Next / Previous / Contents / Shipman's homepage

5.2. Constants related to encounter records

These constants define the format of the input file to the primary data compilers.

PAGE_SYMBOL

Must be the first character on a new-page header.

baseclasses.py
PAGE_SYMBOL = "@"

PREFIX_SYMBOL

Must be the first character on a new band prefix line.

baseclasses.py
PREFIX_SYMBOL = "#"

BAND_SIZE_L

Maximum length of the band size field on a page header line.

baseclasses.py
BAND_SIZE_L = 2

BLANK_BAND_SIZE

A blank band size field.

baseclasses.py
BLANK_BAND_SIZE = ' ' * BAND_SIZE_L

PAGE_NO_L

Maximum size of a page number on a page header line.

baseclasses.py
PAGE_NO_L = 3

BLANK_PAGE_NO

A blank page number field.

baseclasses.py
BLANK_PAGE_NO = ' ' * PAGE_NO_L

LOC_CODE_L

Length of a location code.

baseclasses.py
LOC_CODE_L = 4

BLANK_LOC_CODE

A blank location code.

baseclasses.py
BLANK_LOC_CODE = ' ' * LOC_CODE_L

LOCATION_PAT

A compiled Python regular expression pattern that matches a location code.

baseclasses.py
LOCATION_PAT = re.compile (
    r'[a-zA-Z]'            # Matches the initial letter
    r'[a-zA-Z0-9\-]{3}')   # Matches three more letters/digits/hyphen

STA_NO_PAT

A compiled Python regular expression pattern that matches a station number: it matches five digits.

baseclasses.py
STA_NO_PAT = re.compile(r'[0-9]{5}')

STA_CODE_L

Length of an alphabetic station code.

baseclasses.py
STA_CODE_L = 4

BLANK_STA_CODE

A blank station code.

baseclasses.py
BLANK_STA_CODE = ' ' * STA_CODE_L

YYYY_PAT

A compiled Python regular expression that matches a four-digit year. Just for sanity's sake, we allow only 1 or 2 as the first digit.

baseclasses.py
YYYY_PAT = re.compile (
    r'[12]'           # Matches 1 or 2
    r'[0-9]{3}')      # Matches three digits

PREFIX_L

The length of a band string prefix.

baseclasses.py
PREFIX_L = 7

DITTO_CHAR

This is the character used for the single-column ditto function. See the discussion of this feature in the specification.

baseclasses.py
DITTO_CHAR = '"'
HOW_GROUP_L

Number of columns in a group of how-codes.

baseclasses.py
HOW_GROUP_L = 2

BLANK_HOW_GROUP

A blank how-group.

baseclasses.py
BLANK_HOW_GROUP = ' ' * HOW_GROUP_L

WRP_L

Length of the WRP molt cycle codes field.

baseclasses.py
WRP_L = 3
WRP_CYCLE

Characters that are allowed as the first (cycle) character of a WRP molt cycle code.

baseclasses.py
WRP_CYCLE = 'FST4DU'
WRP_QUAL

Characters that are allowed as the second (qualifier) character of a WRP molt cycle code.

baseclasses.py
WRP_QUAL = 'CPA'
WRP_PLUM

Characters that are allowed as the third (plumage) character of a WRP molt cycle code.

baseclasses.py
WRP_PLUM = 'JFASBU'
BLANK_WRP

A blank WRP field.

baseclasses.py
BLANK_WRP = ' ' * WRP_L
WING_L

Length of the wing field.

baseclasses.py
WING_L = 3

BLANK_WING

An all-blank wing field.

baseclasses.py
BLANK_WING = ' ' * WING_L

MASS_IN_L

Length of the mass field on input.

baseclasses.py
MASS_IN_L = 4

BLANK_MASS_IN

A blank input mass field.

baseclasses.py
BLANK_MASS_IN = ' ' * MASS_IN_L

MASS_OUT_L

