rail.evaluation.metrics.pointestimates module

class rail.evaluation.metrics.pointestimates.PointBias

Bases: PointStatsEz

calculates the bias of the ez and ez_magcut samples.

In keeping with the Science Book, this is just the median of the ez values

evaluate()
Return type:

bias ndarray. Median of the full ez sample

class rail.evaluation.metrics.pointestimates.PointOutlierRate

Bases: PointStatsEz

Calculates the catastrophic outlier rate, defined in the Science Book as the number of galaxies with ez larger than max(0.06,3sigma). This keeps the fraction reasonable when sigma is very small.

evaluate()
Return type:

frac float. Fraction of catastrophic outliers for full sample

class rail.evaluation.metrics.pointestimates.PointSigmaIQR

Bases: PointStatsEz

Calculate sigmaIQR

evaluate()

Calculate the width of the e_z distribution using the Interquartile range

Return type:

sigma_IQR float. Width of ez distribution for full sample

class rail.evaluation.metrics.pointestimates.PointSigmaMAD

Bases: PointStatsEz

Function to calculate median absolute deviation and sigma based on MAD (just scaled up by 1.4826) for the full and magnitude trimmed samples of ez values

evaluate()
Return type:

sigma_mad float. Sigma median absolute deviation for full sample.

class rail.evaluation.metrics.pointestimates.PointStatsEz

Bases: MetricEvaluator

Copied from PZDC1paper repo. Adapted to remove the cut based on magnitude.

__init__(pzvec, szvec)

An object that takes in the vectors of the point photo-z the spec-z, and the i-band magnitudes for calculating the point statistics

Calculates: ez = (pz - sz) / (1 + sz), the quantity will be useful for calculating statistics

Parameters:
  • pzvec (ndarray) – Array of the point photo-z values

  • szvec (ndarray) – array of the spec-z values

Return type:

None

evaluate()

Return the ez values

Return type:

float | ndarray