lsst.analysis.tools

analysis_tools is the plotting and metric framework that is used to perform QA on the pipeline products. It is a very powerful way to explore and interact with the pipeline outputs.

Using lsst.analysis.tools

For a tutorial on working with analysis_tools please see the getting started guide.

Need Help?

If you get stuck with analysis_tools then feel free to reach out to the #rubinobs-analysis-tools channel on slack and hopefully someone will help you!

Contributing

lsst.analysis.tools is developed at https://github.com/lsst/analysis_tools. You can find Jira issues for this module under the analysis_tools component.

Python API reference

lsst.analysis.tools Package

Variables

nansigmaMad(x[, axis, center, scale, nan_policy])

Compute the median absolute deviation of the data along the given axis.

sigmaMad(x[, axis, center, scale, nan_policy])

Compute the median absolute deviation of the data along the given axis.

lsst.analysis.tools.actions.plot Package

Classes

BarPanel(*args, **kw)

A configurable class describing a panel in a bar plot.

BarPlot(*args, **kw)

A plotting tool which can take multiple keyed data inputs and can create one or more bar graphs.

ColorColorFitPlot(*args, **kw)

Makes a color-color plot and overplots a prefited line to the specified area of the plot.

DiaSkyPanel(*args, **kw)

Configuration options for DiaSkyPlot panels.

DiaSkyPlot(*args, **kw)

Generic pseudo base class for plotting DiaSources (or DiaObjects) on the sky.

HistPanel(*args, **kw)

A Config class that holds parameters to configure a single panel of a histogram plot.

HistPlot(*args, **kw)

Make an N-panel plot with a configurable number of histograms displayed in each panel.

HistStatsPanel(*args, **kw)

A Config class that holds parameters to configure a the stats panel shown for histPlot.

MultiVisitCoveragePlot(*args, **kw)

Plot the coverage for a set of visits.

RhoStatisticsPlotAction(*args, **kw)

Make multiple plots of rho statistics.

ScatterPlotStatsAction(*args, **kw)

Calculates the statistics needed for the scatter plot with two hists.

ScatterPlotWithTwoHists(*args, **kw)

Makes a scatter plot of the data with a marginal histogram for each axis.

SkyPlot(*args, **kw)

Plots the on sky distribution of a parameter.

XYPlot(*args, **kw)

Make a plot (with errorbars) of one quantity (X) vs another (Y).

lsst.analysis.tools.actions.vector Package

Classes

AstromDiff(*args, **kw)

Calculate the difference between two columns, assuming their units are degrees, and convert the difference to arcseconds.

BandSelector(*args, **kw)

Makes a mask for sources observed in a specified set of bands.

BinnedCorr2Config(*args, **kw)

A Config class that holds some of the parameters supported by treecorr.

CalcE(*args, **kw)

Calculate a complex value representation of the ellipticity.

CalcE1(*args, **kw)

Calculate \(e_1\) (distortion-type) or \(g_1\) (shear-type).

CalcE2(*args, **kw)

Calculate \(e_2\) (distortion-type) or \(g_2\) (shear-type).

CalcEDiff(*args, **kw)

Calculate the difference of two ellipticities as a complex quantity.

CalcRhoStatistics(*args, **kw)

Calculate rho statistics.

CalcShapeSize(*args, **kw)

Calculate a size: \((I_{xx}I_{yy}-I_{xy}^2)^{\frac{1}{4}}\) (determinant radius) or \(\sqrt{(I_{xx}+I_{yy})/2}\) (trace radius).

CoaddPlotFlagSelector(*args, **kw)

This default setting makes it take the band from the kwargs.

ConstantValue(*args, **kw)

Return a constant scalar value.

DivideVector(*args, **kw)

Calculate (A/B)

DownselectVector(*args, **kw)

Get a vector from KeyedData, apply specified selector, return the shorter Vector.

ExtendednessSelector(*args, **kw)

A selector that picks between extended and point sources.

ExtinctionCorrectedMagDiff(*args, **kw)

Compute the difference between two magnitudes and correct for extinction By default bands are derived from the <band>_ prefix on flux columns, per the naming convention in the Object Table: e.g.

FlagSelector(*args, **kw)

The base flag selector to use to select valid sources for QA.

FractionalDifference(*args, **kw)

Calculate (A-B)/B.

GalaxySelector(*args, **kw)

A selector that picks out galaxies based off of their extendedness values.

GoodDiaSourceSelector(*args, **kw)

Selects good DIA sources from diaSourceTables.

LoadVector(*args, **kw)

Load and return a Vector from KeyedData.

MagColumnNanoJansky(*args, **kw)

Turn nano janskies into magnitudes.

MagDiff(*args, **kw)

Calculate the difference between two magnitudes; each magnitude is derived from a flux column.

MultiCriteriaDownselectVector(*args, **kw)

Get a vector from KeyedData, apply specified set of selectors with AND logic, and return the shorter Vector.

PerGroupStatistic(*args, **kw)

Compute per-group statistic values and return result as a vector with one element per group.

RangeSelector(*args, **kw)

Selects rows within a range, inclusive of min/exclusive of max.

SNCalculator(*args, **kw)

Calculate the signal-to-noise.

SkyObjectSelector(*args, **kw)

Selects sky objects in the given band(s).

SkySourceSelector(*args, **kw)

Selects sky sources from sourceTables.

Sn(*args, **kw)

Compute signal-to-noise in the given flux type.

SnSelector(*args, **kw)

Selects points that have S/N > threshold in the given flux type.

StarSelector(*args, **kw)

A selector that picks out stars based off of their extendedness values.

SubtractVector(*args, **kw)

Calculate (A-B).

ThresholdSelector(*args, **kw)

Return a mask corresponding to an applied threshold.

UnknownSelector(*args, **kw)

A selector that picks out unclassified objects based off of their extendedness values.

VectorSelector(*args, **kw)

Load a boolean vector from KeyedData and return it for use as a selector.

VisitPlotFlagSelector(*args, **kw)

Select on a set of flags appropriate for making visit-level plots (i.e., using sourceTable_visit catalogs).

lsst.analysis.tools.actions.scalar Package

Classes

ApproxFloor(*args, **kw)

Returns the median of the lowest ten values of the sorted input.

CountAction(*args, **kw)

Returns the number of non-NaN entries in the given column.

CountUniqueAction(*args, **kw)

Counts the number of unique rows in a given column.

FracInRange(*args, **kw)

Compute the fraction of a distribution that is between specified minimum and maximum values, and is not NaN.

FracNan(*args, **kw)

Compute the fraction of vector entries that are NaN.

FracThreshold(*args, **kw)

Compute the fraction of a distribution that is above or below a specified threshold.

MaxAction(*args, **kw)

Returns the maximum of the given data.

MeanAction(*args, **kw)

Calculates the mean of the given data.

MedianAction(*args, **kw)

Calculates the median of the given data.

MinAction(*args, **kw)

Returns the minimum of the given data.

SigmaMadAction(*args, **kw)

Calculates the sigma mad of the given data.

StdevAction(*args, **kw)

Calculates the standard deviation of the given data.