Class

NumCosmoMathSphereMap

Description [src]

final class NumCosmoMath.SphereMap : GObject.Object
{
  /* No available fields */
}

Maps on the sphere in the HEALPix pixelization.

An independent implementation of the HEALPix pixelization of the sphere, written from its definition in Górski et al. (2005) and not derived from the HEALPix code. For a resolution parameter nside, a power of two, the sphere is divided into $12\,\mathrm{nside}^2$ pixels of equal area on $4\,\mathrm{nside} - 1$ rings of constant latitude. Pixels are numbered in RING or NESTED order (NcmSphereMapOrder), with the same indices, centres and pixel lookups as HEALPix; the tests compare them with healpy.

The object holds a map of values on those pixels, reads and writes it in the HEALPix FITS format, and computes its spherical harmonic coefficients $a_{\ell m}$ and power spectrum $C_\ell$ up to NcmSphereMap:lmax, and a map from given $a_{\ell m}$.

Ancestors

Constructors

ncm_sphere_map_new

Creates a new NcmSphereMap for a given nside.

Functions

ncm_sphere_map_clear

If smap is not NULL, decreases the reference count of smap. When its reference count drops to 0, the object is finalized (i.e. its memory is freed). Set smap to NULL.

Instance methods

ncm_sphere_map_add_noise

Adds a Gaussian noise with $\sigma=$ sd and zero mean to each pixel.

ncm_sphere_map_add_to_ang

Adds s to the pixel of smap, in its current ordering, that contains the direction (theta, phi), see ncm_sphere_map_ang2pix_ring().

ncm_sphere_map_add_to_vec

Adds s to the pixel of smap, in its current ordering, that contains the direction of vec.

ncm_sphere_map_alm2map

Replaces the map of smap by the synthesis of its current $a_{\ell m}$, $\sum_{\ell m} a_{\ell m} Y_{\ell m}$ at the pixel centres, in RING order. Any $\ell_\mathrm{max}$ works: an $m$ above a ring’s Nyquist frequency folds onto it as in healpy’s alm2map, which the result matches to $10^{-13}$ of the largest pixel.

ncm_sphere_map_ang2pix_nest

Gets the NESTED index of the pixel that contains the direction (theta, phi).

ncm_sphere_map_ang2pix_ring

Gets the RING index of the pixel that contains the direction (theta, phi).

ncm_sphere_map_calc_Ctheta

Computes the angular two-point correlation function $$C(\theta) = \sum_{\ell=0}^{\ell_\mathrm{max}} \frac{2\ell + 1}{4\pi} C_\ell P_\ell(\cos\theta)$$ from the current $C_\ell$ (ncm_sphere_map_prepare_alm(), ncm_sphere_map_update_Cl() or ncm_sphere_map_set_Cls()), as a spline on $\theta \in [0, \pi]$ with knots added until it reproduces the sum to reltol.

ncm_sphere_map_clear_pixels

Clear the pixels of smap, i.e. set all pixels to zero.

ncm_sphere_map_compute_cross_Cl

Computes the cross-spectrum between two maps: $$C_\ell^\mathrm{cross} = \frac{1}{2\ell+1} \sum_{m=-\ell}^\ell \mathrm{Re}(a_{lm}^{(1)} \bar{a}_{lm}^{(2)})$$.

ncm_sphere_map_free

Decreases the reference count of smap. When its reference count drops to 0, the object is finalized (i.e. its memory is freed).

ncm_sphere_map_get_Cl

Gets $C_\ell$ as computed by the last ncm_sphere_map_prepare_alm() or ncm_sphere_map_update_Cl(), or set by ncm_sphere_map_set_Cls().

ncm_sphere_map_get_alm

Gets $a_{\ell m}$, as computed by ncm_sphere_map_prepare_alm() or set by ncm_sphere_map_set_alm(). The coefficients of negative $m$ follow from the real map, $a_{\ell, -m} = (-1)^m a_{\ell m}^*$.

ncm_sphere_map_get_cap_size

Get the number of pixels of the north cap of smap.

ncm_sphere_map_get_coordsys

Gets the coordinate system of smap.

ncm_sphere_map_get_iter

Gets the number of iterations used in the spherical harmonic transform.

ncm_sphere_map_get_lmax
No description available.

ncm_sphere_map_get_middle_size

Get the number of pixels of the middle of smap. That is the number of pixels of the middle rings.

ncm_sphere_map_get_npix

Gets the number of pixels of smap.

ncm_sphere_map_get_nrings

Get the number of rings of smap.

ncm_sphere_map_get_nrings_cap

Get the number of rings of the north cap of smap.

ncm_sphere_map_get_nrings_middle

Get the number of rings of the middle of smap.

ncm_sphere_map_get_nside

Get the nside parameter of smap.

ncm_sphere_map_get_order

Gets the pixel ordering of smap.

ncm_sphere_map_get_pix

Gets the value of the pixel i.

ncm_sphere_map_get_ring_first_index

