firecrown.data_types
This module deals with data types.
This module contains data types definitions.
Classes
Class defining the data for a two-point measurement. |
|
Wrapper for a np.ndarray that represents some observed data values. |
|
Wrapper for an np.ndarray that represents a prediction by some theory. |
Functions
|
Return a bare np.ndarray with the difference between data and theory. |
Package Contents
- class firecrown.data_types.TwoPointMeasurement
Bases:
firecrown.utils.YAMLSerializable
Class defining the data for a two-point measurement.
The class used to store the data for a two-point function measured on a sphere.
This includes the measured two-point function, their indices in the covariance matrix and the name of the covariance matrix. The corresponding metadata is also stored.
- data: numpy.typing.NDArray[numpy.float64]
- indices: numpy.typing.NDArray[numpy.int64]
- covariance_name: str
- __post_init__()
Make sure the data and indices have the same shape.
- Return type:
None
- __eq__(other)
Equality test for TwoPointMeasurement objects.
- Return type:
bool
- is_real()
Check if the metadata is real.
- Return type:
bool
- is_harmonic()
Check if the metadata is harmonic.
- Return type:
bool
- firecrown.data_types.residuals(data, theory)
Return a bare np.ndarray with the difference between data and theory.
This is to be preferred to using arithmetic on the vectors directly.
- Parameters:
data (firecrown.data_types._vectors.DataVector)
theory (firecrown.data_types._vectors.TheoryVector)
- Return type:
numpy.typing.NDArray[numpy.float64]
- class firecrown.data_types.DataVector
Bases:
numpy.typing.NDArray[numpy.float64]
Wrapper for a np.ndarray that represents some observed data values.
- classmethod create(vals)
Create a DataVector that wraps a copy of the given array vals.
- Parameters:
vals (numpy.typing.NDArray[numpy.float64]) – the array to be copied and wrapped
- Returns:
a new DataVector
- Return type:
- classmethod from_list(vals)
Create a DataVector from the given list of floats.
- Parameters:
vals (list[float]) – the list of floats
- Returns:
a new DataVector
- Return type:
- class firecrown.data_types.TheoryVector
Bases:
numpy.typing.NDArray[numpy.float64]
Wrapper for an np.ndarray that represents a prediction by some theory.
- classmethod create(vals)
Create a TheoryVector that wraps a copy of the given array vals.
- Parameters:
vals (numpy.typing.NDArray[numpy.float64]) – the array to be copied and wrapped
- Returns:
a new TheoryVector
- Return type:
- classmethod from_list(vals)
Create a TheoryVector from the given list of floats.
- Parameters:
vals (list[float]) – the list of floats
- Returns:
a new TheoryVector
- Return type: