Difference between revisions of "File format:Tektronix WFM"
Jump to navigation
Jump to search
(add resources, link to Tektronix manual and github repos) |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:File format:Tek WFM}} | {{DISPLAYTITLE:File format:Tek WFM}} | ||
The '''Tektronix WFM''' format is a special format used by the Tektronix TDS series scopes. It uses less space than the CSV/Matlab export functions provided. | |||
== Header == | |||
TODO The table may need an update, Tektronix documents at least three file format versions, with some fields added and others changing data types in more recent versions. | |||
{| border="0" class="alternategrey sigroktable sortable" | {| border="0" class="alternategrey sigroktable sortable" | ||
Line 11: | Line 12: | ||
|- | |- | ||
| 0 - 1 | | 0 - 1 | ||
| Magic | | Magic bytes | ||
|- | |- | ||
| 2 - 5 | | 2 - 5 | ||
| Format | | Format code | ||
|- | |- | ||
| 6 | | 6 | ||
| Length of | | Length of data, unsigned integer (so far always 4) | ||
|- | |- | ||
| 7 - 11 | | 7 - 11 | ||
Line 23: | Line 24: | ||
|- | |- | ||
| 12 - 15 | | 12 - 15 | ||
| Another | | Another magic | ||
|- | |- | ||
| 16-20 | | 16-20 | ||
| Length of | | Length of header + data (big endian, signed integer) | ||
|- | |- | ||
| 21 - 28 | | 21 - 28 | ||
| Vertical | | Vertical position (double) | ||
|- | |- | ||
| 29 - 36 | | 29 - 36 | ||
| Horizontal | | Horizontal position (double) | ||
|- | |- | ||
| 37 - 43 | | 37 - 43 | ||
| Vertical | | Vertical zoom (double) | ||
|- | |- | ||
| 44 - 51 | | 44 - 51 | ||
| Horizontal | | Horizontal zoom (double) | ||
|- | |- | ||
| 52 - 53 | | 52 - 53 | ||
| Acquisition | | Acquisition mode (signed integer, currently unknown) | ||
|- | |- | ||
| 54 - 55 | | 54 - 55 | ||
| Min | | Min max (unknown) | ||
|- | |- | ||
| 56 - 63 | | 56 - 63 | ||
Line 50: | Line 51: | ||
|- | |- | ||
| 63 - 64 | | 63 - 64 | ||
| Vertical | | Vertical coupling (signed integer) | ||
|- | |- | ||
| 65 - 66 | | 65 - 66 | ||
| Horizontal | | Horizontal unit (signed integer) | ||
|- | |- | ||
| 67 - 74 | | 67 - 74 | ||
Line 59: | Line 60: | ||
|- | |- | ||
| 75 - 76 | | 75 - 76 | ||
| Vertical | | Vertical unit (signed integer) | ||
|- | |- | ||
| 77 - 84 | | 77 - 84 | ||
| Vertical | | Vertical offset (double) | ||
|- | |- | ||
| 85 - 92 | | 85 - 92 | ||
| Vertical | | Vertical position (double) | ||
|- | |- | ||
| 93 - 100 | | 93 - 100 | ||
| Vertical | | Vertical gain (double) | ||
|- | |- | ||
| 101 - 105 | | 101 - 105 | ||
Line 74: | Line 75: | ||
|- | |- | ||
| 106 - 107 | | 106 - 107 | ||
| Trigger | | Trigger position (signed integer), possibly in points | ||
|- | |- | ||
| 108 - 109 | | 108 - 109 | ||
| Header | | Header version (signed integer) | ||
|- | |- | ||
| 110 - 111 | | 110 - 111 | ||
| Sampling | | Sampling density (??) (signed integer) | ||
|- | |- | ||
| 112 - 113 | | 112 - 113 | ||
| Burst | | Burst segment length (signed integer) | ||
|- | |- | ||
| 114 - 115 | | 114 - 115 | ||
| Waveform | | Waveform source (signed integer) | ||
|- | |- | ||
| 116 - 121 | | 116 - 121 | ||
Line 103: | Line 104: | ||
== Data == | == Data == | ||
Waveform data. Length of this segment is stored in Record length. | Waveform data. Length of this segment is stored in '''Record length'''. | ||
To reconstruct the waveform use the following: | To reconstruct the waveform use the following: | ||
y = data[i] * vertgain / 25 / 256 + vertoffset - vertposition * vertgain | |||
x = (i - (reclength*trigpos/100)) * horizscaleperpoint | |||
== Resources == | |||
* [https://download.tek.com/manual/Waveform-File-Format-Manual-077022011.pdf Tektronix instructions] on the WFM file format | |||
* [https://github.com/MorganAskins/tektronix_wfmreader github Morgan Askins wfm reader] | |||
* [https://github.com/vongostev/tekwfm2 github Pavel Gostev wfm2 reader] | |||
[[Category:File format]] | [[Category:File format]] |
Latest revision as of 19:38, 2 June 2022
The Tektronix WFM format is a special format used by the Tektronix TDS series scopes. It uses less space than the CSV/Matlab export functions provided.
Header
TODO The table may need an update, Tektronix documents at least three file format versions, with some fields added and others changing data types in more recent versions.
Bytes | Field |
---|---|
0 - 1 | Magic bytes |
2 - 5 | Format code |
6 | Length of data, unsigned integer (so far always 4) |
7 - 11 | Number of bytes following |
12 - 15 | Another magic |
16-20 | Length of header + data (big endian, signed integer) |
21 - 28 | Vertical position (double) |
29 - 36 | Horizontal position (double) |
37 - 43 | Vertical zoom (double) |
44 - 51 | Horizontal zoom (double) |
52 - 53 | Acquisition mode (signed integer, currently unknown) |
54 - 55 | Min max (unknown) |
56 - 63 | Duration in seconds (double) |
63 - 64 | Vertical coupling (signed integer) |
65 - 66 | Horizontal unit (signed integer) |
67 - 74 | Horizontal time per point (double) |
75 - 76 | Vertical unit (signed integer) |
77 - 84 | Vertical offset (double) |
85 - 92 | Vertical position (double) |
93 - 100 | Vertical gain (double) |
101 - 105 | Record length (unsigned integer) |
106 - 107 | Trigger position (signed integer), possibly in points |
108 - 109 | Header version (signed integer) |
110 - 111 | Sampling density (??) (signed integer) |
112 - 113 | Burst segment length (signed integer) |
114 - 115 | Waveform source (signed integer) |
116 - 121 | 3x Video 1 (signed integer) |
122 - 129 | Video 2 (double) |
130 - 131 | Video 3 (signed integer) |
131 - 163 | Preamble (???) |
Data
Waveform data. Length of this segment is stored in Record length.
To reconstruct the waveform use the following:
y = data[i] * vertgain / 25 / 256 + vertoffset - vertposition * vertgain x = (i - (reclength*trigpos/100)) * horizscaleperpoint
Resources
- Tektronix instructions on the WFM file format
- github Morgan Askins wfm reader
- github Pavel Gostev wfm2 reader