Exemple #1
0
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import mlab
from matplotlib.colors import LinearSegmentedColormap
from matplotlib.dates import date2num
from matplotlib.mlab import detrend_none, window_hanning
from matplotlib.ticker import FormatStrFormatter

from obspy import Stream, Trace
from obspy.core.util import get_matplotlib_version
from obspy.signal.invsim import cosine_taper
from obspy.signal.util import prev_pow_2


MATPLOTLIB_VERSION = get_matplotlib_version()

dtiny = np.finfo(0.0).tiny

# build colormap as done in paper by mcnamara
CDICT = {
    "red": (
        (0.0, 1.0, 1.0),
        (0.05, 1.0, 1.0),
        (0.2, 0.0, 0.0),
        (0.4, 0.0, 0.0),
        (0.6, 0.0, 0.0),
        (0.8, 1.0, 1.0),
        (1.0, 1.0, 1.0),
    ),
    "green": (
Exemple #2
0
 def lines(self):
     if get_matplotlib_version() < [1, 3, 0]:
         return self.__dict__["lines"]
     else:
         return self.vlines
Exemple #3
0
 def lines(self, value):
     if get_matplotlib_version() < [1, 3, 0]:
         self.__dict__["lines"] = value
     else:
         self.vlines = value
from matplotlib.ticker import FormatStrFormatter

from obspy import Stream, Trace, UTCDateTime
from obspy.core import Stats
from obspy.core.inventory import Inventory
from obspy.core.util import get_matplotlib_version
from obspy.core.util.decorator import deprecated_keywords, deprecated
from obspy.core.util.deprecation_helpers import ObsPyDeprecationWarning
from obspy.imaging.cm import obspy_sequential
from obspy.io.xseed import Parser
from obspy.signal.invsim import cosine_taper
from obspy.signal.util import prev_pow_2
from obspy.signal.invsim import paz_to_freq_resp, evalresp


MATPLOTLIB_VERSION = get_matplotlib_version()

dtiny = np.finfo(0.0).tiny

NOISE_MODEL_FILE = os.path.join(os.path.dirname(__file__),
                                "data", "noise_models.npz")
NPZ_STORE_KEYS = [
    'hist_stack',
    '_times_data',
    '_times_gaps',
    '_times_used',
    'xedges',
    'yedges',
    'channel',
    'delta',
    'freq',