1#!/usr/bin/env python3
 2
 3"""Declare a few common database related enumerations and constants.
 4This is done here to avoid either circular dependencies or putting unnecessary
 5imports in __init__.py."""
 6
 7from enum import Enum
 8
 9# must come before importing connection.
10# Permitted database backend engines.
11DatabaseEngine = Enum('DatabaseEngine', 'ORACLE SQLITE POSTGRESQL MYSQL')
12
13# COMMON_TS_FIELDS must be declared before importing ts to avoid circular dependancy
14# These are reserved special field names in TS AP tables that have special meanings.
15COMMON_TS_FIELDS = ('SCID', 'SENSING_TIME', 'ORBIT', 'ROWCOUNT', 'GEN_TIME')
16
17# Number of significant figures to use when writing 'raw' values from linear calibration
18SF_LINEAR_RAW = 6
19
20# Number of significant figures to use when writing 'cal' values from linear calibration
21SF_LINEAR_CAL = 6
22
23# significant figures to use when writing polynomial coefficients float values
24# to calibrations file
25# changed to 12 to handle MHS_OBT
26SF_POLY = 12
27
28# suffix added to a table name to find the calibration view name
29CAL_SUFFIX = '_CAL'