Coverage for python/lsst/afw/cameraGeom/cameraFactory.py : 87%
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
|
Detector, DetectorType, Orientation, TransformMap
"makeDetector", "copyDetector"]
"""!Make a Detector instance from a detector config and amp info catalog
@param detectorConfig config for this detector (an lsst.pex.config.Config) @param ampInfoCatalog amplifier information for this detector (an lsst.afw.table.AmpInfoCatalog) @param focalPlaneToField FOCAL_PLANE to FIELD_ANGLE Transform @return detector (an lsst.afw.cameraGeom.Detector) """ detectorConfig.pixelSize_x, detectorConfig.pixelSize_y)
bbox=bbox, orientation=orientation, focalPlaneToField=focalPlaneToField, pixelSizeMm=pixelSizeMm, )
detectorConfig.name, detectorConfig.id, DetectorType(detectorConfig.detectorType), detectorConfig.serial, bbox, ampInfoCatalog, orientation, pixelSizeMm, transforms, ] args.append(crosstalk)
"""!Return a copy of a Detector
@param detector The Detector to clone @param ampInfoCatalog The ampInfoCatalog to use; default use original
N.b. No deep copies are made; the input transformDict is used unmodified """
detector.getSerial(), detector.getBBox(), ampInfoCatalog, detector.getOrientation(), detector.getPixelSize(), transformDict, detector.getCrosstalk())
"""!Make an Orientation instance from a detector config
@param detectorConfig config for this detector (an lsst.pex.config.Config) @return orientation (an lsst.afw.cameraGeom.Orientation) """
"""!Make a dictionary of CameraSys: lsst.afw.geom.Transform from a config dict.
@param transformConfigDict an lsst.pex.config.ConfigDictField from an lsst.afw.geom.Transform registry; keys are camera system names. @return a dict of CameraSys or CameraSysPrefix: lsst.afw.geom.Transform """
pupilFactoryClass=PupilFactory): """!Make a Camera instance from a directory of ampInfo files
The directory must contain one ampInfo fits file for each detector in cameraConfig.detectorList. The name of each ampInfo file must be shortNameFunc(fullDetectorName) + ".fits".
@param[in] cameraConfig an instance of CameraConfig @param[in] ampInfoPath path to ampInfo data files @param[in] shortNameFunc a function that converts a long detector name to a short one @param[in] pupilFactoryClass class to attach to camera; default afw.cameraGeom.PupilFactory @return camera (an lsst.afw.cameraGeom.Camera) """ ampInfoCatDict = dict() for detectorConfig in cameraConfig.detectorList.values(): shortName = shortNameFunc(detectorConfig.name) ampCatPath = os.path.join(ampInfoPath, shortName + ".fits") ampInfoCatalog = AmpInfoCatalog.readFits(ampCatPath) ampInfoCatDict[detectorConfig.name] = ampInfoCatalog
return makeCameraFromCatalogs(cameraConfig, ampInfoCatDict, pupilFactoryClass)
pupilFactoryClass=PupilFactory): """!Construct a Camera instance from a dictionary of detector name: AmpInfoCatalog
@param[in] cameraConfig an instance of CameraConfig @param[in] ampInfoCatDict a dictionary of detector name: AmpInfoCatalog @param[in] pupilFactoryClass class to attach to camera; default afw.cameraGeom.PupilFactory @return camera (an lsst.afw.cameraGeom.Camera) """
detectorConfig=detectorConfig, ampInfoCatalog=ampInfoCatalog, focalPlaneToField=focalPlaneToField, ))
|