computeHolePositions

lsst.cbp.computeHolePositions(detectorNames, detectorPositions, cameraGeom, cbpFlipX, cbpFocalLength)

Compute hole positions for a CBP mask.

Given the desired locations of one or more spots on each detector, and assuming the telescope and CBP are pointing directly at each other, compute hole positions for a CBP mask.

Parameters:
detectorNames : iterable of str, or None,

List of detector names; if None, use all detectors in cameraGeom, sorted by name.

detectorPositions : iterable of pair of float

Detector x, y positions (pixels). Note that the center of a 1000x1000 pixel detector is (499.5, 499.5)

cameraGeom : lsst.afw.cameraGeom.Camera

Camera geometry.

cbpFlipX : bool

Is the CBP focal plane flipped?

Returns:
holePositions : list of tuple of pair of float

CBP mask x, y hole positions mm.

Notes

This code assumes that all detectors have approximately the same dimensions and orientation. This restriction should suffice for LSST because the two kinds of CCDs it uses have very similar dimensions. However, it will not do for HSC because that has very rectangular CCDs and some are 90 degrees from the others.