2014-11-28

Converting HEALPix Maps to Tangent Plane Projection

Most astronomers are used to dealing with images that use the tangent-plane projection to map the spherical sky onto the flat image plane. However, the Advanced Data Products (ADPs) within the JCMT Science Archive (JSA) use a HEALPix projection instead, to facilitate the stitching together of adjacent tiles on the sky. The HEALPix projection differs from the tangent-plane projection in several ways:

  1. The pixels are not quite square, with aspect ratios roughly in the range 1.0 to 1.4 depending on where on the sky the pixel is located (although all pixels are of equal area).
  2. In the north and south polar regions (absolute Declination above 41.8 degrees) the RA and Dec axes are not orthogonal - the angle between east and north is about 60 degrees.
  3. Maps that straddle the boundary between the polar and equatorial regions suffer from a discontinuous distortion as shown in the following image, a tile taken from a SCUBA-2 observation of M31.
In addition, JSA ADP maps are rotated so that north (in the equatorial region) is at 45 degrees to the image X axis.

If you would prefer to see your maps in the usual tangent-plane projection with square pixels and north upwards, you can use the JSAJOIN command within the Starlink SMURF package. This command pastes together one or more input maps in HEALPix projection, and then resamples the result onto a tangent-plane projection (the JSASPLIT command does the opposite).  For instance if the original HEALPix maps are listed in text file "tiles", then running the following command:

    % jsajoin ^tiles tan_map.sdf

will paste all the HEALPix maps into a new tan-projected map in file "tan_map.sdf". By default the output projection is centred on the centre of the available input data, and the pixels are square with size equal to the nominal size of the input pixels. However, the details of the output projection can be specified explicitly, or a template map can be provided that defines the require output projection. See the documentation for further details.

The JSAJOIN command is actually a script that uses various other SMURF and KAPPA commands to do the work. In particularly, it uses the SMURF JSAPASTER command to paste together the individual HEALPix maps into a single HEALPix map, and then uses the KAPPA WCSALIGN command to resample the combined HEALPix map onto a tangent-plane projection. It is of course possible to use these commands directly from the command line yourself if you want more control than is provided by the JSAJOIN script  - for instance if you want to use different values for the resampling parameters. If you want to see how how JSAJOIN chooses it's resampling parameters, search for string "wcsalign" within file $SMURF_DIR/jsajoin.py.

No comments: