Tracks the individual alpha peak frequency (typically 8-13 Hz) which varies per person.
import { WasmAlphaPeakModel } from "@elata-biosciences/eeg-web";const model = new WasmAlphaPeakModel();// Feed EEG data to refine peak estimatemodel.process(samples, sampleRateHz);const peakHz = model.peak_frequency();
Computes a calmness score based on the ratio of alpha to beta power. Higher alpha relative to beta generally indicates a more relaxed state.
import { WasmCalmnessModel } from "@elata-biosciences/eeg-web";const model = new WasmCalmnessModel();model.process(samples, sampleRateHz);const score = model.score(); // 0.0 to 1.0
Decodes raw Athena protocol packets from Muse S (Athena firmware) headbands. Used as a factory parameter for BleTransport:
import { AthenaWasmDecoder } from "@elata-biosciences/eeg-web";const decoder = new AthenaWasmDecoder();decoder.reset();decoder.set_use_device_timestamps(true);decoder.set_clock_kind("monotonic");decoder.set_reorder_window_ms(50);const output = decoder.decode(rawBytes);
The Athena decoder is typically not used directly. It is passed as a factory to BleTransport:
import { BleTransport } from "@elata-biosciences/eeg-web-ble";import { AthenaWasmDecoder } from "@elata-biosciences/eeg-web";const transport = new BleTransport({ deviceOptions: { athenaDecoderFactory: () => new AthenaWasmDecoder(), },});