Skip to content

Commit

Permalink
Revert behaviour log scale plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
sondreso committed Jul 6, 2020
1 parent d0ec5a9 commit 69cd513
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
5 changes: 4 additions & 1 deletion ert_gui/tools/plot/plot_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def all_data_type_keys(self):
the key"""

all_keys = self._facade.all_data_type_keys()
log_keys = [k[6:] for k in all_keys if k.startswith("LOG10_")]
log_keys = [k for k in all_keys if k.startswith("LOG10_")]

return [{"key": key,
"index_type": self._key_index_type(key),
Expand Down Expand Up @@ -51,6 +51,9 @@ def data_for_key(self, case, key):
""" Returns a pandas DataFrame with the datapoints for a given key for a given case. The row index is
the realization number, and the columns are an index over the indexes/dates"""

if key.startswith("LOG10_"):
key = key[6:]

if self._facade.is_summary_key(key):
data = self._facade.gather_summary_data(case, key).T
elif self._facade.is_gen_kw_key(key):
Expand Down
11 changes: 4 additions & 7 deletions ert_shared/storage/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ def obs_for_response(ref_url):
for resp in ens_schema["responses"]
]

log_keys = {
param["group"][6:] + param["key"]
for param in ens_schema["parameters"]
if param["group"].startswith("LOG10_")
}

result.extend(
[
{
Expand All @@ -105,7 +99,7 @@ def obs_for_response(ref_url):
"has_refcase": False,
"dimensionality": 1,
"metadata": {"data_origin": "Parameter"},
"log_scale": (param["group"] + param["key"]) in log_keys,
"log_scale": param["group"].startswith("LOG10_"),
}
for param in ens_schema["parameters"]
]
Expand Down Expand Up @@ -140,6 +134,9 @@ def data_for_key(self, case, key):
""" Returns a pandas DataFrame with the datapoints for a given key for a given case. The row index is
the realization number, and the column index is a multi-index with (key, index/date)"""

if key.startswith("LOG10_"):
key = key[6:]

ensembles = ref_request("{base}/ensembles".format(base=self._BASE_URI))

ens = [ens for ens in ensembles["ensembles"] if ens["name"] == case][0]
Expand Down

0 comments on commit 69cd513

Please sign in to comment.