NcCBE

NcCBE — CLASS (Cosmic Linear Anisotropy Solving System) backend

Functions

Properties

gboolean calc-transfer Read / Write / Construct
double matter-pk-maxk Read / Write / Construct
double matter-pk-maxz Read / Write / Construct
NcCBEPrecision * precision Read / Write / Construct
guint scalar-lmax Read / Write / Construct
NcDataCMBDataType target-Cls Read / Write / Construct
guint tensor-lmax Read / Write / Construct
gboolean use-lensed-Cls Read / Write / Construct
gboolean use-ppf Read / Write / Construct
gboolean use-tensor Read / Write / Construct
gboolean use-thermodyn Read / Write / Construct
guint vector-lmax Read / Write / Construct
guint verbosity Read / Write / Construct

Object Hierarchy

    GObject
    ╰── NcCBE

Description

This object provides an interface for the CLASS code.

If you use this object please cite: Blas (2011) CLASS II, see also:

Functions

NcCBECall ()

void
(*NcCBECall) (NcCBE *cbe,
              NcHICosmo *cosmo);

NcCBEFree ()

void
(*NcCBEFree) (NcCBE *cbe);

nc_cbe_new ()

NcCBE *
nc_cbe_new (void);

FIXME

[constructor]

Returns

a new NcCBEPrecision.

[transfer full]


nc_cbe_prec_new ()

NcCBE *
nc_cbe_prec_new (NcCBEPrecision *cbe_prec);

FIXME

[constructor]

Parameters

cbe_prec

a NcCBEPrecision.

 

Returns

a new NcCBEPrecision.

[transfer full]


nc_cbe_prec_file_new ()

NcCBE *
nc_cbe_prec_file_new (gchar *prec_filename);

nc_cbe_ref ()

NcCBE *
nc_cbe_ref (NcCBE *cbe);

Increases the reference count of cbe .

Parameters

cbe

a NcCBE

 

Returns

cbe .

[transfer full]


nc_cbe_free ()

void
nc_cbe_free (NcCBE *cbe);

Decreases the reference count of cbe .

Parameters

cbe

a NcCBE

 

nc_cbe_clear ()

void
nc_cbe_clear (NcCBE **cbe);

Decreases the reference count of *cbe and sets *cbe to NULL.

Parameters

cbe

a NcCBE

 

nc_cbe_set_precision ()

void
nc_cbe_set_precision (NcCBE *cbe,
                      NcCBEPrecision *cbe_prec);

Sets the cbe_prec as the precision object.

Parameters

cbe

a NcCBE

 

cbe_prec

a NcCBEPrecision

 

nc_cbe_set_target_Cls ()

void
nc_cbe_set_target_Cls (NcCBE *cbe,
                       NcDataCMBDataType target_Cls);

Sets the target_Cls target.

Parameters

cbe

a NcCBE

 

target_Cls

a NcDataCMBDataType.

 

nc_cbe_set_calc_transfer ()

void
nc_cbe_set_calc_transfer (NcCBE *cbe,
                          gboolean calc_transfer);

Sets whether it should calculate the transfer function.

Parameters

cbe

a NcCBE

 

calc_transfer

a boolean

 

nc_cbe_set_lensed_Cls ()

void
nc_cbe_set_lensed_Cls (NcCBE *cbe,
                       gboolean use_lensed_Cls);

Sets whether it should use lensed Cl's.

Parameters

cbe

a NcCBE

 

use_lensed_Cls

a boolean.

 

nc_cbe_set_tensor ()

void
nc_cbe_set_tensor (NcCBE *cbe,
                   gboolean use_tensor);

Sets whether it should use tensor contribution.

Parameters

cbe

a NcCBE

 

use_tensor

a boolean

 

nc_cbe_set_thermodyn ()

void
nc_cbe_set_thermodyn (NcCBE *cbe,
                      gboolean use_thermodyn);

Sets whether it should use the thermodynamics module.

