Skip to content

Fitter albedo fix#286

Merged
samaloney merged 11 commits into
sunpy:mainfrom
ianan:fitter_albedo_fix
Jul 17, 2026
Merged

Fitter albedo fix#286
samaloney merged 11 commits into
sunpy:mainfrom
ianan:fitter_albedo_fix

Conversation

@ianan

@ianan ianan commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

PR Description

Fixes #284 by changing the order in which the photon bin widths are applied when including the albedo correction to the photon model and folding it through the SRM to produce a count model. Instead of the photon spectrum being multiplied by the photon bin widths before being folded through the albedo matrix, this now happens to the SRM before being used to convert the photon spectra to counts.

Change implemented by adding photon bin widths to make_model, and if they are included new way of calculating used. All other inputs/output to make_model remain the same.

Also

  • made the albedo component clearer in default plots (now a labelled plum coloured line).
  • the albedo count spectrum is also stored/logged in plotter_info for separate plotting via fitter.plotting_info['spectrum1']['albedo_excess_count'].
  • modified formatting of fit parameters in default plot to better match their scale (needed here or just a nice bonus?)

AI Assistance Disclosure

AI tools were used for:

  • Code generation (e.g., when writing an implementation or fixing a bug)

@jajmitchell
jajmitchell self-requested a review July 17, 2026 07:37

@jajmitchell jajmitchell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@samaloney samaloney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Eh looks good think just needs to be rebased with main to get the doc build to work.

@ianan

ianan commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Eh looks good think just needs to be rebased with main to get the doc build to work.

Is that something I need to do?

@samaloney
samaloney force-pushed the fitter_albedo_fix branch from 6dd8371 to bd9fc78 Compare July 17, 2026 15:02
@samaloney

Copy link
Copy Markdown
Member

@ianan I've rebase this on main so the doc should hopefully build now

@KriSun95 KriSun95 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM too!

@samaloney
samaloney merged commit d2f16ea into sunpy:main Jul 17, 2026
19 checks passed
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.

Albedo issue in legacy fitting?

4 participants