Skip to content
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

Duplication in functionality between erase_bad and keep_good_only #203

Open
robbibt opened this issue May 20, 2021 · 3 comments
Open

Duplication in functionality between erase_bad and keep_good_only #203

robbibt opened this issue May 20, 2021 · 3 comments

Comments

@robbibt
Copy link
Contributor

robbibt commented May 20, 2021

The following two odc.algo functions appear to do the same thing: replace certain pixels in an array with nodata. To reduce confusion, it would be good to have only one clear option for this kind of task.

odc.algo.erase_bad(...)
odc.algo.keep_good_only(...)

The docstrings seem to say the same thing:

Return a copy of x, but with some pixels replaced with nodata.
This function can work on dask arrays, in which case output will be a dask array as well.

@Kirill888
Copy link
Member

code is the same too, my guess it was attempt at rename that didn't merge correctly.

@robbibt which name do you think works better?

@robbibt
Copy link
Contributor Author

robbibt commented May 20, 2021

I like erase_bad, simpler and more direct

@Kirill888
Copy link
Member

@robbibt Actually they are different, and documentation does differ between the two ever so slightly

erase_bad removes those pixels that are marked True in the mask, while keep_good_only erases pixels that are marked False in the mask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants