[fitsbits] Question about distortions when multiple coordinate systems are applied {External} {External} {External}
Dubois-Felsmann, Gregory P.
gpdf at ipac.caltech.edu
Thu Jul 9 01:16:58 EDT 2026
Hi, Mark,
Very informative documentation, thank you!
Gregory
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: fitsbits <fitsbits-bounces at listmgr.nrao.edu> on behalf of Mark Calabretta via fitsbits <fitsbits at listmgr.nrao.edu>
Sent: Wednesday, 08 July 2026 20:50:32
To: FITSbits <fitsbits at nrao.edu>
Cc: FITSWCS <fitswcs at nrao.edu>; Thompson, William T. (GSFC-671.0)[ADNET SYSTEMS INC] <william.t.thompson at nasa.gov>
Subject: [fitsbits] Question about distortions when multiple coordinate systems are applied {External} {External}
Hi Bill,
> I’ve been told that astropy will automatically apply distortions
> encoded in DPj keywords when there are no DPja keywords for
> alternative coordinate system “a”.
If true, it is not correct behaviour according to the following
statement from WCS Paper I, Sect. 2.5:
If an alternate coordinate description is specified, all coordinate
keywords for that version must be given even if they do not differ
from those of the primary version.
However, astropy uses WCSLIB, which does not leak keyvalues between
alternate coordinate descriptions. As astropy would have to add it
natively you'd need to confirm it with one of the astropy coders.
The WCSLIB bintable header parser, wcsbth(), optionally implements an
inheritance mechanism (non-standard) between primary and bintable
WCS keywords. I wonder if someone has confused it with that.
The legacy distortion functions, TPV, TPU, SIP, DSS, TNX, and ZPX, can
be translated into the Paper IV formalism in a form recognised by
WCSLIB, including alternate coordinate descriptions. Whether given in
that form or not, WCSLIB translates them all to TPD on input, as
explained in the WCSLIB manual:
https://www.atnf.csiro.au/computing/software/wcs/wcslib/dis_8h.html
noting, in particular, the paragraph on historical idiosyncrasies.
Regards,
Mark Calabretta
On Tue, 7 Jul 2026 19:43:25 +0000
"Thompson, William T. \(GSFC-671.0\)\[ADNET SYSTEMS INC\] via fitsbits"
<fitsbits at listmgr.nrao.edu> wrote:
Folks:
I’ve been presented with a question about the use of distortion
parameters when a FITS header contains multiple coordinate systems.
Earlier I had asked about this issue when using the Simple Image
Polynomial convention, but now I’m asking about distortions as
described in the Calabretta et al. 2004 paper.
Specifically I’m asking about prior (DP) distortions, since subsequent
(DQ) distortions are a different case entirely. I’ve been told that
astropy will automatically apply distortions encoded in DPj keywords
when there are no DPja keywords for alternative coordinate system “a”.
I’ve looked through the Calabretta et al. 2004 paper, and cannot find
anything that says that this substitution should be made. Is this a
convention that is widely adopted?
To me, it does make sense that any prior distortion parameters
applicable to one coordinate system would be equally applicable to any
alternate coordinate system. The same is not necessarily true for
subsequent distortion parameters, given the possibly different effects
from the CRPIXja and CDi_ja values between the systems.
I’d appreciate any clarity that can be applied to this situation. If
that convention is widely used, then I should adopt it too.
Thank you,
Bill Thompson
--
[cid:image001.jpg at 01DB8225.EA78D5B0]
William Thompson
Senior Scientist
ADNET SYSTEMS, Inc.
NASA Goddard Space Flight Center, Code 671
Greenbelt, MD 20771
o: 301.286.2040
William.T.Thompson at nasa.gov<mailto:William.T.Thompson at nasa.gov>
_______________________________________________
fitsbits mailing list
fitsbits at listmgr.nrao.edu
https://listmgr.nrao.edu/mailman/listinfo/fitsbits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listmgr.nrao.edu/pipermail/fitsbits/attachments/20260709/7f2c6ada/attachment.html>
More information about the fitsbits
mailing list