sph_tools
- a helper module for spherical harmonic transformation#
Routines for generalized map2alm and alm2map (healpix and CAR).
- pspy.sph_tools.alm2map(alms, template)#
alm2map transform (for healpix and CAR).
- Parameters:
alms (array) – a set of alms, the shape of alms should correspond to so_map.ncomp
template (
so_map
) – the map template
- pspy.sph_tools.get_alms(so_map, window, niter, lmax, theta_range=None, dtype=<class 'numpy.complex128'>)#
Get a map, multiply by a window and return alms This is basically map2alm but with application of the window functions.
- Parameters:
so_map (
so_map
) – the data we wants alms fromwindow (so_map or tuple of so_map) – a so map with the window function, if the so map has 3 components (for spin0 and 2 fields) expect a tuple (window,window_pol)
range (theta) – for healpix pixellisation you can specify a range [theta_min,theta_max] in radian. All pixel outside this range will be assumed to be zero.
- pspy.sph_tools.get_pure_alms(so_map, window, niter, lmax)#
Compute pure alms from maps and window function
- Parameters:
so_map (
so_map
) – the data we wants alms fromwindow (so_map or tuple of so_map) – a so map with the window function, if the so map has 3 components (for spin0 and 2 fields) expect a tuple (window,window_pol)
niter (integer) – the number of iteration performed while computing the alm not that for CAR niter=0 should be enough
lmax (integer) – the maximum multipole of the transform
- pspy.sph_tools.map2alm(map, niter, lmax, theta_range=None, dtype=<class 'numpy.complex128'>)#
Map2alm transform (for healpix or CAR).
- Parameters:
map (
so_map
) – the map from which to compute the almniter (integer) – the number of iteration performed while computing the alm not that for CAR niter=0 should be enough
lmax (integer) – the maximum multipole of the transform
theta_range (list of 2 elements) – [theta_min,theta_max] in radian. for healpix pixellisation all pixel outside this range will be assumed to be zero.