data.edit.corr.field applies a Perl modification to the data stream if the result of a Perl text expression is true.
data.edit.corr.cut_blank can operate as either an independent filter (provided the correct input is given) or as part of the correction chain
data.edit.corr.field [--input=R11] [--test='Perl code'] --mod='Perl code' --variables=var1,var2... [--inputs=var1,var2...] [--outputs='var1,var2...]
Record base to try to resolve variables from, if they are not fully defined.
Perl code segment to apply as the test, if true then the modification segment is executed. Additional Variables Available For Tests are calculated in the main processing loop. They are:
$year, $doy, $seconds, $h, $m, $s, $cut, $contam
These variables were used in the old version of corr_field, and are kept here for consistency.
The modification to be applied if test is true.
List of variables to use. Used as both inputs and outputs unless overridden.
Set input variables.
Set output variables.
data.get sgp S11a 2008 2009 clean | data.edit.corr.field --variables='BsG_S11' --test='not ($doy > 31 and $doy < 200)' --mod='undef $variables->{BsG_S11}'
Note that this actually invalidates green scattering outside the range.
data.get sgp A11a,A11m 2008:10 2008:11 | data.edit.corr.field --variables='BaB_A11,Q_A11' --outputs='BsB_A11' --test='$variables->{Q_A11} < 0.1' --mod='undef $variables->{BaB_S11}'
data.get sgp S11a 2008:10 2008:11 | data.edit.corr.field --variables='BsB_S11,BsG_S11,BsR_S11,BbsB_S11,BbsG_S11,BbsR_S11' --test='$cut == 1' --mod='for (qw(BsB_S11 BsG_S11 BsR_S11 BbsB_S11 BbsG_S11 BbsR_S11)) { undef $variables->{$_} }'