Observations¶
The following functions provide functionality for simulating observational effects of surveys.
Redshift distribution¶
- glass.gaussian_nz(z, mean, sigma, *, norm=None)[source]¶
Gaussian redshift distribution.
The redshift follows a Gaussian distribution with the given mean and standard deviation.
If
meanorsigmaare array_like, their axes will be the leading axes of the redshift distribution.- Parameters:
z (
ndarray[tuple[int,...],dtype[float64]]) – Redshift values of the distribution.mean (
float|ndarray[tuple[int,...],dtype[float64]]) – Mean(s) of the redshift distribution.sigma (
float|ndarray[tuple[int,...],dtype[float64]]) – Standard deviation(s) of the redshift distribution.norm (
float|ndarray[tuple[int,...],dtype[float64]] |None) – If given, the normalisation of the distribution.
- Returns:
The redshift distribution at the given
zvalues.- Return type:
- glass.smail_nz(z, z_mode, alpha, beta, *, norm=None)[source]¶
Redshift distribution following Smail et al. (1994).
The redshift follows the Smail et al. [Smail94] redshift distribution.
- Parameters:
z (
ndarray[tuple[int,...],dtype[float64]]) – Redshift values of the distribution.z_mode (
float|ndarray[tuple[int,...],dtype[float64]]) – Mode of the redshift distribution, must be positive.alpha (
float|ndarray[tuple[int,...],dtype[float64]]) – Power law exponent (z/z0)^alpha, must be positive.beta (
float|ndarray[tuple[int,...],dtype[float64]]) – Log-power law exponent exp[-(z/z0)^beta], must be positive.norm (
float|ndarray[tuple[int,...],dtype[float64]] |None) – If given, the normalisation of the distribution.
- Returns:
The redshift distribution at the given
zvalues.- Return type:
Notes
The probability distribution function \(p(z)\) for redshift \(z\) is given by Amara & Refregier [Amara07] as
\[p(z) \sim \left(\frac{z}{z_0}\right)^\alpha \exp\left[-\left(\frac{z}{z_0}\right)^\beta\right] \;,\]where \(z_0\) is matched to the given mode of the distribution.
- glass.fixed_zbins(zmin, zmax, *, nbins=None, dz=None)[source]¶
Tomographic redshift bins of fixed size.
This function creates contiguous tomographic redshift bins of fixed size. It takes either the number or size of the bins.
- Parameters:
- Returns:
A list of redshift bin edges.
- Raises:
ValueError – If both
nbinsanddzare given.- Return type:
- glass.equal_dens_zbins(z, nz, nbins)[source]¶
Equal density tomographic redshift bins.
This function subdivides a source redshift distribution into
nbinstomographic redshift bins with equal density.- Parameters:
- Returns:
A list of redshift bin edges.
- Return type:
- glass.tomo_nz_gausserr(z, nz, sigma_0, zbins)[source]¶
Tomographic redshift bins with a Gaussian redshift error.
This function takes a _true_ overall source redshift distribution
z,nzand returns tomographic source redshift distributions for the tomographic redshift bins given byzbins. It is assumed that sources are assigned a tomographic redshift bin with a Gaussian error [Amara07]. The standard deviation of the Gaussian depends on redshift and is given bysigma(z) = sigma_0*(1 + z).- Parameters:
z (
ndarray[tuple[int,...],dtype[float64]]) – The true source redshift distribution. Must be one-dimensional.nz (
ndarray[tuple[int,...],dtype[float64]]) – The true source redshift distribution. Must be one-dimensional.sigma_0 (
float) – Redshift error in the tomographic binning at zero redshift.zbins (
list[tuple[float,float]]) – List of redshift bin edges.
- Returns:
The tomographic redshift bins convolved with a gaussian error. Array has a shape (nbins, len(z))
- Return type:
See also
equal_dens_zbinsproduce equal density redshift bins
fixed_zbinsproduce redshift bins of fixed size
Visibility¶
- glass.vmap_galactic_ecliptic(nside, galactic=(30, 90), ecliptic=(20, 80))[source]¶
Visibility map masking galactic and ecliptic plane.
This function returns a visibility map that blocks out stripes for the galactic and ecliptic planes. The location of the stripes is set with optional parameters.
- Parameters:
- Returns:
A HEALPix visibility map.
- Raises:
- Return type: