File tree 1 file changed +6
-4
lines changed
eis_toolkit/transformations
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -150,12 +150,14 @@ def winsorize( # type: ignore[no-any-unimported]
150
150
current_transform = f"transformation { i + 1 } "
151
151
current_settings = {
152
152
"band_origin" : bands [i ],
153
- "percentile_lower" : cast_scalar_to_int (percentiles [i ][0 ]),
154
- "percentile_upper" : cast_scalar_to_int (percentiles [i ][1 ]),
155
- "calculated_lower" : cast_scalar_to_int (calculated_lower ),
156
- "calculated_upper" : cast_scalar_to_int (calculated_upper ),
157
153
"nodata" : cast_scalar_to_int (nodata ),
158
154
}
155
+ if calculated_lower :
156
+ current_settings ["percentile_lower" ] = cast_scalar_to_int (percentiles [i ][0 ])
157
+ current_settings ["calculated_lower" ] = cast_scalar_to_int (calculated_lower )
158
+ if calculated_upper :
159
+ current_settings ["percentile_upper" ] = cast_scalar_to_int (percentiles [i ][1 ])
160
+ current_settings ["calculated_upper" ] = cast_scalar_to_int (calculated_upper )
159
161
160
162
out_settings [current_transform ] = current_settings
161
163
You can’t perform that action at this time.
0 commit comments