records.conf

This file defines available CPD1 and CPD2 records. It is used to translate data (data.legacy.cpd1 and data.aggregate.cpd1) and by programs that require knowledge of record contents in advance (data.consolidate). It is located in $DB/etc/$STATION/records.$STATION.conf or in the default location $DB/etc/records.conf. For any combination of a type and record the definitions in the default location are used up until the time of the first definition of the station specific one. That is, as soon as a definition in the station specific one is present then the definitions for that type and record pair are only read from the station specific file, but before that time they may be read from the default file.

Note that after changes data may need to be invalidated and/or updated.

Format

Lines beginning with '#' are treated as comments. Each line is a set of comma separated values. The first value is the start time that the line applies from. The second field is the definition type and any qualifier flags. The third field is the record type (either CPD1 or CPD2 depending on the line type). All subsequent fields are the contents of that line (for example variable names or formats).

The start time can be omitted or set to “0” to specify that the given patterns take effect at the beginning of time otherwise any convertible time format is accepted.

The line type is one of:

  • cpd1 - Defines the variable mappings in a CPD1 record.
  • cpd1mvc - Defines the MVCs of a CPD1 record.
  • cpd1fmt - Defines the format codes of a CPD1 record's variables.
  • cpd1units - Defines the calibration polynomials needed to convert a CPD1 record's variables to CPD2 units. Each consists of a ”:” or ”;” separated list of first the offset, then the first order, second order, etc coefficients. The default is implicitly “0;1”.
  • cpd2 - Defines the variables in a CPD2 record.
  • cpd2mvc - Defines the MVCs for the variables in a CPD2 record (as defined above, in order).
  • cpd2fmt - Defines the format codes for the variables in a CPD2 record (as defined above, in order).
  • cpd2auth - Defines the CPD1 records whos times define the authoritative timing of a CPD2 record (used by data.legacy.cpd1 only). Used to ensure that a CPD2 record that contains variables emitted on non-aligned time only appears on the correct aligned times (for example, A11a should have this set to “h__”, since it contains variables from A11m which may not be aligned).

If the line type has one or more semicolon separated fields following it, then they are treated as the qualifying flags. The flags are:

  • export - Only apply this line to data being exported (for example data.aggregate.cpd1).
  • An archive name - Only apply when accessing or converting data from a particular archive.

If a line with flags appears at the same time as one without, the one with flags takes precedence. This allows a default line to be overridden by one with flags needed for a particular operation. If any flags are present, all must be applicable for the line to take effect.

The record type may be a Perl regular expression that matches the entire record name (for example “S\d{2}a” for any neph scattering record).

The trailing may optionally contain “$i” which will be replaced with the inferred instrument name, if available. For example a “cpd2” line type for the record “S11a” would have the string replaced with “S11” in all variables it contains.