Coverage for tests/test_makePixelToTanPixel.py : 97%
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
|
# # LSST Data Management System # Copyright 2014 LSST Corporation. # # This product includes software developed by the # LSST Project (http://www.lsst.org/). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the LSST License Statement and # the GNU General Public License along with this program. If not, # see <http://www.lsstcorp.org/LegalNotices/>. # Tests for lsst.afw.cameraGeom.Detector """
"""Test a trivial curved focal plane with square pixels
The CCD's lower left pixel is centered on the boresight pupil center = focal plane center CCD x is along focal plane x """ lsst.geom.Extent2I(1000, 1000)) # focal-plane position of ref position on detector (mm) # ref position on detector (pos of lower left corner) fpPosition, refPoint, yaw, ) plateScale, lsst.geom.arcseconds).asRadians() (0.0, plateScaleRad, 0.0, 0.001 * plateScaleRad))
bbox=bbox, orientation=orientation, focalPlaneToField=focalPlaneToField, pixelSizeMm=pixelSizeMm, )
# field center should be pixel position 0, 0 and tan pixel position 0, # 0
# build same camera geometry transforms without optical distortion (0.0, plateScaleRad))
# pix to tan pix should be radial math.atan2(pixPos[1], pixPos[0]), math.atan2(tanPixPos[1], tanPixPos[0]), )
# for a given field angle (which, together with a pointing, gives a position on the sky): # - field angle to pixels gives pixPos # - undistorted field anle to pixels gives tanPixPos fieldPos)
"""Test a curved focal plane (with rectangular pixels) """ lsst.geom.Extent2I(1000, 1000)) # focal-plane position of ref position on detector (mm) # ref position on detector (pos of lower left corner) fpPosition, refPoint, yaw, ) plateScale, lsst.geom.arcseconds).asRadians() (0.0, plateScaleRad, 0.0, 0.001 * plateScaleRad))
bbox=bbox, orientation=orientation, focalPlaneToField=focalPlaneToField, pixelSizeMm=pixelSizeMm, )
# the center point of the field angle frame should not move
# build same camera geometry transforms without optical distortion (0.0, plateScaleRad))
# for a given field angle (which, together with a pointing, gives a position on the sky): # - field angle to pixels gives pixPos # - undistorted field angle to pixels gives tanPixPos fieldPos) # use a degraded accuracy because small Jacobian errors accumulate this far from the center
"""Test an undistorted focal plane (with rectangular pixels) """ lsst.geom.Extent2I(1000, 1000)) # focal-plane position of ref position on detector (mm) # ref position on detector (pos of lower left corner) fpPosition, refPoint, yaw, ) plateScale, lsst.geom.arcseconds).asRadians()
bbox=bbox, orientation=orientation, focalPlaneToField=focalPlaneToField, pixelSizeMm=pixelSizeMm, )
# with no distortion, this should be a unity transform lsst.geom.Point2D(0, 0), lsst.geom.Point2D(1000, 2000), lsst.geom.Point2D(-100.5, 27.23), ):
lsst.utils.tests.init() unittest.main() |