Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joint/Multi-Fit in the Model<->Fitter paradigm #291

Open
jdtsmith opened this issue May 14, 2024 · 1 comment
Open

Joint/Multi-Fit in the Model<->Fitter paradigm #291

jdtsmith opened this issue May 14, 2024 · 1 comment

Comments

@jdtsmith
Copy link
Contributor

Let's discuss here the logic of how multi-segment fitting can/will go, now that we have abstracted out Fitter and its spoon-feeding parent Model.

@jdtsmith
Copy link
Contributor Author

  • A list of Spectrum1Ds becomes a valid fittable.
  • A jointly fitted feature (line, practically) can apply to more than one segment. Model decides which segments, just as it decides which lines to "cull" (i.e. no segments).
  • If a list of spectra is given for fit, Model first checks if the fitter has the JointFit capability, raises PAHFITCapabilityError if not.
  • If so, Fitter.fit (and others) will have to accept a list of numpy arrays for its wavelength argument.
  • Model informs Fitter of the joint fit via a special keyword to add_feature_line (etc., should we choose to do this for other feature kinds) — e.g. segments — which provides a tuple of segment indices (often, just one) to which this feature applies.
  • In this scenario, if the user has hard-coded line fwhm into the table (or tied it to another parameter), an error is thrown — a joint fit makes no sense except when the instrument pack is controlling.
  • Fitter does what it needs to do to arrange for a joint fit for that feature. When it is queried for the fit results for that feature, it must return a single best-fit value for power. The value return for fwhm is ignored (and probably shouldn't actually be returned unless it was actually fit, i.e. not in this scenario).

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

No branches or pull requests

1 participant