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.
PAGE_SYMBOL = "@"
PREFIX_SYMBOL
Must be the first character on a new band prefix line.
PREFIX_SYMBOL = "#"
BAND_SIZE_L
Maximum length of the band size field on a page header line.
BAND_SIZE_L = 2
BLANK_BAND_SIZE
A blank band size field.
BLANK_BAND_SIZE = ' ' * BAND_SIZE_L
PAGE_NO_L
Maximum size of a page number on a page header line.
PAGE_NO_L = 3
BLANK_PAGE_NO
A blank page number field.
BLANK_PAGE_NO = ' ' * PAGE_NO_L
LOC_CODE_L
Length of a location code.
LOC_CODE_L = 4
BLANK_LOC_CODE
A blank location code.
BLANK_LOC_CODE = ' ' * LOC_CODE_L
LOCATION_PAT
A compiled Python regular expression pattern that matches a location code.
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.
STA_NO_PAT = re.compile(r'[0-9]{5}')
STA_CODE_L
Length of an alphabetic station code.
STA_CODE_L = 4
BLANK_STA_CODE
A blank station code.
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.
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.
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.
DITTO_CHAR = '"'
HOW_GROUP_L
Number of columns in a group of how-codes.
HOW_GROUP_L = 2
BLANK_HOW_GROUP
A blank how-group.
BLANK_HOW_GROUP = ' ' * HOW_GROUP_L
WRP_L
Length of the WRP molt cycle codes field.
WRP_L = 3
WRP_CYCLE
Characters that are allowed as the first (cycle) character of a WRP molt cycle code.
WRP_CYCLE = 'FST4DU'
WRP_QUAL
Characters that are allowed as the second (qualifier) character of a WRP molt cycle code.
WRP_QUAL = 'CPA'
WRP_PLUM
Characters that are allowed as the third (plumage) character of a WRP molt cycle code.
WRP_PLUM = 'JFASBU'
BLANK_WRP
A blank WRP field.
BLANK_WRP = ' ' * WRP_L
WING_L
Length of the wing field.
WING_L = 3
BLANK_WING
An all-blank wing field.
BLANK_WING = ' ' * WING_L
MASS_IN_L
Length of the mass field on input.
MASS_IN_L = 4
BLANK_MASS_IN
A blank input mass field.
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".
MASS_OUT_L = 5
BLANK_MASS_OUT
An all-blank mass field, as output.
BLANK_MASS_OUT = ' ' * MASS_OUT_L
STATUS_OUT_L
Length of the output status field.
STATUS_OUT_L = 3
BLANK_STATUS_OUT
A blank output status field.
BLANK_STATUS_OUT = ' ' * STATUS_OUT_L
DATE_L
Length of a full date.
DATE_L = 8
BLANK_DATE
A string of spaces the size of a full date.
BLANK_DATE = ' ' * DATE_L
HHM_L
Length of a time field (with the units dropped from the minutes).
HHM_L = 3
BLANK_HHM
A blank time field.
BLANK_HHM = ' ' * HHM_L
NET4_L
Length of a four-character net field, as in the MAWS 2007 protocol.
NET4_L = 4
BLANK_NET4
A blank two-character net field.
BLANK_NET4 = ' ' * NET4_L
NET2_L
Length of a two-character net field.
NET2_L = 2
BLANK_NET2
A blank two-character net field.
BLANK_NET2 = ' ' * NET2_L
NET_OUT_L
Output size of the net field.
NET_OUT_L = 4
BLANK_NET_OUT
A blank net field in its output size.
BLANK_NET_OUT = ' ' * NET_OUT_L
ALIGNMENT_CHAR
The alignment-check character that follows the last fixed-size field in an encounter record.
ALIGNMENT_CHAR = '.'
NOTE_L
Length of a note-number field.
NOTE_L = 2
BLANK_NOTE
A blank note-number field.
BLANK_NOTE = ' ' * NOTE_L
COLOR_BANDS_L
Length of the color-band sequence field in the output record.
COLOR_BANDS_L = 5
BLANK_COLOR_BANDS
A blank color-bands field.
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.
TAIL_CUE_CHAR = "'"
TAIL_COLOR
In a tail field, signifies a color-band sequence. Note that all these codes are uppercase.
TAIL_COLOR = 'C'
TAIL_DISPOSITION
In a tail field, signifies a disposition code.
TAIL_DISPOSITION = 'D'
TAIL_PULLED
In a tail field, signifies a feather-pulled field (not actually a tail feather).
TAIL_PULLED = 'P'
TAIL_NOTE
In a tail field, signifies a note number field.
TAIL_NOTE = 'N'
TAIL_SWAB
In a tail field, signifies a cloacal swab field.
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.
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.
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.
LONG_TAIL_CUE = "/"