Get the RING-order index of the first pixel of the ring r_i of smap, see ncm_sphere_map_get_ring_size().

ncm_sphere_map_get_ring_size

Get the number of pixels of the ring r_i of smap, counting rings from the north pole, $0 \le$ r_i $<$ ncm_sphere_map_get_nrings().

ncm_sphere_map_load_fits

Loads a full-sky map in the HEALPix FITS format: a binary table in the first extension with the map in one column, any number of pixels per row, and the keys NSIDE, ORDERING (RING if missing, with a warning) and COORDSYS (celestial if missing, with a warning). The nside, ordering and coordinate system of smap are set from the file. A PIXTYPE other than HEALPIX, a partial-sky map (INDXSCHM = EXPLICIT) or a column whose size does not match NSIDE abort.

ncm_sphere_map_load_from_fits_catalog

Adds the objects of a catalog, a binary table in the first extension of fits_file, to the pixels of smap that contain them: each object adds its signal, or one when S is NULL. The map is not cleared first, see ncm_sphere_map_clear_pixels().

ncm_sphere_map_nest2ring

Converts a pixel index from NESTED to RING ordering.

ncm_sphere_map_pix2ang_nest

Gets the centre of the pixel nest_index. The polar angle is measured from the north pole.

ncm_sphere_map_pix2ang_ring

Gets the centre of the pixel ring_index, see ncm_sphere_map_pix2ang_nest().

ncm_sphere_map_pix2vec_nest

Sets vec to the unit vector of the centre of the pixel nest_index.

ncm_sphere_map_pix2vec_ring

Sets vec to the unit vector of the centre of the pixel ring_index.

ncm_sphere_map_prepare_alm

Calculates the $a_{\ell m}$ of the map of smap up to $\ell_\mathrm{max}$, set by ncm_sphere_map_set_lmax(), and from them the $C_\ell$ (ncm_sphere_map_get_Cl()). The map is put in RING order first, and stays in it.

ncm_sphere_map_ref

Increases the reference count of smap.

ncm_sphere_map_ring2nest

Converts a pixel index from RING to NESTED ordering.

ncm_sphere_map_save_fits

Saves smap in the HEALPix FITS format read by ncm_sphere_map_load_fits() and healpy: a binary table with one double-precision value per row, in the current ordering, and the keys PIXTYPE, ORDERING, NSIDE, FIRSTPIX, LASTPIX, INDXSCHM and COORDSYS. The values are written in double precision, so a save and load returns the map unchanged.

ncm_sphere_map_set_Cls

Sets the $C_\ell$ of smap used by ncm_sphere_map_get_Cl() and ncm_sphere_map_calc_Ctheta(); the map and the $a_{\ell m}$ are not changed.

ncm_sphere_map_set_alm

Sets $a_{\ell m}$. The $C_\ell$ are not updated, see ncm_sphere_map_update_Cl().

ncm_sphere_map_set_coordsys

Sets the coordinate system of smap. It labels the map, for instance in the files of ncm_sphere_map_save_fits(); the pixel values are not transformed.

ncm_sphere_map_set_iter

Sets the number of iterations to use in the spherical harmonic transform. Iterations improve the accuracy of the transform for undersampled maps (when lmax < 3 * nside). iter=0 uses only the direct transform; healpy’s map2alm defaults to 3 iterations.

ncm_sphere_map_set_lmax

Prepare the object to calculate $a_{\ell{}m}$ and/or $C_\ell$, up to $\ell=$lmax.

ncm_sphere_map_set_map

Sets the pixels of smap to map, in the current ordering; map must hold ncm_sphere_map_get_npix() values.

ncm_sphere_map_set_nside

Sets the nside parameter of smap, which must be a power of two, or zero to release the pixels. A change allocates a new map, with every pixel zero.

ncm_sphere_map_set_order

Sets the pixel ordering of smap.

ncm_sphere_map_update_Cl

Recomputes the $C_\ell$ from the current $a_{\ell m}$, for instance after ncm_sphere_map_set_alm().

ncm_sphere_map_vec2pix_nest

Gets the NESTED index of the pixel that contains the direction of vec, any non-zero vector.

ncm_sphere_map_vec2pix_ring

Gets the RING index of the pixel that contains the direction of vec, any non-zero vector.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

NumCosmoMath.SphereMap:coordsys

The coordinate system the map is given in, see ncm_sphere_map_set_coordsys().

NumCosmoMath.SphereMap:iter

The number of refinement iterations of the map to $a_{\ell m}$ transform, see ncm_sphere_map_set_iter().

NumCosmoMath.SphereMap:lmax

The largest $\ell$ of the harmonic transforms, see ncm_sphere_map_set_lmax().

NumCosmoMath.SphereMap:nside

The HEALPix resolution parameter, a power of two, or zero for no pixels.

NumCosmoMath.SphereMap:order

The pixel ordering; changing it reorders the stored map.

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.

Class structure

struct NumCosmoMathSphereMapClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.