obspy.core.stream.Stream._dummy_stream_from_string

static Stream._dummy_stream_from_string(s)[source]

Helper method to create a dummy Stream object (with data always equal to one) from a string representation of the Stream, mostly for debugging purposes.

>>> s = ['', '', '3 Trace(s) in Stream:',
...      'IU.GRFO..HH2 | 2016-01-07T00:00:00.008300Z - '
...      '2016-01-07T00:00:30.098300Z | 10.0 Hz, 301 samples',
...      'XX.GRFO..HH1 | 2016-01-07T00:00:02.668393Z - '
...      '2016-01-07T00:00:09.518393Z | 100.0 Hz, 686 samples',
...      'IU.ABCD..EH2 | 2016-01-07T00:00:09.528393Z - '
...      '2016-01-07T00:00:50.378393Z | 100.0 Hz, 4086 samples',
...      '', '']
>>> s = os.linesep.join(s)
>>> st = Stream._dummy_stream_from_string(s)
>>> print(st)  
3 Trace(s) in Stream:
IU.GRFO..HH2 | 2016-01-07T00:00:00.008300Z ... | 10.0 Hz, 301 samples
XX.GRFO..HH1 | 2016-01-07T00:00:02.668393Z ... | 100.0 Hz, 686 samples
IU.ABCD..EH2 | 2016-01-07T00:00:09.528393Z ... | 100.0 Hz, 4086 samples