[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Mohammad Akhlaghi
Subject: [task #15128] TPV and SIP keywords when WCS distortions are necessary
Date: Sat, 13 Jun 2020 02:08:24 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0

Update of task #15128 (project gnuastro):

              Item Group:                    None => Enhancement            
        Percent Complete:                     80% => 100%                   
             Assigned to:                    None => sks_15                 
             Open/Closed:                    Open => Closed                 


Follow-up Comment #35:

I am happy to say that Sachin's great work is now fully merged into Gnuastro
master branch (in Commit 7da840d4
<> and this
task is officially closed :-) :-) :-).

The internal library infra-structure we defined is much more general than just
the TPV <---> SIP conversion and allows easy addition of other conversions in
the future (when the need comes).

For a command-line interface, after playing a little with various scenarios,
and considering the ease of implementation (which was really important because
I am very busy now!), I thought the best solution is to put this functionality
in the Fits program. for now (afterall WCS is a part of the FITS standard!).

So you can use it like this: let's assume you have a FITS file with TPV
distortion, called 'tpv.fits'. You can use the command below to convert the
distortion to SIP and keep the output data (and new WCS) in 'sip.fits':

astfits tpv.fits --wcsdistortion=SIP --output=sip.fits

I just defined task #15690 to hopefully find better, and more efficient, ways
of doing this in the future.

The good thing with this interface is that you don't need to know the type of
distortion a priori :-D! What ever it is (as long as its supported!) the
output will have a SIP distortion (even if it has a SIP distortion from the

I would like to express a BIG THANK YOU for the job that was very well done by
Sachin! Digging through that Python implementation and trying to figure out
the WCSLIB internal strucure WASN'T EASY!!! As you all see from the changes in
the final commit, it was a lot of work! But Sachin finally pulled it off... I
just polished it and put the 'astfits' program interface (a very trivial

Raul and Samaeh, since you already have some datasets with SIP and TPV, can
you please play a little with this new feature to see how it works? There may
be bugs that Sachin and I haven't found yet and it would be great if we can
find and fix them soon.

As always the most recent tarball and its book are available in the links
below (currently, version 0.12.8-7da84):


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]