Visualization Nodes¶
Analog signal visualizers¶
Spectral visualizers¶
-
class
pyacq.viewers.
QTimeFreq
(**kargs)[source]¶ Class for visualizing the frequency spectrogram with a Morlet continuous wavelet transform.
This allows better visualization than the standard FFT spectrogram because it provides better temporal resolution for high-frequency signals without sacrificing frequency resolution for low-frequency signals. See https://en.wikipedia.org/wiki/Morlet_wavelet
This class internally uses one TimeFreqWorker per channel, which allows multiple signals to be transformed in parallel.
The node operates in one of 2 modes:
- Each TimeFreqWorker lives in the same QApplication as the QTimeFreq node (nodegroup_friends=None).
- Each TimeFreqWorker is spawned in another NodeGroup to distribute the load (nodegroup_friends=[some_list_of_nodegroup]).
This viewer needs manual tuning for performance: small refresh_interval, high number of freqs, hight f_stop, and high xsize can all lead to heavy CPU load.
This node requires its input stream to use:
transfermode==sharedarray
axisorder==[1,0]
If the input stream does not meet these requirements, then a StreamConverter will be created to proxy the input.
QTimeFreq can be configured on the fly by changing QTimeFreq.params and QTimeFreq.by_channel_params. By default, double-clicking on the viewer will open a GUI dialog for these parameters.
Usage:
viewer = QTimeFreq() viewer.configure(with_user_dialog=True, nodegroup_friends=None) viewer.input.connect(somedevice.output) viewer.initialize() viewer.show() viewer.start() viewer.params['nb_column'] = 4 viewer.params['refresh_interval'] = 1000