TIQData
Class for TIQ format
xaratustrah@github Aug-2015
TIQData
Bases: IQBase
Source code in iqtools/tiqdata.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
read(nframes=10, lframes=1024, sframes=0)
Read a section of the file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nframes |
int
|
Number of frames to be read. Defaults to 10. |
10
|
lframes |
int
|
Length of each frame. Defaults to 1024. |
1024
|
sframes |
int
|
Starting frame. Defaults to 0. |
0
|
Source code in iqtools/tiqdata.py
31 32 33 34 35 36 37 38 39 40 |
|
read_header()
Parse TIQ header The following information are extracted. Data needs to be normalized over 50 ohm.
AcquisitionBandwidth Frequency File name Data I and Q [Unit is Volt] Data Offset DateTime NumberSamples Resolution Bandwidth RFAttenuation (it is already considered in the data scaling, no need to use this value, only for info) Sampling Frequency Span Voltage Scaling
Source code in iqtools/tiqdata.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|
read_samples(nsamples, offset=0)
Read samples.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nsamples |
int
|
Number of samples to read from file |
required |
offset |
int
|
description. Defaults to 0. |
0
|
Raises:
Type | Description |
---|---|
ValueError
|
Raises if the requested number of samples is larger than available |
Source code in iqtools/tiqdata.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
save_header()
Saves the header byte array into a txt tile.
Source code in iqtools/tiqdata.py
136 137 138 139 140 141 142 |
|