{"id":26115539,"url":"https://github.com/neurosity/eeg-pipes","last_synced_at":"2026-03-07T11:32:11.911Z","repository":{"id":40827485,"uuid":"111766179","full_name":"neurosity/eeg-pipes","owner":"neurosity","description":"Digital signal processing utilities as RxJS operators for working with EEG data in Node and the Browser","archived":false,"fork":false,"pushed_at":"2023-05-31T16:40:31.000Z","size":5147,"stargazers_count":112,"open_issues_count":16,"forks_count":22,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-09-27T03:40:07.215Z","etag":null,"topics":["bci","eeg","fft","opensource","rxjs"],"latest_commit_sha":null,"homepage":"https://neurosity.github.io/eeg-pipes","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neurosity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-11-23T05:14:10.000Z","updated_at":"2025-05-30T11:29:10.000Z","dependencies_parsed_at":"2023-02-02T21:15:44.353Z","dependency_job_id":"e78fbc3e-32e3-4175-b2bb-dc6f4bf2afdb","html_url":"https://github.com/neurosity/eeg-pipes","commit_stats":{"total_commits":217,"total_committers":10,"mean_commits":21.7,"dds":0.4746543778801844,"last_synced_commit":"e395654926a8c7518d2c42ddb78758769ec311ad"},"previous_names":["alexcastillo/eeg-pipes"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/neurosity/eeg-pipes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurosity%2Feeg-pipes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurosity%2Feeg-pipes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurosity%2Feeg-pipes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurosity%2Feeg-pipes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neurosity","download_url":"https://codeload.github.com/neurosity/eeg-pipes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurosity%2Feeg-pipes/sbom","scorecard":{"id":180976,"data":{"date":"2025-08-11","repo":{"name":"github.com/neurosity/eeg-pipes","commit":"e395654926a8c7518d2c42ddb78758769ec311ad"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 2/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"79 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-cph5-m8f7-6c5x","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-257v-vj4p-3w2h","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-r7jx-5m6m-cpg9","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-j4f2-536g-r55m","Warn: Project is vulnerable to: GHSA-r7qp-cfhv-p84w","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-x55w-vjjp-222r","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-89w7-5q45-r53w","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-xf5p-87ch-gxw2","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-92xj-mqp7-vmcj","Warn: Project is vulnerable to: GHSA-wxgw-qj99-44c2","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-6fx8-h7jm-663j","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-25hc-qcg6-38wj","Warn: Project is vulnerable to: GHSA-qm95-pgcg-qqfq","Warn: Project is vulnerable to: GHSA-cqmj-92xf-r6r9","Warn: Project is vulnerable to: GHSA-mxhp-79qh-mcx6","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T18:52:29.113Z","repository_id":40827485,"created_at":"2025-08-16T18:52:29.114Z","updated_at":"2025-08-16T18:52:29.114Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30212124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T09:02:10.694Z","status":"ssl_error","status_checked_at":"2026-03-07T09:02:08.429Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bci","eeg","fft","opensource","rxjs"],"created_at":"2025-03-10T07:45:42.691Z","updated_at":"2026-03-07T11:32:11.879Z","avatar_url":"https://github.com/neurosity.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## EEG Pipes\n\n#### By Neurosity\n\nBlazing fast EEG transformers implemented as \"Pipeable\" RxJS operators for Node and the Browser.\n\nFeatures include:\n\n- FFT\n- PSD and Power Bands\n- Buffering and Epoching\n- IIR Filters\n- Signal Quality (new)\n- and more.\n\n[Read full documentation](https://neurosity.github.io/eeg-pipes)\n\nGet started by installing the library:\n\n```\nnpm install @neurosity/pipes\n```\n\n## Getting started\n\n```bash\nnpm install @neurosity/pipes\n```\n\nThen import the module\n\n##### ESM\n\n```js\nimport { epoch } from \"@neurosity/pipes\";\n```\n\n##### Node\n\n```js\nconst { epoch } = require(\"@neurosity/pipes\");\n```\n\n##### Browser\n\n```html\n\u003cscript type=\"module\"\u003e\n  import { epoch } from \"./node_modules/neurosity/pipes/esm/eeg-pipes.mjs\";\n\u003c/script\u003e\n\u003cscript nomodule src=\"./node_modules/neurosity/pipes/browser/eeg-pipes.js\"\u003e\n```\n\n##### Electron\n\n```js\nimport { epoch } from \"@neurosity/pipes/dist/electron\";\n```\n\n## Usage\n\nAn Observable of EEG data is required to work with pipes. This can be done by using `fromEvent` from RxJS in order to push callback events into an Observable stream.\n\nGiven a callback-driven API such as:\n\n```js\nbci.on(\"data\", () =\u003e { ... });\n```\n\nThen...\n\n```js\nimport { fromEvent } from \"rxjs\";\n\nconst eeg$ = fromEvent(bci, \"data\");\n```\n\nNow we have an Observable of EEG data that support Pipeable operators.\n\n```js\neeg$.pipe().subscribe();\n```\n\nThe following are some libraries that provide EEG as RxJS observables out of the box:\n\n- [Neurosity Crown](https://github.com/neurosity/notion-js)\n- [OpenBCI Ganglion Web Bluetooth](https://github.com/neurosity/ganglion-ble)\n- [OpenBCI Cyton/Ganglion](https://github.com/neurosity/openbci-observable)\n- [Muse Web Bluetooth](https://github.com/urish/muse-js)\n\nPipes can be added to an EEG observable of EEG data samples with the\nfollowing data structure:\n\n```js\n{\n  data: [Number, Number, Number, Number], // channels\n  timestamp: Date,\n  info?: {\n  \tsamplingRate?: Number,\n  \tchannelNames?: [String, String, String, String],\n  \t..\n  }\n};\n```\n\nIndividual 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.\n\nImport the pipes from the module:\n\n```js\nimport { epoch, fft, alphaPower } from \"@neurosity/pipes\";\n```\n\nAdd to RxJS observable pipe:\n\n```js\neeg$\n  .pipe(\n    epoch({ duration: 256, interval: 100 }),\n    fft({ bins: 256 }),\n    alphaPower()\n  )\n  .subscribe((alphaPower) =\u003e console.log(alphaPower));\n```\n\n## Pipes\n\n### Filtering (IIR)\n\nFilter pipes can be applied to both samples or buffers of samples. Filters are linear IIR filters using a digital biquad implementation.\n\n- lowpassFilter({ nbChannels, cutoffFrequency })\n- highpassFilter({ nbChannels, cutoffFrequency })\n- bandpassFilter({ nbChannels, cutoffFrequencies: [lowBound, highBound] })\n- notchFilter({ nbChannels, cutoffFrequency })\n\nOptional Parameters:  \n`characteristic`: 'butterworth' or 'bessel'. Default is butterworth characteristic because of its steeper cutoff  \n`order`: the number of 2nd order biquad filters applied to the signal. Default is 2.  \n`samplingRate`: should match the samplingRate of your EEG device. Default is 250\n\n### Frequency\n\n- bufferFFT({ bins, window, samplingRate })\n- alphaPower()\n- betaPower()\n- deltaPower()\n- gammaPower()\n- thetaPower()\n- averagePower()\n- sliceFFT([ min, max ])\n- powerByBand()\n\n#### Unit conversion\n\n- voltToMicrovolts({ useLog })\n\n#### Utility\n\n- epoch({ duration, interval, samplingRate })\n- bufferCount()\n- bufferTime()\n- bufferToEpoch({ samplingRate })\n- pickChannels({ channels: [c1, c2, c3] })\n- removeChannels({ channels: [c1, c2, c3] })\n- addInfo()\n- addSignalQuality()\n  - signal quality is represented as standard deviation value for each channel\n- samples() // epoch to samples\n- concatEpochs()\n- dynamicBuffer({ minSamples: number, maxSamples: number, incrementCountBy: number })\n\n### Coming soon\n\n#### Filtering\n\n- vertScaleFilter()\n- vertAgoFilter()\n- smoothFilter()\n- polarityFilter()\n- maxFrequencyFilter()\n\n## Data Structures\n\n### Sample\n\nThis is the simplest, core data structure for individual samples of EEG data. Samples have a data array containing a single reading from a number of different EEG electrodes along with a single timestamp. Samples can also contain optional other parameters added by the `addInfo` operator. The design for this comes directly from the discussion on the [EEG stream data models repo](https://github.com/NeuroJS/eeg-stream-data-model/issues/1).\n\n```js\n{\n    data: [Number, ..., Number], // length == nbChannels\n    timestamp: \u003cNumber\u003e,\n    info?: {\n  \t  samplingRate?: Number,\n  \t  channelNames?: [String, String, String, String],\n  \t...\n  }\n}\n```\n\n### Epoch\n\nAn Epoch represents the EEG data that has been collected over a specific period of time. They can be produced by using either the `epoch` operator or by using a standard RxJS buffering operator such as `bufferTime` followed by the `bufferToEpoch` operator. Collecting data in this way is necessary for performing frequency-based analyses and, in many cases, will improve performance of filtering and other downstream operations. Epochs contain a 2D data array (channels x samples) and an info object that always includes samplingRate and startTime data so that the timestamps of individual samples can be derived.\n\n```js\n{\n    data: [\n        [Number, ... , Number], // length == duration\n        [Number, ... , Number]\n    ], // length == nbChannels\n    info: {\n        samplingRate: Number,\n        startTime: Number,\n        channelNames?: [String, ..., String ]\n    }\n}\n```\n\n### Power Spectral Density or PSD: Proposed Work in Progress\n\nA PSD represents the absolute power of different frequency bins in an Epoch of EEG data. PSDs are produced by applying the `fft` operator to Epochs or using the `bufferFFT` operator directly on a stream of EEG Samples. PSDs contain an array of frequencies and a corresponding array of spectral power at each of those frequencies, as well as an info object that contains samplingRate and startTime info similarly to Epochs.\n\n```js\n{\n    psd: [\n        [Number, ... , Number] // spectral power; length = freqs.length\n    ], // length = numChannels\n    freqs: [Number, ... , Number], // length = fftLength / 2\n    info: {\n        samplingRate: Number,\n        startTime: Number,\n        channelNames?: [String, ..., String ]\n    }\n}\n```\n\n## Generating documentation\n\nTo generate the docs, run `npm run build:docs`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurosity%2Feeg-pipes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneurosity%2Feeg-pipes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurosity%2Feeg-pipes/lists"}