Skip to content

Commit

Permalink
fix the test2
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Dec 2, 2024
1 parent 1e97f6a commit fba5fa8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion py/desispec/test/test_flux_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def test_apply_fluxcalibration(self):
ivar = np.random.uniform(0.9, 1.1, size=flux.shape)
origframe = Frame(wave, flux.copy(), ivar.copy(), spectrograph=0)

# define fluxcalib object
# efine fluxcalib object
calib = np.random.uniform(.5, 1.5, size=origframe.flux.shape)
mask = np.zeros(origframe.flux.shape, dtype=np.uint32)

Expand All @@ -157,6 +157,7 @@ def test_apply_fluxcalibration(self):
# calibration vector
fc = FluxCalib(origframe.wave, calib, ivar, mask)
frame = copy.deepcopy(origframe)
frame.ivar = ivar_big
apply_flux_calibration(frame, fc)
self.assertTrue(np.allclose(frame.flux**2 * frame.ivar,
calib**2 * ivar))
Expand Down

0 comments on commit fba5fa8

Please sign in to comment.