gnuastro-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #61974] Unreasonable output when header keyword not available


From: Mohammad Akhlaghi
Subject: [bug #61974] Unreasonable output when header keyword not available
Date: Thu, 10 Feb 2022 06:38:37 -0500 (EST)

Update of bug #61974 (project gnuastro):

                  Status:                    None => Fixed                  
             Assigned to:                    None => makhlaghi              
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

Thanks for reporting this Pedram ;-).

This is the expected behavior. Let me explain: it often happens that some
parts of the data don't have a value (for example an image that has been
warped and the edges remain NaN). 

So when the user requests an analysis for something that doesn't exist
('date-to-sec' conversion on the non-existant value of 'DATE-OBS' for that
file), we need a place-holder to signify that this particular data element
doesn't have a value.

In the case of floating point numbers, the IEEE floating point standard does
have a solution: NaN (or Not a Number). But the output of 'date-to-sec' is not
floating-point, it is a 64-bit, signed integer! And the simplicity of the
integer number definition doesn't allow for any such NaN element!

For signed integers, the default blank value is defined to be the smallest
possible number (or '-9223372036854775808' for this data type, see Numeric
data types
<https://www.gnu.org/software/gnuastro/manual/html_node/Numeric-data-types.html>).
For unsigned integers (where the minimum is zero), it is the maximum value of
that data type. Generally, in the Gnuastro library we have a whole blank.h
<https://www.gnu.org/software/gnuastro/manual/html_node/Library-blank-values.html>
devoted to dealing with blank values ;-).

On the other hand, in Gnuastro's text table format
<https://www.gnu.org/software/gnuastro/manual/html_node/Gnuastro-text-table-format.html>,
we allow the users to set any value they like to be blank. This is why you see
this blank value also repeated in the column metadata ;-). So even if a
table-reader doesn't know Gnuastro's convention for blank values, they can use
that metadata in the text table format to know that this value is not valid by
definition (didn't exist!).

Please let me know if this wasn't clear ;-).

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61974>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]