Allow Table_Delimited(and Table_Character?) records containing empty boolean fields to be read in by PDS4 Tools, as discussed in #36.
This change applies the mask_numeric_nulls behaviour (mask_array population and data element dummy imputation), as already present in the wider numeric logic branch, to the boolean branch. No attempts have been made to refactor the branching for performance or DRYness, as I am not familiar enough with the codebase or potential edge cases to delve into that, but we can always tackle that at a later point if the PR is allowed to progress.
Initially tested with Python 3.6.13 / NumPy 1.19.5 to yield the desired results, i.e. records read in successfully, their empty boolean fields are of type numpy.ma.core.MaskedConstant, and their values are visually blanked out when viewed with pds4_tools.view().
Allow
Table_Delimited
(andrecords containing empty boolean fields to be read in by PDS4 Tools, as discussed in #36.Table_Character
?)This change applies the
mask_numeric_nulls
behaviour (mask_array
population anddata
element dummy imputation), as already present in the wider numeric logic branch, to the boolean branch. No attempts have been made to refactor the branching for performance or DRYness, as I am not familiar enough with the codebase or potential edge cases to delve into that, but we can always tackle that at a later point if the PR is allowed to progress.Initially tested with Python 3.6.13 / NumPy 1.19.5 to yield the desired results, i.e. records read in successfully, their empty boolean fields are of type
numpy.ma.core.MaskedConstant
, and their values are visually blanked out when viewed withpds4_tools.view()
.