ColorColorFitPlot¶
- class lsst.analysis.tools.actions.plot.ColorColorFitPlot(*args, **kw)¶
- Bases: - PlotAction- Make a color-color plot and overplot a prefited line to the fit region. - This is mostly used for the stellar locus plots and also includes panels that illustrate the goodness of the given fit. - Attributes Summary - Plot distance from fit as a function of color in lower right panel? ( - bool, default- True)- Plot distance from fit histograms separated into blue and red star subsamples? ( - bool, default- False)- Label to use for the magnitudes used to color code by ( - str)- Minimum number of valid objects to bother attempting a fit. - The name for the plot. - Selection of types of objects to plot. - Label to use for the x axis ( - str)- Minimum and maximum x-axis limit to force (provided as a list of [xMin, xMax]). - Label to use for the y axis ( - str)- Minimum and maximum y-axis limit to force (provided as a list of [yMin, yMax]). - Methods Summary - __call__(data, **kwargs)- Call self as a function. - getInputSchema(**kwargs)- Return the schema an - AnalysisActionexpects to be present in the arguments supplied to the __call__ method.- makePlot(data, plotInfo, **kwargs)- Make stellar locus plots using pre fitted values. - Attributes Documentation - doPlotDistVsColor¶
- Plot distance from fit as a function of color in lower right panel? ( - bool, default- True)
 - doPlotRedBlueHists¶
- Plot distance from fit histograms separated into blue and red star subsamples? ( - bool, default- False)
 - minPointsForFit¶
- Minimum number of valid objects to bother attempting a fit. Deprecated: This field is no longer used. The value should go as an entry to the paramsDict keyed as minObjectForFit. Will be removed after v27. ( - int, default- 5)- Valid Range = [1,inf) 
 - plotTypes¶
- Selection of types of objects to plot. Can take any combination of stars, galaxies, unknown, mag, any. ( - List, default- ['stars'])
 - xLims¶
- Minimum and maximum x-axis limit to force (provided as a list of [xMin, xMax]). If - None, limits will be computed and set based on the data. (- List, default- None)
 - yLims¶
- Minimum and maximum y-axis limit to force (provided as a list of [yMin, yMax]). If - None, limits will be computed and set based on the data. (- List, default- None)
 - Methods Documentation - __call__(data: MutableMapping[str, ndarray[Any, dtype[ScalarType]] | Scalar | HealSparseMap | Tensor], **kwargs) Mapping[str, Figure] | Figure¶
- Call self as a function. 
 - getInputSchema(**kwargs) Tensor]]]¶
- Return the schema an - AnalysisActionexpects 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. 
 
- result
 
 - makePlot(data: MutableMapping[str, ndarray[Any, dtype[ScalarType]] | Scalar | HealSparseMap | Tensor], plotInfo: Mapping[str, str], **kwargs) Figure¶
- Make stellar locus plots using pre fitted values. - Parameters:
- dataKeyedData
- The data to plot the points from, for more information please see the notes section. 
- plotInfodict
- A dictionary of information about the data being plotted with keys: 
 
- data
- Returns:
- figmatplotlib.figure.Figure
- The resulting figure. 
 
- fig
 - Notes - The axis labels are given by - self.xAxisLabeland- self.yAxisLabel. The perpendicular distance of the points to the fit line is given in a histogram in the second panel.- For the code to work it expects various quantities to be present in the - datathat it is given.- The quantities that are expected to be present are: - Statistics that are shown on the plot or used by the plotting code:
- approxMagDepth
- The approximate magnitude corresponding to the SN cut used. 
 
- f"{self.plotName}_sigmaMAD"
- The sigma mad of the distances to the line fit. 
 
- f"{self.plotName or ''}_median"
- The median of the distances to the line fit. 
 
 
 
- Parameters from the fitting code that are illustrated on the plot:
- "bFixed"
- The fixed intercept to fall back on. 
 
- "mFixed"
- The fixed gradient to fall back on. 
 
- "bODR"
- The intercept calculated by the final orthogonal distance regression fitting. 
 
- "mODR"
- The gradient calculated by the final orthogonal distance regression fitting. 
 
- "xMin`"
- The x minimum of the box used in the fit. 
 
- "xMax"
- The x maximum of the box used in the fit. 
 
- "yMin"
- The y minimum of the box used in the fit. 
 
- "yMax"
- The y maximum of the box used in the fit. 
 
- "mPerp"
- The gradient of the line perpendicular to the line from the second ODR fit. 
 
- "bPerpMin"
- The intercept of the perpendicular line that goes through xMin. 
 
- "bPerpMax"
- The intercept of the perpendicular line that goes through xMax. 
 
- "goodPoints"
- The points that passed the initial set of cuts (typically in fluxType S/N, extendedness, magnitude, and isfinite). 
 
- "fitPoints"
- The points use in the final fit. 
 
 
 
 - The main inputs to plot:
- x, y, mag 
 
 - Examples - An example of the plot produced from this code is here:   - For a detailed example of how to make a plot from the command line please see the getting started guide.