# PropertyList should support missing values and possibly units

XMLWordPrintable

#### Details

• Type: RFC
• Status: Implemented
• Resolution: Done
• Component/s:
• Labels:
None

#### Description

PropertyList is how we perform FITS header I/O, but it does not support missing values, which are used in FITS headers to indicate items that have unknown value.

Furthermore, it would be nice to have support for units as a separate field, though for FITS headers one must include that information as part of the comment.

I am not necessarily proposing to do this work, but I felt I could at least get permission for it to be done.

#### Activity

Hide
Russell Owen added a comment -

This RFC is accepted as follows:

• PropertyList will be extended to support missing (unknown) values, in a way that is compatible with the FITS standard for header cards.
• PropertySet need not not gain same support, but if it can be added without doing violence to the class, then it would help keep the classes more closely aligned.
• Consider using None as the value for missing values in Python.
• How important this is, and whether we can safely rely on it, depends partly on how pyfits handles headers with missing values. We know pyfits cannot write such headers, but we don't know what happens when it tries to read them.
• Do not add support for units as part of this RFC. Feel free to make a new RFC for that.
Show
Russell Owen added a comment - This RFC is accepted as follows: PropertyList will be extended to support missing (unknown) values, in a way that is compatible with the FITS standard for header cards. PropertySet need not not gain same support, but if it can be added without doing violence to the class, then it would help keep the classes more closely aligned. Consider using None as the value for missing values in Python. How important this is, and whether we can safely rely on it, depends partly on how pyfits handles headers with missing values. We know pyfits cannot write such headers, but we don't know what happens when it tries to read them. Do not add support for units as part of this RFC. Feel free to make a new RFC for that.
Hide
Paul Price added a comment -

I don't want to hijack this thread, so let's take the NaN issue offline.

Show
Paul Price added a comment - I don't want to hijack this thread, so let's take the NaN issue offline.
Hide
John Parejko added a comment -

How does writing NAN/Inf as strings help? We would have to do some strange parsing internally, and they would break everything else externally. Plus, strings wouldn't even work for some keywords that must be a certain type.

Show
John Parejko added a comment - How does writing NAN/Inf as strings help? We would have to do some strange parsing internally, and they would break everything else externally. Plus, strings wouldn't even work for some keywords that must be a certain type.
Hide
Paul Price added a comment -

I think we want to be able to round-trip floating-point values, so we need to support NaN and +/- Inf. I don't think FITS supports these natively, so you have to write them as strings.

Show
Paul Price added a comment - I think we want to be able to round-trip floating-point values, so we need to support NaN and +/- Inf . I don't think FITS supports these natively, so you have to write them as strings.
Hide
Tim Jenness added a comment -

Paul Price are you talking about:

 KEYWORD = NaN / Floating point that came out wrong 

or

 KEYWORD = 'NaN' / not a number written out as a string 

?

Show
Tim Jenness added a comment - Paul Price are you talking about: KEYWORD = NaN / Floating point that came out wrong or KEYWORD = 'NaN' / not a number written out as a string ?

#### People

Assignee:
Russell Owen
Reporter:
Russell Owen
Watchers:
John Parejko, Kian-Tat Lim, Paul Price, Russell Owen, Tim Jenness, Xiuqin Wu [X] (Inactive)
0 Vote for this issue
Watchers:
6 Start watching this issue

#### Dates

Created:
Updated:
Resolved:
Planned End:

#### Jenkins Builds

No builds found.