コード例 #1
0
 def data_array_from_gappy_stream(self, basic_stream_with_gap):
     st = basic_stream_with_gap[0]
     return obspy_to_array(st.merge(method=1), trim_stream=False)
コード例 #2
0
 def data_array_from_trace(self, waveform_cache_trace):
     """ convert the trace to a data array, return data array """
     tr = waveform_cache_trace
     return obspy_to_array(tr), tr
コード例 #3
0
 def test_idempotent(self, st_dict_close_lens):
     """ ensure the transformation to data array is idempotent """
     dar = obspy_to_array(st_dict_close_lens)
     dar2 = obspy_to_array(dar)
     assert (dar == dar2).all()
コード例 #4
0
 def data_array_from_stream(self, waveform_cache_stream):
     return obspy_to_array(waveform_cache_stream)
コード例 #5
0
 def test_stream_uneven(self, st_dict_close_lens):
     """ tests for when all streams are different lens """
     ar = obspy_to_array(st_dict_close_lens)
     assert not ar.isnull().any()
コード例 #6
0
 def list_array1(self):
     """A  list of homogeneous streams"""
     return obspy_to_array([obspy.read() for _ in range(self.list1_len)])
コード例 #7
0
ファイル: conftest.py プロジェクト: niowniow/obsplus
def default_array():
    """ the basic waveforms turned into an array """
    st = obspy.read()
    return obspy_to_array(st)
コード例 #8
0
ファイル: conftest.py プロジェクト: niowniow/obsplus
def bingham_dar(bingham_stream_dict):
    """ build a data array from the bingham waveforms dictionary """
    return obspy_to_array(bingham_stream_dict)
コード例 #9
0
ファイル: conftest.py プロジェクト: niowniow/obsplus
def data_array_from_dict(stream_dict):
    """ feed the waveforms dict into the stream_dict2dataset functions """
    return obspy_to_array(stream_dict)