subroutine s2hat_alm2map_spin( pixelization, scan, spin, nlmax, nmmax, nmvals, mvals, nmaps, first_ring, last_ring, map_size, local_map, lda, local_alm, numprocs, myid, comm)
Purpose:
memory distributed direct spherical harmonic transform of a field with an arbitrary (non-zero) spin value ( = spin):
synthesizes a map (or maps) of a sky patch as defined in
scan using the pixelization as defined in pixelization. The output, stored in local_map,
is distributed over all procs (as defined by first_ring and last_ring) and calculated
given input spherical harmonic coefficients, stored in local_alm, distributed over all procs (as defined by mvals).
This call needs to be made by all procs of the communicator comm. Blocking.
Parameter description:
input:
- pixelization(*)-- [pixeltype], an S2HAT structure defining the pixelization to be used;
- scan(*)-- [scandef], an S2HAT structure defining the sky coverage;
- spin(*)-- [integer(4b)], a value of a spin ( /= 0 ) of the field to be synthesized;
- nlmax(*)-- [integer(4b)], maximum considered value of l (polar number) (included);
- nmmax(*)-- [integer(4b)], maximum value of m (azimuthal number) (included);
- nmvals-- [integer(4b)], a number of m modes assigned to a givem proc;
- mvals-- [integer (4b)], a vector of nmvals values of m assigned to a given proc;
- nmaps(*)-- [integer(4b)], a number of input sets of alm coefficients each containing
sets of Elm and Blm multipoles. All the sets have to have the same properties and be
distributed identically over the processors. On the input they are stored in a single array local_alm.
This number is also equal to a number of the output maps (each made of 2 component maps corresponding
to the real and imaginary parts of the spin field)
which are to be produced. All maps have to have the same properties and be distributed over the processors in the same way.
- first_ring, last_ring-- [integer(4b)], numbers of a first and last ring (both included) of the Northern hemisphere,
which together with their Southern counterparts define a sub map to be computed by a given proc;
- map_size-- [integer(4b)], a number of pixels corresponding to the ring interval defined
by first_ring and last_ring;
- lda(*)-- [integer(4b)], a leading dimension of local_alm array. Equal either to
= 2 or = nlmax;
- local_alm-- [complex(dp)], an allocated pointer to a 4dim array of dimensions:
storing relevant alm coefficients for all m values assigned to a given proc, all considered l
values [0, nlmax] and for all nmaps which are to be processed simultanously. The two sets of
the coefficients in each correspond to Elm and Blm coefficients respectively (as defined in
Lewis (2005));
- numprocs(*)-- [integer(4b)], total number of procs used;
- myid-- [integer(4b)], proc id (0,...,numprocs-1);
- comm(*)-- [integer(4b)], an mpi communicator for the numprocs procs;
(*)The value must be the same on all procs of the communicator comm.
Output:
- local_map-- [real(dp)], an allocated pointer of a 3dim array of a size (0:map_size-1,1:2,1:nmaps)
which stores all the maps computed for a given subset of pixels.
If the input spin value is positive then, for each map, on the output the real part of the complex field is stored first and the imaginary
one - second. If the spin value is negative, the real part is stored first and the second is (-1) x the imaginary part of the field.
That corresponds to a convention that for two real fields local_map[ :,1,:] and local_map[:,2,:] the complex field
of spin spin is given as:
and SPIN_CONV_SIGN is an S2HAT parameter set by default to -1.
Top of the page
Comments:
N.B., for a single real field with spin =0 it may be handy to use s2hat_alm2map with nstokes = 1 instead. There is however a sign change.
a subset of m values to be processed by the routine (mvals) is arbitrary,
though can not be empty. The subsets assigned to any two procs must be disjoint. The load balanced distribution of
m modes over procs is calculated by the routines nummvalues and
find_mvalues or, alternately, by the wrapper routine get_local_data_sizes
.
a subset of a map to be computed by any proc will be composed of
a complete iso-latitude rings of the Northern hemisphere, with rings from the interval
defined by first_ring and last_ring as well as of the corresponding rings
of the Southern hemisphere.
All rings are included in full as long as at least are partially observed.
Thus only fully unobserved rings from the interval will be omitted. Consequently, if a final
map consists of partially observed rings, the unobserved pixels of those rings may need to be
marked as such in post processing.
The ring intervals can be arbitrary though can not be empty on any processor and can not overlap.
Moreover, it is assumed that
the proc 0 gets the first set of rings, proc 1 next etc.
(These assumptions are left unchanged from Healpix 2.1).
The load balanced distribution of rings can be calculated using the routine find_ring_range or
the wrapper routine get_local_data_sizes.
the parameter map_size is in fact redundant and can be computed from first_ring
and last_ring using the function local_map_size for any
predefined pixelization.
Top of the page
|