obspy.core.trace.Trace.write

Trace.write(filename, format, **kwargs)[source]

Save current trace into a file.

Parameters:
  • filename (str) The name of the file to write.
  • format (str) The format to write must be specified. See obspy.core.stream.Stream.write() method for possible formats.
  • kwargs Additional keyword arguments passed to the underlying waveform writer method.

Example

>>> tr = Trace()
>>> tr.write("out.mseed", format="MSEED")