obspy.clients.arclink.client.Client.save_waveforms¶
-
Client.
save_waveforms
(filename, network, station, location, channel, starttime, endtime, format='MSEED', compressed=True, route=True, unpack=True)[source]¶ Writes a retrieved waveform directly into a file.
This method ensures the storage of the unmodified waveform data delivered by the ArcLink server, e.g. preserving the record based quality flags of MiniSEED files which would be neglected reading it with
obspy.io.mseed
.Parameters: - filename (str) – Name of the output file.
- network (str) – Network code, e.g.
'BW'
. - station (str) – Station code, e.g.
'MANZ'
. - location (str) – Location code, e.g.
'01'
. Location code may contain wild cards. - channel (str) – Channel code, e.g.
'EHE'
. Channel code may contain wild cards. - starttime (
UTCDateTime
) – Start date and time. - endtime (
UTCDateTime
) – End date and time. - format (str, optional) –
Output format. Either as full SEED (
'FSEED'
) or Mini-SEED ('MSEED'
) volume. Defaults to'MSEED'
.Note
A format
'XSEED'
is documented, but not yet implemented in ArcLink. - compressed (bool, optional) – Request compressed files from ArcLink server.
Default is
True
. - route (bool, optional) – Enables ArcLink routing. Default is
True
. - unpack (bool, optional) – Unpack compressed waveform files before storing to disk.
Default is
True
.
Returns: None
Example
>>> from obspy.clients.arclink import Client >>> from obspy import UTCDateTime >>> client = Client('test@obspy.org', 'webdc.eu', 18001) >>> t = UTCDateTime(2009, 1, 1, 12, 0) >>> client.save_waveforms('BW.MANZ.fullseed', 'BW', 'MANZ', '', '*', ... t, t + 20, format='FSEED') # doctest: +SKIP