FocalPlaneGeometryPlot

class lsst.analysis.tools.actions.plot.FocalPlaneGeometryPlot(*args, **kw)

Bases: FocalPlanePlot

Plots the focal plane distribution of a parameter in afw camera geometry units: amplifiers and detectors.

Given the detector positions in x and y, the focal plane positions are calculated using the camera model. A 2d binned statistic (default is mean) is then calculated and plotted for the parameter z as a function of the camera geometry segment the input points fall upon.

The xAxisLabel, yAxisLabel, zAxisLabel, and statistic variables are inherited from the parent class.

Attributes Summary

addHistogram

Add a histogram of all input points (bool, default False)

doUseAdaptiveBinning

If set to True, the number of bins is adapted to the source density, with lower densities using fewer bins.

histBins

Number of bins to use in histogram (int, default 30)

level

Which geometry level should values be plotted? (str, default 'amplifier')

nBins

Number of bins to use within the effective plot ranges along the spatial directions.

plotMax

Maximum in z-value to display in the focal plane plot and in the histogram plot, if applicable (float, default None)

plotMin

Minimum in z-value to display in the focal plane plot and in the histogram plot, if applicable (float, default None)

showStats

Show statistics for plotted data (bool, default True)

statistic

Operation to perform in binned_statistic_2d (str, default 'mean')

xAxisLabel

Label to use for the x axis.

yAxisLabel

Label to use for the y axis.

zAxisLabel

Label to use for the z axis.

Methods Summary

getInputSchema(**kwargs)

Return the schema an AnalysisAction expects to be present in the arguments supplied to the __call__ method.

makePlot(data, camera[, plotInfo])

Prep the catalogue and then make a focalPlanePlot of the given column.

Attributes Documentation

addHistogram

Add a histogram of all input points (bool, default False)

doUseAdaptiveBinning

If set to True, the number of bins is adapted to the source density, with lower densities using fewer bins. Under these circumstances the nBins parameter sets the minimum number of bins. (bool, default False)

histBins

Number of bins to use in histogram (int, default 30)

level

Which geometry level should values be plotted? (str, default 'amplifier')

Allowed values:

'amplifier'

Plot values per readout amplifier.

'detector'

Plot values per detector.

'None'

Field is optional

nBins

Number of bins to use within the effective plot ranges along the spatial directions. (int, default 200)

plotMax

Maximum in z-value to display in the focal plane plot and in the histogram plot, if applicable (float, default None)

plotMin

Minimum in z-value to display in the focal plane plot and in the histogram plot, if applicable (float, default None)

showStats

Show statistics for plotted data (bool, default True)

statistic

Operation to perform in binned_statistic_2d (str, default 'mean')

xAxisLabel

Label to use for the x axis. (str, default 'x (mm)')

yAxisLabel

Label to use for the y axis. (str, default 'y (mm)')

zAxisLabel

Label to use for the z axis. (str)

Methods Documentation

getInputSchema(**kwargs) Tensor]]]

Return the schema an AnalysisAction expects to be present in the arguments supplied to the __call__ method.

Returns:
resultKeyedDataSchema

The schema this action requires to be present when calling this action, keys are unformatted.

makePlot(data: MutableMapping[str, ndarray[Any, dtype[ScalarType]] | Scalar | HealSparseMap | Tensor], camera: Camera, plotInfo: Mapping[str, str] | None = None, **kwargs) Figure

Prep the catalogue and then make a focalPlanePlot of the given column.

Uses the axisLabels config options x and y to make an image, where the color corresponds to the 2d binned statistic (the mean is the default) applied to the z column. A summary panel is shown in the upper right corner of the resultant plot. The code uses the selectorActions to decide which points to plot and the statisticSelector actions to determine which points to use for the printed statistics.

Parameters:
datapandas.core.frame.DataFrame

The catalog to plot the points from. This is expected to have the following columns/keys:

"detector"

The integer detector id for the points.

"amplifier"

The string amplifier name for the points.

"z"

The numerical value that will be combined via statistic to the binned value.

"x"

Focal plane x position, optional.

"y"

Focal plane y position, optional.

cameralsst.afw.cameraGeom.Camera

The camera used to map from pixel to focal plane positions.

plotInfodict

A dictionary of information about the data being plotted with keys:

"run"

The output run for the plots (str).

"skymap"

The type of skymap used for the data (str).

"filter"

The filter used for this data (str).

"tract"

The tract that the data comes from (str).

"bands"

The band(s) that the data comes from (list of str).

Returns:
figmatplotlib.figure.Figure

The resulting figure.