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

Changing how spectra are interpolated for smoothing with JWST/NIRSpec PRISM LSF #302

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

themiyan
Copy link

Attempts to fix an spectral interpolation issue when fitting lower resolution spectra JWST/NIRSpec PRISM spectra + photometry as noted in #298. Changed how the FSPS spectra are interpolated to the user supplied spectrum's wavelength grid. Changing numpy to Spectres package utilising numba seems to not have a significant effect on the run time.

@karlglazebrook
Copy link

yes, for low res data (e.g. NIRSPEC prism) the use ofnp.interp in the prospector code for the resampling step causes serious problems. This kind of linear interpolation really does not work in going from high-res models with lots of fine lines to low res NIRSPEC prism data.

As @themiyan mentioned when in our fitting we changed to spectres.spectres for this (one line change), which does binning up correctly by integrating pixels, that completely solved all our issues with fitting (including unrealistically small errors and poor chi^2 on the best fit).

This will affect anyone using Prospector to fit NIRSPEC PRISM spectra, (UNCOVER etc.) so it is probably worth informing people of this issue if you know they are working on this.

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.

2 participants