Next: destroy_pixelization    Up: Scan/pixelization routines    Previous: zbounds2scan


mask2scan

subroutine mask2scan( int *mask, pixeltype pixelization, scandef *scan)

Purpose:

Allocates and defines the S2HAT scandef structure, scan, corresponding to a observed sky patch defined by a mask, mask.

The scan structure has to be defined and identical on all the employed processors prior to any call to the transform routines. This can be achieved by calling the routine by either all procs or just one proc, e.g., root, followed by a call to mpi_scanbcast.

Parameters:

input:
mask- [int], a vector of the full map length (=pixelization%npixsall) with 0 and 1 defining the observed sky patch (=1);
pixelization- [type(pixeltype)], a S2HAT structure defining all the properties of the pixelization;
output:
scan- [type(scandef)], a S2HAT structure containing all the info about the sky coverage needed by the transforms.
N.B.1. The scan structure aims at avoiding performing unneccesary calculations involving zeros by flagging the unobserved pixel rings, which are consequently not processed by the transform routines. It also may lead to some memory savings. However, at the expense of performance efficient one can always use the structure corresponding to the full sky and just mask the input/output (see the comment below) maps appropriately.
The middle-of-the-way solutions are also possible and advisable especially for multi-connected sky coverages. In such cases the mask could be simplified, e.g., singly-connected though still saving some FLOPS and memory in comparison with the full sky cases.

N.B.2. Note that on the input to s2hat_map2alm routines the unobserved pixels should be explicitly masked out by setting their values to zero. On the output of the s2hat_alm2map routines one should explicitly mask the pixels which were not observed.



Next: destroy_pixelization    Up: Scan/pixelization routines    Previous: zbounds2scan

radek stompor 2009-10-15