()
| 6 | } |
| 7 | |
| 8 | async 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 (10000); |
| 15 | board.stopStream(); |
| 16 | const data = board.getCurrentBoardData(500); |
| 17 | board.releaseSession(); |
| 18 | const eegChannels = BoardShim.getEegChannels(boardId); |
| 19 | const eegData = data[eegChannels[0]]; |
| 20 | const eeg2D: number[][] = []; |
| 21 | while (eegData.length) |
| 22 | eeg2D.push(eegData.splice(0, 100)); |
| 23 | const icaData = DataFilter.performIca(eeg2D, 2, [0, 1, 2, 3, 4]); |
| 24 | console.info(icaData[3]); |
| 25 | } |
| 26 | |
| 27 | runExample (); |
no test coverage detected