Skip to content

Seismic misfit map - #14328

Draft
akustn wants to merge 9 commits into
equinor:mainfrom
akustn:seismic-misfit-map
Draft

Seismic misfit map#14328
akustn wants to merge 9 commits into
equinor:mainfrom
akustn:seismic-misfit-map

Conversation

@akustn

@akustn akustn commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Issue
Resolves #my_issue

Approach
Short description of the approach

(Screenshot of new behavior in GUI if applicable)

  • 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 screenshots are changed: Review screenshot-PR in ert-testdata,
    merge screenshot-PR in ert-testdata before merging this PR.
  • 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')

@codecov-commenter

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
86 1 85 0
View the top 1 failed test(s) by shortest run time
tests/ert/ui_tests/gui/test_main_window.py::test_that_the_plot_window_contains_the_expected_elements
Stack Traces | 13.9s run time
esmda_has_run = <ert.gui.main_window.ErtMainWindow object at 0x7f387cf0d3b0>
qtbot = <pytestqt.qtbot.QtBot object at 0x7f3885c359d0>

    @pytest.mark.skip_mac_ci
    def test_that_the_plot_window_contains_the_expected_elements(
        esmda_has_run: ErtMainWindow, qtbot
    ):
        gui = esmda_has_run
        open_storage(gui.ert_config.ens_path, mode="r")
        with ErtServerController.init_service(
            project=Path(gui.ert_config.ens_path).absolute(),
        ):
            expected_ensembles = [
                "es_mda : iter-0",
                "es_mda : iter-1",
                "es_mda : iter-2",
                "es_mda : iter-3",
            ]
    
            # Click on Create plot after esmda has run
            button_plot_tool = gui.findChild(QToolButton, "button_Create_plot")
            assert button_plot_tool
            qtbot.mouseClick(button_plot_tool, Qt.MouseButton.LeftButton)
            plot_window = wait_for_child(gui, qtbot, PlotWindow)
    
            data_types = get_child(plot_window, DataTypeKeysWidget)
            case_selection = get_child(
                plot_window, EnsembleSelectListWidget, "ensemble_selector"
            )
            general_options = get_child(plot_window, CollapsibleSection, "general_options")
            for checkbox_name in (
                "legend_checkbox",
                "grid_checkbox",
                "history_checkbox",
                "observations_checkbox",
                "log_scale_checkbox",
            ):
                assert get_child(general_options, QCheckBox, checkbox_name)
    
            # Assert that the Case selection widget contains the expected ensembles
            ensemble_names = [
                case_selection.item(index).text() for index in range(case_selection.count())
            ]
    
            assert sorted(ensemble_names) == expected_ensembles
    
            data_names = []
            data_keys = data_types.data_type_keys_widget
            for i in range(data_keys.model().rowCount()):
                index = data_keys.model().index(i, 0)
                data_names.append(str(index.data(Qt.ItemDataRole.DisplayRole)))
    
            expected_data_names = [
                "POLY_RES@0",
                "COEFFS:a",
                "COEFFS:b",
                "COEFFS:c",
            ]
            expected_data_names.sort()
            data_names.sort()
            assert expected_data_names == data_names
    
>           assert {
                plot_window._central_tab.tabText(i)
                for i in range(plot_window._central_tab.count())
            } == {
                "Cross ensemble statistics",
                "Distribution",
                "Gaussian KDE",
                "Ensemble",
                "Histogram",
                "Statistics",
                "Std dev",
                "Misfits",
            }
E           AssertionError: assert {'Cross ensem...fit map', ...} == {'Cross ensem...Misfits', ...}
E             
E             Extra items in the left set:
E             'Misfit map'
E             'Observations map'
E             
E             Full diff:
E               {
E                   'Cross ensemble statistics',
E                   'Distribution',
E                   'Ensemble',
E                   'Gaussian KDE',
E                   'Histogram',
E             +     'Misfit map',
E                   'Misfits',
E             +     'Observations map',
E                   'Statistics',
E                   'Std dev',
E               }

.../ui_tests/gui/test_main_window.py:347: AssertionError
----------------------------- Captured Qt messages -----------------------------
QtWarningMsg: This plugin does not support propagateSizeHints()

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@ertomatic

Copy link
Copy Markdown
Collaborator

Screenshots differ from baselines. A baseline update PR has been prepared: equinor/ert-testdata#107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants