Abstract
Describes the implementation of a suite of programs to process bird-banding data.
This publication is available in Web
form and also as a PDF document. Please forward any comments to
tcc-doc@nmt.edu.
Table of Contents
baseclasses.py: ProloguescanFieldList(): A utility routine
for flat-file scanningscanFieldItems(): Parse a sequence of
FieldItem objectsclass BaseStationSet: Base class for
station authority objectsclass Location: Represents a group of
stationsclass Station: Represents one stationclass MapsStationSet: Station set objectclass MawsStationSet: Station set objectclass BaseSpeciesSet: Base class for
species authority objectsclass Maps2004SpeciesSetclass Maps1998SpeciesSetclass Maws2002SpeciesSetclass SpeciesSearcher: Logic for the
species code search scriptsclass Species: Definition of a species
codeclass BaseCompiler: Base class for
banding data compilersclass BaseCompiler: The interfaceBaseCompiler
classBaseCompiler.__init__():
ConstructorBaseCompiler.parseFileName(): Parse the
batch file nameBaseCompiler.parseFileLocality(): Find the
location or station code in a batch file nameBaseCompiler.checkForLocation()BaseCompiler.checkForStation()BaseCompiler.scanCallback(): Error
localization stringBaseCompiler.__iter__(): IteratorBaseCompiler.classify(): Which kind of line is
it?BaseCompiler.scanPageHeader(): Process a page
header lineBaseCompiler.scanPrefix(): Process a band
prefiix lineBaseCompiler.scanEncounter(): Process an
encounter lineclass Maps2006Compiler: Compiler for
MAPS 2006 filesclass Maps2004Compiler: Compiler for
MAPS 2004 protocolclass Maws2007Compiler: MAWS 2007 compilerclass Maws2004Compiler: MAWS compilerclass PageHeader: Page header line
objectclass Prefix: Band number prefix lineclass FieldItem: Base class for encounter
record fieldsclass SingleField: Generic
single-character fieldclass PageNoField: Page number fieldclass BandSizeField: Band size fieldclass LocationField: Location code fieldclass CaptureCodeField: Encounter
record type codeclass BandNoField: Band number
fieldclass BandNoSuffix: Short band numberclass Spec4Field: Four-letter species
codeclass Spec6Field: Six-letter MAWS
species codeclass AgeCodeField: Age codeclass HowGroupField: How-code groupclass WrpField: WRP molt cycle codeclass SexCodeField: Sex codeclass SkullField: Skull ossificationclass CloacalField: Cloacal
protuberanceclass BroodField: Brood patchclass FatField: Fat classclass BodyMoltField: Body moltclass FlightMoltField: Flight feather
moltclass FlightWearField: Flight feather
wearclass JuvenalField: Juvenal plumageclass MicroAgingField: Base class for
microaging fieldsclass MicroPPCField: Primary coverts
micro-aging fieldclass MicroSSCField: Secondary coverts
micro-aging fieldclass MicroPPFField: Primaries
micro-aging fieldclass MicroSSFField: Secondaries
micro-aging fieldclass MicroTTField: Tertials
micro-aging fieldclass MicroRRField: Rectrices micro-aging
fieldclass MicroHDFieldclass MicroUPPFieldclass MicroUNPFieldclass MicroBPLField: Body plumage
micro-aging fieldclass MicroNFField: Non-feather
micro-aging fieldclass WingField: Wing lengthclass MassField: Body massclass StatusField: Release status
codeclass DateField: Date fieldclass MawsDateField: MAWS date fieldclass HHMField: Time of dayclass StationCodeField: Station codeclass Net2Field: Two-character net
codeclass Net4Field: Four-character net
codeclass DispositionFieldclass NoteField: Note numberclass PulledField: Feather-pulled codeclass ColorBandsField: Color-band sequenceclass SwabField: Cloacal swab codeclass BaseEncounter: General output
recordBaseEncounter
classBaseEncounter.OUT_FIELD_LIST:
Definition of the output formatBaseEncounter.__init__():
ConstructorBaseEncounter.__getattr__(): Handle
references to undefined attributesBaseEncounter.flatten(): Convert to a
flat-file recordBaseEncounter.scanLine(): Scan a raw
encounter recordBaseEncounter.scanShort(): Scan lost or
destroyed encounter lineBaseEncounter.scanUnbanded(): Scan
unbanded encounter lineBaseEncounter.scanNewBand(): Scan short
new-band lineBaseEncounter.scanLongNew(): Scan long
new-band lineBaseEncounter.scanRecap(): Scan recapture
encounter lineBaseEncounter.dispatchMap: Encounter
record routing dictionaryBaseEncounter.scanBody(): Scan encounter
line body and tail sectionsBaseEncounter.scanTail(): Scan tail
fieldsBaseEncounter.scanTailField(): Scan one
free-form tail fieldBaseEncounter.tailColor(): Scan
color-band tailBaseEncounter.tailDisposition(): Scan
disposition code tail fieldBaseEncounter.tailPulled(): Scan
feather-pulled tail fieldBaseEncounter.tailNote(): Scan note tail
fieldBaseEncounter.tailSwab(): Scan swab tail
fieldBaseEncounter.tailDispatch: Tail field
routing dictionaryBaseEncounter.copyDitto(): Implement
single-column dittoclass Maps2006Encounterclass Maps2004Encounterclass Maws2007Encounterclass Maws2004Encountermaps2004: MAPS data compiler for 2004
protocolmaps1998: MAPS data compiler for 1998
protocolimaws2007: Current MAWS data compilerimaws2004: MAWS 2004 data compilershowstas: Look up MAPS station and
location codesshowmaws: Look up MAWS station and
location codesspec2004, spec2002, and
spec1998dbfstruct: Display the structure of a
dBASE V filedbflatten: Convert a dBASE V file to flat
formatdbfpy package for reading dBASE V
filesThis document describes the implementation of the system specified by iband7: IBP banding data entry system.
The actual code for several applications is contained in this document, document in literate style. For more information, see the author's lightweight literate programming page.
This document is an exposition of the source code using lightweight literate programming practice: the source code is extracted from this document, so what you see here is the actual code. For more information on this practice, see the author's Lightweight Literate Programming page.
Here are links to all the files generated by extraction from this documentation's source file:
baseclasses.py: The
Python module used by all the other applications in this
suite; see Section 4, “baseclasses.py: Prologue”.
dbflatten: Section 89, “dbflatten: Convert a dBASE V file to flat
format”.
maps2004:
Section 81, “maps2004: MAPS data compiler for 2004
protocol”.
imaws2007: Section 83, “imaws2007: Current MAWS data compiler”.
imaws2004: Section 84, “imaws2004: MAWS 2004 data compiler”.
showstas:
Section 85, “showstas: Look up MAPS station and
location codes”.
showmaws:
Section 86, “showmaws: Look up MAWS station and
location codes”.
These files are not extracted from the source file, but are necessary or useful:
ibandims.xml:
DocBook source file for this document, including all
extracted source files.
Makefile: Used by the make utility to build HTML and PDF documentation
and extract source code.
cset.py: A module from the author's
standard Python library to represent sets of characters.
log.py: A module from the author's standard Python
library that does error logging.
scan.py: A module from the author's
standard Python library that manages reading an input
stream and reporting errors on it.
To execute some of these programs, you will need the
public-domain, external dbf.py
module; see Section 90, “The dbfpy package for reading dBASE V
files”, which has links to
the download page, and all the files from that module
currently in use.