-
Notifications
You must be signed in to change notification settings - Fork 18
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
Improve masking #122
base: develop
Are you sure you want to change the base?
Improve masking #122
Conversation
Masking is now performed on accessing data in the datastore
pytest_cases is not compatible with pytest 8 :/
Tests now pass
I've made some changes, can you check it works as expected? You can set the mask with: |
Replace mutation of stored data with numpy masked array Better way to set null mask?
Have fixed the problems you stated I think - using a masked array instead of mutation and now generates a null mask in a better way (?) Moat of the time, the masks I used are quite straightforward, for example (from docs): To remove data points in dic_map where max_shear is above 0.8, use:
To remove data points in dic_map where e11 is above 1 or less than -1, use:
To remove data points in dic_map where corrVal is less than 0.4, use:
|
Also - there is an inconsistency in function naming - |
I did call it |
As far as I'm aware, everything still seems to works as expected with a masked array. It does incur an overhead (but much smaller by a factor 1000 than the previous method). Do we need to change the logic to not use masked arrays for data that isn't masked? Currently a masked array is always generated. |
A masked array is only returned when a mask is provided. If unset, the normal map data is passed through as before. |
Masking is now performed on accessing data in the datastore.
Removed the preview function in
set_mask
since it is now extraneous as the original data is not being overwritten.We should consider moving cropping and masking from
hrdic
intobase