pylandtemp icon indicating copy to clipboard operation
pylandtemp copied to clipboard

Possible minor bug

Open npr99 opened this issue 2 years ago • 1 comments

Thank you for this repo! It looks really good.

I was able to replicated: https://github.com/pylandtemp/pylandtemp/blob/master/tutorials/Tutorial_1-%20load_landsat8_image_from_amazon_and_google_cloud.ipynb

In code block 6 # Creating and applying the mask to the images. mask = tempImage10 == 0 tempImage10[mask] = np.nan tempImage11[mask] = np.nan

Should the mask be set twice? # Creating and applying the mask to the images. mask = tempImage10 == 0 tempImage10[mask] = np.nan mask = tempImage11 == 0 tempImage11[mask] = np.nan

npr99 avatar Mar 02 '23 21:03 npr99

Hello @npr99

Thanks for reaching out. Indeed, the masks for bands 10 and 11 should be set differently.

mask10 = tempImage10 == 0 
mask11 = tempImage11 == 0 

tempImage10[mask10] = np.nan 
tempImage11[mask11] = np.nan

Because, in this case, I was trying to mask out pixels with zero values and my assumption was that they could be the same for both bands 10 and 11. Indeed, they might not be the same.

Thanks for picking that up. I should update that part in the next release.

dimejimudele avatar Mar 02 '23 22:03 dimejimudele