PAHFIT / pahfit

Model Decomposition for Near- to Mid-Infrared Spectroscopy of Astronomical Sources
https://pahfit.readthedocs.io/
18 stars 26 forks source link

Gaussian1D line FWHM far too large #174

Open jdtsmith opened 2 years ago

jdtsmith commented 2 years ago

In the nominal science pack, the lines have an incredibly wide 2x (below, above) latitude in FWHM. This is far much, and does not match the IDL PAHFIT, where a 10% range was allowed. This leads to absurdly narrow lines which the fitter "prefers" (since it goes perfectly "through" a couple points). Example (notice ArII, H2 S(1), SiII):

2x FWHM constraints: IMG_3300

10% FWHM constraints IMG_2005 straints:

FWHM for unresolved lines should be the purview of the instrument pack, not the sci-pack. We could add a "sigma_v" dispersion term that is allowed to be convolved with the Gaussian LSF specified in the sci-pack. But that's for another day. Right now I have re-hard-coded 10% constraints in the model reader, which works. But a better fix will involve the sci/inst-pack separation. Will submit workaround PR unless there are objections.

karllark commented 2 years ago

You can just update the scipack min/max values. A bit tedious for sure. But it is possible and would avoid having to hard-code this.

karllark commented 2 years ago

Definitely a better fit with the tighter constraints.

jdtsmith commented 2 years ago

This should all be replaced soon by a proper scipack + instpack generator (which Thomas and I just discussed in depth).

karllark commented 2 years ago

Fully agree. Just thinking if you are looking for a "quick fix", you could just update the scipack file.

jdtsmith commented 2 years ago

It's even quicker; see #177 :).