firecrown.metadata_types
This module deals with metadata types.
This module contains metadata types definitions.
Attributes
Classes
The names of the two tracers in the sacc file. |
|
This enumeration type for galaxy measurements. |
|
This enumeration type for CMB measurements. |
|
This enumeration type for cluster measurements. |
|
The class used to store the redshift resolution data for a sacc file. |
|
Class defining a two-point correlation pair of redshift resolutions. |
|
Class defining the metadata for an harmonic-space two-point measurement. |
|
Class defining the metadata for a real-space two-point measurement. |
Functions
|
Define a comparison function for the Measurement enumeration. |
Check if two Measurement are compatible. |
|
Return True if x supports real-space calculations. |
|
Return True if x supports harmonic-space calculations. |
|
Check if two Measurement are compatible for real-space calculations. |
|
Check if two Measurement are compatible for harmonic-space calculations. |
|
|
Return the final SACC string used to denote the real-space correlation. |
Return the final SACC string used to denote the harmonic-space correlation. |
Module Contents
- class firecrown.metadata_types.TracerNames[source]
Bases:
firecrown.utils.YAMLSerializable
The names of the two tracers in the sacc file.
- name1: str
- name2: str
- firecrown.metadata_types.TRACER_NAMES_TOTAL
- class firecrown.metadata_types.Galaxies[source]
Bases:
firecrown.utils.YAMLSerializable,str,enum.Enum
This enumeration type for galaxy measurements.
It provides identifiers for the different types of galaxy-related types of measurement.
SACC has some notion of supporting other types, but incomplete implementation. When support for more types is added to SACC this enumeration needs to be updated.
- SHEAR_E
- SHEAR_T
- SHEAR_MINUS
- SHEAR_PLUS
- COUNTS
- sacc_type_name()[source]
Return the lower-case form of the main measurement type.
This is the first part of the SACC string used to denote a correlation between measurements of this type.
- Return type:
str
- sacc_measurement_name()[source]
Return the lower-case form of the specific measurement type.
This is the second part of the SACC string used to denote the specific measurement type.
- Return type:
str
- class firecrown.metadata_types.CMB[source]
Bases:
firecrown.utils.YAMLSerializable,str,enum.Enum
This enumeration type for CMB measurements.
It provides identifiers for the different types of CMB-related types of measurement.
SACC has some notion of supporting other types, but incomplete implementation. When support for more types is added to SACC this enumeration needs to be updated.
- CONVERGENCE
- sacc_type_name()[source]
Return the lower-case form of the main measurement type.
This is the first part of the SACC string used to denote a correlation between measurements of this type.
- Return type:
str
- sacc_measurement_name()[source]
Return the lower-case form of the specific measurement type.
This is the second part of the SACC string used to denote the specific measurement type.
- Return type:
str
- class firecrown.metadata_types.Clusters[source]
Bases:
firecrown.utils.YAMLSerializable,str,enum.Enum
This enumeration type for cluster measurements.
It provides identifiers for the different types of cluster-related types of measurement.
SACC has some notion of supporting other types, but incomplete implementation. When support for more types is added to SACC this enumeration needs to be updated.
- COUNTS
- sacc_type_name()[source]
Return the lower-case form of the main measurement type.
This is the first part of the SACC string used to denote a correlation between measurements of this type.
- Return type:
str
- sacc_measurement_name()[source]
Return the lower-case form of the specific measurement type.
This is the second part of the SACC string used to denote the specific measurement type.
- Return type:
str
- firecrown.metadata_types.Measurement
- firecrown.metadata_types.ALL_MEASUREMENTS: list[Measurement]
- firecrown.metadata_types.ALL_MEASUREMENT_TYPES
- firecrown.metadata_types.HARMONIC_ONLY_MEASUREMENTS
- firecrown.metadata_types.REAL_ONLY_MEASUREMENTS
- firecrown.metadata_types.EXACT_MATCH_MEASUREMENTS
- firecrown.metadata_types.LENS_REGEX
- firecrown.metadata_types.SOURCE_REGEX
- firecrown.metadata_types.GALAXY_SOURCE_TYPES
- firecrown.metadata_types.GALAXY_LENS_TYPES
- firecrown.metadata_types.compare_enums(a, b)[source]
Define a comparison function for the Measurement enumeration.
Return -1 if a comes before b, 0 if they are the same, and +1 if b comes before a.
- Parameters:
a (Measurement)
b (Measurement)
- Return type:
int
- class firecrown.metadata_types.InferredGalaxyZDist[source]
Bases:
firecrown.utils.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.
- bin_name: str
- z: numpy.ndarray
- dndz: numpy.ndarray
- measurements: set[Measurement]
- firecrown.metadata_types.measurement_is_compatible(a, b)[source]
Check if two Measurement are compatible.
Two Measurement are compatible if they can be correlated in a two-point function.
- Parameters:
a (Measurement)
b (Measurement)
- Return type:
bool
- firecrown.metadata_types.measurement_supports_real(x)[source]
Return True if x supports real-space calculations.
- Parameters:
x (Measurement)
- Return type:
bool
- firecrown.metadata_types.measurement_supports_harmonic(x)[source]
Return True if x supports harmonic-space calculations.
- Parameters:
x (Measurement)
- Return type:
bool
- firecrown.metadata_types.measurement_is_compatible_real(a, b)[source]
Check if two Measurement are compatible for real-space calculations.
Two Measurement are compatible if they can be correlated in a real-space two-point function.
- Parameters:
a (Measurement)
b (Measurement)
- Return type:
bool
- firecrown.metadata_types.measurement_is_compatible_harmonic(a, b)[source]
Check if two Measurement are compatible for harmonic-space calculations.
Two Measurement are compatible if they can be correlated in a harmonic-space two-point function.
- Parameters:
a (Measurement)
b (Measurement)
- Return type:
bool
- firecrown.metadata_types.type_to_sacc_string_real(x, y)[source]
Return the final SACC string used to denote the real-space correlation.
The SACC string used to denote the real-space correlation type between measurements of x and y.
- Parameters:
x (Measurement)
y (Measurement)
- Return type:
str
- firecrown.metadata_types.type_to_sacc_string_harmonic(x, y)[source]
Return the final SACC string used to denote the harmonic-space correlation.
the SACC string used to denote the harmonic-space correlation type between measurements of x and y.
- Parameters:
x (Measurement)
y (Measurement)
- Return type:
str
- firecrown.metadata_types.MEASURED_TYPE_STRING_MAP: dict[str, tuple[Measurement, Measurement]]
- class firecrown.metadata_types.TwoPointXY[source]
Bases:
firecrown.utils.YAMLSerializable
Class defining a two-point correlation pair of redshift resolutions.
It is used to store the two redshift resolutions for the two bins being correlated.
- x_measurement: Measurement
- y_measurement: Measurement
- class firecrown.metadata_types.TwoPointHarmonic[source]
Bases:
firecrown.utils.YAMLSerializable
Class defining the metadata for an harmonic-space two-point measurement.
The class used to store the metadata for a (spherical) harmonic-space two-point function measured on a sphere.
This includes the two redshift resolutions (one for each binned quantity) and the array of (integer) l’s at which the two-point function which has this metadata were calculated.
- XY: TwoPointXY
- ells: numpy.typing.NDArray[numpy.int64]
- window: None | numpy.typing.NDArray[numpy.float64] = None
- class firecrown.metadata_types.TwoPointReal[source]
Bases:
firecrown.utils.YAMLSerializable
Class defining the metadata for a real-space two-point measurement.
The class used to store the metadata for a real-space two-point function measured on a sphere.
This includes the two redshift resolutions (one for each binned quantity) and the a array of (floating point) theta (angle) values at which the two-point function which has this metadata were calculated.
- XY: TwoPointXY
- thetas: numpy.typing.NDArray[numpy.float64]