Lesson 1 of 3 · Reflectance encoding, special values and masked support
Decode reflectance without inventing data
12 minute lesson · 3 checks along the way
Your goal for this lessonDecode a stated reflectance encoding while retaining no-data, signed estimates and valid spatial support.
In this lesson 4 sections · 3 checks
Using archive links & definitions
Follow a linked name to explore its archive card. “Back to your lesson” brings you to the same part of the reading.
Read & understand
Identify the product before doing arithmetic
Sentinel-2 observes reflected sunlight through its MultiSpectral Instrument, or MSI. The European Copernicus mission was developed by a consortium led by Astrium GmbH in Germany, with Astrium SAS in France responsible for MSI. The credited photograph records Vega carrying Sentinel-2A in June 2015. It establishes launch context, not the quality of a surface measurement. This course follows three decisions that remain necessary after downloading an image: decoding its numbers, understanding the correction behind them and choosing comparable observations.
A digital number, abbreviated DN, is a stored code. For the applicable Sentinel-2 Level-2A encoding, surface reflectance is ρ=(DN+O)/Q, where O is the band’s BOA_ADD_OFFSET and Q is QUANTIFICATION_VALUE. Read both from the delivered product metadata. DN=0 is reserved for no-data and must be separated before that arithmetic. A nonzero code may still fail other quality tests: clouds, saturation or an unsuitable retrieval do not become acceptable merely because a number can be decoded.
Vega carrying Sentinel-2A on the launch pad in June 2015. Resized and compressed from the original. Photograph: ESA / M. Pedoussaut, CC BY-SA 2.0.
Look closely
What does this launch photograph establish about the reflectance values used in this lesson?
See what to notice
It documents Vega carrying Sentinel-2A in June 2015. Interpreting a reflectance value requires the delivered product, metadata and processing evidence; the launch photograph cannot supply them.
Check 1 of 3
10 pointsUse the reading above. You can try again without losing points.
Read & understand
Keep missing, zero and negative separate
Use original teaching metadata Q=10000 and O=−1000, and four stored samples: 0, 500, 1000 and 3000. The first is missing. The other three decode to −0.05, 0 and 0.20. Thus a stored zero is not the zero-reflectance estimate, which is encoded here as DN1000. The offset permits signed corrected estimates near dark surfaces. A negative estimate does not mean that the ground emits negative reflected power; it invites scrutiny of uncertainty and processing conditions rather than an automatic physical interpretation.
The mean of the three available signed estimates is (−0.05+0+0.20)/3=0.05. If the no-data code is mistakenly decoded as −0.10, the four-value mean falls to 0.0125. If the negative available estimate is instead clipped to zero, the three-value mean rises to about 0.0667. Both changes follow from altering the values or their population, not from new observations. This is a counterexample to silent replacement, not a rule that every negative estimate must be retained in every scientific analysis.
Check 2 of 3
10 pointsUse the reading above. You can try again without losing points.
Read & understand
Compare encodings, not raw integers
Suppose one product stipulates Q=10000, O=0 and DN2000, while another stipulates Q=10000, O=−1000 and DN3000. Both describe 0.20. Their difference of 1000 stored counts is an encoding difference, not a change in the ground. Sentinel-2 processing baselines can change, and historical acquisitions can be reprocessed. Acquisition year alone therefore cannot select an offset. Preserve the product identifier, processing version, band and metadata used for each calculation.
The same caution applies when a service supplies already decoded reflectance or a separately processed dataset. Applying a SAFE-product offset again can introduce a new error. In our example, subtracting another 0.10 from the already decoded 0.20 would produce 0.10. Verify what a provider actually delivers before using the formula. Different bands may also have different metadata values. An apparently tidy column of decimals is useful only when its definition and quality rules travel with it.
Read & understand
Carry support through resampling
Now interpolate halfway between stored codes 0 and 3000. Averaging those integers first gives DN1500, which decodes to 0.05. That number has been manufactured partly from a missing-data marker. Decode with the mask first: the pair is missing and 0.20. A rule requiring both contributors returns no result. A rule renormalizing over available contributors returns 0.20, accompanied by a retained weight fraction of one half. These policies answer different questions; the second does not establish what the missing half contained.
With a common affine encoding, normalized averaging and decoding can commute on the same fully valid population. The failure above comes from treating a special code as a measurement. Keep the validity mask, additional quality decisions, interpolation weights and retained support together. If all positive-weight contributors are missing, renormalization cannot recover a value. If partial coverage is allowed, record it and use comparable support in later analysis. Decoding correctly is the beginning of interpretation; the next lesson examines how nearby ground can influence a corrected estimate.
Decode values, keep the mask
Original encoding example: Q=10000, O=−1000 and DN0 reserved for no-data. Check special values before conversion. The available signed mean is 0.05. The lower branch contrasts two explicit support policies; renormalizing available data cannot establish what the missing contributor contained.
Open full-size diagram in a new tab: Decode values, keep the maskCheck 3 of 3
10 pointsUse the reading above. You can try again without losing points.
Put it together
Your lesson progress
Each check connects to a part of the story. Complete all 3 to earn your 25-point lesson bonus.
Explore further · Optional
Go to the source
Explore the evidence behind this lesson. These optional readings and videos open in a new tab.
- Read: Copernicus SentiWiki: Sentinel-2 missionMission and historical industrial roles support the introduction; changing constellation status is outside this lesson.
- Read: Copernicus SentiWiki: Sentinel-2 productsThe Level-2A section defines the offset conversion, no-data exception and product metadata location.
- Read: Sentinel-2 Products Specification Document, issue 15.2Issue 15.2, pages 298 and 440, documents conversion and metadata fields. The exercise inputs are original.
- Read: Copernicus SentiWiki: Sentinel-2 processingProcessing-baseline and Collection-1 sections explain why an old acquisition can arrive in a newer encoding.