<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:24:08 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-354] On missing, unconverted, or invalid numeric values, write a string FITS complaint</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/INSTRM-354</link>
                <project id="10300" key="INSTRM">Instrument control development</project>
                    <description>&lt;p&gt;As it stands, when the routines which generate FITS cards get an invalid or missing value, they do not generate the card, but write a COMMENT instead.&lt;/p&gt;

&lt;p&gt;We should write out &apos;NaN&apos; for floating point numbers and, say, &apos;INVALID&apos; for integers. Probably leave the semi-informative COMMENTS, but it is better for readers to get invalid values than no card.&lt;/p&gt;

&lt;p&gt;n.b. NaNs are valid pixel values, but NaN is not a valid card value.&lt;/p&gt;</description>
                <environment></environment>
        <key id="12329">INSTRM-354</key>
            <summary>On missing, unconverted, or invalid numeric values, write a string FITS complaint</summary>
                <type id="3" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10518&amp;avatarType=issuetype">Task</type>
                                            <priority id="10000" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/priorities/medium.svg">Normal</priority>
                        <status id="10002" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/statuses/generic.png" description="The issue is resolved, reviewed, and merged">Done</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="cloomis">cloomis</assignee>
                                    <reporter username="cloomis">cloomis</reporter>
                        <labels>
                            <label>FITS</label>
                    </labels>
                <created>Wed, 2 May 2018 19:07:45 +0000</created>
                <updated>Fri, 22 Apr 2022 05:43:41 +0000</updated>
                            <resolved>Fri, 22 Apr 2022 05:43:41 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                <comments>
                            <comment id="13722" author="cloomis" created="Mon, 2 Jul 2018 20:26:36 +0000"  >&lt;p&gt;Pinning the conventions down a bit more:&lt;/p&gt;

&lt;p&gt;Unavailable values (where there is no Gen2 or MHS keyword at all, say):&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Subaru already uses &lt;tt&gt;&apos;##NODATA##&apos;&lt;/tt&gt;. Can we always use that, as ugly as it is? Good for all types.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Invalid and out-of-range values:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;tt&gt;FLTCARD = NaN&lt;/tt&gt; is not valid FITS: use &lt;tt&gt;FLTCARD = &apos;NaN&apos;&lt;/tt&gt;.&lt;/li&gt;
	&lt;li&gt;Because of that, should we simply use &lt;tt&gt;INTCARD = &apos;NaN&apos;&lt;/tt&gt;? Using a string which suggests a float might be a problem.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The most common use-case for the invalid integer is for stepper motors whose position is not known. Yes, you can often use &lt;tt&gt;-9999&lt;/tt&gt; etc., but that often causes trouble.&lt;/p&gt;</comment>
                            <comment id="14709" author="hassan" created="Mon, 10 Dec 2018 08:30:59 +0000"  >&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=furu&quot; class=&quot;user-hover&quot; rel=&quot;furu&quot;&gt;Hisanori Furusawa&lt;/a&gt; check how invalid values are converted prior to ingestion. By the next FITS WG meeting.&lt;/p&gt;</comment>
                            <comment id="14710" author="hassan" created="Mon, 10 Dec 2018 08:37:18 +0000"  >&lt;p&gt;A meta keyword that qualifies (valid/invalid) the keyword in question may be an option.&lt;/p&gt;</comment>
                            <comment id="15001" author="cloomis" created="Wed, 20 Feb 2019 16:41:34 +0000"  >&lt;p&gt;Per the 4.0 standard&apos;s 4.1.2.3:&lt;/p&gt;

&lt;p&gt;&quot;The value field, when present, shall contain the ASCII text representation of a literal string constant, a logical constant, or a numerical constant, in the format specified in Sect. 4.2. The value field may be a null field; i.e., it may consist entirely of spaces, in which case the value associated with the keyword is undefined.&quot;&lt;/p&gt;

&lt;p&gt;So we could just leave out the value. Is that OK for Subaru?&lt;/p&gt;</comment>
                            <comment id="15172" author="furu" created="Mon, 25 Mar 2019 00:27:55 +0000"  >&lt;p&gt;We are checking this - sorry for taking long, but could you elaborate on what exactly the problems are if we set the values like -9999? I am still inclined to set these normal but impossible numbers as default, since they are simply db loadable as they are without any type conversion, and will not conflict with real measurements. We could define multiple values for different states like -9999 (measurement failure), -8888 (not set; not ready etc for known reason)..&lt;/p&gt;</comment>
                            <comment id="15332" author="cloomis" created="Wed, 17 Apr 2019 16:51:14 +0000"  >&lt;p&gt;If type conversion is a significant problem for the db ingest programs, I agree that using special values is probably the right choice.  I was hoping to use a defined FITS standard, but if we can&apos;t so be it.&lt;br/&gt;
Do you know whether the ingest programs handle &lt;em&gt;any&lt;/em&gt; special values, like the string &quot;NaN&quot; for a floating point value? I also wonder whether the common Gen2 keyword value &quot;##NODATA##&quot; is handled specially?&lt;/p&gt;

&lt;p&gt;Let me talk to myself out loud.&lt;/p&gt;

