Skip to content

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

Open
themiyan wants to merge 5 commits intobd-j:mainfrom
themiyan:spectra_interpolate
Open

Changing how spectra are interpolated for smoothing with JWST/NIRSpec PRISM LSF#302
themiyan wants to merge 5 commits intobd-j:mainfrom
themiyan:spectra_interpolate

Conversation

@themiyan
Copy link
Copy Markdown

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
Copy Markdown

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