Skip to content

Support BINTABLE boolean NULL values #29

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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