Skip to content

Commit

Permalink
test code for instcat satellite streaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jchiang87 committed Jul 29, 2024
1 parent b906cde commit 7225c25
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_instcat_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,19 @@ def test_radec_clarification(self):
]
)

def test_satellite_streaks(self):
"""Test satellite streak modeling."""
cat_file = os.path.join(self.data_dir, "satellite_streak.txt")
sed_dir = os.path.join(self.data_dir, 'test_sed_library')
det_name = "R22_S11"
wcs = self.make_wcs(instcat_file=cat_file,
sensors=[det_name])[det_name]
cat = imsim.InstCatalog(cat_file, wcs, sed_dir=sed_dir)
self.assertEqual(cat.getNObjects(), 1)
self.assertTrue((cat.objinfo == np.array(['streak', '600', '1e-6', '0'])).all())
obj = cat.getObj(0)
self.assertTrue(isinstance(obj.original.original, galsim.Box))


if __name__ == '__main__':
unittest.main()

0 comments on commit 7225c25

Please sign in to comment.