MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / runExample

Function runExample

nodejs_package/tests/denoising.ts:8–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6}
7
8async function runExample (): Promise<void>
9{
10 const boardId = BoardIds.SYNTHETIC_BOARD;
11 const board = new BoardShim (boardId, {});
12 board.prepareSession();
13 board.startStream();
14 await sleep (5000);
15 board.stopStream();
16 const data = board.getBoardData();
17 board.releaseSession();
18 const eegChannels = BoardShim.getEegChannels(boardId);
19 const oldData = data[eegChannels[0]];
20 console.info(oldData);
21 DataFilter.performWaveletDenoising(oldData, WaveletTypes.DB2, 2);
22 console.info(oldData);
23}
24
25runExample ();

Callers 1

denoising.tsFile · 0.70

Calls 8

prepareSessionMethod · 0.95
startStreamMethod · 0.95
stopStreamMethod · 0.95
getBoardDataMethod · 0.95
releaseSessionMethod · 0.95
getEegChannelsMethod · 0.80
sleepFunction · 0.70

Tested by

no test coverage detected