Closed kylemath closed 4 years ago
https://github.com/neurosity/eeg-pipes/blob/master/examples/createEEG.js
const { createEEG } = require("..");
// defaults to muse-lsl.csv
const eeg$ = createEEG();
// with custom csv file, can load file via webpack loader
const withCustomCsv$ = createEEG({
csv: [] // insert your parsed csv content here
});
// with randomly generated data
const mock$ = createEEG({
mock: true
});
// with NaN range injection
const mockNaN$ = createEEG({
mock: true,
NaNRange: [0.29, 0.31]
});
const sine$ = createEEG({ sine: 1 });
sine$.subscribe(console.log);
working on a version that might put the output of createEEG right into the pipe in https://github.com/kylemath/EEGEdu/tree/mock
Data spec:
{electrode: 3, index: 5718, samples: Array(12), timestamp: 1575847285216.125}
electrode: 3
index: 5718
samples: (12) [-0.48828125, -0.48828125, 30.76171875, -62.98828125, 363.76953125, 977.05078125, -927.734375, -42.96875, -341.30859375, 897.4609375, -884.765625, 381.34765625]
timestamp: 1575847285216.125
__proto__: Object
const takeSingle = client.eegReadings.pipe(take(1));
takeSingle.subscribe((v) => {console.log(v);})
Closed with #66
https://github.com/neurosity/eeg-pipes/blob/master/src/utils/createEEG.js
need to change the input of the pipe into this need some way to turn this mode on and off that is not client facing ? Perhaps we do this is a default if their muse doesn't connect