<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
It’s a weakness of SIP that it doesn’t support the alternative-WCS convention, and this has led to real problems in deciding what Astropy should do with it when there are alternative WCSes defined.</div>
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
For cases where the convention actually supports the alternative-WCS “a” convention (as in the question in this thread) I think it’s very clear that the consistent intent of the design of FITS was to have each of the 27 possible WCSes be independent of the
 others.</div>
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
There are cases, such as for SPHEREx, where you absolutely don’t want optical distortions to “leak” into other WCSes.  In SPHEREx, we use a FITS-standard (though rather exotic) 2D-lookup-table WCS to document the (intentionally) varying spectral bandpass across
 the field of view.  That bandpass is tied to the physical pixels, not to the sky, created by linear-variable filters immediately in front of the detectors, so including optical distortions from the primary spatial WCS in the spectral WCS would be a serious
 error.</div>
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
We have to leave it up to projects/missions to choose which WCSes to apply distortions to; if that means they have to repeat distortion models for multiple “a” values, well, within the limitations of FITS: so be it.</div>
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Best wishes,</div>
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Gregory Dubois-Felsmann</div>
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Caltech/IPAC</div>
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
NSF/DOE Vera C. Rubin Observatory Science Platform science lead, Data Engineering lead</div>
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
NASA SPHEREx mission pipeline system designer</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">
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: -apple-system, HelveticaNeue; font-size: 13.398001px; color: rgb(33, 33, 33);">--</span><span style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span><span style="font-family: -apple-system, HelveticaNeue; font-size: 13.398001px; color: rgb(33, 33, 33);">Gregory Dubois-Felsmann, Ph.D. | Senior Staff Scientist | Caltech/IPAC</span><span style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span><span style="font-family: -apple-system, HelveticaNeue; font-size: 13.398001px; color: rgb(33, 33, 33);">Science Platform Scientist, Vera C. Rubin Observatory</span><span style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span><span style="font-family: -apple-system, HelveticaNeue; font-size: 13.398001px; color: rgb(33, 33, 33);">Pipeline System Designer, NASA SPHEREx mission</span><span style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span><span style="font-family: -apple-system, HelveticaNeue; font-size: 13.398001px; color: rgb(33, 33, 33);">Mail Code MR 100-22 | Pasadena, CA 91125-2200 | </span><span style="font-family: -apple-system, HelveticaNeue; font-size: 13.398001px; color: rgb(0, 120, 212);">gpdf@ipac.caltech.edu</span></div>
<div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</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 Thompson, William T. (GSFC-671.0)[ADNET SYSTEMS INC] via fitsbits <fitsbits@listmgr.nrao.edu><br>
<b>Sent:</b> Tuesday, 07 July 2026 12:43:25<br>
<b>To:</b> fitsbits@listmgr.nrao.edu <fitsbits@listmgr.nrao.edu><br>
<b>Subject:</b> [fitsbits] Question about distortions when multiple coordinate systems are applied {External}</font>
<div> </div>
</div>
<div>
<div style="direction:ltr; font-family:Aptos,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Folks:</div>
<div style="direction:ltr; font-family:Aptos,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr; font-family:Aptos,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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.</div>
<div style="direction:ltr; font-family:Aptos,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr; font-family:Aptos,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Specifically I’m asking about <i>prior</i> (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?</div>
<div style="direction:ltr; font-family:Aptos,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr; font-family:Aptos,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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.</div>
<div style="direction:ltr; font-family:Aptos,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr; font-family:Aptos,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I’d appreciate any clarity that can be applied to this situation.  If that convention is widely used, then I should adopt it too.</div>
<div style="direction:ltr; font-family:Aptos,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr; font-family:Aptos,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thank you,</div>
<div style="direction:ltr; font-family:Aptos,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr; font-family:Aptos,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Bill Thompson</div>
<div style="direction:ltr; font-family:Aptos,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_ms-outlook-mobile-signature">
<div class="x_MsoNormal">-- </div>
<table class="x_MsoNormalTable" cellspacing="0" cellpadding="0" border="0" style="width:461.25pt; box-sizing:border-box; border-collapse:collapse; border-spacing:0px">
<tbody>
<tr>
<td class="x_MsoNormalTable" style="padding:2.15pt 1.45pt; width:103.5pt; height:93.2pt">
<div class="x_MsoNormal" style="direction:ltr; text-align:center; color:black"><img src="cid:image001.jpg@01DB8225.EA78D5B0" id="x_Picture_x0020_1" width="132" height="31" style="width:1.3854in; height:0.3333in"></div>
</td>
<td class="x_MsoNormalTable" style="padding:2.15pt 1.45pt; vertical-align:bottom; width:24.65pt; height:93.2pt">
<div class="x_MsoNormal" style="direction:ltr; text-align:center; line-height:115%">
<img src="cid:image002.png@01DB8225.EA78D5B0" id="x_Straight_x0020_Connector_x0020_2" width="0" height="144" style="width:0.0104in; height:1.5104in"></div>
</td>
<td class="x_MsoNormalTable" style="padding:2.15pt 1.45pt; width:333.25pt; height:93.2pt">
<div class="x_MsoNormal" style="line-height:115%; font-family:Helvetica; color:black">
<b>William Thompson</b></div>
<div class="x_MsoNormal" style="line-height:115%; font-family:Helvetica; font-size:9pt; color:black">
<span style="line-height:115%"><b>Senior Scientist</b></span></div>
<div class="x_MsoNormal" style="line-height:115%; font-family:Helvetica; font-size:9pt; color:black">
<span style="line-height:115%">ADNET SYSTEMS, Inc.</span></div>
<div class="x_MsoNormal" style="line-height:115%; font-family:Helvetica; font-size:9pt; color:black">
<span style="line-height:115%">NASA Goddard Space Flight Center, Code 671</span></div>
<div class="x_MsoNormal" style="line-height:115%; font-family:Helvetica; font-size:9pt; color:black">
<span style="line-height:115%">Greenbelt, MD 20771</span></div>
<div class="x_MsoNormal" style="line-height:115%; font-family:Helvetica; font-size:9pt; color:black">
<span style="line-height:115%">o: 301.286.2040</span></div>
<div class="x_MsoNormal" style="font-family:Helvetica; font-size:9pt"><a href="mailto:William.T.Thompson@nasa.gov" data-outlook-id="7405954f-b1ed-4d07-8280-0c3977b7aeda">William.T.Thompson@nasa.gov</a></div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>