CameraModel

class lsst.jointcal.cameraGeometry.CameraModel(wcsList, detectors, camera, n=100)

Bases: object

Convert a jointcal SkyWcs into a distortion model and detector positions (TODO) that can be used by cameraGeom.

Because this code only operates on the WCS, it is independent of the format of the persisted output (e.g. gen2 separate files vs. gen3 bundled visits).

Parameters:
wcsListlist [lsst.afw.geom.SkyWcs]

The WCS to use to compute the distortion model from, preferably from multiple visits on the same tract.

detectorslist [int]

Detector ids that correspond one-to-one with wcsList.

cameralsst.afw.cameraGeom.Camera

The camera these WCS were fit for.

nint

Number of points to compute the pixel scale at, along the +y axis.

Methods Summary

computeCameraPixelScale([detector_id])

Compute the radial and tangential pixel scales using the distortion model supplied with the camera.

computeDistortionModel()

Calculate the afw cameraGeom distortion model to be included in an on-disk camera model.

computePixelScale()

Compute the radial and tangential pixel scale by averaging over multiple jointcal WCS models.

Methods Documentation

computeCameraPixelScale(detector_id=30)

Compute the radial and tangential pixel scales using the distortion model supplied with the camera.

This is designed to be directly comparable with the results of computePixelScale.

Parameters:
detector_id: `int`

Detector identifier for the detector_id to use for the calculation.

Returns:
fieldAnglenumpy.ndarray

Field angles in degrees.

radialScalenumpy.ndarray

Radial direction pixel scales in arcseconds/pixel.

tangentialScalenumpy.ndarray

Tangential direction pixel scales in arcseconds/pixel.

computeDistortionModel()

Calculate the afw cameraGeom distortion model to be included in an on-disk camera model.

PLACEHOLDER: This may be as simple as running computePixelScale and then doing a numpy polynomial fit to it for the cameraGeom input. However, we need to check details of how that distortion model is stored in a Camera. e.g.: np.polyfit(self.fieldAngle, self.radialScale, poly_degree)

computePixelScale()

Compute the radial and tangential pixel scale by averaging over multiple jointcal WCS models.

Also computes the standard deviation and logs any WCS that are significant outliers. The calculations are stored in the fieldAngle[s], radialScale[s], and tangentialScale[s] member variables.