lsst.validate.drp — Science Requirements Monitoring

Python API Reference

lsst.validate.drp.base Module

lsst.validate.drp’s Measurement API that handles JSON persistence.

Classes

BlobBase() Base class for Blob classes.
Datum(value, units[, label, description]) A value annotated with units, a plot label and description.
DatumAttributeMixin
Job([measurements, blobs]) A Job is a wrapper around all measurements and blob metadata associated with a validate_drp run.
JsonSerializationMixin Mixin that provides serialization support
MeasurementBase() Baseclass for Measurement classes.
Metric(name, description, operatorStr[, ...]) Container for the definition of a Metric and specification levels.
Specification(name, value, units[, ...]) A specification level or threshold associated with a Metric.
ValidateError Base classes for exceptions in validate_drp.
ValidateErrorNoStars To be raised by tests that find no stars satisfying a set of criteria.
ValidateErrorSpecification Indicates an error with accessing or using requirement specifications.
ValidateErrorUnknownSpecificationLevel Indicates the requested level of requirements is unknown.

Class Inheritance Diagram

Inheritance diagram of lsst.validate.drp.base.BlobBase, lsst.validate.drp.base.Datum, lsst.validate.drp.base.DatumAttributeMixin, lsst.validate.drp.base.Job, lsst.validate.drp.base.JsonSerializationMixin, lsst.validate.drp.base.MeasurementBase, lsst.validate.drp.base.Metric, lsst.validate.drp.base.Specification, lsst.validate.drp.base.ValidateError, lsst.validate.drp.base.ValidateErrorNoStars, lsst.validate.drp.base.ValidateErrorSpecification, lsst.validate.drp.base.ValidateErrorUnknownSpecificationLevel

lsst.validate.drp.calcsrd Package

Metric measurement classes that implement LPM-17, the Science Requirements Document.

Classes

ADxMeasurement(x, matchedDataset, amx, ...) Measurement of AFx (x=1,2,3): The maximum fraction of astrometric distances which deviate by more than ADx milliarcsec (see AMx) (%).
AFxMeasurement(x, matchedDataset, amx, ...) Measurement of AFx (x=1,2,3): The maximum fraction of astrometric distances which deviate by more than ADx milliarcsec (see AMx) (%).
AMxMeasurement(x, matchedDataset, bandpass) Measurement of AMx (x=1,2,3): The maximum rms of the astrometric distance distribution for stellar pairs with separations of D arcmin (repeatability).
PA1Measurement(matchedDataset, bandpass[, ...]) Measurement of the PA1 metric: photometric repeatability of measurements across a set of observations.
PA2Measurement(matchedDataset, pa1, ...[, ...]) Measurement of PA2: millimag from median RMS (see PA1) of which PF1 of the samples can be found.
PF1Measurement(matchedDataset, pa1, ...[, ...]) Measurement of PF1: fraction of samples between median RMS (PA1) and PA2 specification.

Class Inheritance Diagram

Inheritance diagram of lsst.validate.drp.calcsrd.adx.ADxMeasurement, lsst.validate.drp.calcsrd.afx.AFxMeasurement, lsst.validate.drp.calcsrd.amx.AMxMeasurement, lsst.validate.drp.calcsrd.pa1.PA1Measurement, lsst.validate.drp.calcsrd.pa2.PA2Measurement, lsst.validate.drp.calcsrd.pf1.PF1Measurement

lsst.validate.drp.matchreduce Module

Blob classes that reduce a multi-visit dataset and encapsulate data for measurement classes, plotting functions, and JSON persistence.

Functions

isExtended(source, extendedKey[, ...]) Is the source extended attribute above the threshold.
magNormDiff(cat) Calculate the normalized mag/mag_err difference from the mean for a set of observations of an objection.
fitExp(x, y, y_err[, deg]) Fit an exponential quadratic to x, y, y_err.
fitAstromErrModel(snr, dist) Fit model of astrometric error from LSST Overview paper
fitPhotErrModel(mag, mmag_err) Fit model of photometric error from LSST Overview paper
positionRms(cat) Calculate the RMS for RA, Dec for a set of observations an object.
astromErrModel(snr[, theta, sigmaSys, C]) Calculate expected astrometric uncertainty based on SNR.
photErrModel(mag, sigmaSys, gamma, m5, **kwargs) Fit model of photometric error from LSST Overview paper

