JP-3075: Updating dynamic_mask function to include inversion functionality #145
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…he 'dq_def' attribute to compress the DQ array.
Resolves JP-3075
This PR addresses round tripping issues for datamodels that use
dq_def
. Thedq_def
table details how DQ flags are compressed for saving and how to be uncompressed when opened. When opened, datamodels automatically calldynamic_mask
to properly uncompress DQ arrays. However, the inverse was not true during save, which meant that if these datamodels got saved, the uncompressed DQ array got saved to disk, so that when opened again the decompression failed.An
inv
parameter got added to thedynamic_mask
function to compress uncompressed DQ arrays. This inversion is used for datamodels that usedq_def
. In particular, instdatamodels
the inversion is used for ReferenceFileModel during save to ensure the uncompressed DQ array does not get saved, but is properly transformed using thedq_def
table before saving.Checklist
CHANGES.rst
(either inBug Fixes
orChanges to API
)