Parameters

cbe

a NcCBE

 

use_thermodyn

a boolean

 

nc_cbe_set_scalar_lmax ()

void
nc_cbe_set_scalar_lmax (NcCBE *cbe,
                        guint scalar_lmax);

Sets the maximum multipole $\ell_\textrm{max}$ at which the angular power spectrum $C_{\ell}$ of the scalar mode is computed.

Parameters

cbe

a NcCBE

 

scalar_lmax

a guint

 

nc_cbe_set_vector_lmax ()

void
nc_cbe_set_vector_lmax (NcCBE *cbe,
                        guint vector_lmax);

Sets the maximum multipole $\ell_\textrm{max}$ at which the angular power spectrum $C_{\ell}$ of the vector mode is computed.

Parameters

cbe

a NcCBE

 

vector_lmax

a guint

 

nc_cbe_set_tensor_lmax ()

void
nc_cbe_set_tensor_lmax (NcCBE *cbe,
                        guint tensor_lmax);

Sets the maximum multipole $\ell_\textrm{max}$ at which the angular power spectrum $C_{\ell}$ of the tensor mode is computed.

Parameters

cbe

a NcCBE

 

tensor_lmax

a guint

 

nc_cbe_set_max_matter_pk_z ()

void
nc_cbe_set_max_matter_pk_z (NcCBE *cbe,
                            gdouble zmax);

Sets $z_\mathrm{max}$ for (until?) which the matter power spectrum $P(k, z)$ is evaluated.

Parameters

cbe

a NcCBE

 

zmax

maximum redshift

 

nc_cbe_set_max_matter_pk_k ()

void
nc_cbe_set_max_matter_pk_k (NcCBE *cbe,
                            gdouble kmax);

Sets $k_\mathrm{max}$ for which the matter power spectrum $P (k, z)$ is evaluated.

Parameters

cbe

a NcCBE

 

kmax

maximum mode

 

nc_cbe_get_max_matter_pk_z ()

gdouble
nc_cbe_get_max_matter_pk_z (NcCBE *cbe);

Gets the maximum redshift $z_\mathrm{max}$ for which the matter power spectrum $P(k, z)$ is evaluated.

Parameters

cbe

a NcCBE

 

Returns

$z_\mathrm{max}$.


nc_cbe_get_max_matter_pk_k ()

gdouble
nc_cbe_get_max_matter_pk_k (NcCBE *cbe);

Gets the maximum mode $k_\mathrm{max}$ for which the matter power spectrum $P (k, z)$ is evaluated.

Parameters

cbe

a NcCBE

 

Returns

$k_\mathrm{max}$.


nc_cbe_peek_precision ()

NcCBEPrecision *
nc_cbe_peek_precision (NcCBE *cbe);

Peeks the NcCBEPrecision object.

Parameters

cbe

a NcCBE

 

Returns

the NcCBEPrecision object.

[transfer none]


nc_cbe_get_target_Cls ()

NcDataCMBDataType
nc_cbe_get_target_Cls (NcCBE *cbe);

Gets the target_Cls flags.

Parameters

cbe

a NcCBE

 

Returns

the NcDataCMBDataType flags.


nc_cbe_calc_transfer ()

gboolean
nc_cbe_calc_transfer (NcCBE *cbe);

Gets whether it calculates the transfer function.

Parameters

cbe

a NcCBE

 

Returns

a boolean.


nc_cbe_lensed_Cls ()

gboolean
nc_cbe_lensed_Cls (NcCBE *cbe);

Gets whether it uses lensed $C_{\ell}$'s.

Parameters

cbe

a NcCBE

 

Returns

a boolean.


nc_cbe_tensor ()

gboolean
nc_cbe_tensor (NcCBE *cbe);

Gets whether it uses tensor contributions.

Parameters

cbe

a NcCBE

 

Returns

a boolean.


nc_cbe_thermodyn ()

