Skip to content

Commit

Permalink
Add hscPupilFactory test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmeyers314 committed Apr 13, 2017
1 parent 6e798a6 commit 0db3425
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/testRepository.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,22 @@ def testRaw(self):
self.assertAlmostEqual(weather.getAirPressure(), self.weath_airPressure)
self.assertAlmostEqual(weather.getHumidity(), self.weath_humidity)

def testPupil(self):
"""Test retrieval of pupil (without checking value)"""
raw = self.butler.get("raw", visit=self.visit, ccd=self.ccdNum)
visitInfo = raw.getInfo().getVisitInfo()
camera = self.butler.get("camera", visit=self.visit, ccd=self.ccdNum)
size = 16.4
npix = 1024

pupilFactory = camera.getPupilFactory(visitInfo, size, npix)
self.assertIsInstance(pupilFactory, lsst.obs.hsc.hscPupil.HscPupilFactory)

pupil = pupilFactory.getPupil(afwGeom.Point2D(0.0, 0.0))
self.assertEqual(pupil.size, size)
self.assertEqual(pupil.scale, size/npix)
self.assertEqual(pupil.illuminated.shape, (npix, npix))

def testRawMetadata(self):
"""Test retrieval of raw image metadata"""
md = self.butler.get("raw_md", visit=self.visit, ccd=self.ccdNum)
Expand Down

0 comments on commit 0db3425

Please sign in to comment.