<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<div style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" dir="ltr">
Hi, Mark,</div>
<div style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" dir="ltr">
<br>
</div>
<div style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" dir="ltr">
Very informative documentation, thank you!</div>
<div style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" dir="ltr">
<br>
</div>
<div style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" dir="ltr">
Gregory</div>
<div id="ms-outlook-mobile-body-separator-line" data-applydefaultfontstyles="true" dir="auto" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt;">
<div style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt;">
<br>
</div>
</div>
<div style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" id="ms-outlook-mobile-signature" dir="auto">
<span style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Get
</span><a href="https://aka.ms/o0ukef" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt;">Outlook for iOS</a></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> fitsbits <fitsbits-bounces@listmgr.nrao.edu> on behalf of Mark Calabretta via fitsbits <fitsbits@listmgr.nrao.edu><br>
<b>Sent:</b> Wednesday, 08 July 2026 20:50:32<br>
<b>To:</b> FITSbits <fitsbits@nrao.edu><br>
<b>Cc:</b> FITSWCS <fitswcs@nrao.edu>; Thompson, William T. (GSFC-671.0)[ADNET SYSTEMS INC] <william.t.thompson@nasa.gov><br>
<b>Subject:</b> [fitsbits] Question about distortions when multiple coordinate systems are applied {External} {External}</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi Bill,<br>
<br>
> I’ve been told that astropy will automatically apply distortions<br>
> encoded in DPj keywords when there are no DPja keywords for<br>
> alternative coordinate system “a”.  <br>
<br>
If true, it is not correct behaviour according to the following<br>
statement from WCS Paper I, Sect. 2.5:<br>
<br>
  If an alternate coordinate description is specified, all coordinate<br>
  keywords for that version must be given even if they do not differ<br>
  from those of the primary version.<br>
<br>
However, astropy uses WCSLIB, which does not leak keyvalues between<br>
alternate coordinate descriptions.  As astropy would have to add it<br>
natively you'd need to confirm it with one of the astropy coders.<br>
<br>
The WCSLIB bintable header parser, wcsbth(), optionally implements an<br>
inheritance mechanism (non-standard) between primary and bintable<br>
WCS keywords.  I wonder if someone has confused it with that.<br>
<br>
The legacy distortion functions, TPV, TPU, SIP, DSS, TNX, and ZPX, can<br>
be translated into the Paper IV formalism in a form recognised by<br>
WCSLIB, including alternate coordinate descriptions.  Whether given in<br>
that form or not, WCSLIB translates them all to TPD on input, as<br>
explained in the WCSLIB manual:<br>
<br>
  <a href="https://www.atnf.csiro.au/computing/software/wcs/wcslib/dis_8h.html">https://www.atnf.csiro.au/computing/software/wcs/wcslib/dis_8h.html</a><br>
<br>
noting, in particular, the paragraph on historical idiosyncrasies.<br>
<br>
Regards,<br>
Mark Calabretta<br>
<br>
<br>
<br>
On Tue, 7 Jul 2026 19:43:25 +0000<br>
"Thompson, William T. \(GSFC-671.0\)\[ADNET SYSTEMS INC\] via fitsbits"<br>
<fitsbits@listmgr.nrao.edu> wrote:<br>
<br>
Folks:<br>
<br>
I’ve been presented with a question about the use of distortion<br>
parameters when a FITS header contains multiple coordinate systems.<br>
Earlier I had asked about this issue when using the Simple Image<br>
Polynomial convention, but now I’m asking about distortions as<br>
described in the Calabretta et al. 2004 paper.<br>
<br>
Specifically I’m asking about prior (DP) distortions, since subsequent<br>
(DQ) distortions are a different case entirely.  I’ve been told that<br>
astropy will automatically apply distortions encoded in DPj keywords<br>
when there are no DPja keywords for alternative coordinate system “a”.<br>
I’ve looked through the Calabretta et al. 2004 paper, and cannot find<br>
anything that says that this substitution should be made.  Is this a<br>
convention that is widely adopted?<br>
<br>
To me, it does make sense that any prior distortion parameters<br>
applicable to one coordinate system would be equally applicable to any<br>
alternate coordinate system.  The same is not necessarily true for<br>
subsequent distortion parameters, given the possibly different effects<br>
from the CRPIXja and CDi_ja values between the systems.<br>
<br>
I’d appreciate any clarity that can be applied to this situation.  If<br>
that convention is widely used, then I should adopt it too.<br>
<br>
Thank you,<br>
<br>
Bill Thompson<br>
<br>
--<br>
[cid:image001.jpg@01DB8225.EA78D5B0]<br>
<br>
William Thompson<br>
Senior Scientist<br>
ADNET SYSTEMS, Inc.<br>
NASA Goddard Space Flight Center, Code 671<br>
Greenbelt, MD 20771<br>
o: 301.286.2040<br>
William.T.Thompson@nasa.gov<mailto:William.T.Thompson@nasa.gov><br>
<br>
_______________________________________________<br>
fitsbits mailing list<br>
fitsbits@listmgr.nrao.edu<br>
<a href="https://listmgr.nrao.edu/mailman/listinfo/fitsbits">https://listmgr.nrao.edu/mailman/listinfo/fitsbits</a><br>
</div>
</span></font></div>
</body>
</html>