brainflow package¶
Submodules¶
brainflow.amplifiers module¶
Amplifiers.
- class brainflow.amplifiers.BaseAmplifier¶
Bases:
objectBase Ampifier class. -author: Lichao Xu -Created on: 2021-04-01 -update log:
2022-08-10 by Wei Zhao
- clear()¶
- down_worker(name)¶
- abstract recv()¶
the minimal recv data function, usually a package.
- register_worker(name: str, worker: ProcessWorker, marker: Marker)¶
- start()¶
start the loop.
- stop()¶
stop the loop.
- unregister_worker(name: str)¶
- up_worker(name)¶
- class brainflow.amplifiers.Marker(interval: list, srate: float, events: Optional[List[int]] = None)¶
Bases:
RingBufferIntercept online data. -author: Lichao Xu -Created on: 2021-04-01 -update log:
2022-08-10 by Wei Zhao
- Parameters:
interval (list,) – Time Window.
srate (int,) – Amplifier setting sample rate.
events (list,) – Event label.
- get_epoch()¶
Fetch data from buffer.
- class brainflow.amplifiers.NeuroScan(device_address: Tuple[str, int] = ('127.0.0.1', 4000), srate: float = 1000, num_chans: int = 68)¶
Bases:
BaseAmplifierAn amplifier implementation for NeuroScan device. Intercept online data. -author: Lichao Xu -Created on: 2021-04-01 -update log:
2022-08-10 by Wei Zhao
- close_connection()¶
- command(method)¶
- connect_tcp()¶
- recv()¶
the minimal recv data function, usually a package.
- send(message)¶
- set_timeout(timeout)¶
- start_acq()¶
- start_trans()¶
- stop_acq()¶
- stop_trans()¶
- class brainflow.amplifiers.RingBuffer(size=1024)¶
Bases:
dequeOnline data RingBuffer. -author: Lichao Xu -Created on: 2021-04-01 -update log:
None
- Parameters:
size (int,) – Size of the RingBuffer.
- get_all()¶
Access all current buffer value.
- Returns:
the list of current buffer
- Return type:
list
- isfull()¶
Whether current buffer is full or not.
- Return type:
boolean
brainflow.logger module¶
Logging system.
- brainflow.logger.disable_log()¶
disable system logger. -author: Lichao Xu -Created on: 2021-04-01 -update log:
Nonw
- brainflow.logger.get_logger(log_name)¶
get system logger. -author: Lichao Xu -Created on: 2021-04-01 -update log:
Nonw
- Parameters:
log_name (str,) – Name of logger.
brainflow.workers module¶
Many Workers.
- class brainflow.workers.ProcessWorker(timeout: float = 0.001, name: Optional[str] = None)¶
Bases:
ProcessOnline processing. -author: Lichao Xu -Created on: 2021-04-01 -update log:
2022-08-10 by Wei Zhao
- clear_queue()¶
- abstract consume(data)¶
- abstract post()¶
- abstract pre()¶
- put(data)¶
- run()¶
Method to be run in sub-process; can be overridden in sub-class
- settimeout(timeout=0.01)¶
- stop()¶