SkyPlot¶
- class lsst.analysis.tools.actions.plot.SkyPlot(*args, **kw)¶
Bases:
PlotAction
Plots the on sky distribution of a parameter.
Plots the values of the parameter given for the z axis according to the positions given for x and y. Optimised for use with RA and Dec. Also calculates some basic statistics and includes those on the plot.
Attributes Summary
Fix the colorbar to be symmetric around zero.
The name for the plot.
Plot the outlines of the ccds/patches? (
bool
, defaultTrue
)Selection of types of objects to plot.
Label to use for the x axis.
Label to use for the y axis.
Label to use for the z axis.
Methods Summary
__call__
(data, **kwargs)Call self as a function.
getInputSchema
(**kwargs)Return the schema an
AnalysisAction
expects to be present in the arguments supplied to the __call__ method.makePlot
(data[, plotInfo, sumStats])Make a skyPlot of the given data.
statsAndText
(arr[, mask])Calculate some stats from an array and return them and some text.
Attributes Documentation
- plotTypes¶
Selection of types of objects to plot. Can take any combination of stars, galaxies, unknown, mag, any. (
List
)
Methods Documentation
- __call__(data: MutableMapping[str, ndarray[Any, dtype[ScalarType]] | Scalar | HealSparseMap], **kwargs) Mapping[str, Figure] | Figure ¶
Call self as a function.
- getInputSchema(**kwargs) HealSparseMap]]] ¶
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], plotInfo: Mapping[str, str] | None = None, sumStats: Mapping | None = None, **kwargs) Figure ¶
Make a skyPlot of the given data.
- Parameters:
- Returns:
pipeBase.Struct
containing:- skyPlot
matplotlib.figure.Figure
The resulting figure.
- skyPlot
Notes
Expects the data to contain slightly different things depending on the types specified in plotTypes. This is handled automatically if you go through the pipetask framework but if you call this method separately then you need to make sure that data contains what the code is expecting.
If stars is in the plot types given then it is expected that data contains: xStars, yStars, zStars and starStatMask.
If galaxies is present: xGalaxies, yGalaxies, zGalaxies and galaxyStatsMask.
If unknown is present: xUnknowns, yUnknowns, zUnknowns and unknownStatMask.
If any is specified: x, y, z, statMask.
These options are not exclusive and multiple can be specified and thus need to be present in data.
- statsAndText(arr, mask=None)¶
Calculate some stats from an array and return them and some text.