data.segmentation.modify

data.segmentation.modify is the interface that external programs can use to modify segmentation runs. Modification commands are read from standard input. Once all commands are read, the changes defined by all of them are made atomically with respect to locking (but not to failure, if one or more fail they are reported but the change proceeds anyway).

Command Line Usage

data.segmentation.modify [station]

Arguments

station

The station identifier code. For example 'brw'. Case insensitive.

Input

Input consists of a series of commands read from standard input. Each of these commands is an action of “add” or “remove” followed by the segment specifier. Each command is a single line:

command,start,end,type,data

command

The action to be taken, either “add” or “remove”.

start and end

Segment time specifiers. Any convertible time format is accepted. If either is null (zero length) it is assumed to be positive or negative infinity.

type

Type of the segment. This can be an arbitrary string. The types that are currently in use include:

  • flight - start/end of a flight
  • site - start/end of on-site sampling period
  • leg - start/end of level flight legs
  • InstID_error - start/end times of a nephelometer error condition, e.g., S11_error
  • InstID_zero - start/end times when nephelometer is in zero mode, e.g., S11_zero
  • InstID_filter - start/end times for a filter sample. This can be a chemical filter sampler or a light absorption photometer (PSAP, CLAP, Aethalometer). Examples are A11_filter, F12_filter.

data

Data string for this segment. This is a label that identifies the segment.

Example Usage

Execute a file of commands

data.segmentation.modify sgp < commands.txt

Remove all segments in a given time

data.segmentation.get aao 2008:10 2008:11 flight | perl -pe 'print "remove,"' | data.segmentation.modify aao