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.

Fixed bug where custom experimental stimulu titles were not showing up in UI

jdpigeon 3eba812a 2bdc775c

+21 -6
+6 -1
app/components/CleanComponent/index.js
··· 50 50 handleRecordingChange: (Object, Object) => void; 51 51 handleLoadData: () => void; 52 52 handleSubjectChange: (Object, Object) => void; 53 + icons: string[]; 53 54 54 55 constructor(props: Props) { 55 56 super(props); ··· 63 64 this.handleLoadData = this.handleLoadData.bind(this); 64 65 this.handleSidebarToggle = this.handleSidebarToggle.bind(this); 65 66 this.handleSubjectChange = this.handleSubjectChange.bind(this); 67 + this.icons = 68 + props.type === EXPERIMENTS.N170 69 + ? ['smile', 'home', 'x', 'book'] 70 + : ['star', 'star outline', 'x', 'book']; 66 71 } 67 72 68 73 async componentDidMount() { ··· 114 119 <Segment basic textAlign="left"> 115 120 {this.props.epochsInfo.map((infoObj, index) => ( 116 121 <Segment key={infoObj.name} basic> 117 - <Icon name={['smile', 'home', 'x', 'book'][index]} /> 122 + <Icon name={this.icons[index]} /> 118 123 {infoObj.name} 119 124 <p>{infoObj.value}</p> 120 125 </Segment>
+3 -2
app/constants/constants.js
··· 48 48 49 49 export const SEARCH_TIMER = 3000; 50 50 51 + // NOTE: the actual marker id values of stimulus 1 and 2 are reversed 51 52 export const EVENTS = { 52 - FACE: 2, 53 - HOUSE: 1, 53 + STIMULUS_1: 2, 54 + STIMULUS_2: 1, 54 55 TARGET: 2, 55 56 NONTARGET: 1 56 57 };
+12 -3
app/epics/jupyterEpics.js
··· 241 241 awaitOkMessage(action$), 242 242 execute(filterIIR(1, 30), state$), 243 243 awaitOkMessage(action$), 244 - execute( 245 - epochEvents({ House: EVENTS.HOUSE, Face: EVENTS.FACE }, -0.1, 0.8), 246 - state$ 244 + map(() => 245 + epochEvents( 246 + { 247 + [state$.value.experiment.params.stimulus1.title]: EVENTS.STIMULUS_1, 248 + [state$.value.experiment.params.stimulus2.title]: EVENTS.STIMULUS_2 249 + }, 250 + -0.1, 251 + 0.8 252 + ) 253 + ), 254 + map(epochEventsCommand => 255 + state$.value.jupyter.mainChannel.next(executeRequest(epochEventsCommand)) 247 256 ), 248 257 awaitOkMessage(action$), 249 258 map(getEpochsInfo)