<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:33:13 JST 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>PFS-JIRA</title>
    <link>https://pfspipe.ipmu.jp/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.3.4</version>
        <build-number>803005</build-number>
        <build-date>13-09-2019</build-date>
    </build-info>


<item>
            <title>[INSTRM-1230] Failure writing FITS file</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/INSTRM-1230</link>
                <project id="10300" key="INSTRM">Instrument control development</project>
                    <description>&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;2021-04-07 19:52:44.614Z cmdr             10 CmdrConnection.py:58 read: client.v57.sps 105 ccd_b3 d text=&quot;creating fits file /data/raw/2021-04-07/sps/PFLA02450731.fits&quot;
2021-04-07 19:52:44.723Z cmds             20 CommandLink.py:121 &amp;gt; 2 51 w text=&quot;failed to write fits file /data/raw/2021-04-07/sps/PFLA02450731.fits: FITSIO status = 402: bad float to string conversion
Error in ffd2e: double value is a NaN or INDEF
&quot;
2021-04-07 19:52:44.724Z exposure         30 exposure.py:386 failed to write fits file /data/raw/2021-04-07/sps/PFLA02450731.fits: FITSIO status = 402: bad float to string conversion
Error in ffd2e: double value is a NaN or INDEF

2021-04-07 19:52:44.728Z cmdr             10 CmdrConnection.py:58 read: client.v57.sps 105 ccd_b3 w text=&quot;failed to write fits file /data/raw/2021-04-07/sps/PFLA02450731.fits: FITSIO status = 402: bad float to string conversion&quot;
2021-04-07 19:52:44.729Z cmdr             10 CmdrConnection.py:58 read: .ccd_b3 0 ccd_b3 w RawLine=&quot;Error in ffd2e: double value is a NaN or INDEF&quot;
2021-04-07 19:52:44.730Z cmdr             10 CmdrConnection.py:58 read: .ccd_b3 0 ccd_b3 w RawLine=&quot;\&quot;&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="15526">INSTRM-1230</key>
            <summary>Failure writing FITS file</summary>
                <type id="3" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10518&amp;avatarType=issuetype">Task</type>
                                            <priority id="2" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/priorities/critical.svg">Critical</priority>
                        <status id="10100" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/statuses/generic.png" description="No further work should be done on this.">Won&apos;t Fix</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="2">Won&apos;t Fix</resolution>
                                        <assignee username="cloomis">cloomis</assignee>
                                    <reporter username="cloomis">cloomis</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Apr 2021 20:06:57 +0000</created>
                <updated>Wed, 7 Apr 2021 22:23:28 +0000</updated>
                            <resolved>Wed, 7 Apr 2021 22:23:28 +0000</resolved>
                                                                    <component>ics_ccdActor</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                <comments>
                            <comment id="19108" author="cloomis" created="Wed, 7 Apr 2021 21:06:32 +0000"  >&lt;p&gt;I allowed a NaN to sneak through to the fits header writer:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(Pdb) p fitsFile.write(im[:1,:1], header=fitsio.FITSHDR(cards[351:352]))
*** OSError: FITSIO status = 402: bad float to string conversion
Error in ffd2e: double value is a NaN or INDEF
(Pdb) p cards[351:352]
[{&apos;name&apos;: &apos;W_SHEXDT&apos;, &apos;value&apos;: np.nan, &apos;comment&apos;: &apos;[day] Last hexapod move time&apos;}]
(Pdb) p fitsio.FITSHDR(cards[351:352])

W_SHEXDT=                  nan / [day] Last hexapod move time
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="19112" author="cloomis" created="Wed, 7 Apr 2021 22:23:28 +0000"  >&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/INSTRM-1231&quot; title=&quot;Sanitize FITS headers before sending to fitsio.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;INSTRM-1231&quot;&gt;INSTRM-1231&lt;/a&gt; will be the fix.&lt;/p&gt;

&lt;p&gt;The trigger was a real float nan keyword value from the dcb. The fitsio FITSHDR constructor does no validation/sanitization, so a &lt;tt&gt;KEYNAME = nan&lt;/tt&gt; FITS card got sent to &lt;tt&gt;fitsio.write()&lt;/tt&gt;. That is not valid, since FITS cannot express NaNs in header cards, so the write failed.&lt;/p&gt;

&lt;p&gt;For &lt;b&gt;right now&lt;/b&gt;, the dcb actorkeys definition for the hexapodDate declares that &quot;nan&quot; is the invalid value, so that when the ccdActor retrieves the keyword value an exception gets thrown and the standard 9998. NAOJ-approved invalid float value gets passed to fitsio.&lt;/p&gt;

&lt;p&gt;And &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/INSTRM-1231&quot; title=&quot;Sanitize FITS headers before sending to fitsio.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;INSTRM-1231&quot;&gt;INSTRM-1231&lt;/a&gt; will more generally sanitize FITS card values.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10500" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|zzs4vs:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>