Cannot get the interpolated profile Horne extraction to produce the correct normalization for the extracted spectrum
The extracted spectrum has negative normalization (kind of mirroring the gaussian Horne or boxcar extractions). I tried various combinations of parameters, but cannot figure out where it is getting a negative normalization.
Here is the data: "mast:HLSP/jades/dr3/goods-n/spectra/clear-prism/goods-n-mediumhst/hlsp_jades_jwst_nirspec_goods-n-mediumhst-00000804_clear-prism_v1.0_s2d.fits"
Here is a plot of the extraction:
Talked to Hannu and the problem seems to be related to the fact that the 2D spectrum has bands of negative flux (because of the nodding pattern done by NIRSpec). The solution could be to add a new keyword to limit the calculation of the interpolated profile within a certain window of the trace and ignore the rest of the 2D spectrum.