same_shape_pixels_nest, same_shape_pixels_ring

These routines provide the ordered list of all HEALPix pixels having the same shape as a given template, for a resolution parameter $N_{\mathrm{side}}$. Depending on the template considered the number of such pixels is either 8, 16, 4 $N_{\mathrm{side}}$ or 8 $N_{\mathrm{side}}$.

The template pixels are all located in the Northern Hemisphere, or on the Equator. They are chosen to have their center located at
$\displaystyle z=\cos(\theta)\ge 2/3 \mycomma0< \phi \leq \pi/2,$      
$\displaystyle %[Nside*(Nside+2)/4]
2/3 > z \geq 0 \mycomma\phi=0, \quad{\rm or}\quad \phi=\frac{\pi}{4N_{\mathrm{side}}}. %\nonumber %[Nside]
$     (23)

They are numbered continuously from 0, starting at the North Pole, with the index increasing in $\phi$, and then increasing for decreasing $z$.

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


FORMAT

call same_shape_pixels_nest, same_shape_pixels_ring( nside, template [, list, reflexion, nrep] )


FORMAT

call same_shape_pixels_nest, same_shape_pixels_ring( nside, template [, list, reflexion, nrep] )


ARGUMENTS

name & dimensionality kind in/out description
       
nside I4B IN the HEALPix $N_{\mathrm{side}}$ parameter.
template I4B/ I8B IN identification number of the template pixel (the numbering scheme of the pixel templates is the same for both routines).
list(0:nrep-1) OPTIONAL I4B/ I8B OUT pointer containing the ordered list of NESTED/RING scheme identification numbers (in {0, $12N_{\mathrm{side}}^2-1$}) of all pixels having the same shape as the template provided. The routines will allocate the list array if it is not allocated upon calling.
reflexion(0:nrep-1) OPTIONAL I4B OUT pointer containing the transformation(s) (in {0, 3}) to apply to each of the returned pixels to match exactly in shape and position its respective template. 0: rotation around the polar axis only, 1: rotation + East-West swap (ie, reflexion around meridian), 2: rotation + North-South swap (ie, reflexion around Equator), 3: rotation + East-West and North-South swaps. The routines will allocate the list array if it is not allocated upon calling.
nrep OPTIONAL I4B/ I8B OUT number of pixels having the same template (either 8, 16, 4 $N_{\mathrm{side}}$ or 8 $N_{\mathrm{side}}$).


EXAMPLE:

use healpix_modules
integer, parameter :: IXB = I4B ! for nside <= 8192
!integer, parameter :: IXB = I8B ! for any valid nside
integer(I4B):: nside
integer(IXB):: template, nrep
integer(I4B), dimension(:), pointer :: listref
integer(IXB), dimension(:), pointer :: listpix

allocate(listref(0:0)) ! only the lower bound matters
allocate(listpix(0:0)) ! only the lower bound matters
nside = 256
template = 1234
call same_shape_pixels_ring(nside, template, list=listpix, reflexion=listref, nrep=nrep)
print*,nrep
print*,listpix(0:nrep-1)
print*,listref(0:nrep-1)
Returns in listpix the RING-scheme index of the all the pixels having the same shape as the template #1234 for $N_{\mathrm{side}}=256$. Upon return listref will contain the rotation/reflexions to apply to each pixel returned to match the template, and nrep will contain the number of pixels having that same shape (16 in that case). Note that some variables (corresponding to arguments template, list and nrep) must be of type I8B instead of I4B if $N_{\mathrm{side}}> 8192$ is to be used.

RELATED ROUTINES

This section lists the routines related to same_shape_pixels_nest, same_shape_pixels_ring

nside2templates
returns the number of template pixel shapes available for a given $N_{\mathrm{side}}$.
template_pixel_ring
template_pixel_nest
return the template shape matching the pixel provided

Version 3.82, 2022-07-28