obspy.core.trace.Trace.write

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

Saves current trace into a file.

Parameters:
  • filename (string) The name of the file to write.
  • format (string) The format to write must be specified. One of "MSEED", "GSE2", "SAC", "SACXY", "Q", "SH_ASC", "SEGY", "SU", "WAV", "PICKLE". See obspy.core.stream.Stream.write() method for all possible formats.
  • kwargs Additional keyword arguments passed to the underlying waveform writer method.

Example

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

This Page