MultiVisitCoveragePlot¶
- class lsst.analysis.tools.actions.plot.MultiVisitCoveragePlot(*args, **kw)¶
Bases:
PlotAction
Plot the coverage for a set of visits.
Attributes Summary
A dict mapping which color to use for the labels of a given band.
Name of the color map to be used if not using the default color-blind friendly orange/blue default (used if this is set to
None
).Whether to scatter the points in RA/Dec before plotting.
Number of bins to use within the effective plot ranges along the spatial directions.
Threshold number of data points above which binning of the data will be performed in the RA/Dec projection.
List of paramters to plot.
Whether to plot tract outlines for all tracts within the plot limits (regardless if they have any data in them).
Whether to plot a shaded outline of the detector size in the RA/Dec projectionfor reference.
The name for the plot.
Projection to plot.
A dict mapping the RA/Dec limits to apply to the plot.
Use overlaid scatter points to show the x-y positions of the 15% most extreme values? (
bool
, defaultTrue
)List of all bands that could, in principle, but do not have to, exist in data table.
List of tracts within which to limit the RA and Dec limits of the plot.
Whether to trim the plot limits to the tract limit(s).
A dict mapping a parameter to its appropriate units (for label plotting).
List of columns to load from input table.
Methods Summary
__call__
(data, **kwargs)Call self as a function.
Return the schema an
AnalysisAction
expects to be present in the arguments supplied to the __call__ method.makePlot
(data[, plotInfo, camera, skymap, ...])Make an Nband x Nparameter panel multi-visit coverage plot.
Attributes Documentation
- bandLabelColorDict¶
A dict mapping which color to use for the labels of a given band. (
Dict
, default{'u': 'tab:purple', 'g': 'tab:blue', 'r': 'tab:green', 'i': 'gold', 'z': 'tab:orange', 'y': 'tab:red', 'N921': 'tab:pink'}
)
- cmapName¶
Name of the color map to be used if not using the default color-blind friendly orange/blue default (used if this is set to
None
). Any name available viamatplotlib.cm
may be used. (str
, defaultNone
)
- doScatterInRaDec¶
Whether to scatter the points in RA/Dec before plotting. This may be useful for visualization for surveys with tight dithering patterns. (
bool
, defaultFalse
)
- nBins¶
Number of bins to use within the effective plot ranges along the spatial directions. Only used in the “raDec” projection (for the “focalPlane” projection, the binning is effectively one per detector). (
int
, default25
)
- nPointBinThresh¶
Threshold number of data points above which binning of the data will be performed in the RA/Dec projection. If
projection
is “focalPlane”, the per-detector nPoint threshold is nPointMinThresh/number of science detectors in the givencamera
. (int
, default400
)
- parametersToPlotList¶
List of paramters to plot. They are plotted along rows and the columns plot these parameters for each band. (
List
, default['psfSigma', 'astromOffsetMean', 'medianE', 'psfStarScaledDeltaSizeScatter', 'skyBg', 'zeroPoint']
)
- plotAllTractOutlines¶
Whether to plot tract outlines for all tracts within the plot limits (regardless if they have any data in them). (
bool
, defaultFalse
)
- plotDetectorOutline¶
Whether to plot a shaded outline of the detector size in the RA/Dec projectionfor reference. Ignored if
projection
is not raDec or no camera is provided in the inputs. (bool
, defaultFalse
)
- projection¶
Projection to plot. Currently only “raDec” and “focalPlane” are permitted. In either case, one point is plotted per visit/detector combination. (
str
, default'raDec'
)
- raDecLimitsDict¶
A dict mapping the RA/Dec limits to apply to the plot. Set to
None
to use base limits on the default or the other config options. The dict must contain the keys raMin, ramax, decMin, decMax, e.g. raDecLimitsDict = {“raMin”: 0, “raMax”: 360, “decMin”: -90, “decMax”: 90}. Not compatible withtrimToTract
ortractsToPlotList
(i.e. the latter two will be ignored if the dict is notNone
). (Dict
, defaultNone
)
- showExtremeOutliers¶
Use overlaid scatter points to show the x-y positions of the 15% most extreme values? (
bool
, defaultTrue
)
- sortedFullBandList¶
List of all bands that could, in principle, but do not have to, exist in data table. The sorting of the plot panels will follow this list (typically by wavelength). (
List
, default['u', 'g', 'r', 'i', 'z', 'y', 'N921']
)
- tractsToPlotList¶
List of tracts within which to limit the RA and Dec limits of the plot. (
List
, defaultNone
)
- trimToTract¶
Whether to trim the plot limits to the tract limit(s). Otherwise, plot will be trimmed to data limits (both will be expanded in the smaller range direction for an equal aspect square plot). (
bool
, defaultFalse
)
- unitsDict¶
A dict mapping a parameter to its appropriate units (for label plotting). (
Dict
, default{'astromOffsetMean': 'arcsec', 'astromOffsetStd': 'arcsec', 'psfSigma': 'pixels', 'skyBg': 'counts', 'skyNoise': 'counts', 'visit': 'number', 'detector': 'number', 'zenithDistance': 'deg', 'zeroPoint': 'mag', 'ra': 'deg', 'decl': 'deg', 'xFp': 'mm', 'yFp': 'mm', 'medianE': '', 'psfStarScaledDeltaSizeScatter': '', 'psfTraceRadiusDelta': 'pixel'}
)
- vectorsToLoadList¶
List of columns to load from input table. (
List
, default['visitId', 'detector', 'band', 'ra', 'decl', 'zeroPoint', 'psfSigma', 'skyBg', 'astromOffsetMean', 'psfStarDeltaE1Median', 'psfStarDeltaE2Median', 'psfStarScaledDeltaSizeScatter', 'psfTraceRadiusDelta', 'llcra', 'lrcra', 'ulcra', 'urcra', 'llcdec', 'lrcdec', 'ulcdec', 'urcdec', 'xSize', 'ySize']
)
Methods Documentation
- __call__(data: MutableMapping[str, ndarray[Any, dtype[ScalarType]] | Scalar | HealSparseMap | Tensor], **kwargs) Mapping[str, Figure] | Figure ¶
Call self as a function.
- getInputSchema() Tensor]]] ¶
Return the schema an
AnalysisAction
expects to be present in the arguments supplied to the __call__ method.- Returns:
- result
KeyedDataSchema
The schema this action requires to be present when calling this action, keys are unformatted.
- result
- makePlot(data: MutableMapping[str, ndarray[Any, dtype[ScalarType]] | Scalar | HealSparseMap | Tensor], plotInfo: Mapping[str, str] | None = None, camera: Camera | None = None, skymap: BaseSkyMap | None = None, calibrateConfig: Config | None = None, makeWarpConfig: Config | None = None, **kwargs) Figure ¶
Make an Nband x Nparameter panel multi-visit coverage plot.
The panels rows are for different bands,sorted according to the order in config
sortedFullBandList
. The columns are per-parameter, plotted in the order given by the configparametersToPlotList
. Red “over” colors indicate thresholds in play in the data processing (e.g. used to select against data of sufficient quality).- Parameters:
- data
lsst.analysis.tools.interfaces.KeyedData
The key-based catalog of data to plot.
- plotInfo
dict
[str
], optional A dictionary of information about the data being plotted with (at least) keys:
- camera
lsst.afw.cameraGeom.Camera
, optional The camera object associated with the data. This is to enable the conversion of to focal plane coordinates (if needed, i.e. for the focal plane projection version of this plot) and to obtain the projected (in RA/Dec) size of a typical detector (for reference in the raDec projection plots when requested, i.e. if the config
plotDetectorOutline
isTrue
).- skymap
lsst.skymap.BaseSkyMap
, optional The sky map used for this dataset. If a specific tract[List] is provided, this is used to determine the appropriate RA & Dec limits to downselect the data to within those limits for plotting.
- calibrateConfig
lsst.pex.config.Config
, optional The persisted config used in the calibration task for the given collection. Used to introspect threshold values used in the run.
- makeWarpConfig
lsst.pex.config.Config
, optional The persisted config used in the makeWarp task for the given collection. Used to introspect threshold values used in the run.
- data
- Returns:
- fig
matplotlib.figure.Figure
The resulting figure.
- fig