Skip to content

Add breakthrough observations to plotter#12912

Merged
SAKavli merged 4 commits intoequinor:mainfrom
SAKavli:create-breakthrough-plotter
Feb 25, 2026
Merged

Add breakthrough observations to plotter#12912
SAKavli merged 4 commits intoequinor:mainfrom
SAKavli:create-breakthrough-plotter

Conversation

@SAKavli
Copy link
Copy Markdown
Contributor

@SAKavli SAKavli commented Feb 17, 2026

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.

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'just rapid-tests')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Add backport label to latest release (format: 'backport release-branch-name')

@SAKavli SAKavli force-pushed the create-breakthrough-plotter branch 5 times, most recently from c422174 to fcedcb5 Compare February 18, 2026 08:56
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 92.68293% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.11%. Comparing base (44665de) to head (868dda9).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/ert/gui/tools/plot/plottery/plot_context.py 81.81% 2 Missing ⚠️
src/ert/dark_storage/endpoints/observations.py 66.66% 1 Missing ⚠️
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     
Flag Coverage Δ
cli-tests 36.75% <4.87%> (-0.04%) ⬇️
gui-tests 67.44% <85.36%> (+0.18%) ⬆️
performance-and-unit-tests 76.77% <58.53%> (-0.01%) ⬇️
test 45.92% <36.58%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_responses in the dark-storage experiment schema/endpoints and consume them in PlotApi.
  • 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.

Comment thread src/ert/gui/tools/plot/plottery/plots/observations.py
Comment thread src/ert/dark_storage/endpoints/observations.py Outdated
Comment thread src/ert/gui/tools/plot/plot_window.py Outdated
Comment thread src/ert/gui/tools/plot/plot_api.py
Comment thread src/ert/gui/tools/plot/plottery/plot_config.py
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Feb 18, 2026

Merging this PR will not alter performance

✅ 35 untouched benchmarks


Comparing SAKavli:create-breakthrough-plotter (868dda9) with main (a64ca23)

Open in CodSpeed

@SAKavli SAKavli force-pushed the create-breakthrough-plotter branch 3 times, most recently from 677212a to 087a9fa Compare February 24, 2026 12:13
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.
@SAKavli SAKavli force-pushed the create-breakthrough-plotter branch 3 times, most recently from 05390d3 to 0757138 Compare February 24, 2026 14:20
@SAKavli SAKavli added the release-notes:new-feature Automatically categorise as new feature in release notes label Feb 24, 2026
@SAKavli SAKavli force-pushed the create-breakthrough-plotter branch 2 times, most recently from bd435ee to a832db3 Compare February 24, 2026 15:24
@SAKavli SAKavli marked this pull request as ready for review February 24, 2026 15:25
@SAKavli SAKavli force-pushed the create-breakthrough-plotter branch from a832db3 to 0e1ab6c Compare February 24, 2026 15:28
Comment thread tests/ert/ui_tests/gui/test_breakthrough_visualization.py Outdated
Comment thread tests/ert/ui_tests/gui/test_breakthrough_visualization.py Outdated
Comment thread tests/ert/ui_tests/gui/test_breakthrough_visualization.py Outdated
Copy link
Copy Markdown
Contributor

@eivindjahren eivindjahren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@SAKavli SAKavli force-pushed the create-breakthrough-plotter branch from 0e1ab6c to 868dda9 Compare February 25, 2026 08:21
@SAKavli
Copy link
Copy Markdown
Contributor Author

SAKavli commented Feb 25, 2026

Thanks for the feedback, Eivind! 🎶

@SAKavli SAKavli merged commit f684095 into equinor:main Feb 25, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes:new-feature Automatically categorise as new feature in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Visualize breakthrough observations and responses in plotter

4 participants