Skip to content

Commit a1e8096

Browse files
author
phaesler
committed
Added some more comments in code fragments.
1 parent 3b8048e commit a1e8096

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

docs/style_howto_color_ramp.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ arthimetic operators like `+ - / *` and parentheses for precedence.
7373

7474
ndvi_unidirection_cfg = {
7575
"index_expression": "(nir-red)/(nir+red)",
76-
"mpl_ramp": "ocean_r",
76+
"mpl_ramp": "ocean_r", # ocean_r is the "ocean" ramp, reversed.
7777
"range": [0.0, 1.0]
7878
}
7979

docs/style_howto_components.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,22 @@ bands to make the blue channel:
119119
all_bands_cfg = {
120120
"components": {
121121
"red": {
122+
# Weighting factors should sum to (close to) 1.0
123+
# 0.333 + 0.333 + 0.333 = 0.999 ~ 1.0
122124
"red": 0.333,
123125
"green": 0.333,
124126
"blue": 0.333,
125127
},
126128
"green": {
127-
"nir": 1.0
129+
# Weighting factors should sum to (close to) 1.0
130+
# So use 1.0 for a single band.
131+
"nir": 1.0
128132
},
129133
"blue": {
130-
"swir1": 0.5,
131-
"swir2": 0.5,
134+
# Weighting factors should sum to (close to) 1.0
135+
# 0.5 + 0.5 = 1.0
136+
"swir1": 0.5,
137+
"swir2": 0.5,
132138
},
133139
},
134140
"scale_range": (50, 3000),

0 commit comments

Comments
 (0)