Defines

APPS makes use of many enumerations throughout its infrastructure. The defines module provides pythonic access to the definitions of those enumerations as well as to convenience methods for normalizing short and long forms in a case insensitive way. It is a best practice when using the library never to use the raw enumeration values directly as literals but rather to reference them through the defines module. This both makes code more readable and more resilient to library updates.

class gdgps_apps.defines.Data[source]

Bases: object

ACCESS_CHOICES = (('X', 'Private'), ('A', 'Public'))
ACCESS_DEFAULT = 'X'
APPROVED = 'O'
AVAILABLE = 'A'
DONE = 'D'
EMAIL_NOTIFY_CHOICES = ((None, 'Account Default'), (False, 'No'), (True, 'Yes'))
EMAIL_NOTIFY_DEFAULT = None
ERROR = 'E'
NASCENT = 'N'
PRIVATE = 'X'
PROCESSING = 'P'
PUBLIC = 'A'
QUEUED = 'Q'
RETRIEVED = 'R'
SOURCE_CHANGE_STATES = ['N', 'V', 'W', 'E']
SOURCE_DELETE_STATES = ['N', 'V', 'W', 'E', 'D', 'A', 'R']
STATES = (('N', 'Nascent'), ('S', 'Submitted'), ('V', 'Verified'), ('O', 'Approved'), ('W', 'Waiting'), ('Q', 'Queued'), ('E', 'Error'), ('P', 'Processing'), ('D', 'Done'), ('A', 'Available'), ('R', 'Retrieved'))
SUBMITTED = 'S'
VERIFIED = 'V'
WAITING = 'W'
classmethod get_verbose_access(setting)[source]
classmethod get_verbose_state(state)[source]
classmethod normalize_access(setting)[source]
classmethod normalize_state(state)[source]
classmethod rank_state(left, right)[source]
class gdgps_apps.defines.DataFlag[source]

Bases: object

DataFlags are issued against submissions and exist at one of four defined levels. Similar to ubiquitous log level conventions, they indicate the degree to which the user’s attention is required to resolve an issue if one exists.

ERROR = 'E'

Indicates that there was an issue with the submission that is unresolvable without additional intervention from the user.

INFO = 'I'

Includes some information that may or may not be of interest to the user.

LEVELS = (('S', 'Success'), ('I', 'Info'), ('W', 'Warning'), ('E', 'Error'))

The valid list of level definitions including short form formats and their long form counterparts.

SUCCESS = 'S'

Indicates that some operation was successful.

WARN = 'W'

Indicates that APPS should be able, or was able to process the submission but there may be some caveats that the user should be aware of before reviewing the results.

classmethod get_verbose_level(level)[source]

Convert the given level enumeration string into its canonical long form format

Parameters

level (str) – A valid level enumeration, case insensitve

Returns

The long form format of the level

Raises

ValueError – if the level enumeration parameter does not refer to a valid level

classmethod normalize_level(level)[source]

Convert the given level enumeration string into its canonical short form format

Parameters

level (str) – A valid level enumeration, case insensitive

Returns

The short form format of the level

Raises

ValueError – if the level enumeration parameter does not refer to a valid level

class gdgps_apps.defines.GIPSYData[source]

Bases: gdgps_apps.defines.Data, gdgps_apps.defines.OrbitClockProduct

