Coverage for python/lsst/sims/maf/batches/common.py : 55%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
'standardAngleMetrics']
"""Return a list of filters, plot colors and orders.
Parameters ---------- all : boolean, opt Include 'all' in the list of filters and as part of the colors/orders dictionaries. Default True. extraSql : str, opt Additional sql constraint to add to sqlconstraints returned per filter. Default None. extraMetadata : str, opt Substitute metadata to add to metadata strings composed per band. Default None.
Returns ------- list, dict, dict List of filter names, dictionary of colors (for plots), dictionary of orders (for display) """ else: else: else: else: else:
"""A set of standard summary metrics, to calculate Mean, RMS, Median, #, Max/Min, and # 3-sigma outliers. """ standardSummary = [metrics.MeanMetric(), metrics.RmsMetric(), metrics.MedianMetric(), metrics.CountMetric(), metrics.MaxMetric(), metrics.MinMetric(), metrics.NoutliersNsigmaMetric(metricName='N(+3Sigma)', nSigma=3), metrics.NoutliersNsigmaMetric(metricName='N(-3Sigma)', nSigma=-3.)] return standardSummary
"""An extended set of summary metrics, to calculate all that is in the standard summary stats, plus 25/75 percentiles."""
extendedStats = standardSummary() extendedStats += [metrics.PercentileMetric(metricName='25th%ile', percentile=25), metrics.PercentileMetric(metricName='75th%ile', percentile=75)] return extendedStats
"""A set of standard simple metrics for some quantity. Typically would be applied with unislicer.
Parameters ---------- colname : str The column name to apply the metrics to. replace_colname: str or None, opt Value to replace colname with in the metricName. i.e. if replace_colname='' then metric name is Mean, instead of Mean Airmass, or if replace_colname='seeingGeom', then metric name is Mean seeingGeom instead of Mean seeingFwhmGeom. Default is None, which does not alter the metric name.
Returns ------- List of configured metrics. """ standardMetrics = [metrics.MeanMetric(colname), metrics.MedianMetric(colname), metrics.MinMetric(colname), metrics.MaxMetric(colname)] if replace_colname is not None: for m in standardMetrics: if len(replace_colname) > 0: m.name = m.name.replace('%s' % colname, '%s' % replace_colname) else: m.name = m.name.rstrip(' %s' % colname) return standardMetrics
"""An extended set of simple metrics for some quantity. Typically applied with unislicer.
Parameters ---------- colname : str The column name to apply the metrics to. replace_colname: str or None, opt Value to replace colname with in the metricName. i.e. if replace_colname='' then metric name is Mean, instead of Mean Airmass, or if replace_colname='seeingGeom', then metric name is Mean seeingGeom instead of Mean seeingFwhmGeom. Default is None, which does not alter the metric name.
Returns ------- List of configured metrics. """ extendedMetrics = standardMetrics(colname, replace_colname=None) extendedMetrics += [metrics.RmsMetric(colname), metrics.NoutliersNsigmaMetric(colname, metricName='N(+3Sigma) ' + colname, nSigma=3), metrics.NoutliersNsigmaMetric(colname, metricName='N(-3Sigma) ' + colname, nSigma=-3), metrics.PercentileMetric(colname, percentile=25), metrics.PercentileMetric(colname, percentile=75), metrics.CountMetric(colname)] if replace_colname is not None: for m in extendedMetrics: if len(replace_colname) > 0: m.name = m.name.replace('%s' % colname, '%s' % replace_colname) else: m.name = m.name.rstrip(' %s' % colname) return extendedMetrics
"""A set of standard simple metrics for some quantity which is a wrap-around angle.
Parameters ---------- colname : str The column name to apply the metrics to. replace_colname: str or None, opt Value to replace colname with in the metricName. i.e. if replace_colname='' then metric name is Mean, instead of Mean Airmass, or if replace_colname='seeingGeom', then metric name is Mean seeingGeom instead of Mean seeingFwhmGeom. Default is None, which does not alter the metric name.
Returns ------- List of configured metrics. """ standardAngleMetrics = [metrics.MeanAngleMetric(colname), metrics.RmsAngleMetric(colname), metrics.FullRangeAngleMetric(colname), metrics.MinMetric(colname), metrics.MaxMetric(colname)] if replace_colname is not None: for m in standardAngleMetrics: if len(replace_colname) > 0: m.name = m.name.replace('%s' % colname, '%s' % replace_colname) else: m.name = m.name.rstrip(' %s' % colname) return standardAngleMetrics |