obspy.io.mseed3.core._write_mseed3

_write_mseed3(stream, filename, encoding=None, verbose=0, **_kwargs)[source]

Write miniseed3 file from a Stream object.

Warning

This function should NOT be called directly, it registers via the the write() method of an ObsPy Stream object, call this instead.

Parameters:
  • stream (Stream) – A Stream object.

  • filename (str) – Name of the output file or a file-like object.

  • encoding (int or str, optional) – Should be set to one of the following supported Mini-SEED data encoding formats: INT16 (1), INT32 (3)*, FLOAT32 (4)*, FLOAT64 (5)*, STEIM1 (10) and STEIM2 (11). If no encoding is given it will be derived from the dtype of the data and the appropriate default encoding (depicted with an asterix) will be chosen based on the numpy dtype.

  • verbose (int, optional) – Controls verbosity, a value of 0 will result in no diagnostic output

Example

>>> from obspy import read
>>> st = read()
>>> st.write('filename.ms3', format='MSEED3', encoding='STEIM2')