Plotters
Collection of plotters
xaratustrah@github 2017
plot_frame_power(yy, frame_power)
Plot frame power, i.e. trapezoid along each time frame
Parameters:
Name | Type | Description | Default |
---|---|---|---|
yy |
ndarray
|
Time meshgrid |
required |
frame_power |
ndarray
|
Array describing the frame power |
required |
Source code in iqtools/plotters.py
37 38 39 40 41 42 43 44 45 46 47 |
|
plot_hilbert(x_bar)
Shows the Hilbert plot
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x_bar |
ndarray
|
Complex valued data array |
required |
Source code in iqtools/plotters.py
24 25 26 27 28 29 30 31 32 33 34 |
|
plot_phase_shift(x, phase)
Plots the signal before and after the phase shift
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
ndarray
|
Data array |
required |
phase |
float
|
Phase shift |
required |
Source code in iqtools/plotters.py
200 201 202 203 204 205 206 207 208 209 210 211 212 |
|
plot_spectrogram(xx, yy, zz, cen=0.0, cmap=cm.jet, dpi=300, dbm=False, filename=None, title='Spectrogram', zzmin=0, zzmax=1000000.0, mask=False, span=None, decimal_place=2)
Plot the calculated spectrogram. For the coordinates, it also accepts sparse matrices.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
xx |
ndarray
|
Frequency meshgrid, can be sparse |
required |
yy |
ndarray
|
Time meshgrid, can be sparse |
required |
zz |
ndarray
|
Power meshgrid |
required |
cen |
float
|
Center frequency. Defaults to 0.0. |
0.0
|
cmap |
string
|
Matplotlib.colormap. Defaults to cm.jet. |
jet
|
dpi |
int
|
Resolution for PNG output. Defaults to 300. |
300
|
dbm |
bool
|
Display in dBm scale. Defaults to False. |
False
|
filename |
str
|
File name. Defaults to None, in which case nothing will be saved to file. |
None
|
title |
str
|
Title of the plot. Defaults to 'Spectrogram'. |
'Spectrogram'
|
zzmin |
int
|
Color contrast min. Defaults to 0. |
0
|
zzmax |
int
|
Color contrast max. Defaults to 1e6. |
1000000.0
|
mask |
bool
|
Mask out values less than this, for cleaner histograms. Defaults to False. |
False
|
span |
float
|
Show only a frequency window. Defaults to None. |
None
|
decimal_place |
int
|
Limit display of decimal places of all numbers in the plot. Defaults to 2. |
2
|
Source code in iqtools/plotters.py
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 |
|
plot_spectrogram_with_gnuplot(zz)
Plots using external instance of GNUPlot. Data is reshaped in form of a matrix for plotting. Idea based on this post on SO
Parameters:
Name | Type | Description | Default |
---|---|---|---|
zz |
ndarray
|
Power meshgrid |
required |
Source code in iqtools/plotters.py
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
|
plot_spectrum(f, p, cen=0.0, span=None, dbm=False, filename=None, title='Spectrum')
Plots 2D spectrum in dBm per Hz
Parameters:
Name | Type | Description | Default |
---|---|---|---|
f |
ndarray
|
Frequency array |
required |
p |
ndarray
|
Power array |
required |
cen |
float
|
Center frequency. Defaults to 0.0. |
0.0
|
span |
float
|
Frequency window. Defaults to None. |
None
|
dbm |
bool
|
Display in dBm scale. Defaults to False. |
False
|
filename |
str
|
File name. Defaults to None, in which case nothing will be saved to file. |
None
|
title |
str
|
Title of the plot. Defaults to 'Spectrogram'. |
'Spectrum'
|
Source code in iqtools/plotters.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
|