from_file

RigolWFM.lecroy.from_file(file_name: str) LeCroyWaveform[source]

Parse a LeCroy .trc file and normalize it for Wfm.from_file().

Handles both LECROY_2_3 and LECROY_1_0 WAVEDESC formats. Files with a leading SCPI #N<digits> block-data prefix are automatically detected and stripped before parsing.

Parameters:

file_name – path to a LeCroy .trc waveform file.

Returns:

A LeCroyWaveform 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 LeCroy waveform.