File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # LSLKit
2+ Python library to help write Python code that interacts with Lab Streaming layer
3+
4+ ### Replay From File
5+ As a library
6+ ``` python
7+ from lslkit.components import outlets
8+ file_out = outlets.FileReplayOutlet(' my_lab_time_series.mat' , stream_type = ' EEG' ,
9+ srate = 300 , data_key = ' eeg' )
10+ file_out.begin()
11+ ```
12+
13+ From the Command line
14+ ``` bash
15+ python -m lslkit.replay_from_file --file-path=my_lab_time_series.mat --data-key=eeg --stream-type=EEG --sample-rate=300 --chunksize=1
16+ ```
17+
18+ ### Processing a stream
19+ ``` python
20+ from lslkit.components import processor
21+ proc_f = lambda _df : _df.mean()
22+ # Find a matching stream and build a processor around it
23+ proc = processor.ProcessStream.from_resolve(proc_f, ' emg' , max_buflen = 512 )
24+ # Pull data until each dataframe has the required_size samples
25+ proc.begin(required_size = 51 )
26+ ```
You can’t perform that action at this time.
0 commit comments