&lt;p&gt;The source of every FITS card is an MHS keyword. Each MHS keyword has a special invalid value, which is generally unused or which defaults to NaN. That value is currently used when sending MHS keywords &lt;em&gt;within&lt;/em&gt; the ICS system.&lt;br/&gt;
We could use that mechanism, certainly for strings and integers, and use some defaults (your suggested -9999 or -8888, say)&lt;/p&gt;

&lt;p&gt;Thinking through our devices, I suspect that -9999, etc. would work. Sigh.&lt;/p&gt;

&lt;p&gt;We do need to decide on this very soon, since people are starting to use the data files.&lt;/p&gt;
</comment>
                            <comment id="15950" author="cloomis" created="Wed, 14 Aug 2019 10:24:33 +0000"  >&lt;p&gt;I&apos;ll be generating two special values, &quot;invalid&quot; and &quot;out-of-date&quot;. The real NaNs, etc. can in general be useful, so those are still used within the instrument software. The new special values are &lt;b&gt;only&lt;/b&gt; used for FITS headers. We need cover the four header card types: integer, real, string, and logical.&lt;/p&gt;

&lt;p&gt;For invalid, -9999, -9999.0, and &quot;invalid value&quot;. The comment will have &quot;INVALID&quot; appended.&lt;br/&gt;
For out-of-date, -9998, -9998.0, and &quot;expired value&quot;. The comment will have &quot;NOT CURRENT&quot; appended.&lt;/p&gt;

&lt;p&gt;Logicals are left untouched in the case of expired values, and have no invalid value.&lt;/p&gt;

&lt;p&gt;Am adding the &quot;value&quot; to the strings so as not to get confused with the common &quot;invalid&quot; enumeration value (both limit switches being set, for instance).&lt;/p&gt;

&lt;p&gt;Some measurement errors will show other &quot;invalid&quot; values. For instance the cryostat temperatures will be -9999 for no readings, 400K for off-scale high, and 0K for off scale low. In this case, the internal NaN signals that an ADC channel could not be read, and the other two that the circuit is open/shorted. This ticket only translates the NaN.&lt;/p&gt;

&lt;p&gt;If we need a different special value for some cards, it would not be hard to add the mechanism. But I am not doing it until we actually encounter the problem.&lt;/p&gt;

&lt;p&gt;Can you check off on this please, &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=furu&quot; class=&quot;user-hover&quot; rel=&quot;furu&quot;&gt;Hisanori Furusawa&lt;/a&gt;?&lt;/p&gt;</comment>
                            <comment id="15951" author="furu" created="Thu, 15 Aug 2019 00:01:12 +0000"  >&lt;p&gt;Thank you for your proposal. Could you elaborate a bit on it? Do you mean with the &quot;invalid value&quot; and &quot;expired value&quot; string values will be set in the FITS header, or they are still numeric that is the same type as regular values for a certain card? For instance, are the invalid values 400 and 0 for the cryostat temperatures?&lt;br/&gt;
I believe a concern by the archive team is that if the value type in a certain card varies frame by frame, they need to deal with it in their ingesting program, which leads to cumbersome case-by-case exceptional code. So, we want to ingest values as they are without any type casting or pre-processing for conversion for reliable operation and maintenability of the code.&lt;/p&gt;</comment>
                            <comment id="15952" author="cloomis" created="Thu, 15 Aug 2019 00:13:33 +0000"  >&lt;p&gt;Sorry, I meant that for when the FITS writer cannot determine a valid value (the internal value is &quot;NaN&quot; or None or blank, or &quot;##NODATA##&quot;), it will use a &lt;b&gt;type-correct&lt;/b&gt; value: -9999 for integer cards, -9999.0 for float cards, and &quot;invalid value&quot; for string cards. Logical cards will always be T or F.&lt;/p&gt;

&lt;p&gt;Likewise for &quot;expired&quot; values. In some sense there is no difference between &quot;invalid&quot; and &quot;expired&quot; values, but I would like to be able to express as much as I can about things which have gone wrong. But if you would prefer I can convert all failures to the &quot;invalid&quot; values.&lt;/p&gt;

&lt;p&gt;I only mentioned the cryostat temperatures to point out that there may be other type-correct values which indicate errors.&lt;/p&gt;</comment>
                            <comment id="15953" author="furu" created="Thu, 15 Aug 2019 00:33:12 +0000"  >&lt;p&gt;Thank you. I understand. This plan looks fine to me. They want to have a dictionary that defines such special values for each card, so that they could perform validation of data on the archive side. &lt;br/&gt;
Currently, SMOKA ingests &apos;##NODATA##&apos; without any conversion since it always appears in string cards and there is no conversion issue, but I agree on that, instead, having dedicated values for failures such as &quot;invalid value&quot; and &quot;expired value&quot; is good for health check and data quality control.&lt;/p&gt;</comment>
                            <comment id="30767" author="cloomis" created="Fri, 22 Apr 2022 05:43:41 +0000"  >&lt;p&gt;Long since done.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="12822">INSTRM-484</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="13530">PIPE2D-404</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="11657">INSTRM-130</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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|ii04hr:</customfieldvalue>

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