subroutine plm_mvalues_gen( pixeltype pixelization, scandef scan, int npols, int nlmax, int nmmax, int nmvals, int *mvals, int lda, long int nplm, double *plm)
Purpose:
on each processor it pre-computes the associated Legendre for all observed rings (as defined by scan), all values of
l (from 0 to nlmax) and a subset of m assigned to every proc as defined in mvals.
Parameters:
input:
- pixelization(*)-- [pixeltype], an S2HAT structure containing the info about the pixelization.
- scan(*)-- [scandef], an S2HAT structure containing the info about the sky coverage.
- npols(*)-- int], a number of harmonic types to be pre-computed (=1 (for scalar only) or 3 (for all scalar + spin 2);
- nlmax(*)-- [int], maximum value of l (included);
- nmmax(*)-- [int], maximum value of m (included);
- nmvals-- [int], a number of m values to be processed by a given proc;
- mvals-- [int], a vector of a length nmvals containing
a list of m values to be processed by a given proc;
- lda(*)-- [int], defines the leading dimension of the local_plm matrix. Accepted
values: lda == npols or nlmax;
- nplm-- [long int (8bytes)], one of the factors determining the dimensions of the local_plm array.
It is equal to a product of a number of all observed rings (only from the Northern hemisphere plus equator - due to assumed symmetries)
times a number of all l,m processed by a given proc.
output:
- local_plm-- [double*], a vector of doubles storing a 2dim array in the column-wise order
with dimensions given by,
where
- We note that in the latter case what is computed are two linear combinations of spin +2 and -2 functions, i.e.,
and
respectively, rather than spin-weighted functions themselves.
-
Also the computed Legendre functions are all normalized as spherical harmonics.
The output vector, local_plm, does not store any more zeros, i.e., l and m modes with m>l
are not included. The ordering of the results is such that for every observed ring, r, the Legendre functions are stored
m-mode by m-mode, and for each m we store consecutively all l-modes going from l=m to
l=lmax. Each proc computes only the m modes assigned to it and defined in the mvals vector. The observed
rings are always assumed to belong to the Northern Hemisphere and are stored in the order from the North Pole towards the equator.
(*)The value must be the same on all procs participating in the computation.
|