apply_mask

This routine multiplies a HEALPix map by an arbitrary pixel mask and/or sets to 0 pixels lying in or out a constant latitude strip

Location in HEALPix directory tree: src/f90/mod/pix_tools.F90 


FORMAT

call apply_mask( map, ordering[, mask=, zbounds=] )


ARGUMENTS

name & dimensionality kind in/out description
       
map(0:npix-1,1:p) SP/ DP INOUT HEALPix map(s) on which the mask(s) and/or cut will be applied. The map will obviously be modified on output if either mask or zbounds are provided.
ordering I4B IN HEALPix scheme of the map(s) (and mask(s)) 1:RING, 2: NESTED (relevant for zbounds).
mask(0:npix-1,1:q) OPTIONAL SP/ DP IN pixel mask(s). Should have the same ordering and number of pixels (npix) as map. If several maps are provided ($p>1$), each map is multiplied by its respective mask, and if there are fewer masks than maps ($q<p$) the last mask is duplicated as many times as necessary to match the number of maps.
zbounds(1:2) OPTIONAL DP IN section of the map to be set to 0, expressed in terms of $z=\sin({\rm latitude}) =
\cos(\theta)$. If zbounds(1)$<$zbounds(2), pixels outsise the strip zbounds(1)$<z<$zbounds(2) are set to 0; if not, pixels on the strip zbounds(2)$\le z \le$zbounds(1) are set to 0. If absent, the map is unchanged.


EXAMPLE:

s = sin(15.0_dp * DEG2RAD)
call apply_mask(map, 1, zbounds=(/ s, -s /) )
Will set to 0 pixels of the input (RING ordered) map lying in the strip $\vert b\vert \le 15^o$.


MODULES & ROUTINES

This section lists the modules and routines used by apply_mask.

pix_tools
module, containing:

Version 3.82, 2022-07-28