PropertyMapPlot¶
- class lsst.analysis.tools.actions.plot.PropertyMapPlot(*args, **kw)¶
Bases:
PlotAction
Attributes Summary
The name for the plotting task.
Methods Summary
__call__
(data, tractInfo, plotConfig, ...)Call self as a function.
addPlotInfo
(fig, plotInfo, mapName)Add useful information to the plot.
addTextToColorbar
(cb, text[, orientation, ...])Helper method to add text inside the horizontal colorbar.
getLongestSuffixMatch
(s, options)Find the longest suffix in the provided list that matches the end of the given string.
getOutputNames
([config])Returns a list of names that will be used as keys if this action's call method returns a mapping.
getZoomedExtent
(fullExtent, n)Get zoomed extent centered on the original full plot.
makePlot
(data, tractInfo, plotConfig, plotInfo)Make the survey property map plot.
Attributes Documentation
Methods Documentation
- __call__(data: MutableMapping[str, ndarray[Any, dtype[_ScalarType_co]] | Scalar | HealSparseMap | Tensor | Mapping], tractInfo: ExplicitTractInfo, plotConfig: PropertyMapTractAnalysisConfig, plotInfo: Mapping[str, Mapping[str, str] | str | int], **kwargs) Mapping[str, Figure] ¶
Call self as a function.
- addPlotInfo(fig: Figure, plotInfo: Mapping[str, Mapping[str, str] | str | int], mapName: Mapping[str, str]) Figure ¶
Add useful information to the plot.
- Parameters:
- fig
matplotlib.figure.Figure
The figure to add the information to.
- plotInfo
dict
A dictionary of the plot information.
- mapName
str
The name of the map being plotted.
- fig
- Returns:
- fig
matplotlib.figure.Figure
The figure with the information added.
- fig
- static addTextToColorbar(cb, text, orientation='vertical', color='black', fontsize=14, fontweight='bold', alpha=0.8)¶
Helper method to add text inside the horizontal colorbar.
- Parameters:
- cb
Colorbar
The colorbar object.
- text
str
The text to add.
- orientation
str
, optional The orientation of the colorbar. Can be either “vertical” or “horizontal”.
- fontsize
int
, optional The fontsize of the text.
- fontweight
str
, optional The fontweight of the text.
- alpha
float
, optional The alpha value of the text.
- cb
- Returns:
None
The text is added to the colorbar in place.
- static getLongestSuffixMatch(s, options)¶
Find the longest suffix in the provided list that matches the end of the given string.
- getOutputNames(config=None) Iterable[str] ¶
Returns a list of names that will be used as keys if this action’s call method returns a mapping. Otherwise return an empty Iterable.
- Parameters:
- config
lsst.pex.config.Config
, optional Configuration of the task. This is only used if the output naming needs to be config-aware.
- config
- Returns:
- result
Iterable
ofstr
If a
PlotAction
produces more than one plot, this should be the keys the action will use in the returnedMapping
.
- result
- static getZoomedExtent(fullExtent, n)¶
Get zoomed extent centered on the original full plot.
- makePlot(data: MutableMapping[str, ndarray[Any, dtype[_ScalarType_co]] | Scalar | HealSparseMap | Tensor | Mapping], tractInfo: ExplicitTractInfo, plotConfig: PropertyMapTractAnalysisConfig, plotInfo: Mapping[str, Mapping[str, str] | str | int]) Mapping[str, Figure] ¶
Make the survey property map plot.
- Parameters:
- data
KeyedData
The HealSparseMap to plot the points from.
- tractInfo: `~lsst.skymap.tractInfo.ExplicitTractInfo`
The tract info object.
- plotConfig
PropertyMapTractAnalysisConfig
The configuration for the plot.- plotInfo
dict
A dictionary of information about the data being plotted.
- data
- Returns:
- static prettyPrintFloat(n)¶