3.0.4 • Published 1 year ago
@neurodevs/node-signal-processing v3.0.4
node-signal-processing
Object-oriented algorithms for digital signal processing.
Table of Contents
Overview
This package contains object-oriented algorithms for digital signal processing.
Installation
Install the package with your preferred package manager, such as:
npm install @neurodevs/node-signal-processing
or:
yarn add @neurodevs/node-signal-processing
Usage
Fft
import { Fft } from '@neurodevs/node-signal-processing'
function runFftForwardAndInverse() {
const signal = [1, 2, 3, 4]
const fft = Fft.Create({ radix: signal.length })
const frequencies = fft.forward(signal)
const original = fft.inverse(frequencies)
}FirBandpassFilter
import { FirBandpassFilter } from '@neurodevs/node-signal-processing'
function filterLowAndHighFrequenciesFromPpgSignal() {
const rawPpgSignal: number[] = [...]
const filter = FirBandpassFilter.Create({
sampleRate: 64, // PPG sample rate
lowCutoffHz: 0.4, // Filter under 24 bpm heart rate
highCutoffHz: 4.0, // Filter over 240 bpm heart rate
numTaps: 4 * 64 + 1, // Heuristic: 4 * sampleRate + 1
attenuation: 50 // Frequencies outside bandpass reduced by 50 dB
})
const filteredPpgSignal = filter.run(rawPpgSignal)
}HilbertPeakDetector
import { HilbertPeakDetector } from '@neurodevs/node-signal-processing'
function detectPpgPeaksFromFilteredSignal() {
const filteredPpgSignal: number[] = [...] // See FirBandpassFilter example
const timestamps: number[] = [...] // Must be same length as filteredPpgSignal
const detector = HilbertPeakDetector.Create()
const results = detector.run(filteredPpgSignal, timestamps)
}HilbertTransformer
import { HilbertTransformer } from '@neurodevs/node-signal-processing'
function calculateAnalyticSignalAndEnvelopeFromSignal() {
const signal = [1, 2, 3, 4]
const transformer = HilbertTransformer.Create()
const { analyticSignal, envelope } = transformer.run(signal)
}1.0.1
1 year ago
1.0.0
1 year ago
2.0.3
1 year ago
2.0.2
1 year ago
2.0.4
1 year ago
2.1.0
1 year ago
2.0.1
1 year ago
2.0.0
1 year ago
3.0.4
1 year ago
3.0.3
1 year ago
3.0.2
1 year ago
3.0.1
1 year ago
3.0.0
1 year ago
0.4.11
1 year ago
0.4.10
1 year ago
0.4.9
1 year ago
0.4.8
1 year ago
0.4.7
1 year ago
0.4.6
1 year ago
0.4.5
2 years ago
0.4.4
2 years ago
0.4.3
2 years ago
0.4.2
2 years ago
0.4.1
2 years ago
0.4.0
2 years ago
0.3.0
2 years ago
0.3.1
2 years ago
0.3.3
2 years ago
0.2.1
2 years ago
0.1.6
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago