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. |
|
String to specify the subtype or origin of a measurement source. |
|
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. |
|
This class defines the two-point correlation space. |
|
Defines methods for filtering two-point measurements. |
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.TypeSource[source]
Bases:
str
String to specify the subtype or origin of a measurement source.
This helps distinguish between different categories of sources within the same measurement type. For example:
In galaxy counts, this could differentiate between red and blue galaxies.
In CMB lensing, it could identify data from different instruments like Planck or SPT.
- DEFAULT: TypeSource
- 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
- PART_OF_XI_MINUS
- SHEAR_MINUS
- PART_OF_XI_PLUS
- SHEAR_PLUS
- COUNTS
- is_shear()[source]
Return True if the measurement is a shear measurement, False otherwise.
- Returns:
True if the measurement is a shear measurement, False otherwise
- Return type:
bool
- 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.INCOMPATIBLE_MEASUREMENTS
- firecrown.metadata_types.LENS_REGEX
- firecrown.metadata_types.SOURCE_REGEX
- firecrown.metadata_types.CMB_REGEX
- firecrown.metadata_types.GALAXY_SOURCE_TYPES
- firecrown.metadata_types.GALAXY_LENS_TYPES
- firecrown.metadata_types.CMB_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]
- type_source: TypeSource
- 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
- window_ells: 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]
- class firecrown.metadata_types.TwoPointCorrelationSpace[source]
Bases:
firecrown.utils.YAMLSerializable,enum.StrEnum
This class defines the two-point correlation space.
The two-point correlation space can be either real or harmonic. The real space corresponds measurements in terms of angular separation, while the harmonic space corresponds to measurements in terms of spherical harmonics decomposition.
- REAL
- HARMONIC
- class firecrown.metadata_types.TwoPointFilterMethod[source]
Bases:
firecrown.utils.YAMLSerializable,enum.StrEnum
Defines methods for filtering two-point measurements.
When filtering a two-point measurement with an associated window, the filter is applied to the window first. The user must then choose how to proceed:
If filtering by LABEL, the window_ells labels are used to determine whether the observation should be kept.
If filtering by SUPPORT, the full ell support must lie within the allowed range.
If filtering by SUPPORT_95, only the 95% support region must lie within the range.
In all cases, filters define an interval of ells to retain.
- LABEL
- SUPPORT
- SUPPORT_95