Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonbb committed Mar 19, 2024
1 parent 30ced4c commit da1a2a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions tests/test_butlerstd.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,12 @@ def test_to_layered_image(self):
std = Standardizer.get(DatasetId(8), butler=self.butler)
self.assertIsInstance(std, ButlerStandardizer)

# Get the expected FITS files and extract the MJD from the header
fits = FitsFactory.get_fits(8, spoof_data=True)
hdr = fits["PRIMARY"].header
expected_mjd = Time(hdr["DATE-AVG"]).mjd

# Get list of layered images froom the standardizer
butler_imgs = std.toLayeredImage()
self.assertEqual(1, len(butler_imgs))
img = butler_imgs[0]
Expand All @@ -351,6 +353,7 @@ def test_to_layered_image(self):
np.testing.assert_equal(fits["VARIANCE"].data, img.get_variance().image)
np.testing.assert_equal(fits["MASK"].data, img.get_mask().image)

# Test that we correctly set metadata
self.assertEqual(expected_mjd, img.get_obstime())


Expand Down
6 changes: 3 additions & 3 deletions tests/test_standardizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,11 @@ def test_to_layered_image(self):
std = Standardizer.get(self.fits, force=KBMODV1)
self.assertIsInstance(std, KBMODV1)

# Get the expected MJD from the header
# Get the expected FITS files and extract the MJD from the header
hdr = self.fits["PRIMARY"].header
expected_mjd = Time(hdr["DATE-AVG"], format="isot").mjd

# Get list of layered images froom the standardizer
# Get list of layered images from the standardizer
layered_imgs = std.toLayeredImage()
self.assertEqual(1, len(layered_imgs))
img = layered_imgs[0]
Expand All @@ -361,7 +361,7 @@ def test_to_layered_image(self):
np.testing.assert_equal(self.fits["VARIANCE"].data, img.get_variance().image)
np.testing.assert_equal(self.fits["MASK"].data, img.get_mask().image)

# Test that we correctly get the metadata
# Test that we correctly set metadata
self.assertEqual(expected_mjd, img.get_obstime())


Expand Down

0 comments on commit da1a2a8

Please sign in to comment.