V3.6 has wrong `RADESYS`

Issue #29 resolved
karl krughoff created an issue

In the latest version of phosim, the 'RADESYS' is set as 'J2000'. This is not a valid coordinate system. I'm assuming that 'FK5' is what was meant, but I think 'ICRS' would be better, if possible. This makes v3.6 images impossible to reduce with the DM stack because it (rightly) throws an exception at the invalid coordinate system. We have work arounds, but it would be good to get this fixed soon.

Comments (7)

  1. Thomas Glanzman

    A second header issue has surfaced: CTYPE2 = 'DEC--TAN'

    According to http://tdc-www.harvard.edu/wcstools/wcstools.wcs.html, this is illegal due to the second hyphen. 'DEC-TAN' should be acceptable.

    This value is hard-coded in the same image.cpp as the RADESYS already mentioned.

    We're working our way through the process of ingesting phoSim eImages into the DM Level 1/2 sequence. We are not there yet so it is possible additional issues may arise.

  2. Thomas Glanzman

    After comparing the DC1 (phoSim v3.6.1) FITS files with one produced by Twinkles (phoSim v3.5.2), it appears that CTYPE2 was okay (had not realized that "-TAN" was the desired projection) but CTYPE1 needs a correction, from:

    CTYPE1=RA--TAN

    to

    CTYPE1=RA---TAN

    Testing in progress.

  3. Thomas Glanzman

    The two corrections above, RADESYS and CTYPE1, have allowed the DM stack to further process a DC1 phoSim FITS file. It appears to have gotten past the wcs issues -- but another, probably unrelated problem, arose.

    Just for fun, I ran the latest version of fverify on a randomly selected raw DC1 phoSim FITS file:

    $ fverify lsst_e_40336_f2_R01_S00_E000.fits.gz

                      FVERIFY V4.18 (CFITSIO V3.420)                                                                                                                 
                      ------------------------------
    

    HEASARC conventions are being checked.

    File: lsst_e_40336_f2_R01_S00_E000.fits.gz

    1 Header-Data Units in this file.

    =================== HDU 1: Primary Array ===================

    Warning: Keyword #21, EPOCH is deprecated. Use EQUINOX instead. Warning: Keyword #19, RADESYS has non-allowed value: J2000

    631 header keywords

    32-bit floating point pixels, 2 axes (4000 x 4072),

    ++++++++++++++++++++++ Error Summary ++++++++++++++++++++++

    HDU# Name (version) Type Warnings Errors 1 Primary Array 2 0

    * Verification found 2 warning(s) and 0 error(s). *

    =======================

    Apparently, fverify does not know how to judge CTYPE1/CTYPE2. The warning on the use of EPOCH is interesting, and something to consider changing in the next phoSim update?

  4. Thomas Glanzman

    Confirmed: two header elements in the phoSim v3.6.1 must be changed to be successfully ingested by DM stack code. The two elements are:

    RADESYS changed from "J2000" to "ICRS"

    CTYPE1 changed from "RA--TAN" to "RA---TAN"

    These should be considered as a correction for the next version of phoSim.

  5. Log in to comment