Skip to content

Support BINTABLE boolean NULL values #29

@fxpineau

Description

@fxpineau

Here in the code, the boolean parsing is incorrect.
It should be something like byte == b'T' instead of byte != 0.
And byte == 0 is used for a NULL value, see section 7.3.3.1 of the FITS document.
I image two solutions:

  • add a Null to the DataValue enum
  • replace bool by Option<bool> for value in DataValue::Logical

Which one do you prefer (I have not looked enough at fitsrs to have an opinion)?

P.S: in AT2S I use both a Field::Boolean(bool) and Field::NullableBoolean(Option<bool>) so I then to favor the second option in the above list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions