Top |
NcmSphereMapCoordSys | coordsys | Read / Write / Construct |
guint | lmax | Read / Write / Construct |
gint64 | nside | Read / Write / Construct |
NcmSphereMapOrder | order | Read / Write / Construct |
#define | NCM_TYPE_SPHERE_MAP |
enum | NcmSphereMapOrder |
enum | NcmSphereMapCoordSys |
#define | NCM_SPHERE_MAP_HEALPIX_NULLVAL |
#define | NCM_SPHERE_MAP_DEFAULT_SIGNAL |
NcmSphereMap |
NcmSphereMap *
ncm_sphere_map_new (const gint64 nside
);
Creates a new NcmSphereMap for a given nside
.
NcmSphereMap *
ncm_sphere_map_ref (NcmSphereMap *smap
);
Increases the reference count of smap
.
void
ncm_sphere_map_free (NcmSphereMap *smap
);
Decreases the reference count of smap
. When its reference count
drops to 0, the object is finalized (i.e. its memory is freed).
void
ncm_sphere_map_clear (NcmSphereMap **smap
);
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
.
void ncm_sphere_map_set_nside (NcmSphereMap *smap
,gint64 nside
);
Sets the nside parameter of smap
.
gint64
ncm_sphere_map_get_nside (NcmSphereMap *smap
);
Get the nside parameter of smap
.
gint64
ncm_sphere_map_get_npix (NcmSphereMap *smap
);
Gets the number of pixels of smap
.
gint64
ncm_sphere_map_get_cap_size (NcmSphereMap *smap
);
Get the number of pixels of the north cap of smap
.
gint64
ncm_sphere_map_get_middle_size (NcmSphereMap *smap
);
Get the number of pixels of the middle of smap
. That is
the number of pixels of the middle rings.
gint64
ncm_sphere_map_get_nrings (NcmSphereMap *smap
);
Get the number of rings of smap
.
gint64
ncm_sphere_map_get_nrings_cap (NcmSphereMap *smap
);
Get the number of rings of the north cap of smap
.
gint64
ncm_sphere_map_get_nrings_middle (NcmSphereMap *smap
);
Get the number of rings of the middle of smap
.
gint64 ncm_sphere_map_get_ring_size (NcmSphereMap *smap
,gint64 r_i
);
Get the number of pixels of the ring r_i
of smap
.
gint64 ncm_sphere_map_get_ring_first_index (NcmSphereMap *smap
,gint64 r_i
);
Get the first pixel index of the ring r_i
of smap
.
void ncm_sphere_map_set_order (NcmSphereMap *smap
,NcmSphereMapOrder order
);
Sets the pixel ordering of smap
.
NcmSphereMapOrder
ncm_sphere_map_get_order (NcmSphereMap *smap
);
Gets the pixel ordering of smap
.
void ncm_sphere_map_set_coordsys (NcmSphereMap *smap
,NcmSphereMapCoordSys coordsys
);
Sets the coordinate system of smap
.
NcmSphereMapCoordSys
ncm_sphere_map_get_coordsys (NcmSphereMap *smap
);
Gets the coordinate system of smap
.
void ncm_sphere_map_set_lmax (NcmSphereMap *smap
,guint lmax
);
Prepare the object to calculate $a_{\ell{}m}$ and/or $C_\ell$,
up to $\ell=$lmax
.
gint64 ncm_sphere_map_nest2ring (NcmSphereMap *smap
,const gint64 nest_index
);
Converts a pixel index from NESTED to RING ordering.
gint64 ncm_sphere_map_ring2nest (NcmSphereMap *smap
,const gint64 ring_index
);
Converts a pixel index from RING to NESTED ordering.
void ncm_sphere_map_pix2ang_nest (NcmSphereMap *smap
,const gint64 nest_index
,gdouble *theta
,gdouble *phi
);
Converts a pixel index from NESTED to spherical coordinates and
returns the angles theta
and phi
.
void ncm_sphere_map_pix2ang_ring (NcmSphereMap *smap
,const gint64 ring_index
,gdouble *theta
,gdouble *phi
);
Converts a pixel index from RING to spherical coordinates and
returns the angles theta
and phi
.
void ncm_sphere_map_pix2vec_nest (NcmSphereMap *smap
,const gint64 nest_index
,NcmTriVec *vec
);
Converts a pixel index from NESTED to a unit vector.
void ncm_sphere_map_pix2vec_ring (NcmSphereMap *smap
,const gint64 ring_index
,NcmTriVec *vec
);
Converts a pixel index from RING to a unit vector.
void ncm_sphere_map_ang2pix_nest (NcmSphereMap *smap
,const gdouble theta
,const gdouble phi
,gint64 *nest_index
);
Converts spherical coordinates to a pixel index in NESTED ordering.
void ncm_sphere_map_ang2pix_ring (NcmSphereMap *smap
,const gdouble theta
,const gdouble phi
,gint64 *ring_index
);
Converts spherical coordinates to a pixel index in RING ordering.
void ncm_sphere_map_vec2pix_ring (NcmSphereMap *smap
,NcmTriVec *vec
,gint64 *ring_index
);
Converts a unit vector to a pixel index in RING ordering.
void ncm_sphere_map_vec2pix_nest (NcmSphereMap *smap
,NcmTriVec *vec
,gint64 *nest_index
);
Converts a unit vector to a pixel index in NESTED ordering.
void ncm_sphere_map_add_to_vec (NcmSphereMap *smap
,NcmTriVec *vec
,const gdouble s
);
Adds s
to the signal at the pixel corresponding to vec
.
void ncm_sphere_map_add_to_ang (NcmSphereMap *smap
,const gdouble theta
,const gdouble phi
,const gdouble s
);
Adds s
to the signal at the pixel corresponding to theta
and phi
.
void ncm_sphere_map_load_fits (NcmSphereMap *smap
,const gchar *fits_file
,const gchar *signal_name
);
Loads a NcmSphereMap from a fits file.
void ncm_sphere_map_save_fits (NcmSphereMap *smap
,const gchar *fits_file
,const gchar *signal_name
,gboolean overwrite
);
Saves a NcmSphereMap to a fits file.
void ncm_sphere_map_load_from_fits_catalog (NcmSphereMap *smap
,const gchar *fits_file
,const gchar *RA
,const gchar *DEC
,const gchar *S
);
Loads a NcmSphereMap from a fits catalog.
void
ncm_sphere_map_prepare_alm (NcmSphereMap *smap
);
Calculates the $a_{\ell{}m}$ from the map smap
, using $\ell_\mathrm{max}$
set by ncm_sphere_map_set_lmax()
. If $\ell_\mathrm{max} = 0$
nothing is done.
void
ncm_sphere_map_update_Cl (NcmSphereMap *smap
);
Updates the values of $C_\ell$ based on the current $a_{lm}$.
void ncm_sphere_map_get_alm (NcmSphereMap *smap
,guint l
,guint m
,gdouble *Re_alm
,gdouble *Im_alm
);
Gets the value of $a_{lm}$ previously calculated by
ncm_sphere_map_prepare_alm()
.
void ncm_sphere_map_set_alm (NcmSphereMap *smap
,guint l
,guint m
,gdouble Re_alm
,gdouble Im_alm
);
Sets the value of $a_{lm}$.
gdouble ncm_sphere_map_get_Cl (NcmSphereMap *smap
,guint l
);
Gets the value of $C_{\ell}$ previously calculated by
ncm_sphere_map_prepare_alm()
.
gdouble ncm_sphere_map_get_pix (NcmSphereMap *smap
,guint i
);
Gets the value of pixel index by i
.
void ncm_sphere_map_add_noise (NcmSphereMap *smap
,const gdouble sd
,NcmRNG *rng
);
Adds a Gaussian noise with $\sigma=$ sd
and zero mean to each pixel.
void ncm_sphere_map_set_map (NcmSphereMap *smap
,GArray *map
);
Set map pixels to map
using current ordering.
void ncm_sphere_map_set_Cls (NcmSphereMap *smap
,NcmVector *Cls
);
Set map $C_l$s.
void
ncm_sphere_map_alm2map (NcmSphereMap *smap
);
Compute map pixels from current $a_{\ell{}m}$.
NcmSpline * ncm_sphere_map_calc_Ctheta (NcmSphereMap *smap
,const gdouble reltol
);
Computes the two-point correlation function $C(\theta)$ from the precomputed $C_\ell$.
#define NCM_SPHERE_MAP_ALM_SIZE(lmax) (((lmax) * (lmax) + 3 * (lmax) + 2) / 2)
#define NCM_SPHERE_MAP_M_START(lmax, m) ((2 * (lmax) * (m) - (m) * (m) + 3 * (m)) / 2)
“coordsys”
property“coordsys” NcmSphereMapCoordSys
Map coordinate system.
Owner: NcmSphereMap
Flags: Read / Write / Construct
Default value: NCM_SPHERE_MAP_COORD_SYS_CELESTIAL
“lmax”
property “lmax” guint
max ell.
Owner: NcmSphereMap
Flags: Read / Write / Construct
Default value: 0
“nside”
property “nside” gint64
nside.
Owner: NcmSphereMap
Flags: Read / Write / Construct
Allowed values: >= 0
Default value: 0
“order”
property“order” NcmSphereMapOrder
Map pixel ordering.
Owner: NcmSphereMap
Flags: Read / Write / Construct
Default value: NCM_SPHERE_MAP_ORDER_RING