Releases: pwstegman/bci.js
v1.8.0
Release Notes
Welch's Method
Added Welch's method for power spectral density estimation. Documentation can be found at:
https://bci.js.org/docs/module-bcijs.html#.welch.
Updated Build Process
The switch to ES6 module syntax with webpack for building and the update to the latest math.js has allowed for better tree shaking and dead code removal in the browser dist build. File size of bci.min.js
reduced from 429 KB to 293 KB.
v1.7.1
v1.7.0
Release Notes
Added Periodogram Method
The periodogram method was added as a method to estimate the power spectral density (PSD) of a signal. It returns an object containing the PSD estimates and their corresponding frequencies.
Units of the estimates are the squared units of the input signal per Hz. For example, if the input signal is μV, then the PSD estimates are μV²/Hz.
let psd = bci.periodogram(signal, sample_rate);
console.log(psd.estimates); // Array of estimates, units of μV²/Hz for μV signal
console.log(psd.frequencies); // Array of corresponding frequencies, units of Hz
For more info, see https://bci.js.org/docs/module-bcijs.html#.periodogram
Added New Bandpower Method
The new bandpower method is more extensive and returns values in proper units (squared units of input signal, ex: μV² if the input signal is measured in μV). It supports single channel or multi channel input. It also allows for the calculation of relative bandpower (the power in a frequency band divided by the total power, unitless), as well as bandpower averaged across channels (ex: alpha power averaged across all channels).
let powers = bci.bandpower(signal, sample_rate, ['alpha', 'beta'], {relative: true});
// Returns an array containing the relative alpha power and the relative beta power
For more info, see https://bci.js.org/docs/module-bcijs.html#.bandpower
Deprecated Methods
The below methods have been deprecated in this release and have been replaced with the new periodogram
and bandpower
methods listed above. The methods shown below do not scale outputs to the proper units. The new methods correct this issue.
signalBandPower
replaced bybandpower
averageBandPowers
replaced bybandpower
with the option{average: true}
psdBandPower
replaced bybandpower
with the option{input: 'psd'}
psd
replaced withperiodogram