change_polcconv

This IDL facility changes the coordinate convention in FITS file containing a polarised sky map. The main effect is to change the sign of the U Stokes parameter, and add/update the POLCCONV FITS header keyword with either COSMO or IAU value.
See note on POLCCONV in The HEALPix Primer

Location in HEALPix directory tree: src/idl/fits/change_polcconv.pro 


FORMAT

IDL> CHANGE_POLCCONV, File_In, File_Out, [/I2C|/C2I|/C2C|/I2I], [/FORCE]


QUALIFIERS

File_In
name of a FITS file to be read

File_Out
name of a FITS file to be written, after modification of the polarisation coordinate convention, if applicable. It must be different from File_In


KEYWORDS

One and only one among I2C, C2I, C2C and I2I must be set.
/I2C
changes from IAU to COSMO coordinate convention
-if POLCCONV is not found or found with value 'IAU', or FORCE is set, it is added/replaced with value 'COSMO', and the sign of the U Stokes parameter map is changed;
-if POLCCONV already has value 'COSMO' and FORCE is NOT set, File_In is copied unchanged into File_Out.

/C2I
changes from COSMO to IAU coordinate convention
-if POLCCONV is not found or found with value 'COSMO', or FORCE is set, it is added/replaced with value 'IAU', and the sign of the U Stokes parameter map is changed;
-if POLCCONV already has value 'IAU', and FORCE is NOT set, File_In is copied unchanged into File_Out.

/C2C
does NOT change coordinate system
-if POLCCONV is found with value 'IAU', and FORCE is NOT set, program will issue error message and no file is written;
-in all other cases POLCCONV is set/added with value 'COSMO' in File_Out, but data is NOT changed.

/I2I
does NOT change coordinate system
-if POLCCONV is found with value 'COSMO', and FORCE is NOT set, program will issue error message and no file is written;
-in all other cases POLCCONV is set/added with value 'IAU' in File_Out, but data is NOT changed.

/FORCE
if set, the value of POLCCONV read from File_In FITS header is ignored. The sign of U is swapped (if used with /C2I or /I2C), and/or the File_Out FITS keyword is updated to IAU (if used with /I2I or /C2I) or to COSMO (if used with /C2C or /I2C).


DESCRIPTION

This routine will change the sign of the U Stokes parameters (and related quantities, such as the TU and QU cross-correlations) and update the POLCCONV FITS keyword where applicable. The recognised formats are:
- standard HEALPix full sky polarised format,
- cut sky HEALPix polarised format,
- WMAP 9-year release polarised *_iqumap_* and *_iqusmap_* formats,
- Planck *_SkyMap_* and *_CMB_IQU* formats


RELATED ROUTINES

This section lists the routines related to change_polcconv

idl
version 6.4 or more is necessary to run change_polcconv
write_fits_cut4
This HEALPix IDL facility can be used to write a (polarised or unpolarised) cut sky map into a FITS file.
read_fits_cut4
This HEALPix IDL facility can be used to read a (polarised or unpolarised) cut sky map from a FITS file.
write_tqu
This HEALPix IDL facility can be used to write a polarised full sky map (with either the standard Healpix format or the WMAP 2nd year format) into a FITS file
read_tqu
This HEALPix IDL facility can be used to read a polarised cut sky map from a FITS file


EXAMPLE:

change_polcconv, 'map_cosmo.fits','map_iau.fits',/c2i  
Modify the file 'map_cosmo.fits', which was using the 'COSMO' convention for polarisation coordinate convention into 'map_iau.fits' which uses the 'IAU' convention

Version 3.83, 2024-11-13