Store wave, bin_info, and wave_info separately in WaveRecord.
[igor.git] / igor / record / wave.py
1 # Copyright
2
3 from io import BytesIO as _BytesIO
4
5 from ..binarywave import load as _loadibw
6 from . import Record
7
8
9 class WaveRecord (Record):
10     def __init__(self, *args, **kwargs):
11         super(WaveRecord, self).__init__(*args, **kwargs)
12         self.wave,self.bin_info,self.wave_info = _loadibw(
13             _BytesIO(bytes(self.data)), strict=False)
14
15     def __str__(self):
16         return str(self.wave)