[x] Add get_mean_sd_by_band function in data/utils.py
[x] Add warning if tags are unavailable and computation does not take place
I believe it would be a good idea to check if this works properly within the malpolon environment. As mentioned IRL, I had trouble setting up an environment. In my poorly setup environment, rasterio's src.tags(band_number) returns an empty dict.
I've tested in other environments and this works properly, I never had such an issue before and do not find further hints about this bug for now. But if it works in a properly set environment, it works.
Just in case, I've added a warning in case the function does not return means and sds as its supposed to do.
:memo: Changelog
get_mean_sd_by_band
function indata/utils.py
I believe it would be a good idea to check if this works properly within the
malpolon
environment. As mentioned IRL, I had trouble setting up an environment. In my poorly setup environment, rasterio'ssrc.tags(band_number)
returns an empty dict. I've tested in other environments and this works properly, I never had such an issue before and do not find further hints about this bug for now. But if it works in a properly set environment, it works.Just in case, I've added a warning in case the function does not return means and sds as its supposed to do.