ANCILLARY_SOURCE_FIELDS = ['antenna_calibration', 'pressure', 'attitude']
ANTENNA_CALIBRATION_FILE = 'C'
ARCHIVE_FILE = 'A'
ATTITUDE_FILE = 'A'
BEST = 'B'
DETAIL_FILE = 'D'
DUAL_FREQUENCY = 'D'
ELEV_ANGLE_CUTOFF_MAX = 90.0
ELEV_ANGLE_CUTOFF_MIN = -90.0
ELEV_DEP_WEIGHTINGS = (('FLAT', 'Flat'), ('SIN', 'Sin'), ('SQRTSIN', 'SqrtSin'))
FLAT = 'FLAT'
GDCOV_FILE = 'G'
GIPSY_FIELDS = ['access', 'processing_mode', 'product', 'troposphere_model', 'ocean_loading', 'model_tides', 'elev_dep_weighting', 'elev_angle_cutoff', 'solution_period', 'generate_quaternions']
KINEMATIC = 'K'
KINEMATIC_FAST = 'F'
KINEMATIC_SLOW = 'K'
KML_FILE = 'K'
MEASUREMENT_TYPES = (('S', 'Single Frequency'), ('D', 'Dual Frequency'), ('Un', 'Unresolved'))
PRESSURE_FILE = 'P'
PROCESSING_MODES = (('S', 'Static'), ('K', 'Kinematic-Slow'), ('F', 'Kinematic-Fast'))
PROCESSING_MODE_DEFAULT = 'S'
PRODUCTS = [('B', 'Best Available'), ('T', 'Real-Time'), ('U', 'Ultra'), ('R', 'Rapid'), ('F', 'Final')]
PRODUCT_DEFAULT = 'B'
RESULT_TYPES = (('A', 'Archive'), ('S', 'Summary'), ('T', 'Time Dependent Parameters'), ('P', 'Solution'), ('G', 'Covariance'), ('D', 'Detail'), ('K', 'Keyhole Markup Language'))
RESULT_TYPES_DEFAULT = None
RINEX_FILE = 'R'
ROOT_SINE = 'SQRTSIN'
SINE = 'SIN'
SINGLE_FREQUENCY = 'S'
SOLUTION_FILE = 'P'
SOLUTION_PERIOD_MIN = 1
SOURCE_TYPES = (('R', 'RINEX'), ('P', 'Pressure'), ('A', 'Attitude'), ('C', 'Antenna Calibration'))
SOURCE_TYPE_DEFAULT = None
STATIC = 'S'
SUBMISSION_FIELDS = ['name', 'email_notify', 'access', 'access', 'processing_mode', 'product', 'troposphere_model', 'ocean_loading', 'model_tides', 'elev_dep_weighting', 'elev_angle_cutoff', 'solution_period', 'generate_quaternions', 'antenna_calibration', 'pressure', 'attitude']
SUMMARY_FILE = 'S'
TDP_FILE = 'T'
TROPOSPHERE_MODELS = (('OFF', 'Off'), ('GMF', 'GMF'), ('VMF1', 'VMF1'), ('GPT2', 'GPT2'), ('PRV', 'Provided'))
TROP_GMF = 'GMF'
TROP_GPT2 = 'GPT2'
TROP_OFF = 'OFF'
TROP_PROVIDED = 'PRV'
TROP_VMF1 = 'VMF1'
UNRESOLVED = 'Un'
classmethod get_verbose_elev_dep_weighting(elev_dep_weighting)[source]
classmethod get_verbose_measurement_type(measurement_type)[source]
classmethod get_verbose_processing_mode(processing_mode)[source]
classmethod get_verbose_result_type(result_type)[source]
classmethod get_verbose_source_type(source_type)[source]
classmethod get_verbose_troposphere_model(trop_model)[source]
classmethod normalize_elev_dep_weighting(elev_dep_weighting)[source]
classmethod normalize_measurement_type(measurement_type)[source]
classmethod normalize_processing_mode(processing_mode)[source]
classmethod normalize_result_type(result_type)[source]
classmethod normalize_source_type(source_type)[source]
classmethod normalize_troposphere_model(trop_model)[source]
class gdgps_apps.defines.GIPSYXData[source]

Bases: gdgps_apps.defines.GIPSYData

class gdgps_apps.defines.OrbitClockProduct[source]

Bases: object

FINAL = 'F'
PRODUCTS = (('T', 'Real-Time'), ('U', 'Ultra'), ('R', 'Rapid'), ('F', 'Final'))
RAPID = 'R'
REAL_TIME = 'T'
ULTRA = 'U'
classmethod get_verbose_product(product)[source]
classmethod normalize_product(product)[source]
classmethod product_rank(product)[source]
class gdgps_apps.defines.RINEXDefines[source]

Bases: object

