subroutine collect_xls( nmaps1, mapnum1, nmaps2, mapnum2, ncomp, nlmax, nmvals, mvals, lda, local_alm1, local_alm2, nxspec, xcl, myid, numprocs, root, comm)
Purpose:
Computes and collects on a proc root power cross-spectra for the maps mapnum1 and mapnum2 directly from the
relevant alm coefficients, which are distributed over procs and stored in local_alm1 and local_alm2 arrays.
The call has to be made by all procs of the communicator, comm. Blocking.
Parameters:
input:
- nmaps1, nmaps2(*)-- [integer(4b)], a number of the alm sets (each made of ncomp components);
- mapnum1, mapnum2(*)-- [integer(4b)], an alm set number, spectra of which are to be computed;
- ncomp(*)-- [integer(4b)], a number of components of the input alm sets (=1,2,3);
- nlmax(*)-- [integer(4b)], maximum value of l (included);
- nmvals-- [integer(4b)], a number of m values to be processed by a given proc;
- mvals-- [integer(4b)], a vector of a length nmvals containing
a list of m values to be processed by a given proc;
- lda(*)-- [integer(4b)], defines the leading dimension of the alm, local_alm and local_plm matrices. Accepted
values: lda == ncomp or nlmax;
- local_alm1, local)alm2-- [complex(dp)], an allocated pointer to a 4dim array of dimensions:
storing relevant alm coefficients for all m values processed on a given proc and all l
and all ncomp components for each of the nmaps maps which are to be processed simultanously;
For ncomp == 1 the coefficients are those for total intensity only. For ncomp == 3 the
component corresponds to the total intensity, E-mode and B-mode polarizations, respectively;
-
nxspec(*)-- [ integer(4b)], determines which spectra are to be computed (see the output parameter description below);
- myid-- [integer(4b)], proc id (0,...,numprocs-1);
- numprocs(*)-- [integer(4b)], total number of procs used;
- root(*)-- [integer(4b)], defines root processor on which the
alm coefficients are stored in a non-distributed form;
- comm(*)-- [integer(4b)], an mpi communicator for the numprocs procs.
(*)The value must be the same on all procs of the communicator comm.
output:
- xcl-- [ real(dp)], a pointer to an array [0:nlmax,1:nxspec] storing the computed
(pseudo) cross-power spectra of the types as determined by the value of nxspec.
nxspec == ncomp -- only same component-spectra are computed;
nxspec == ncomp+2 ( ncomp>1) -- all ncomp same-component spectra and one different-component spectrum (e.g., T1E2 and E1T2 if ncomp == 3) are computed;
nxspec == ncomp^2 (ncomp > 1) -- all same-component and all different-component spectra are computed.
On the output the auto spectra are stored first (i.e., [ 1_i 2_i] for i = 1, ..., ncomp) followed by relevant spectra
of the different components
([1_i 2_j], [1_j, 2_i] for i = 1,.., ncomp-1 and j = i+1, ..., ncomp). Here, the numbers 1 and 2,
denote, respectively, the first or the second set of the alms which are used for the calculation of the spectra.
For example:
if ncomp = 3 (= nstokes) and nspec = 9 then the output is as follows:
T1 T2, E1 E2, B1 B2, T1 E2, E1 T2, T1 B2, B1 T2, E1 B2, B1 E2
(and in the above order).
|