def getObsKeys(self, data_key): ensemble_data_fetcher = EnsembleDataFetcher(self.ert()) block_observation_data_fetcher = BlockObservationDataFetcher(self.ert()) gen_data_observation_data_fetcher = ObservationGenDataFetcher(self.ert()) if ensemble_data_fetcher.supportsKey(data_key): return self.ert().ensembleConfig().getNode(data_key).getObservationKeys() elif block_observation_data_fetcher.supportsKey(data_key): return [data_key] elif gen_data_observation_data_fetcher.supportsKey(data_key): return gen_data_observation_data_fetcher.getAllObsKeysForKey(data_key)
def fetchSummaryData(self, observation_data_fetcher, key, cases): plot_data = PlotData(key) histogram_factory = HistogramPlotDataFactory(key) refcase_fetcher = RefcaseDataFetcher(self.ert()) self.addObservationData(plot_data, key, observation_data_fetcher, histogram_factory) self.addRefcaseData(plot_data, key, refcase_fetcher, histogram_factory) self.addEnsembleData(plot_data, key, cases, EnsembleDataFetcher(self.ert()), histogram_factory) self.addPcaData(plot_data, key, cases) if refcase_fetcher.hasRefcase(): unit = refcase_fetcher.getRefCase().unit(key) if unit != "": plot_data.setUnitY(unit) plot_data.setHistogramFactory(histogram_factory) return plot_data
def fetchSupportedKeys(self): summary_keys = EnsembleDataFetcher(self.ert()).getSupportedKeys() keys = [] for key in summary_keys: obs_keys = self.ert().ensembleConfig().getNode(key).getObservationKeys() if len(obs_keys) > 0: keys.append(key) keys += BlockObservationDataFetcher(self.ert()).getSupportedKeys() keys += ObservationGenDataFetcher(self.ert()).getSupportedKeys() return keys