firecrown.metadata_types.InferredGalaxyZDist

firecrown.metadata_types.InferredGalaxyZDist#

class firecrown.metadata_types.InferredGalaxyZDist(*, bin_name, z, dndz, measurements)[source]#

Bases: YAMLSerializable

The class used to store the redshift resolution data for a sacc file.

The sacc file is a complicated set of tracers (bins) and surveys. This class is used to store the redshift resolution data for a single photometric bin.

Parameters:
  • bin_name (str) –

  • z (ndarray) –

  • dndz (ndarray) –

  • measurements (set[Galaxies | CMB | Clusters]) –

Public Methods:

__post_init__()

Validate the redshift resolution data.

__eq__(other)

Equality test for InferredGalaxyZDist.

__hash__()

Return hash(self).

__replace__(**changes)

__init__(*, bin_name, z, dndz, measurements)

param bin_name:

__repr__()

Return repr(self).

__setattr__(name, value)

Implement setattr(self, name, value).

__delattr__(name)

Implement delattr(self, name).

Inherited from YAMLSerializable

to_yaml()

Return the YAML representation of the object.

from_yaml(yaml_str)

Load the object from YAML.


__eq__(other)[source]#

Equality test for InferredGalaxyZDist.

Two InferredGalaxyZDist are equal if they have equal bin_name, z, dndz, and measurement.

__post_init__()[source]#

Validate the redshift resolution data. :rtype: None

  • Make sure the z and dndz arrays have the same shape;

  • The measurement must be of type Measurement.

  • The bin_name should not be empty.