AIRBORNE = 'A'
ANIMAL = 'AN'
BALLISTIC = 'BA'
BEIDOU = 'C'
BEIDOU_TIME = 'C'
FIXED_BUOY = 'B'
FLOATING_BUOY = 'FB'
FLOATING_ICE = 'FI'
GALILEO = 'E'
GALILEO_TIME = 'E'
GEODETIC = 'G'
GLACIER = 'GL'
GLONASS = 'R'
GLONASS_TIME = 'R'
GNSS_TYPES = (('G', 'GPS'), ('R', 'GLONASS'), ('E', 'Galileo'), ('J', 'QZSS'), ('C', 'Beidou'), ('I', 'IRNSS'), ('S', 'SBAS'), ('M', 'Mixed'))
GPS = 'G'
GPS_TIME = 'G'
GROUND_CRAFT = 'GC'
HUMAN = 'H'
IRNSS = 'I'
IRNSS_TIME = 'I'
MARKER_TYPES = ((None, ''), ('G', 'GEODETIC'), ('NG', 'NON_GEODETIC'), ('NP', 'NON_PHYSICAL'), ('S', 'SPACEBORNE'), ('A', 'AIRBORNE'), ('WC', 'WATER_CRAFT'), ('GC', 'GROUND_CRAFT'), ('B', 'FIXED_BUOY'), ('FB', 'FLOATING_BUOY'), ('FI', 'FLOATING_ICE'), ('GL', 'GLACIER'), ('BA', 'BALLISTIC'), ('AN', 'ANIMAL'), ('H', 'HUMAN'))
MIXED = 'M'
NON_GEODETIC = 'NG'
NON_PHYSICAL = 'NP'
QZSS = 'J'
QZSS_TIME = 'J'
SBAS = 'S'
SPACEBORNE = 'S'
TIME_STANDARDS = (('G', 'GPS'), ('R', 'GLO'), ('E', 'GAL'), ('J', 'QZS'), ('I', 'IRNSS'), ('C', 'BDT'))
WATER_CRAFT = 'WC'
classmethod get_verbose_gnss_types(gnss_types)[source]
classmethod get_verbose_marker_type(marker_type)[source]
classmethod get_verbose_time_standard(time_standard)[source]
classmethod normalize_gnss_types(gnss_types)[source]
classmethod normalize_marker_type(marker_type)[source]
classmethod normalize_time_standard(time_standard)[source]
class gdgps_apps.defines.Storage[source]

Bases: object

BZIP2 = 'bz2'
GZIP = 'gz'
LZMA = 'xz'
TAR = 'tar'
UNIX = 'Z'
ZIP = 'zip'
class gdgps_apps.defines.UserAlert[source]

Bases: object

ALARM = 'A'
INFO = 'I'
LEVELS = (('S', 'Success'), ('I', 'Info'), ('W', 'Warning'), ('A', 'Alarm'))
SUCCESS = 'S'
WARN = 'W'
classmethod get_verbose_level(level)[source]
classmethod normalize_level(level)[source]
class gdgps_apps.defines.UserProfile[source]

Bases: object

ARCHIVE_PREFERENCES = (('tar', 'tar'), ('zip', 'zip'))
ARCHIVE_PREFERENCE_DEFAULT = 'tar'
BZIP2 = 'bz2'
COMPRESSION_PREFERENCES = (('gz', 'gz'), ('bz2', 'bz2'), ('Z', 'Z'))
COMPRESSION_PREFERENCE_DEFAULT = 'gz'
EMAIL_NOTIFY_DEFAULT = False
GZIP = 'gz'
KEEP_SOURCE_FILES_DEFAULT = False
NO_PROMPT_PROFESSING_DEFAULT = False
TAR = 'tar'
TIMEZONE_DEFAULT = 'UTC'
UNIX = 'Z'
ZIP = 'zip'
gdgps_apps.defines.fetch_choice(choice, choices, idx)[source]
gdgps_apps.defines.get_verbose(abbr, choices)[source]
gdgps_apps.defines.lower(chc)[source]

For choices empty string and None should be treated the same, never use empty string, always use None in choice lists. :param chc: :return: None if empty string or None, else return the lower case version of the string

gdgps_apps.defines.normalize(choice, choices)[source]
gdgps_apps.defines.rank_choices(left, right, choices)[source]