microsoft / microsoft/PlanetaryComputerExamples

Question: landsat-c2-l2 scaling & NDVI

Open
#310 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
455
Forks
225
PR merge metrics
No merged PRs in 30d

Description

Hi,

I was going through the landsat-c2-example.ipynb notebook and noticed that the NDVI is calculated directly from the red and nir08 bands as loaded via odc.stac - without applying the documented scale and offset.
My understanding of odc.stac is that it does not apply scaling by default, so the computation as in the example notebook seems to be using the raw integer DNs. Doesn't this bias the NDVI? Is there a specific reason why the example computes NDVI on the unscaled data - or have I misunderstood anything?

Thank you for providing and maintaining these examples, they've been super helpful for getting familiar with MPC!

Best
Maike

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open datasets/landsat-c2/landsat-c2-example.ipynb and review how odc.stac loads the red and nir08 bands before the NDVI calculation. Compare that calculation with the documented scale and offset, then clarify the reason for the current behavior or update the example so the notebook's NDVI computation is correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.