File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -681,6 +681,10 @@ int svgrid = 5000;
681
681
set_brick_ncols (DN , 1 );
682
682
set_brick_nrows (DN , 1 );
683
683
684
+ meta -> cal = allocate_calibration (nb );
685
+
686
+ // re-init to 0 to be compatible with older baselines
687
+ for (b = 0 ; b < nb ; b ++ ) meta -> cal [b ].radd = 0 ;
684
688
685
689
686
690
/** parse top-level xml **/
@@ -733,8 +737,6 @@ int svgrid = 5000;
733
737
734
738
for (b = 0 ; b < nb ; b ++ ) set_brick_sensor (DN , b , sensor );
735
739
736
- meta -> cal = allocate_calibration (nb );
737
-
738
740
// set start of Relative Spectral Response Array
739
741
if (strcmp (sensor , "SEN2A" ) == 0 ){
740
742
b_rsr = _RSR_START_SEN2A_ ;
@@ -881,10 +883,6 @@ int svgrid = 5000;
881
883
882
884
// additive scaling factor (since baseline 4.0)
883
885
} else if (strcmp (tag , "RADIO_ADD_OFFSET" ) == 0 ){
884
- // re-init to 0 to be compatible with older baselines
885
- for (b = 0 ; b < nb ; b ++ ){
886
- if (meta -> cal [b ].radd == meta -> cal [b ].fill ) meta -> cal [b ].radd = 0 ;
887
- }
888
886
b = -1 ;
889
887
while (strcmp (tokenptr , "/RADIO_ADD_OFFSET" ) != 0 ){
890
888
if (b < 0 ){
You can’t perform that action at this time.
0 commit comments