taskGNU Astronomy Utilities - Tasks: task #15128, TPV and SIP keywords when WCS...


You are not allowed to post comments on this tracker with your current authentication level.

task #15128: TPV and SIP keywords when WCS distortions are necessary

Submitted by:  Mohammad Akhlaghi <makhlaghi>
Submitted on:  Fri 21 Dec 2018 02:27:13 PM UTC  
Should Start On:  Fri 21 Dec 2018 12:00:00 AM UTC Should be Finished on:  Fri 21 Dec 2018 12:00:00 AM UTC
Category:  All Gnuastro Priority:  5 - Normal
Item Group:  None Status:  Postponed
Privacy:  Public Percent Complete:  0%
Assigned to:  None Open/Closed:  Open
Effort:  0.00

Fri 21 Dec 2018 02:27:13 PM UTC, original submission:

Currently, Gnuastro just uses WCSLIB's raw output when it wants to write WCS keywords that are distorted. In particular, it will use the SIP distortion coefficients (which has become the commonly used standard recently).

But, as discussed in Proc. of SPIE Vol. 8451, 84511M,  there are many software packages (Astromatic software in particular) that use TPV.

In that SPIE paper, they suggest to include both conventions in the header (with `CTYPE' referring to SIP, but TPV also present as `PV*' keywords.

It would be good if we apply this standard in Gnuastro's outputs also (to allow easy integration with Astromatic).

WCSLIB does appear to have a flag for writing TPV keywords (`WCSHDO_PVn_ma', when calling `wcshdo'), but I couldn't see any change when I changed the current value (`WCSHDO_safe') in the call to `wcshdo' of `lib/fits.c' (using WCSLIB 6.2).

So we might have to do this manually. That paper does give some of the basic equations, but I couldn't find the `sip2pv' and `pv2sip' C programs it talks about! However, they have apparently we-written it in Python and are distributing that here.

So if there is no better solution, we can translate this Python code into C and include it in Gnuastro's WCS library (for general use).

Afterwards, it is trivial to also add a common option to all programs (maybe called `--tpvinwcs'). When it is called, Gnuastro's programs can follow the SPIE paper's suggestion and have both headers present.

For the time being, I am busy and won't have the chance to work on this, so if you are interested please post a comment (for encouragement!), or just take up the job (its just a relatively simple translation from Python).

Mohammad Akhlaghi <makhlaghi>
Project Administrator


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.4