earthlab / earth-analytics-intermediate-earth-data-science-textbook

Other
11 stars 9 forks source link

Used named indexes to select bands #8

Open snowman2 opened 2 years ago

snowman2 commented 2 years ago

I was going through: https://www.earthdatascience.org/courses/use-data-open-source-python/multispectral-remote-sensing/intro-naip/

Doing:

xds.isel(band=0)

Instead of:

xds[0]

Can help make the code more clear.

lwasser commented 2 years ago

@nkorinek this is definitely a good improvement as it's more explicit about calling various "slices" of data from the xarray object.

nkorinek commented 2 years ago

Can definitely implement this easily!