Skip to content

LFP Viewer issues at low sampling rates #703

Description

@roberttoth02

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).

Image Image Image Image Image

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions