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

Handling of NaN values while calculating tpi #9

Open
BENR0 opened this issue Dec 16, 2020 · 0 comments
Open

Handling of NaN values while calculating tpi #9

BENR0 opened this issue Dec 16, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@BENR0
Copy link
Owner

BENR0 commented Dec 16, 2020

Is your feature request related to a problem? Please describe.
When the array the tpi is calculated on contains NA values all pixels in the result where the window around it contains this NA value will be NA.
This is due to the tpi calculation using convolve which does not allow handling NA values.

Describe the solution you'd like
There should be an option to specify how NA values will be handled. For example allow a certain amount of NA values in the window.

Additional context
Something like:
https://stackoverflow.com/questions/38318362/2d-convolution-in-python-with-missing-data
could be implemented which recalculates NA areas after convolution.
Due to the loop this is possibly very slow depending on how many NA values are present.

Maybe https://github.com/Xunius/python_convolution is an option which is the same principle but uses fortran.

@BENR0 BENR0 added the enhancement New feature or request label Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant