Skip to content

Commit b3bed53

Browse files
committed
updates from review
1 parent 828f91d commit b3bed53

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

jwst/spectral_leak/spectral_leak.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def do_correction(sp_leak_ref, ch1b, ch3a):
1616
Parameters
1717
----------
1818
sp_leak_ref : str
19-
Name of the spectral leak reference file defined by datamodels.MirMrsPtCorrModel
19+
Name of the spectral leak reference file defined by datamodels.MirMrsPtCorrModel.
2020
2121
ch1b : numpy array
2222
Input channel 1 B spectrum
@@ -40,12 +40,13 @@ def do_correction(sp_leak_ref, ch1b, ch3a):
4040

4141
# Spectral leak vector
4242

43-
leak = np.interp(wave3a, 2 * wave1b, spec1b) * np.interp(wave3a, leak_wave, leak_percent)
4443
# Factor of 2 in 2*wavelb is necessary because we're dealing with second order light.
4544
# Without this the interpolation simply uses the last point in the spectrum, which is close
4645
# enough to correct as won't be noticeable for BAND spectra, but for CH spectra can be
4746
# quite different.
4847

48+
leak = np.interp(wave3a, 2 * wave1b, spec1b) * np.interp(wave3a, leak_wave, leak_percent)
49+
4950
# Correct the data
5051
spec3a_corr = spec3a - leak
5152

jwst/spectral_leak/spectral_leak_step.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def process(self, input_data):
3434
Returns
3535
-------
3636
JWST DataModel
37-
The corrected data model. This will be the input_model if the step is skipped,
37+
The corrected data model. This will be the input model if the step is skipped,
3838
otherwise it will be a corrected 1D extracted spectrum that contains
3939
the MRS channel 3B range.
4040
"""

0 commit comments

Comments
 (0)