Class
NumCosmoGalaxyRedshiftBinning
Description [src]
final class NumCosmo.GalaxyRedshiftBinning : GObject.Object
{
/* No available fields */
}
Binning calculator: the true-redshift distribution of a photometric bin.
A calculator (a plain GObject, NOT an NcmModel and NOT held in an NcmMSet)
that produces the true-redshift distribution $\mathrm{d}n/\mathrm{d}z$ of the
galaxies selected into a photometric window $[z_{p,\min}, z_{p,\max}]$, from a
population model $P(z\mid I)$ (a NcGalaxyRedshiftPop) and a population photo-z
observable $P(z_p\mid z)$ (a NcGalaxyRedshiftObsSel):
$$ \frac{\mathrm{d}n}{\mathrm{d}z}(z) \propto P(z\mid I)\,
\frac{W(z; z_{p,\min}, z_{p,\max})}{N(z)}, \qquad
N(z) = \int_0^\infty P(z_p\mid z)\,\mathrm{d}z_p, $$
where $W$ is the observable’s selection mass in the window and $N$ the physical
(photo-z $\ge 0$) normalization. Both come from the observable’s generic
nc_galaxy_redshift_obs_sel_window_mass(), so the calculator is scheme-free (no
per-kernel subclass).
The photometric window is NOT object state: a single calculator produces
$\mathrm{d}n/\mathrm{d}z$ for arbitrarily many bins. The window is an argument
to nc_galaxy_redshift_binning_compute_dndz() (and the on-nodes variant), which
are pure producers: they return a freshly-built, normalized NcmSpline on each
call and cache nothing, so they do NOT require nc_galaxy_redshift_binning_prepare().
nc_galaxy_redshift_binning_prepare() builds only the window-free marginal
photo-z density $P(z_p)$ used by nc_galaxy_redshift_binning_eval_pzp() and the
equal-area edges nc_galaxy_redshift_binning_compute_equal_area_photoz_bins();
those two read the cached marginal and take no models. Re-call prepare after
changing the model parameters.
Following the NcDistance convention, the calculator does NOT hold the models:
they are consumed only inside the methods that need them and are passed as
arguments. The cached marginal is built with an adaptive-knot scheme that
guarantees a relative interpolation-error tolerance
(NcGalaxyRedshiftBinning:reltol). Photo-z systematics (shift/stretch) are
intentionally NOT here: they belong to a future n(z) model layered on top of
this producer.
Constructors
nc_galaxy_redshift_binning_new
Creates a new NcGalaxyRedshiftBinning. The photometric window is not held by
the calculator: it is supplied to each dn/dz method. The population and
observable models are likewise not held; they are passed to every method that
needs them.
Functions
nc_galaxy_redshift_binning_clear
Decreases the reference count of gsdrb by one, and sets the pointer *gsdrb
to NULL.
nc_galaxy_redshift_binning_lsst_srd_edges
Computes the LSST SRD tomographic photo-z bin edges for type and hands back
the matching population + Gaussian observable models (both configured for
type) via the out-parameters. The edges follow the LSST DESC SRD recipe:.
Instance methods
nc_galaxy_redshift_binning_compute_dndz
Builds the normalized bin $\mathrm{d}n/\mathrm{d}z$ for the photometric window
[zp_min, zp_max] as a fresh adaptive-knot NcmSpline meeting
NcGalaxyRedshiftBinning:reltol over its effective support, normalized to unit
integral. Pure producer: consumes the models on the call, holds nothing, and
does NOT require nc_galaxy_redshift_binning_prepare().
nc_galaxy_redshift_binning_compute_dndz_on_nodes
As nc_galaxy_redshift_binning_compute_dndz(), but returns the normalized bin
$\mathrm{d}n/\mathrm{d}z$ tabulated on the given z_nodes (0 outside the
effective support). Same pure-producer semantics: holds nothing and does NOT
require nc_galaxy_redshift_binning_prepare().
nc_galaxy_redshift_binning_compute_equal_area_photoz_bins
Computes n_bins + 1 photometric-redshift edges that split the marginal
$P(z_p)$ (see nc_galaxy_redshift_binning_eval_pzp()) into n_bins slices of
equal integrated probability, by inverting its CDF. Suitable for equal-area
source binning. Requires a prior nc_galaxy_redshift_binning_prepare(); zp_max
must not exceed NcGalaxyRedshiftBinning:zp-support-max.
nc_galaxy_redshift_binning_eval_pzp
Evaluates the marginal photometric-redshift density $$ P(z_p) = \int P(z\mid I)\,\frac{f(z_p\mid z)}{N(z)}\,\mathrm{d}z, \qquad N(z) = \int_0^\infty f(z_p’\mid z)\,\mathrm{d}z_p’, $$ the distribution of photo-z over the whole population (independent of any bin window). Requires a prior nc_galaxy_redshift_binning_prepare().
nc_galaxy_redshift_binning_prepare
Builds the window-free marginal photo-z density $P(z_p)$ over
$[0, \mathtt{zp_support_max}]$ used by nc_galaxy_redshift_binning_eval_pzp()
and nc_galaxy_redshift_binning_compute_equal_area_photoz_bins(). The models are
consumed here and NOT retained; re-call this after changing their parameters.
nc_galaxy_redshift_binning_set_reltol
Sets the relative interpolation tolerance and invalidates the cached marginal $P(z_p)$.
nc_galaxy_redshift_binning_set_zp_support_max
Sets the maximum photometric redshift over which the marginal $P(z_p)$ is tabulated and invalidates the cached marginal distribution. Does not affect the bin $\mathrm{d}n/\mathrm{d}z$, which is independent of the P(zp) support.
Properties
NumCosmo.GalaxyRedshiftBinning:reltol
Relative interpolation-error tolerance for the cached adaptive splines.
NumCosmo.GalaxyRedshiftBinning:zp-support-max
Maximum photometric redshift for the marginal $P(z_p)$ support, used by
nc_galaxy_redshift_binning_eval_pzp() and the equal-area bin edges.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.