spacetelescope / jwst

Python library for science observations from the James Webb Space Telescope
https://jwst-pipeline.readthedocs.io/en/latest/
Other
558 stars 164 forks source link

MRS 1d residual fringe correction can fail due to bright emission lines #8655

Open stscijgbot-jp opened 2 months ago

stscijgbot-jp commented 2 months ago

Issue JP-3692 was created on JIRA by David Law:

The MRS 1d residual fringe algorithm seems to have a failure case when one or two bright emission lines in a spectrum confuse the fringe finding routine.

Attached plot illustrates that there is only marginal difference between the regular (blue) and defringed  (orange) spectra. 

PR in progress that may fix this, but needs to be tested more extensively first.

m-samland commented 1 month ago

Would it be possible to include an ignore_region_min and ignore_region_max argument, similar to the residual fringe step in spec2 that zeroes out the relevant weights?

I'm not sure if the problem is that the 1D correction isn't actually a "step" at the moment with it's own parameters.

I am currently working on a target with bright emission lines in my data and this actually seems to negatively affect the efficacy of the fringe correction. Since I already exclude them in the spec2 residual fringe step, I would like to use the same exclusion for the spec3 extract1d step, if possible.