Skip to content

Summary report figures show only experiment 0 #433

Closed

Description

@rozyczko

Problem. The summary report shows these for the last recorded fit:

  • the total goodness of fit, over every fitted dataset;
  • the free-parameter count of that fit;
  • the parameters of every model.

The figures, however, still draw only the first experiment and the first model. With three contrasts fitted jointly, the report gives a pooled χ² for all three but plots one curve and one SLD profile.

This is pre-existing: the figures always used index 0. It is not a regression from PR #432. But a multi-contrast report is now possible, and its figures don't match its numbers.

Where: src/easyreflectometry/summary/summary.py:

  • _measured_series: experimental_data_for_model_at_index(0) and experiment_channels_at_index(0).
  • _model_curve: model_data_for_model_at_index(0, ...).
  • save_sld_plot and _sld_plotly_figure: sld_data_for_model_at_index(0).
  • save_fit_experiment_plot and the interactive reflectivity figure, which build on the two helpers above.

Proposed.

  • Reflectivity figure: one measured series and one calculated curve per experiment, each in its model's color. Polarized experiments keep one series per channel. Optionally stagger the experiments, as the app's Analysis chart does.
  • SLD figure: one profile per model.
  • Which experiments to draw: those in last_fit.inputs when a run is recorded (the report then describes that fit), otherwise every experiment.
  • Static (PDF) and interactive (HTML) paths should share the same series list.

Activity

  1. added
    [scope] bug
    bugfix
    [priority] high
    on Oct 10, 2026
  2. added a commit that references this issue on Oct 26, 2026
  3. added a commit that references this issue on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [priority] high[scope] bugbugfix

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions