healpix_types


This module defines a set of parameters used by most other HEALPix modules.

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

The parameters defined in healpix_types include

* 'kind' parameters, used when defining the type of a variable,

name type value3 definition
I1B integer 1 number of bytes in the hardware-supported signed integers covering the range -99 to 99 with the least margin
I2B integer 2 same as above for the range -9999 to 9999 (ie, 4 digits)
I4B integer 4 same as above for 9 digits
I8B integer 8 same as above for 16 digits4
SP integer 4 number of bytes in the hardware-supported floating-point numbers covering the range 10-30 to 1030 with the least margin (hereafter single precision)
DP integer 8 same as above for the range 10-200 to 10200 (double precision)
SPC integer 4 number of bytes in real (or imaginary) part of single precision complex numbers
DPC integer 8 same as above for double precision complex numbers
LGT integer 4 number of bytes in logical variables

* largest accessible numbers,

name type or kind value5 definition
MAX_I1B integer 127 largest number accessible to integers of kind I1B
MAX_I2B integer 32767 same as above for I2B integers
MAX_I4B integer $2^{31}-1 \simeq 2.1\ 10^9$ same as above for I4B integers
MAX_I8B I8B $2^{63}-1 \simeq 9.2\ 10^{18}$ same as above for I8B integers
MAX_SP SP $\simeq 3.40\ 10^{38}$ same as above for SP floating-point
MAX_DP DP $\simeq 1.80\ 10^{308}$ same as above for DP floating-point

* mathematical definitions,

name kind value definition
QUARTPI DP $\pi/4$  
HALFPI DP $\pi/2$  
PI DP $\pi \simeq 3.14159\ldots$  
TWOPI DP $2\pi$  
FOURPI DP $4\pi$  
SQRT2 DP $\sqrt{2}$  
EULER DP $\gamma \simeq 0.577\ldots$ Euler constant
SQ4PI_INV DP $1/\sqrt{4\pi}$  
TWOTHIRD DP 2/3  
DEG2RAD DP $\pi/180$ Degrees to Radians conversion factor
RAD2DEG DP $180/\pi$ Radians to Degrees conversion factor

* and HEALPix specific definitions,

name type or kind value definition
HPX_SBADVAL SP $-1.6375\ 10^{30}$ default sentinel value given to missing pixels in single precision data sets
HPX_DBADVAL DP $-1.6375\ 10^{30}$ same as above for double precision data sets
FILENAMELEN integer 1024 default length in character of file names.
HEALPIX_VERSION character ``3.31'' current HEALPix package version.


EXAMPLE:

use healpix_types
real(kind=DP) :: dx
print*,' pi = ',PI
The value of PI, as well as all other healpix_types parameters are made known to the code

Version 3.31, 2017-01-06