NcGalaxyRedshift

NcGalaxyRedshift — Abstract class describing galaxy redshifts.

Stability Level

Unstable, unless otherwise indicated

Functions

Object Hierarchy

    GObject
    ╰── NcGalaxyRedshift
        ├── NcGalaxyRedshiftGauss
        ├── NcGalaxyRedshiftSpec
        ╰── NcGalaxyRedshiftSpline

Description

Abstract class used to define a generic galaxy redshift probability distribution $P_g(z)$.

Functions

NcGalaxyRedshiftF ()

gdouble
(*NcGalaxyRedshiftF) (const gdouble z,
                      gpointer userdata);

nc_galaxy_redshift_ref ()

NcGalaxyRedshift *
nc_galaxy_redshift_ref (NcGalaxyRedshift *gz);

Increase the reference of gz by one.

Parameters

Returns

gz .

[transfer full]


nc_galaxy_redshift_free ()

void
nc_galaxy_redshift_free (NcGalaxyRedshift *gz);

Decrease the reference count of gz by one.

Parameters


nc_galaxy_redshift_clear ()

void
nc_galaxy_redshift_clear (NcGalaxyRedshift **gz);

Decrease the reference count of gz by one, and sets the pointer *gz to NULL.

Parameters


nc_galaxy_redshift_has_dist ()

gboolean
nc_galaxy_redshift_has_dist (NcGalaxyRedshift *gz);

[virtual has_dist]

Parameters

Returns

whether the galaxy has a redshift distribution.


nc_galaxy_redshift_mode ()

gdouble
nc_galaxy_redshift_mode (NcGalaxyRedshift *gz);

[virtual mode]

Parameters

Returns

the value of the distribution mode or the spectroscopic redshift when available.


nc_galaxy_redshift_nintervals ()

guint
nc_galaxy_redshift_nintervals (NcGalaxyRedshift *gz);

[virtual nintervals]

Parameters

Returns

the number of disjointed intervals in the distribution.


nc_galaxy_redshift_interval_weight ()

gdouble
nc_galaxy_redshift_interval_weight (NcGalaxyRedshift *gz,
                                    const guint di);

[virtual interval_weight]

Parameters

gz

a NcGalaxyRedshift

 

di

distribution index $i$

 

Returns

the weight associated to interval $i$.


nc_galaxy_redshift_pdf_limits ()

void
nc_galaxy_redshift_pdf_limits (NcGalaxyRedshift *gz,
                               const guint di,
                               gdouble *zmin,
                               gdouble *zmax);

This method provides the limits of the redshift probability density $p_i(z)$.

[virtual pdf_limits]

Parameters

gz

a NcGalaxyRedshift

 

di

distribution index $i$

 

zmin

the redshift lower limit.

[out caller-allocates]

zmax

the redshift upper limit.

[out caller-allocates]

nc_galaxy_redshift_pdf ()

gdouble
nc_galaxy_redshift_pdf (NcGalaxyRedshift *gz,
                        const guint di,
                        const gdouble z);

[virtual pdf]

Parameters

gz

a NcGalaxyRedshift

 

di

distribution index $i$

 

z

the redshift $z$

 

Returns

the probability density at z , $p_{i}(z)$.


nc_galaxy_redshift_gen ()

gdouble
nc_galaxy_redshift_gen (NcGalaxyRedshift *gz,
                        NcmRNG *rng);

Generates a redshift from the distribution using rng .

[virtual gen]

Parameters

gz

a NcGalaxyRedshift

 

rng

a NcmRNG

 

Returns

the generated value $z$.


nc_galaxy_redshift_quantile ()

gdouble
nc_galaxy_redshift_quantile (NcGalaxyRedshift *gz,
                             const gdouble q);

Computes the $q$ quantile.

[virtual quantile]

Parameters

gz

a NcGalaxyRedshift

 

q

the quantile $q \in [0, 1]$

 

Returns

the $q$ quantile.


nc_galaxy_redshift_compute_mean_m2lnf ()

gdouble
nc_galaxy_redshift_compute_mean_m2lnf (NcGalaxyRedshift *gz,
                                       guint gal_i,
                                       NcGalaxyRedshiftF m2lnf,
                                       gpointer userdata);

Computes the mean of a functions through $\int\mathrm{d}z P(z)f(z)$.

[virtual compute_mean_m2lnf]

Parameters

gz

a NcGalaxyRedshift

 

gal_i

galaxy redshift id

 

m2lnf

a NcGalaxyRedshiftF.

[scope call]

userdata

user data for m2lnf calls.

[closure]

Returns

$-2\ln\left[\int \mathrm{d}z P(z)f(z)\right]$.


nc_galaxy_redshift_len ()

guint
nc_galaxy_redshift_len (NcGalaxyRedshift *gz);

[virtual len]

Parameters

Returns

number of galaxies in the object.