-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to TiledDataset for missing, irregular or overlapping tiles #487
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #487 will not alter performanceComparing Summary
Benchmarks breakdown
|
def __init__(self, dataset_array, inventory=None): | ||
self._data = np.array(dataset_array, dtype=object) | ||
def __init__(self, dataset_array, inventory=None, mask=False): | ||
self._data = np.ma.masked_array(dataset_array, dtype=object, mask=mask) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we auto-generate the mask based on the elements of dataset_array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect so. We can readily assume anything that isn't a Dataset should be masked out, but we should probably also have some way of flagging invalid Datasets for masking as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the default value of mask be None
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either works fine. False
is specifying to set the mask to be False
(ie: not masked) everywhere. Which is the default if you pass None
into masked_array
anyway, but explicit is better than implicit.
Co-authored-by: Stuart Mumford <[email protected]>
…o tiledds-improvements
There are a few places where this can still be improved - if we're happy to make issues for those and punt them then this is good to go pending review. Otherwise I'll come back to it on Monday. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 This looks good.
I think we should postpone merging this until we have made the corresponding changes to dkist-inventory just to make sure we haven't missed anything.
Changes the array of datasets underlying TiledDataset into a masked array, defaulting to False everywhere (all tiles are valid).