Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Lettable RxJS operators for working with EEG data in Node and the Browser
Pipeable RxJS operators for working with EEG data in Node and the Browser
Before getting started, you'll need an observable of EEG data.
The following are some libraries that provide exactly that:
Pipes can be added to an EEG observable of EEG data samples with the following data structure:
{
data: [Number, Number, Number, Number], // channels
timestamp: Date,
info?: {
samplingRate?: Number,
channelNames?: [String, String, String, String],
..
}
};
Individual samples of EEG data contain an array of values for each EEG channel as well as a timestamp. An additional info object containing metadata about the EEG stream such as sampling rate and channel names can also be included or added with the addInfo operator.
We can start by installing the library:
npm install --save eeg-pipes
Then, importing the pipes from the library:
import { bufferFFT, alphaPower } from "eeg-pipes";
And adding them to the RxJS observable pipe operator:
eeg$
.pipe(bufferFFT({ bins: 256 }), alphaPower())
.subscribe(buffer => console.log(buffer));
Filter pipes can be applied to both samples or buffers of samples. Filters are linear IIR filters using a digital biquad implementation.
Optional Parameters:
characteristic
: 'butterworth' or 'bessel'. Default is butterworth characteristic because of its steeper cutoff
order
: the number of 2nd order biquad filters applied to the signal. Default is 2.
samplingRate
: should match the samplingRate of your EEG device. Default is 250
Most pipes will work when applied to streams of individual EEG samples. However, in order to improve performance, especially when working with high sample rates, it is also possible to chunk data so that each emitted event represents a collection of individual EEG samples. Only filter pipes support chunked data currently
Chunks can be created by using a buffer operator such as bufferCount
or bufferTime
followed by the chunk
operator:
eeg$
.pipe(bufferCount(1000), chunk())
.subscribe(buffer => console.log(buffer));
Chunks have the following data structure:
{
data: [
[Number, Number, ...],
[Number, Number, ...],
[Number, Number, ...],
[Number, Number, ...],
], // nbChannels x nbSamples
info: {
samplingRate: Number,
startTime: Number,
...
}
}
Chunks contain a 2D data array with shape nbChannels x nbSamples. Instead of individual timestamps for each sample, Chunk objects contain samplingRate and startTime information in the info object in order to allow time at any point within the Chunk to be inferred. Info properties present in Sample objects before being pooled into Chunks will be maintained.
FAQs
Lettable RxJS operators for working with EEG data in Node and the Browser
The npm package eeg-pipes receives a total of 26 weekly downloads. As such, eeg-pipes popularity was classified as not popular.
We found that eeg-pipes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.