gboolean
nc_cbe_thermodyn (NcCBE *cbe);

Gets whether it uses the thermodynamics module.

Parameters

cbe

a NcCBE

 

Returns

a boolean.


nc_cbe_get_scalar_lmax ()

guint
nc_cbe_get_scalar_lmax (NcCBE *cbe);

Gets the maximum multipole $\ell_\textrm{max}$ at which the angular power spectrum $C_{\ell}$ of the scalar mode is computed.

Parameters

cbe

a NcCBE

 

Returns

the maximum (scalar) multipole $\ell_\textrm{max}$.


nc_cbe_get_vector_lmax ()

guint
nc_cbe_get_vector_lmax (NcCBE *cbe);

Gets the maximum multipole $\ell_\textrm{max}$ at which the angular power spectrum $C_{\ell}$ of the vector mode is computed.

Parameters

cbe

a NcCBE

 

Returns

the maximum (vector) multipole $\ell_\textrm{max}$.


nc_cbe_get_tensor_lmax ()

guint
nc_cbe_get_tensor_lmax (NcCBE *cbe);

Gets the maximum multipole $\ell_\textrm{max}$ at which the angular power spectrum $C_{\ell}$ of the tensor mode is computed.

Parameters

cbe

a NcCBE

 

Returns

the maximum (tensor) multipole $\ell_\textrm{max}$.


nc_cbe_use_ppf ()

void
nc_cbe_use_ppf (NcCBE *cbe,
                gboolean use_ppf);

Sets if PPF should be used.

Parameters

cbe

a NcCBE

 

use_ppf

whether to use PPF

 

nc_cbe_thermodyn_prepare ()

void
nc_cbe_thermodyn_prepare (NcCBE *cbe,
                          NcHICosmo *cosmo);

Prepares the thermodynamic Class structure.

Parameters

cbe

a NcCBE

 

cosmo

a NcHICosmo

 

nc_cbe_thermodyn_prepare_if_needed ()

void
nc_cbe_thermodyn_prepare_if_needed (NcCBE *cbe,
                                    NcHICosmo *cosmo);

Prepares the thermodynamic Class structure.

Parameters

cbe

a NcCBE

 

cosmo

a NcHICosmo

 

nc_cbe_prepare ()

void
nc_cbe_prepare (NcCBE *cbe,
                NcHICosmo *cosmo);

Prepares all necessary Class structures.

Parameters

cbe

a NcCBE

 

cosmo

a NcHICosmo

 

nc_cbe_prepare_if_needed ()

void
nc_cbe_prepare_if_needed (NcCBE *cbe,
                          NcHICosmo *cosmo);

Prepares all necessary Class structures.

Parameters

cbe

a NcCBE

 

cosmo

a NcHICosmo

 

nc_cbe_compare_bg ()

gdouble
nc_cbe_compare_bg (NcCBE *cbe,
                   NcHICosmo *cosmo,
                   gboolean log_cmp);

Compares CLASS and NumCosmo background calculations and returns the worst discrepancy.

Parameters

cbe

a NcCBE

 

cosmo

a NcHICosmo

 

log_cmp

whether to print the comparison

 

Returns

worst error.


nc_cbe_thermodyn_get_Xe ()

NcmSpline *
nc_cbe_thermodyn_get_Xe (NcCBE *cbe);

Gets the free electrons fraction $X_e$ as a function of the redshift.

Parameters

cbe

a NcCBE

 

Returns

a NcmSpline for Xe.

[transfer full]


nc_cbe_thermodyn_v_tau_max_z ()

gdouble
nc_cbe_thermodyn_v_tau_max_z (NcCBE *cbe);

Gets the redshift of the maximum visibility function.

Parameters

cbe

a NcCBE

 

Returns

$z_\mathrm{rec}$.


nc_cbe_thermodyn_z_d ()

gdouble
nc_cbe_thermodyn_z_d (NcCBE *cbe);

Gets drag redshift.

