You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, sometimes a user may wish to pass in data that is already normalised between 0-1, and therefore set normalise to False. However, this still raises the warning, which can produce a lot of spammy messages.
Hmm, this is complicated by the fact that ds can be Dask, and we don't want to trigger computation early to work out if its values are outside the 0-1.0 range...
Describe the bug/issue
The
calculate_indices
function currently provides a warning ifnormalise
is set to False, but an index is requested that needs normalisation. This prevents users from running an index that assumes values in the range of 0-1 on data with values in the range of 0-10,000.https://github.com/GeoscienceAustralia/dea-notebooks/blob/develop/Tools/dea_tools/bandindices.py#L316-L324
However, sometimes a user may wish to pass in data that is already normalised between 0-1, and therefore set
normalise
to False. However, this still raises the warning, which can produce a lot of spammy messages.Solution
This line should include a check to see if values are not in the range 0-1, and only raise the warning if that is the case.
https://github.com/GeoscienceAustralia/dea-notebooks/blob/develop/Tools/dea_tools/bandindices.py#L316-L324
The text was updated successfully, but these errors were encountered: