<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Menlo;
panose-1:2 11 6 9 3 8 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
font-size:12.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
p.p1, li.p1, div.p1
{mso-style-name:p1;
margin:0in;
font-size:10.5pt;
font-family:Menlo;
color:black;}
span.s1
{mso-style-name:s1;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
p.p2, li.p2, div.p2
{mso-style-name:p2;
margin:0in;
font-size:10.5pt;
font-family:Menlo;
color:black;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:236061867;
mso-list-type:hybrid;
mso-list-template-ids:-252038094 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l1
{mso-list-id:559707000;
mso-list-type:hybrid;
mso-list-template-ids:8425204 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l1:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l1:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l1:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Folks:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I wanted to share with you a draft document that some of my colleagues have been developing. My particular focus is on Appendix VI which describes an extension of the Paper V mechanism for describing distortions,
but you may wish to peruse and comment on the rest of the document as well.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I’ve just implemented part of Appendix VI in the SolarSoft WCS routines (<a href="https://soho.nascom.nasa.gov/solarsoft/gen/idl/wcs/">https://soho.nascom.nasa.gov/solarsoft/gen/idl/wcs/</a>). This was needed
to support corrections to the pointing in Solar Orbiter SPICE files due to spacecraft motions during an observation. I’ve attached a figure showing a particularly strong example of these spacecraft induced distortions. SPICE is a scanning slit spectrometer,
and builds up an image by taking multiple exposures, changing the internal pointing by the slit width for each exposure. The attached plot shows the difference from the nominal spacecraft pointing in the scan (X) direction and along the slit (Y).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The FITS file associated with the attached plot contains the following HDUs:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="p1"><span class="s1">Primary HDU -- O III 703 + Mg IX 706 (Merged)</span><o:p></o:p></p>
<p class="p1"><span class="s1">Extension 1 -- O II 718 - Peak</span><o:p></o:p></p>
<p class="p1"><span class="s1">Extension 2 -- Ne VIII 770 - Peak</span><o:p></o:p></p>
<p class="p1"><span class="s1">Extension 3 -- S V 786 / O IV 787 - Peak</span><o:p></o:p></p>
<p class="p1"><span class="s1">Extension 4 -- C III 977 - Peak</span><span class="apple-converted-space"> </span><o:p></o:p></p>
<p class="p1"><span class="s1">Extension 5 -- Ly Beta 1025 (Merged)</span><o:p></o:p></p>
<p class="p1"><span class="s1">Extension 6 -- O VI 1032 - Peak</span><o:p></o:p></p>
<p class="p1"><span class="s1">Extension 7 -- VARIABLE_KEYWORDS</span><o:p></o:p></p>
<p class="p1"><span class="s1">Extension 8 -- WCSDVARR</span><o:p></o:p></p>
<p class="p1"><span class="s1">Extension 9 -- WCSDVARR</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The primary HDU and the first 6 extensions contain spectral line data for subsections of the detector containing those lines. It’s sufficient to look at the primary HDU, since the extensions follow the same
general format. The data in this HDU has the dimensions (224,1024,82,1) associated with the axes (X,Y,Lambda,Time). Note that the time axis is degenerate, but the PCj_i matrix ties time to the X dimension, since each X position is a separate exposure. The
header has the following keywords to tie the coordinates into the WCSDVARR extensions:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">CRDER1 = 0.175124208406 / [arcsec] Mean stddev of Solar X
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">CWERR1 = 1.47306831780 / [arcsec] Max absolute distortion, Solar X
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">CWDIS1 = 'Lookup ' / Type of WCS distortion correction
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">DW1 = 'EXTVER: 1' / Extension version
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">DW1 = 'NAXES: 1' / Axes in the distorion array
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">DW1 = 'AXIS.1: 1' / Correction of Solar X
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">DW1 = 'ASSOCIATE: 1' / Association stage is pixel coordinates
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">DW1 = 'APPLY: 6' / Application stage is world coordinates
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">and<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">CRDER2 = 0.338068853111 / [arcsec] Mean stddev of Solar Y
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">CWERR2 = 14.1500402581 / [arcsec] Max absolute distortion, Solar Y
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">CWDIS2 = 'Lookup ' / Type of WCS distortion correction
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">DW2 = 'EXTVER: 2' / Extension version
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">DW2 = 'NAXES: 1' / Axes in the distorion array
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">DW2 = 'AXIS.2: 1' / Correction of Solar Y
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">DW2 = 'ASSOCIATE: 1' / Association stage is pixel coordinates
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">DW2 = 'APPLY: 6' / Application stage is world coordinates
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">With ASSOCIATE=1 and APPLY=6, what’s really happening is that the distortion values are exposure-by-exposure corrections to CRVAL1 and CRVAL2 respectively. The other use case identified in the SOLARNET document
also has ASSOCIATE=1 and APPLY=6.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The first of the WCSDVARR extensions contains the following keywords:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="p1"><span class="s1">XTENSION= 'IMAGE </span><span class="apple-converted-space">
</span><span class="s1">' </span><span class="apple-converted-space"> </span>
<span class="s1">/</span><span class="apple-converted-space"> </span><span class="s1">Written by IDL:</span><span class="apple-converted-space">
</span><span class="s1">Thu Dec 22 03:33:32 2022</span><o:p></o:p></p>
<p class="p1"><span class="s1">BITPIX</span><span class="apple-converted-space">
</span><span class="s1">=</span><span class="apple-converted-space">
</span><span class="s1">-64 / Real*8 (double precision)</span><o:p></o:p></p>
<p class="p1"><span class="s1">NAXIS </span><span class="apple-converted-space">
</span><span class="s1">=</span><span class="apple-converted-space">
</span><span class="s1">1 /</span><o:p></o:p></p>
<p class="p1"><span class="s1">NAXIS1</span><span class="apple-converted-space">
</span><span class="s1">=</span><span class="apple-converted-space">
</span><span class="s1">224 /</span><o:p></o:p></p>
<p class="p1"><span class="s1">PCOUNT</span><span class="apple-converted-space">
</span><span class="s1">=</span><span class="apple-converted-space">
</span><span class="s1">0 /</span><span class="apple-converted-space"> </span><span class="s1">number of random group parameters</span><o:p></o:p></p>
<p class="p1"><span class="s1">GCOUNT</span><span class="apple-converted-space">
</span><span class="s1">=</span><span class="apple-converted-space">
</span><span class="s1">1 /</span><span class="apple-converted-space"> </span><span class="s1">number of random groups</span><o:p></o:p></p>
<p class="p1"><span class="s1">DATE</span><span class="apple-converted-space">
</span><span class="s1">= '2022-12-22T04:03:29' /</span><o:p></o:p></p>
<p class="p2"><o:p> </o:p></p>
<p class="p1"><span class="s1">EXTNAME = 'WCSDVARR' </span><span class="apple-converted-space">
</span><span class="s1">/ Extension name</span><o:p></o:p></p>
<p class="p1"><span class="s1">EXTVER</span><span class="apple-converted-space">
</span><span class="s1">=</span><span class="apple-converted-space">
</span><span class="s1">1 / Extension version number, Solar X distortions</span><o:p></o:p></p>
<p class="p1"><span class="s1">FILENAME= 'solo_L1_spice-n-ras_20210914T025031_V08_67109159-000.fits' / Filename</span><o:p></o:p></p>
<p class="p2"><o:p> </o:p></p>
<p class="p1"><span class="s1">CRVAL1</span><span class="apple-converted-space">
</span><span class="s1">=</span><span class="apple-converted-space">
</span><span class="s1">1 / Image array pixel index</span><o:p></o:p></p>
<p class="p1"><span class="s1">CDELT1</span><span class="apple-converted-space">
</span><span class="s1">=</span><span class="apple-converted-space">
</span><span class="s1">1 / Distortion array increment along image coord 1</span><o:p></o:p></p>
<p class="p1"><span class="s1">CRPIX1</span><span class="apple-converted-space">
</span><span class="s1">=</span><span class="apple-converted-space">
</span><span class="s1">1 / [pixel] Index of distortion array ref point</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">That makes it a pretty simple one-to-one association between the first coordinate of the data array and the distortion table. The second WCSDVARR extension is formatted similarly.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I’ve only implemented part of Appendix VI, specifically:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo2"><span style="font-size:11.0pt">Only for LOOKUP tables<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo2"><span style="font-size:11.0pt">Only ASSOCIATE=1-4 is supported<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo2"><span style="font-size:11.0pt">APPLY=5 and APPLY=6 are treated as identical.<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo2"><span style="font-size:11.0pt">Appendix VI-a is not supported<o:p></o:p></span></li></ol>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">This supports the use cases that have been identified so far. Implementing other parts of Appendix VI would require a deeper rewrite of the underlining software, which I don’t think is necessary right now.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">In any case, I wanted to open this document up to a broader FITS community.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Bill Thompson<o:p></o:p></span></p>
</div>
</body>
</html>