pysolate.block.read
- read(params=None, **kwargs)[source]
Read waveform files and processing parameters into a pySolate Block object
The
readfunction accepts waveform files in either ObsPy Stream or Trace objects, or something ObsPy can read. If aParameterobject is not provided, the default processing values will be used instead.- Parameters
params (
Parameter) – parameters required to run the denoiser.event (
EventorCatalog, optional) – Object containing information that describes the seismic event.data (
Stream,Trace, str, …) – Waveform data in ObsPy trace or stream formats or something ObsPy can read.asdf_file (str) – HDF5 file name.
field (str) – path of waveform files within the ASDF volume, default is
"raw_observed".
Examples
Reading from a SAC file
>>> import pysolate as bcs >>> params = bcs.params((block_threshold=1.0, noise_threshold="hard") >>> block = bcs.read(params=params, data="testdata/5014.YW.0.sp0011.DPZ") >>> # Using default values >>> block = bcs.read(data="testdata/5014.YW.0.sp0011.DPZ")
Reading from a ASDF file
>>> import pysolate as bcs >>> params = bcs.params((block_threshold=1.0, noise_threshold="hard") >>> block = bcs.read(params=params, asdf_file="testdata/578449.h5")