obspy.io.sac.core._internal_write_sac

_internal_write_sac(trace, buf, byteorder='<', keep_sac_header=True, **kwargs)[source]

Writes a single trace to an open file or file-like 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:
  • trace (Trace) – The ObsPy Trace object to write.

  • buf (open file or file-like object) – Object to write to.

  • byteorder (int or str) – Must be either 0 or '<' for LSBF or little-endian, 1 or '>' for MSBF or big-endian. Defaults to little endian.

  • keep_sac_header (bool) – Whether to merge the Stats header with an existing Stats.sac SAC header, if one exists. Defaults to True. See obspy_to_sac_header() for more.