from_file

RigolWFM.tek.from_file(file_name: str, frame: int = 0) → TekWaveform[source]

Parse a Tektronix .wfm file and normalize it for Wfm.from_file().

Handles WFM#001, WFM#002, and WFM#003 formats in both little-endian and big-endian byte orders.

A FastFrame capture stores many frames of one channel in a single file. They share every scale factor and differ only in their samples and their trigger timestamp, so one frame is returned at a time.

Parameters:
  • file_name – path to a Tektronix .wfm waveform file.

  • frame – zero-based FastFrame index to return; 0 for an ordinary capture.

Returns:

A TekWaveform object whose header follows the shape expected by RigolWFM.channel.Channel and RigolWFM.wfm.Wfm.

Raises:

ValueError – if the file cannot be parsed as a valid Tektronix waveform.