Skip to content

Shade excluded phase-space region in LineRatioPlot when fit limits are used #237

Description

@mpound

Follow-up to #236 (phase-space limiting in LineRatioFit.run).

The radiation_field_range / density_range keywords added in #236 restrict the fit, but the plotting layer does not yet indicate the restricted region. Specifically:

  • LineRatioFit.chisq(min=False) / reduced_chisq(min=False) still return the full, unmasked chi-squared surface (this is intentional — the excluded region is masked only on local copies during the coarse argmin, so the stored cubes are untouched).
  • As a result, LineRatioPlot renders the entire phase space, with the best-fit marker sitting inside the restricted window and no visual cue about what was excluded.

Proposed enhancement

When phase-space limits were used in the fit, have the phase-space / chi-squared plots (LineRatioPlot) shade or grey out the excluded G0/n region (or draw the allowed-window boundary), so it is visually clear which part of parameter space was ruled out by the limits versus by the data.

Notes / open questions

  • The limits are stored on the tool as LineRatioFit._radiation_field_range and LineRatioFit._density_range (linear model units, None = unrestricted), so the plot layer can read them directly.
  • Decide whether the default should be to shade automatically whenever limits were applied, or to gate it behind a plot keyword.
  • Keep the returned chi-squared cubes unmasked (do not change the fit-side behavior); this is purely a visualization concern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions