Coverage for tests/testPhoSimPositions.py : 95%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" This test suite will verify that the CatSim and PhoSim camera models are in agreement by taking the chip and pixel positions found by PhoSim and verifying that CatSim predicts similar positions. """
def setUpClass(cls): 'tests', 'LSST_focal_plane_data', 'source_position_catalog.txt')
('rotSkyPos', float), ('objRA', float), ('objDec', float), ('chipName', str, 6), ('xpix', float), ('ypix', float)])
def tearDownClass(cls):
""" Simply verify that CatSim puts the sources on the right chip """ pointingDec=self.data['pointingDec'][ix], rotSkyPos=self.data['rotSkyPos'][ix], mjd=59580.0)
self.data['objDec'][ix], obs_metadata=obs)
self.data['chipName'][ix])
""" Test that CatSim pixel positions are close to PhoSim pixel positions.
This is complicated by the fact that PhoSim uses the camera team definition of pixel space, which differs from the DM definition of pixel space as follows:
Camera +y = DM +x Camera +x = DM -y Camera +z = DM +z
This has been verified both by consulting documentation -- the documentation for afwCameraGeom says that +x is along the serial readout direction; LCA-13381 indicates that, in the Camera team's definition, the serial readout is along +y -- and phenomenologically by comparing the relationship between pixelCoordsFromPupilCoords() to visual inspection of PhoSim-generated FITS images. """
corner_pixels[2][0] + corner_pixels[3][0])
corner_pixels[2][1] + corner_pixels[3][1])
pointingDec=self.data['pointingDec'][ix], rotSkyPos=self.data['rotSkyPos'][ix], mjd=59580.0)
self.data['objDec'][ix], obs_metadata=obs)
self.data['objDec'][ix], obs_metadata=obs, epoch=2000.0)
# find displacement from center of DM coordinates of the # objects as placed by PhoSim
# displacement from center of DM coordinates as calculated # by DM
(d_y_dm - d_y_phosim)**2)
# demand that the difference between the two displacements is less # than 0.05 of the total displacement from the center of the object # as calculated by DM
lsst.utils.tests.init() unittest.main() |