PAHFIT / pahfit

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

Fix nirspec resolution #236

Closed jdtsmith closed 1 year ago

jdtsmith commented 1 year ago

NISPEC polynomial fits to resolution had implicit 'domain' set from numpy.polynomial.Polynomial. The domain was not saved, so evaluating the polynomial led to differet results. All segments were re-fit with default ([-1,1]) domain, except for prism, which did not converge without wavelength rescaling due to unusual shape. Direct support of domain was added.

Please check against published resolution results. Closes #235.

drvdputt commented 1 year ago

Did a quick test at a couple of wavelengths, for each nirspec high-resolution segment. All the returned resolution values are reasonable now, when compared to the plots on the webpage that I linked in the issue.

jdtsmith commented 1 year ago

Thanks. I realized with the convert method I could fit with auto-domain then convert to domain-less, so I could remove that complexity. Mind taking another quick peek?

image

drvdputt commented 1 year ago

I also checked the medium resolution just to be sure. It all seems correct now.