Length of the mass field on output. IBP wants the implied decimal before the last column on the banding sheet to be expressed explicitly in the output record, so that an input field of " 347" is output as " 34.7".

baseclasses.py
MASS_OUT_L = 5

BLANK_MASS_OUT

An all-blank mass field, as output.

baseclasses.py
BLANK_MASS_OUT = ' ' * MASS_OUT_L

STATUS_OUT_L

Length of the output status field.

baseclasses.py
STATUS_OUT_L = 3

BLANK_STATUS_OUT

A blank output status field.

baseclasses.py
BLANK_STATUS_OUT = ' ' * STATUS_OUT_L

DATE_L

Length of a full date.

baseclasses.py
DATE_L = 8

BLANK_DATE

A string of spaces the size of a full date.

baseclasses.py
BLANK_DATE = ' ' * DATE_L

HHM_L

Length of a time field (with the units dropped from the minutes).

baseclasses.py
HHM_L = 3

BLANK_HHM

A blank time field.

baseclasses.py
BLANK_HHM = ' ' * HHM_L

NET4_L

Length of a four-character net field, as in the MAWS 2007 protocol.

baseclasses.py
NET4_L = 4

BLANK_NET4

A blank two-character net field.

baseclasses.py
BLANK_NET4 = ' ' * NET4_L

NET2_L

Length of a two-character net field.

baseclasses.py
NET2_L = 2

BLANK_NET2

A blank two-character net field.

baseclasses.py
BLANK_NET2 = ' ' * NET2_L

NET_OUT_L

Output size of the net field.

baseclasses.py
NET_OUT_L = 4

BLANK_NET_OUT

A blank net field in its output size.

baseclasses.py
BLANK_NET_OUT = ' ' * NET_OUT_L

ALIGNMENT_CHAR

The alignment-check character that follows the last fixed-size field in an encounter record.

baseclasses.py
ALIGNMENT_CHAR = '.'

NOTE_L

Length of a note-number field.

baseclasses.py
NOTE_L = 2

BLANK_NOTE

A blank note-number field.

baseclasses.py
BLANK_NOTE = ' ' * NOTE_L

COLOR_BANDS_L

Length of the color-band sequence field in the output record.

baseclasses.py
COLOR_BANDS_L = 5

BLANK_COLOR_BANDS

A blank color-bands field.

baseclasses.py
BLANK_COLOR_BANDS = ' ' * COLOR_BANDS_L

TAIL_CUE_CHAR

This is the character that must be the first character of a free-form tail field.

baseclasses.py
TAIL_CUE_CHAR = "'"

TAIL_COLOR

In a tail field, signifies a color-band sequence. Note that all these codes are uppercase.

baseclasses.py
TAIL_COLOR = 'C'

TAIL_DISPOSITION

In a tail field, signifies a disposition code.

baseclasses.py
TAIL_DISPOSITION = 'D'

TAIL_PULLED

In a tail field, signifies a feather-pulled field (not actually a tail feather).

baseclasses.py
TAIL_PULLED = 'P'

TAIL_NOTE

In a tail field, signifies a note number field.

baseclasses.py
TAIL_NOTE = 'N'

TAIL_SWAB

In a tail field, signifies a cloacal swab field.

baseclasses.py
TAIL_SWAB = 'S'

OLD_PULL_INPUT

In the MAPS 2004 protocol, this character can replace the alignment character, and indicates a single feather was pulled. In that protocol, the PULLED_ATTR should be set to OLD_PULL_OUTPUT in that case.

baseclasses.py
OLD_PULL_INPUT = "*"

OLD_PULL_OUTPUT

In the MAPS 2004 protocol, either a feather was pulled or it wasn't. This value in the PULLED_ATTR field means one was pulled.

baseclasses.py
OLD_PULL_OUTPUT = "P"

LONG_TAIL_CUE

In the MAPS 2004 protocol, this character in the alignment field indicates the presents of a long (extended) tail.

baseclasses.py
LONG_TAIL_CUE   = "/"