lsst.validate.drp¶

The lsst.validate.drp module provides utilities for measuring and plotting Key Performance Metrics (KPMs) on processed LSST data.

Contributing¶

lsst.validate.drp is developed at https://github.com/lsst/validate_drp. You can find Jira issues for this module under the validate_drp component.

Python API reference¶

lsst.validate.drp.validate Module¶

Functions¶

 plot_metrics(job, filterName[, outputPrefix]) Plot AM1, AM2, AM3, PA1 plus related informational plots. print_metrics(job[, levels]) print_pass_fail_summary(jobs[, levels, …]) run(repo_or_json[, metrics, outputPrefix, …]) Main entrypoint from validateDrp.py. runOneFilter(repo, visitDataIds, metrics[, …]) Main executable for the case where there is just one filter.

lsst.validate.drp.util Module¶

Functions¶

 averageDecFromCat(cat) Compute the average declination from a catalog of measurements. averageRaDec(ra, dec) Calculate average RA, Dec from input lists using spherical geometry. averageRaDecFromCat(cat) Calculate the average right ascension and declination from a catalog. averageRaFromCat(cat) Compute the average right ascension from a catalog of measurements. constructDataIds(filters, visits, ccds[, …]) Returns a list of dataIds consisting of every combination of visit & ccd for each filter. constructRunList(visits, ccds[, ccdKeyName]) Construct a comprehensive runList for processCcd.py. discoverDataIds(repo, **kwargs) Retrieve a list of all dataIds in a repo. ellipticity(i_xx, i_xy, i_yy) Calculate ellipticity from second moments. ellipticity_from_cat(cat[, slot_shape]) Calculate the ellipticity of the Shapes in a catalog from the 2nd moments. ellipticity_from_shape(shape) Calculate the ellipticty of shape from its moments. getCcdKeyName(dataId) Return the key in a dataId that’s referring to the CCD or moral equivalent. 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. medianEllipticity1ResidualsFromCat(cat) Compute the median real ellipticty residuals from a catalog of measurements. medianEllipticity2ResidualsFromCat(cat) Compute the median imaginary ellipticty residuals from a catalog of measurements. medianEllipticityResidualsFromCat(cat) Compute the median ellipticty residuals from a catalog of measurements. positionRms(ra_mean, dec_mean, ra, dec) Calculate the RMS between an array of coordinates and a reference (mean) position. positionRmsFromCat(cat) Calculate the RMS for RA, Dec for a set of observations an object. raftSensorToInt(visitId) Construct an int that encodes raft, sensor coordinates. repoNameToPrefix(repo) Generate a base prefix for plots based on the repo name. sphDist(ra_mean, dec_mean, ra, dec) Calculate distance on the surface of a unit sphere.

Classes¶

 MatchedVisitMetricsRunner(TaskClass, parsedCmd) Subclass of TaskRunner for MatchedVisitMetrics MatchedVisitMetricsConfig MatchedVisitMetricsTask([config, name, …]) An alternate command-line driver for the validate_drp metrics.

lsst.validate.drp.photerrmodel Module¶

Functions¶

 photErrModel(mag, sigmaSys, gamma, m5, **kwargs) Model of photometric error for a single visit. fitPhotErrModel(mag, mag_err) Fit photometric error model from the LSST Overview paper: build_photometric_error_model(…[, …]) Returns a serializable analytic photometry error model for a single visit.

lsst.validate.drp.astromerrmodel Module¶

Functions¶

 astromErrModel(snr[, theta, sigmaSys, C]) Calculate expected astrometric uncertainty based on SNR. fitAstromErrModel(snr, dist) Fit model of astrometric error from the LSST Overview paper: build_astrometric_error_model(…[, …]) Serializable model of astrometry errors across multiple visits.