Skip to content

Commit

Permalink
update tests and test data to account for bandpass handling changes a…
Browse files Browse the repository at this point in the history
…nd updated effective aperture diameter
  • Loading branch information
jchiang87 committed May 13, 2024
1 parent 10c1228 commit 48a4f72
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/data/reference_sky_levels.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"u": 966.8740383242452, "g": 9565.16844049534, "r": 20335.64330578381, "i": 39770.05348346839, "z": 66820.68250072759, "y": 62387.30799288845}
{"u": 1769.5583744933522, "g": 12497.156387235353, "r": 25110.19597937431, "i": 44332.949518546884, "z": 70823.00493285632, "y": 59993.94756134916}
4 changes: 2 additions & 2 deletions tests/sky_level_reference_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import imsim


RUBIN_AREA = 0.25 * np.pi * 649**2 # cm^2
RUBIN_AREA = 0.25 * np.pi * 642.3**2 # cm^2

ra = 54.9348753510528
dec = -35.8385705255579
Expand All @@ -24,7 +24,7 @@

sky_levels = {}
for band in 'ugrizy':
bandpass = imsim.RubinBandpass(band)
bandpass = imsim.RubinBandpass(band, camera='LsstCam', det_name='R22_S11').bp_hardware
wave, spec = sky_model.return_wave_spec()
lut = galsim.LookupTable(wave, spec[0])
sed = galsim.SED(lut, wave_type='nm', flux_type='flambda')
Expand Down
4 changes: 2 additions & 2 deletions tests/test_sky_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_sky_model():
expected_sky_levels = json.load(fobj)

for band in 'ugrizy':
bandpass = RubinBandpass(band)
bandpass = RubinBandpass(band, camera='LsstCam', det_name='R22_S11')
sky_model = SkyModel(exptime, mjd, bandpass)
sky_level = sky_model.get_sky_level(skyCoord)
np.testing.assert_approx_equal(sky_level, expected_sky_levels[band],
Expand All @@ -41,7 +41,7 @@ def test_sky_model():
# presumably innocuous reasons (makes a difference ~part per 10000).
# Test still passes at significant=3.
for band in 'ugrizy':
bandpass = RubinBandpass(band, airmass=1.2)
bandpass = RubinBandpass(band, airmass=1.2, camera='LsstCam', det_name='R22_S11')
sky_model = SkyModel(exptime, mjd, bandpass)
sky_level = sky_model.get_sky_level(skyCoord)
np.testing.assert_approx_equal(sky_level, expected_sky_levels[band],
Expand Down

0 comments on commit 48a4f72

Please sign in to comment.