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.
Here in the code, the boolean parsing is incorrect.
It should be something like
byte == b'T'instead ofbyte != 0.And
byte == 0is used for aNULLvalue, see section 7.3.3.1 of the FITS document.I image two solutions:
Nullto theDataValueenumboolbyOption<bool>forvalueinDataValue::LogicalWhich one do you prefer (I have not looked enough at
fitsrsto have an opinion)?P.S: in AT2S I use both a
Field::Boolean(bool)andField::NullableBoolean(Option<bool>)so I then to favor the second option in the above list.