Classes

MatchedMultiVisitDataset(repo, dataIds[, ...]) Container for matched star catalogs from multple visits, with filtering, summary statistics, and modelling.
AnalyticAstrometryModel(matchedMultiVisitDataset) Serializable model of astronometry errors across multiple visits.
AnalyticPhotometryModel(matchedMultiVisitDataset) Serializable analytic photometry error model for multi-visit catalogs.

Class Inheritance Diagram

Inheritance diagram of lsst.validate.drp.matchreduce.MatchedMultiVisitDataset, lsst.validate.drp.matchreduce.AnalyticAstrometryModel, lsst.validate.drp.matchreduce.AnalyticPhotometryModel

lsst.validate.drp.plot Module

Matplotlib plots describing lsst.validate.drp metric measurements, as well as analytic models of photometric and astrometric repeatability.

Functions

plotOutlinedLinesHorizontal(ax, *args, **kwargs) Plot horizontal lines outlined in white.
plotOutlinedLinesVertical(ax, *args, **kwargs) Plot vertical lines outlined in white.
plotOutlinedLines(ax_plot, x1, x2[, ...]) Plot horizontal lines outlined in white.
plotOutlinedAxline(axMethod, x, **kwargs)
plotAnalyticAstrometryModel(dataset, astromModel) Plot angular distance between matched sources from different exposures.
plotExpFit(x, y, y_err[, fit_params, deg, ...]) Plot an exponential quadratic fit to x, y, y_err.
plotAstromErrModelFit(snr, dist, model[, ...]) Plot model of photometric error from LSST Overview paper
plotPhotErrModelFit(mag, mmag_err, photomModel) Plot model of photometric error from LSST Overview paper (Eq.
plotAnalyticPhotometryModel(dataset, photomModel) Plot photometric RMS for matched sources.
plotPA1(pa1[, outputPrefix]) Plot the results of calculating the LSST SRC requirement PA1.
plotAMx(amx, afx, bandpass[, amxSpecName, ...]) Plot a histogram of the RMS in relative distance between pairs of stars.

lsst.validate.drp.util Module

Miscellaneous functions to support lsst.validate.drp.

Functions

arcminToRadians(arcmin)
averageDecFromCat(cat)
averageRaDec(ra, dec) Calculate average RA, Dec from input lists using spherical geometry.
averageRaDecFromCat(cat)
averageRaFromCat(cat)
calcOrNone(func, x, ErrorClass, **kwargs) Calculate the func and return result.
calcRmsDistances(groupView, annulus[, ...]) Calculate the RMS distance of a set of matched objects over visits.
computeWidths(array) Compute the RMS and the scaled inter-quartile range of an array.
constructDataIds(filters, visits, ccds[, ...]) Returns a list of dataIds consisting of every combination of visit & ccd for each filter.
constructRunList(filter, visits, ccds[, ...]) Construct a comprehensive runList for processCcd.py.
discoverDataIds(repo, **kwargs) Retrieve a list of all dataIds in a repo.
getCcdKeyName(dataid) Return the key in a dataId that’s referring to the CCD or moral equivalent.
getRandomDiff(array) Get the difference between two randomly selected elements of an array.
getRandomDiffRmsInMas(array) Calculate the RMS difference in mmag between a random pairs of magnitudes.
loadDataIdsAndParameters(configFile) Load data IDs, magnitude range, and expected metrics from a yaml file.
loadParameters(configFile) Load configuration parameters from a yaml file.
loadRunList(configFile) Load run list from a YAML file.
matchVisitComputeDistance(visit_obj1, ...) Calculate obj1-obj2 distance for each visit in which both objects are seen.
radiansToMilliarcsec(rad)
repoNameToPrefix(repo) Generate a base prefix for plots based on the repo name.
sphDist(ra1, dec1, ra2, dec2) Calculate distance on the surface of a unit sphere.

lsst.validate.drp.validate Module

Main driver functions for metric measurements, plotting, specification grading, and persistence.

Functions

run(repo, dataIds[, outputPrefix, level, ...]) Main executable.
runOneFilter(repo, visitDataIds[, ...]) Main executable for the case where there is just one filter.