Describe the bug
LFP Viewer fails to plot signals with low sampling rates. The fix proposed in #532 is not sufficient below 100Hz. At lower sampling rates, the plot becomes increasingly irregular, the timebase drifts. Display completely fails at 1Hz.
To Reproduce
To make the error reproducible without any hardware device, I used the LSL Inlet module, and provided a low sampling rate data stream from Matlab (2024b).
The following Matlab script produces a 0.1Hz sine wave sampled at 1Hz as a single channel LSL stream, via liblsl-Matlab.
fs = 1; % sampling rate (Hz)
lib = lsl_loadlib();
info = lsl_streaminfo(lib, 'Test_stream', 'misc', 1, fs, 'cf_float32', '');
outlet = lsl_outlet(info);
disp('Streaming Test_stream. Press Ctrl+C to stop.');
sample_idx = 0;
while true
t = sample_idx / fs; % seconds elapsed
sample = 3500 * sin(2 * pi * 0.1 * t); % 0.1 Hz, amplitude 3500.0 uV
outlet.push_sample(sample);
sample_idx = sample_idx + 1;
pause(1 / fs);
end
Screenshots
The attached screenshots show the visualisation of the same 0.1Hz sine wave at various sampling rates (1000Hz, 100Hz, 50Hz, 10Hz, 1Hz).
Versions:
- OS: macOS 14.7.5, Windows 11 (25H2)
- GUI version: 1.0.2
- Plugin version: LSL Inlet 1.0.0-API10
Additional context
I am interested in collecting slow physiological signals along with neural activity. Auxiliary sensor data is received in Open Ephys via the LSL Inlet plugin. The issue is unrelated to the sensor device, as it can be reproduced on synthetic data streams as above.
Describe the bug
LFP Viewer fails to plot signals with low sampling rates. The fix proposed in #532 is not sufficient below 100Hz. At lower sampling rates, the plot becomes increasingly irregular, the timebase drifts. Display completely fails at 1Hz.
To Reproduce
To make the error reproducible without any hardware device, I used the LSL Inlet module, and provided a low sampling rate data stream from Matlab (2024b).
The following Matlab script produces a 0.1Hz sine wave sampled at 1Hz as a single channel LSL stream, via liblsl-Matlab.
Screenshots
The attached screenshots show the visualisation of the same 0.1Hz sine wave at various sampling rates (1000Hz, 100Hz, 50Hz, 10Hz, 1Hz).
Versions:
Additional context
I am interested in collecting slow physiological signals along with neural activity. Auxiliary sensor data is received in Open Ephys via the LSL Inlet plugin. The issue is unrelated to the sensor device, as it can be reproduced on synthetic data streams as above.