An easy-to-use platform for EEG experimentation in the classroom
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Added kernel launching to analyze screen

authored by

jdpigeon and committed by
Teon L Brooks
3d4ef552 9ceacf85

+15 -1
+15 -1
app/components/AnalyzeComponent.js
··· 14 14 import { isNil } from 'lodash'; 15 15 import Plot from 'react-plotly.js'; 16 16 import styles from './styles/common.css'; 17 - import { DEVICES, MUSE_CHANNELS, EMOTIV_CHANNELS } from '../constants/constants'; 17 + import { 18 + DEVICES, 19 + MUSE_CHANNELS, 20 + EMOTIV_CHANNELS, 21 + KERNEL_STATUS, 22 + EXPERIMENTS, 23 + } from '../constants/constants'; 18 24 import { 19 25 readWorkspaceCleanedEEGData, 20 26 getSubjectNamesFromFiles, ··· 40 46 41 47 interface Props { 42 48 title: string; 49 + type: ?EXPERIMENTS; 43 50 deviceType: DEVICES; 51 + isEEGEnabled: boolean; 52 + kernel: ?Kernel; 53 + kernelStatus: KERNEL_STATUS; 54 + mainChannel: ?any; 44 55 epochsInfo: ?Array<{ [string]: number | string }>; 45 56 channelInfo: ?Array<string>; 46 57 psdPlot: ?{ [string]: string }; ··· 132 143 133 144 async componentDidMount() { 134 145 const workspaceCleanData = await readWorkspaceCleanedEEGData(this.props.title); 146 + if (this.props.kernelStatus === KERNEL_STATUS.OFFLINE) { 147 + this.props.jupyterActions.launchKernel(); 148 + } 135 149 const behavioralData = await readWorkspaceBehaviorData(this.props.title); 136 150 this.setState({ 137 151 eegFilePaths: workspaceCleanData.map((filepath) => ({