Skip to main content
U.S. FlagAn official website of the United States government
icon dot gov
Official websites use .gov

A .gov website belongs to an official government organization in the United States.

icon https
Secure .gov websites use HTTPS

A lock () or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

data.edit.corr.field

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

Command Line Usage

data.edit.corr.field [--input=R11] [--test='Perl code']
                     --mod='Perl code'
                     --variables=var1,var2...
                     [--inputs=var1,var2...]
                     [--outputs='var1,var2...]

Arguments

--input=R11

Record base to try to resolve variables from, if they are not fully defined.

--test='Perl code'

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.

--mod='Perl code'

The modification to be applied if test is true.

--variables=var1,var2...

List of variables to use. Used as both inputs and outputs unless overridden.

--inputs=var1,var2...

Set input variables.

--outputs=var1,var2...

Set output variables.

Example Usage

Select green scattering within a DOY range

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.

Invalidate blue absorption when the flow is less than 0.1 LPM

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}'

Invalidate scattering when on the 1um cut size

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->{$_} }'