# http://pyrocko.org - GPLv3 # # The Pyrocko Developers, 21st Century # ---|P------/S----------~Lg----------
= self.nslc_id \ = codes[1:5]
return None
self._listeners.append(weakref.ref(obj))
for ref in self._listeners: obj = ref() if obj: obj.pile_changed(what)
return self._squirrel.get_waveform_deltat_span()[0]
return self._squirrel.get_waveform_deltat_span()[1]
def deltatmin(self): return self.get_deltatmin()
def deltatmax(self): return self.get_deltatmax()
def tmin(self):
def tmax(self):
def networks(self):
def stations(self):
def locations(self):
def channels(self):
self, filenames, filename_attributes=None, fileformat='mseed', cache=None, show_progress=True, update_progress=None):
filenames, kinds='waveform', format=fileformat)
self, tmin, tmax, nut_selector=None, snap=(round, round), include_last=False, load_data=True, accessor_id='default'):
self._squirrel.get_content(nut, 'waveform', accessor_id)
for nut in nuts if nut_selector is None or nut_selector(nut)]
else: trace.Trace(**nut.trace_kwargs) for nut in nuts if nut_selector is None or nut_selector(nut)]
tr = tr.copy(data=False) tr.ydata = None
tmin, tmax, inplace=False, snap=snap, include_last=include_last))
except trace.NoData: pass
self, chopped, degap, maxgap, maxlap, want_incomplete, wmax, wmin, tpad):
-5. * tr.deltat <= emax < 0.):
tr.extend( wmin-tpad, wmax+tpad-tr.deltat, fillmethod='repeat')
chopped_weeded.append(tr)
self, tmin=None, tmax=None, tinc=None, tpad=0., group_selector=None, trace_selector=None, want_incomplete=True, degap=True, maxgap=5, maxlap=None, keep_current_files_open=False, accessor_id='default', snap=(round, round), include_last=False, load_data=True):
''' Get iterator for shifting window wise data extraction from waveform archive.
:param tmin: start time (default uses start time of available data) :param tmax: end time (default uses end time of available data) :param tinc: time increment (window shift time) (default uses ``tmax-tmin``) :param tpad: padding time appended on either side of the data windows (window overlap is ``2*tpad``) :param group_selector: ignored in squirrel-based pile :param trace_selector: filter callback taking :py:class:`pyrocko.trace.Trace` objects :param want_incomplete: if set to ``False``, gappy/incomplete traces are discarded from the results :param degap: whether to try to connect traces and to remove gaps and overlaps :param maxgap: maximum gap size in samples which is filled with interpolated samples when ``degap`` is ``True`` :param maxlap: maximum overlap size in samples which is removed when ``degap`` is ``True`` :param keep_current_files_open: whether to keep cached trace data in memory after the iterator has ended :param accessor_id: if given, used as a key to identify different points of extraction for the decision of when to release cached trace data (should be used when data is alternately extracted from more than one region / selection) :param snap: replaces Python's :py:func:`round` function which is used to determine indices where to start and end the trace data array :param include_last: whether to include last sample :param load_data: whether to load the waveform data. If set to ``False``, traces with no data samples, but with correct meta-information are returned :returns: itererator yielding a list of :py:class:`pyrocko.trace.Trace` objects for every extracted time window '''
logger.warning('Pile\'s tmax is not set - pile may be empty.') return
wmin-tpad, wmax+tpad, nut_selector, snap, include_last, load_data, accessor_id)
chopped, degap, maxgap, maxlap, want_incomplete, wmax, wmin, tpad)
self, load_data=False, return_abspath=False, group_selector=None, trace_selector=None):
'''Iterate over all traces in pile.
:param load_data: whether to load the waveform data, by default empty traces are yielded :param return_abspath: if ``True`` yield tuples containing absolute file path and :py:class:`pyrocko.trace.Trace` objects :param group_selector: filter callback taking :py:class:`TracesGroup` objects :param trace_selector: filter callback taking :py:class:`pyrocko.trace.Trace` objects
Example; yields only traces, where the station code is 'HH1'::
test_pile = pile.make_pile('/local/test_trace_directory') for t in test_pile.iter_traces( trace_selector=lambda tr: tr.station=='HH1'):
print t '''
'waveform', codes_gather, codes_selector)
'''Visualize it.
:param stations: list of `pyrocko.model.Station` objects or ``None`` :param events: list of `pyrocko.model.Event` objects or ``None`` :param markers: list of `pyrocko.gui_util.Marker` objects or ``None`` :param ntracks: float, number of tracks to be shown initially (default: 12) :param follow: time interval (in seconds) for real time follow mode or ``None`` :param controls: bool, whether to show the main controls (default: ``True``) :param opengl: bool, whether to use opengl (default: ``False``) '''
from pyrocko.gui.snuffler import snuffle snuffle(self, **kwargs)
return 0
|