Next / Previous / Contents / NM Tech homepage

6.3. Manifest constants

pycbc.py
# - - - - -   M a n i f e s t   c o n s t a n t s

6.3.1. WATER_BLANK

The value of the Circle.water field when no ocean is involved.

pycbc.py
WATER_BLANK = ' '

6.3.2. WATER_PELAGIC

Value of Circle.water for purely pelagic transects.

pycbc.py
WATER_PELAGIC = 'p'

6.3.3. WATER_OCEAN

Value of Circle.water when some open ocean is included.

pycbc.py
WATER_OCEAN = 'o'

6.3.4. WATER_ESTUARY

Value of Circle.water when some salt-water estuary is included but no open ocean.

pycbc.py
WATER_ESTUARY = 'e'

6.3.5. ODD_BLANK

The value of Circle.odd when the circle has a normal or unknown shape and size.

pycbc.py
ODD_BLANK = ' '

6.3.6. ODD_PELAGIC

Value of Circle.odd for pelagic-only transects.

pycbc.py
ODD_PELAGIC = 'p'

6.3.7. ODD_NONSTANDARD

Value of Circle.odd for non-pelagic circles not having a standard size and shape, where this is known.

pycbc.py
ODD_NONSTANDARD = 'x'

6.3.8. AGE_UNK

The value of the Census.age field when the age class is unknown.

pycbc.py
AGE_UNK = ' '

6.3.9. AGE_ADULT

Value of Census.age for adults.

pycbc.py
AGE_ADULT = 'a'

6.3.10. AGE_IMM

Value of Census.age for immatures.

pycbc.py
AGE_IMM = 'i'

6.3.11. AGE_PHI

Value of Census.age for the female or immature age class.

pycbc.py
AGE_PHI = 'p'

6.3.12. SEX_UNK

The value of the Census.sex field when the sex is unkown.

pycbc.py
SEX_UNK = ' '

6.3.13. SEX_M

Value of Census.sex for males.

pycbc.py
SEX_M = 'm'

6.3.14. SEX_F

Value of Census.sex for females.

pycbc.py
SEX_F = 'f'

6.3.15. PLUS_CW'

The value of the Census.plus field for count-week records.

pycbc.py
PLUS_CW = '+'

6.3.16. Q_Q

The value of the Census.q field for questionable records.

pycbc.py
Q_Q = '?'

6.3.17. URL_FORMAT

SQLAlchemy uses a URL to connect to the database engine.

pycbc.py
URL_FORMAT = "%s://%s:%s@%s/%s"
#             ^    ^  ^  ^  ^
#             |    |  |  |  +-- Database name
#             |    |  |  +-- Host name
#             |    |  +-- Password
#             |    +-- User name
#             +-- Protocol
#

6.3.18. PROTOCOL

The protocol part of the URL for Postgresql.

pycbc.py
PROTOCOL = "mysql"

6.3.19. DB_USER

Database user name.

pycbc.py
DB_USER = "john"

6.3.20. DB_HOST

pycbc.py
DB_HOST = "dbhost.nmt.edu"

6.3.21. DB_NAME

Name of the database.

pycbc.py
DB_NAME = "john"

6.3.22. DEGREE

Unicode for the degree (°) symbol.

pycbc.py
DEGREE = u'\u00b0'

6.3.23. PRIME

Unicode for the prime (′) symbol, used for minutes in latitudes and longitudes.

pycbc.py
PRIME = u'\u2032'

6.3.24. CIRCLE_DIAMETER

Diameter of a CBC circle in miles.

pycbc.py
CIRCLE_DIAMETER = 15.0

6.3.25. FEET_PER_MILE

pycbc.py
FEET_PER_MILE = 5280.0

6.3.26. OVERLAP_MINUTES

This constant defines how close two circles have to be to each other, in minutes of latitude or longitude, before they are in danger of overlapping. This constant is used in Section 6.30, “CBCData.overlappers(): Find overlapping circles”.

pycbc.py
OVERLAP_MINUTES = 14