Parameters

cbe

a NcCBE

 

Returns

$z_d$.


nc_cbe_get_matter_ps ()

NcmSpline2d *
nc_cbe_get_matter_ps (NcCBE *cbe);

Gets the logarithm base e of the matter power spectrum as a function of the redshift $z$ and mode $\ln (k)$.

Parameters

cbe

a NcCBE

 

Returns

a NcmSpline2d for the logarithm base e of the matter power spectrum, $\ln P(\ln k, z)$.

[transfer full]


nc_cbe_get_sigma8 ()

gdouble
nc_cbe_get_sigma8 (NcCBE *cbe);

Computes the value of $\sigma_8$ as computed by CLASS, usually with errors $\propto 10^{-4}$. For better precision use: ncm_powspec_sigma_tophat_R() or NcmPowspecFilter.

Parameters

cbe

a NcCBE

 

Returns

the value of $\sigma_8$ as computed by CLASS.


nc_cbe_get_all_Cls ()

void
nc_cbe_get_all_Cls (NcCBE *cbe,
                    NcmVector *PHIPHI_Cls,
                    NcmVector *TT_Cls,
                    NcmVector *EE_Cls,
                    NcmVector *BB_Cls,
                    NcmVector *TE_Cls);

Gets and store the angular power spectra $C_l$'s calculated in the vectors TT_Cls , EE_Cls , BB_Cls and TE_Cls . If any of these vectors are NULL, then it is (they are) ignored.

Parameters

cbe

a NcCBE

 

PHIPHI_Cls

a NcmVector

 

TT_Cls

a NcmVector

 

EE_Cls

a NcmVector

 

BB_Cls

a NcmVector

 

TE_Cls

a NcmVector

 

Property Details

The “calc-transfer” property

  “calc-transfer”            gboolean

Whether to calculate the transfer function.

Owner: NcCBE

Flags: Read / Write / Construct

Default value: FALSE


The “matter-pk-maxk” property

  “matter-pk-maxk”           double

Maximum mode k for matter Pk.

Owner: NcCBE

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 1


The “matter-pk-maxz” property

  “matter-pk-maxz”           double

Maximum redshift for matter Pk.

Owner: NcCBE

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 0


The “precision” property

  “precision”                NcCBEPrecision *

CLASS precision object.

Owner: NcCBE

Flags: Read / Write / Construct


The “scalar-lmax” property

  “scalar-lmax”              guint

Scalar modes l_max.

Owner: NcCBE

Flags: Read / Write / Construct

Default value: 500


The “target-Cls” property

  “target-Cls”               NcDataCMBDataType

Target Cls to calculate.

Owner: NcCBE

Flags: Read / Write / Construct


The “tensor-lmax” property

  “tensor-lmax”              guint

Tensor modes l_max.

Owner: NcCBE

Flags: Read / Write / Construct

Default value: 500


The “use-lensed-Cls” property

  “use-lensed-Cls”           gboolean

Whether to use lensed Cls.

Owner: NcCBE

Flags: Read / Write / Construct

Default value: FALSE


The “use-ppf” property

  “use-ppf”                  gboolean

Whether to use PPF.

Owner: NcCBE

Flags: Read / Write / Construct

Default value: FALSE


The “use-tensor” property

  “use-tensor”               gboolean

Whether to use tensor contributions.

Owner: NcCBE

Flags: Read / Write / Construct

Default value: FALSE


The “use-thermodyn” property

  “use-thermodyn”            gboolean

Whether to use the thermodynamics module.

Owner: NcCBE

Flags: Read / Write / Construct

Default value: FALSE


The “vector-lmax” property

  “vector-lmax”              guint

Vector modes l_max.

Owner: NcCBE

Flags: Read / Write / Construct

Default value: 500


The “verbosity” property

  “verbosity”                guint

Verbosity.

Owner: NcCBE

Flags: Read / Write / Construct

Default value: 0