Add breakthrough observations to plotter#12912
Conversation
c422174 to
fcedcb5
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12912 +/- ##
==========================================
- Coverage 90.14% 90.11% -0.03%
==========================================
Files 446 447 +1
Lines 30923 30972 +49
==========================================
+ Hits 27875 27910 +35
- Misses 3048 3062 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
fcedcb5 to
a9f3c90
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends the plotter and storage/plot APIs to support plotting breakthrough observations/responses, including surfacing derived responses from /experiments and adjusting axis handling so breakthrough observations can be shown on a time axis.
Changes:
- Expose
derived_responsesin the dark-storage experiment schema/endpoints and consume them inPlotApi. - Update plotter configuration/plotting logic to support flipping response vs observation axes (incl. breakthrough + RFT handling).
- Adjust observations endpoint to emit breakthrough observation “values” as thresholds, and add breakthrough x-axis mapping.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
tests/ert/unit_tests/gui/tools/plot/conftest.py |
Updates mocked /experiments payload to include derived_responses. |
src/ert/gui/tools/plot/plottery/plots/statistics.py |
Renames depth axis logic to flip_response_axis. |
src/ert/gui/tools/plot/plottery/plots/observations.py |
Adds flip_observation_axis path to plot time-uncertainty as xerr. |
src/ert/gui/tools/plot/plottery/plots/ensemble.py |
Uses flip_response_axis instead of depth_y_axis. |
src/ert/gui/tools/plot/plottery/plot_context.py |
Replaces depth_y_axis with flip_response_axis and adds flip_observation_axis. |
src/ert/gui/tools/plot/plottery/plot_config.py |
Introduces flip_response_axis and flip_observation_axis flags. |
src/ert/gui/tools/plot/plot_window.py |
Maps breakthrough selections to plot base summary responses + enables observation axis flipping. |
src/ert/gui/tools/plot/plot_api.py |
Merges responses and derived_responses from /experiments into key definitions. |
src/ert/dark_storage/json_schema/experiment.py |
Adds required derived_responses field to ExperimentOut. |
src/ert/dark_storage/endpoints/responses.py |
Adds breakthrough support in observation x-axis conversion mapping. |
src/ert/dark_storage/endpoints/observations.py |
For breakthrough observations, returns thresholds as “values”. |
src/ert/dark_storage/endpoints/experiments.py |
Populates derived_responses in experiment responses. |
src/ert/config/derived_response_config.py |
Adds filter_on property (default None) to align with ResponseConfig interface. |
677212a to
087a9fa
Compare
This is necessary for generalized logic in the plotter.
Before, both responses and observations were flipped given the depth_y_axis flag. In the future, we wish to seperately flip observations and responses.
05390d3 to
0757138
Compare
bd435ee to
a832db3
Compare
a832db3 to
0e1ab6c
Compare
eivindjahren
left a comment
There was a problem hiding this comment.
Looks good! I only had some small style suggestions for the test.
This amends the derived responses to the response selection widget in the plotter. The breakthrough needs flipped observations to be plotted. The breakthrough derived response is less sensible to plot (this would be a histogram) than to plot the observations on top of the summary key response. Therefore, there is some logic to convert the breakthrough response key to the base summary response key.
We have yet to implement misfit calculations for differences in datetimes.
0e1ab6c to
868dda9
Compare
|
Thanks for the feedback, Eivind! 🎶 |
Issue
Resolves #12826
Fixing the misfit calculation seemed to me like a big job, perhaps a separate issue?
I can disclaim that I got copilot assistance on the snapshot test - as I failed setting it up even after a couple of hours. I've tried to trim it down as much as possible.
git rebase -i main --exec 'just rapid-tests')When applicable