Skip to content

Commit

Permalink
Changed sim path default value to share/results/maps
Browse files Browse the repository at this point in the history
  • Loading branch information
rnyb committed Dec 17, 2021
1 parent 3275a14 commit 11f69bd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED] - YYYY-MM-DD

### Fixed

- https://github.com/equinor/webviz-subsurface/pull/888 - Improved `SeismicMisfit` performance when using polygon files with a large number of polygons.

### Added

- [#867](https://github.com/equinor/webviz-subsurface/pull/867) - Added new `SimulationTimeSeries` plugin, with code structure according to best practice plugin example `webviz-plugin-boilerplate` and usage of `EnsembleSummaryProvider`. New functionality as multiple Delta Ensembles in same plot, selectable resampling frequency and possibility to group subplots per selected ensemble or per selected vector.
Expand Down
19 changes: 6 additions & 13 deletions webviz_subsurface/plugins/_seismic_misfit.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import logging
import math
import re
import time
from pathlib import Path
from typing import Any, Callable, Dict, List, Optional, Tuple, Union

Expand Down Expand Up @@ -162,7 +161,7 @@ def __init__(
webviz_settings: WebvizSettings,
ensembles: List[str],
attributes: List[str],
attribute_sim_path: str = "sim2seis/output/4d_attribute_maps/",
attribute_sim_path: str = "share/results/maps/",
attribute_obs_path: str = "../../share/observations/seismic/",
obs_mult: float = 1.0,
sim_mult: float = 1.0,
Expand Down Expand Up @@ -2057,7 +2056,6 @@ def update_misfit_plot(

# max_diff = find_max_diff(df)
max_diff = None
min_diff = None
figures = []

for ens_name, ensdf in df.groupby("ENSEMBLE"):
Expand Down Expand Up @@ -2091,11 +2089,9 @@ def update_misfit_plot(
to_replace=r"^real-", value="", regex=True
)

# --- calculate max/min from first ensemble, use with color range ---
# --- calculate max from first ensemble, use with color range ---
if max_diff is None:
max_diff = ensdf_diff_sum["ABSDIFF"].max()
if min_diff is None:
min_diff = ensdf_diff_sum["ABSDIFF"].min()

mean_diff = ensdf_diff_sum["ABSDIFF"].mean()

Expand All @@ -2110,9 +2106,9 @@ def update_misfit_plot(
x="REAL",
y="ABSDIFF",
title=ens_name,
range_y=[min_diff * 0.0, max_diff * 1.05],
range_y=[0, max_diff * 1.05],
color="ABSDIFF",
range_color=[min_diff * 0.0, max_diff * 1.00],
range_color=[0, max_diff],
color_continuous_scale=px.colors.sequential.amp,
hover_data={"ABSDIFF": ":,.3r"},
)
Expand Down Expand Up @@ -2265,7 +2261,7 @@ def update_obsdata_map(
y=polydf["Y_UTMN"],
mode="lines",
line_color="RoyalBlue",
name="pol" + str(poly_id),
name=f"pol{poly_id}",
showlegend=False,
hoverinfo="name",
),
Expand Down Expand Up @@ -2303,8 +2299,6 @@ def update_obs_sim_map_plot(
"""Plot seismic obsdata, simdata and diffdata; side by side map view plots.
Takes dataframe with obsdata, metadata and simdata as input"""

# start_time = time.time()

logging.debug(f"Seismic obs vs sim map plot, updating {ens_name}")

ensdf = df[df.ENSEMBLE.eq(ens_name)]
Expand Down Expand Up @@ -2524,7 +2518,7 @@ def update_obs_sim_map_plot(
y=polydf["Y_UTMN"],
mode="lines",
line_color="RoyalBlue",
name="pol" + str(poly_id),
name=f"pol{poly_id}",
showlegend=False,
hoverinfo="name",
),
Expand Down Expand Up @@ -2673,7 +2667,6 @@ def update_obs_sim_map_plot(
) # don't update user selected y-ranges during callbacks

return fig, fig_slice_reals
# print("---", time.time() - start_time)

return fig, None

Expand Down

0 comments on commit 11f69bd

Please sign in to comment.