firecrown.generators.inferred_galaxy_zdist.ZDistLSSTSRD#
- class firecrown.generators.inferred_galaxy_zdist.ZDistLSSTSRD(alpha, beta, z0, max_z=5.0, use_autoknot=False, autoknots_reltol=0.0001, autoknots_abstol=1e-15)[source]#
Bases:
objectLSST Inferred galaxy redshift distributions.
Inferred galaxy redshift distribution is based on the LSST Science Requirements Document (SRD), equation 5. Note that the SRD fixes $beta = 2$.
The values of $alpha$ and $z_0$ are different for Year 1 and Year 10. ZDistLLSTSRD provides these values as defaults and allows for greater flexibility when desired.
- Parameters:
alpha (
float) –beta (
float) –z0 (
float) –max_z (
float) –use_autoknot (
bool) –autoknots_reltol (
float) –autoknots_abstol (
float) –
Public Methods:
__init__(alpha, beta, z0[, max_z, ...])Initialize the LSST Inferred galaxy redshift distribution.
year_1_lens([alpha, beta, z0])Create a ZDistLSSTSRD object for the first year of LSST.
year_1_source([alpha, beta, z0])Create a ZDistLSSTSRD object for the first year of LSST.
year_10_lens([alpha, beta, z0])Create a ZDistLSSTSRD object for the tenth year of LSST.
year_10_source([alpha, beta, z0])Create a ZDistLSSTSRD object for the tenth year of LSST.
distribution(z)Generate the inferred galaxy redshift distribution.
distribution_zp(zp, sigma_z)Generate the Gaussian convolution of the distribution.
compute_distribution(sigma_z)Generate the inferred galaxy redshift distribution.
Generate the inferred galaxy redshift distribution.
equal_area_bins(n_bins, sigma_z, last_z[, ...])Generate equal area bins for the distribution.
binned_distribution(*, zpl, zpu, sigma_z, z, ...)Generate the inferred galaxy redshift distribution in bins.
Private Methods:
_integrated_gaussian_scalar(zpl, zpu, sigma_z, z)Generate the integrated Gaussian distribution.
_integrated_gaussian(zpl, zpu, sigma_z, z)Generate the integrated Gaussian distribution.
- _integrated_gaussian(zpl, zpu, sigma_z, z)[source]#
Generate the integrated Gaussian distribution.
- Parameters:
zpl (
float) –zpu (
float) –sigma_z (
float) –z (
ndarray[tuple[int,...],dtype[TypeVar(_ScalarType_co, bound=generic, covariant=True)]]) –
- Return type:
ndarray[tuple[int,...],dtype[TypeVar(_ScalarType_co, bound=generic, covariant=True)]]
- _integrated_gaussian_scalar(zpl, zpu, sigma_z, z)[source]#
Generate the integrated Gaussian distribution.
- Parameters:
zpl (
float) – The lower bound of the integrationzpu (
float) – The upper bound of the integrationsigma_z (
float) – The resolution parameterz (
float) – The redshifts at which to evaluate the distribution
- Return type:
float- Returns:
The integrated distribution
- binned_distribution(*, zpl, zpu, sigma_z, z, name, measurements)[source]#
Generate the inferred galaxy redshift distribution in bins.
- Parameters:
zpl (
float) – The lower bound of the integrationzpu (
float) – The upper bound of the integrationsigma_z (
float) – The resolution parameterz (
ndarray[tuple[int,...],dtype[TypeVar(_ScalarType_co, bound=generic, covariant=True)]]) – The redshifts at which to evaluate the distributionname (
str) – The name of the distributionmeasurements (
set[Galaxies|CMB|Clusters]) – The set of measurements of the distribution
- Return type:
- Returns:
The inferred galaxy redshift distribution
- compute_distribution(sigma_z)[source]#
Generate the inferred galaxy redshift distribution.
Computes the distribution by convolving the true distribution with a Gaussian. The convolution is computed using the AutoKnots algorithm of NumCosmo.
- Parameters:
sigma_z (
float) – The resolution parameter- Return type:
StatsDist1d- Returns:
The inferred galaxy redshift distribution
- compute_true_distribution()[source]#
Generate the inferred galaxy redshift distribution.
Computes the distribution without the convolution with the Gaussian. That is, the true redshift distribution.
- Return type:
StatsDist1d- Returns:
The inferred galaxy redshift distribution
- distribution(z)[source]#
Generate the inferred galaxy redshift distribution.
- Parameters:
z (
ndarray[tuple[int,...],dtype[TypeVar(_ScalarType_co, bound=generic, covariant=True)]]) – The redshifts at which to evaluate the distribution- Return type:
ndarray[tuple[int,...],dtype[TypeVar(_ScalarType_co, bound=generic, covariant=True)]]- Returns:
The inferred galaxy redshift distribution
- distribution_zp(zp, sigma_z)[source]#
Generate the Gaussian convolution of the distribution.
- Parameters:
sigma_z (
float) – The resolution parameterzp (
float) – The photometric redshift
- Return type:
float- Returns:
The Gaussian distribution
- equal_area_bins(n_bins, sigma_z, last_z, use_true_distribution=False)[source]#
Generate equal area bins for the distribution.
In order to compute the bin edges, the convolution of the distribution with a Gaussian is computed. The bin edges are then computed by inverting the cumulative distribution function of the convolution.
If the true distribution is used, the convolution is not computed. This provides a faster way to compute the bin edges.
- Parameters:
n_bins (
int) – The number of binssigma_z (
float) – The resolution parameterlast_z (
float) – The last redshift to consideruse_true_distribution (
bool) – Whether to use the true distribution
- Return type:
ndarray[tuple[int,...],dtype[TypeVar(_ScalarType_co, bound=generic, covariant=True)]]- Returns:
The bin edges
- classmethod year_10_lens(alpha=0.9, beta=2.0, z0=0.28, **kwargs)[source]#
Create a ZDistLSSTSRD object for the tenth year of LSST.
It uses the default values of the alpha, beta and z0 parameters from the LSST SRD Year 10 for the lens distribution.
- Parameters:
alpha (
float) – The alpha parameter of the distributionbeta (
float) – The beta parameter of the distributionz0 (
float) – The z0 parameter of the distributionkwargs (
Unpack[ZDistLSSTSRDOpt]) –
- Return type:
- Returns:
A ZDistLSSTSRD object.
- classmethod year_10_source(alpha=0.68, beta=2.0, z0=0.11, **kwargs)[source]#
Create a ZDistLSSTSRD object for the tenth year of LSST.
It uses the default values of the alpha, beta and z0 parameters from the LSST SRD Year 10 for the source distribution.
- Parameters:
alpha (
float) – The alpha parameter of the distributionbeta (
float) – The beta parameter of the distributionz0 (
float) – The z0 parameter of the distributionkwargs (
Unpack[ZDistLSSTSRDOpt]) –
- Return type:
- Returns:
A ZDistLSSTSRD object.
- classmethod year_1_lens(alpha=0.94, beta=2.0, z0=0.26, **kwargs)[source]#
Create a ZDistLSSTSRD object for the first year of LSST.
It uses the default values of the alpha, beta and z0 parameters from the LSST SRD Year 1 for the lens distribution.
- Parameters:
alpha (
float) – The alpha parameter of the distributionbeta (
float) – The beta parameter of the distributionz0 (
float) – The z0 parameter of the distributionkwargs (
Unpack[ZDistLSSTSRDOpt]) –
- Return type:
- Returns:
A ZDistLSSTSRD object.
- classmethod year_1_source(alpha=0.78, beta=2.0, z0=0.13, **kwargs)[source]#
Create a ZDistLSSTSRD object for the first year of LSST.
It uses the default values of the alpha, beta and z0 parameters from the LSST SRD Year 1 for the source distribution.
- Parameters:
alpha (
float) – The alpha parameter of the distributionbeta (
float) – The beta parameter of the distributionz0 (
float) – The z0 parameter of the distributionkwargs (
Unpack[ZDistLSSTSRDOpt]) –
- Return type:
- Returns:
A ZDistLSSTSRD object.