Exemple #1
0
#
# The Pyrocko Developers, 21st Century
# ---|P------/S----------~Lg----------
from __future__ import division, absolute_import

import os
import logging
from pyrocko import util, trace

from . import (mseed, sac, kan, segy, yaff, seisan_waveform, gse1, gcf,
               datacube, suds, css, gse2)
from .io_common import FileLoadError, FileSaveError

import numpy as num

__doc__ = util.parse_md(__file__)

logger = logging.getLogger('pyrocko.io')


def allowed_formats(operation, use=None, default=None):
    if operation == 'load':
        lst = [
            'detect', 'from_extension', 'mseed', 'sac', 'segy', 'seisan',
            'seisan.l', 'seisan.b', 'kan', 'yaff', 'gse1', 'gse2', 'gcf',
            'datacube', 'suds', 'css'
        ]

    elif operation == 'save':
        lst = ['mseed', 'sac', 'text', 'yaff', 'gse2']
# http://pyrocko.org - GPLv3
#
# The Pyrocko Developers, 21st Century
# ---|P------/S----------~Lg----------
from __future__ import absolute_import
from pyrocko.util import parse_md

__doc__ = parse_md(__file__)
Exemple #3
0
'''
from __future__ import absolute_import
from pyrocko.util import parse_md
from pyrocko.guts import StringChoice, Float, Int, Bool, Tuple, Object

import math
import random


try:
    newstr = unicode
except NameError:
    newstr = str


__doc__ += parse_md(__file__)


guts_prefix = 'pf'

point = 1.
inch = 72.
cm = 28.3465

units_dict = {
    'point': point,
    'inch': inch,
    'cm': cm,
}

_doc_units = "``'points'``, ``'inch'``, or ``'cm'``"
Exemple #4
0
#
# The Pyrocko Developers, 21st Century
# ---|P------/S----------~Lg----------
from __future__ import absolute_import, division

import os
import re
import math
import os.path as op

from pyrocko import config, util
from .srtmgl3 import SRTMGL3, AuthenticationRequired
from .etopo1 import ETOPO1
from . import dataset, tile

__doc__ = util.parse_md(__file__)

positive_region = tile.positive_region

earthradius = 6371000.0
r2d = 180./math.pi
d2r = 1./r2d
km = 1000.
d2m = d2r*earthradius
m2d = 1./d2m

topo_data_dir = config.config().topo_dir

srtmgl3 = SRTMGL3(
    name='SRTMGL3',
    data_dir=op.join(topo_data_dir, 'SRTMGL3'))