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

Possible minor bug #11

Open
npr99 opened this issue Mar 2, 2023 · 1 comment
Open

Possible minor bug #11

npr99 opened this issue Mar 2, 2023 · 1 comment

Comments

@npr99
Copy link

npr99 commented Mar 2, 2023

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

@dimejimudele
Copy link
Collaborator

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.

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