123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- # -*- coding: utf-8 -*-
- DB = {'host': '', 'port': '', 'database': '', 'user': '', 'password': ''}
- LOG_CONFIG = {
- 'version': 1,
- 'disable_existing_loggers': False,
- 'formatters': {
- 'default_formatter': {
- 'format': '[%(asctime)s: %(module)s - %(levelname)s] %(message)s'
- }
- },
- 'handlers': {
- 'stream_handler': {
- 'class': 'logging.StreamHandler',
- 'formatter': 'default_formatter',
- },
- 'file_handler': {
- 'class': 'logging.FileHandler',
- 'formatter': 'default_formatter',
- 'mode': 'w',
- 'encoding': 'utf8',
- 'filename': 'getquakes.log'
- }
- },
- 'loggers': {
- 'gui_logger': {
- 'handlers': ['file_handler'],
- 'level': 'INFO',
- 'propagate': True
- }
- }
- }
- FILES_FILTERS = {'Bulletin': 'Bulletin text files (*.txt)',
- 'Catalog': 'Catalog excel files (*.xlsx)',
- 'NAS': 'NAS bulletin files (*.bltn)',
- 'ArcGIS': 'ArcGIS text files (*.GIS)'}
- QUAKE_HEADER_DESCRIBE = ['Origin time', 'Lat', 'Lon', 'Depth',
- 'Nsta', 'Region']
- AMNT_COLUMN_SYMBOLS = {'quake_hdr': (26, 9, 9, 9, 6, 6, 0),
- 'sta_hdr': (9, 9, 9, 9, 9, 26, 9, 9, 9, 0)}
- STATION_HEADER_DESCRIBE = ('Sta', 'Dist', 'Az', 'Ph', 'Entry', 'time', 'Amp',
- 'T', 'Mag', 'MagType')
- CATALOG_HEADER = ('Date', 'Origin time', 'Lat', 'Lon', 'Depth', 'Region', 'ML',
- 'MPSP', 'Stations')
- ArcGIS_HEADER = ('Date', 'Time', 'Lat', 'Lon', 'Magn', 'Type')
- MONTHS = ('January', 'February', 'March', 'April', 'May', 'June', 'July',
- 'August', 'September', 'October', 'November', 'December')
- MAGNITUDE_RANGES = {(0.0, 2.51): '1', (2.52, 3.51): '2',
- (3.52, 4.51): '3', (4.52, 11.0): '4'}
- # All params of quake we can get from the db.
- ALL_PARAMS = ('_id', 'origin_dt', 'lat', 'lon', 'depth', 'reg', 'sta',
- 'dist', 'az', 'phase', 'entry', 'phase_dt', 'ampl', 'per',
- 'ml', 'mpsp')
- # Params of quake that will be displayed in the table of GUI
- GUI_TABLE_PARAMS = ('_id', 'origin_dt', 'lat', 'lon', 'depth', 'sta', 'phase',
- 'phase_dt', 'ml', 'mpsp', 'reg')
- STA_RENAME = ['ADZ', 'ARH', 'KLM', 'PRG', 'SLV', 'TMC']
|