11import React from 'react' ;
22import TextField from '@material-ui/core/TextField' ;
3- import { BottomNavigation , BottomNavigationAction } from '@material-ui/core' ;
3+ import { BottomNavigation , BottomNavigationAction , Grid , Switch , Typography } from '@material-ui/core' ;
44import FontIcon from '@material-ui/core/Icon' ;
55import Box from '@material-ui/core/Box' ;
66import Dialog from '@material-ui/core/Dialog/Dialog' ;
@@ -20,13 +20,18 @@ import {
2020 NetPyNESelectField ,
2121} from 'netpyne/components' ;
2222import Utils from '../../../Utils' ;
23+ import Checkbox from '../../general/Checkbox' ;
24+ import { vars } from '../../../theme' ;
25+ import { BASE_PATH } from '../../general/NetPyNEIcons' ;
2326
2427const styles = ( { spacing } ) => ( {
2528 fields : {
2629 marginTop : spacing ( 3 ) ,
2730 width : '100%' ,
2831 } ,
29- } ) ;
32+ } ) ;
33+
34+ const { textColor, primaryColor, experimentLabelColor } = vars ;
3035
3136class NetPyNEPopulation extends React . Component {
3237 constructor ( props ) {
@@ -109,7 +114,7 @@ class NetPyNEPopulation extends React.Component {
109114 < BottomNavigationAction
110115 key = "Stimulation"
111116 label = "Stimulation"
112- icon = { < FontIcon className = "fa fa-list" / >}
117+ icon = { < FontIcon > < img src = { ` ${ BASE_PATH } stimSourceParams.svg` } style = { { height : '100%' , filter : this . state . sectionId === 'Stimulation' ? 'none' : 'brightness(0) invert(1)' } } /> </ FontIcon > }
113118 onClick = { ( ) => select ( 4 , 'Stimulation' ) }
114119 /> ,
115120 ) ;
@@ -283,8 +288,224 @@ class NetPyNEPopulation extends React.Component {
283288 ) ;
284289 } else if ( this . state . sectionId == 'Stimulation' ) {
285290 var content = (
286- < Box className = "scrollbar scrollchild" mt = { 1 } >
287- < NetPyNECoordsRange
291+ < Box className = "scrollbar scrollchild" mt = { 1 } >
292+ < Box mb = { 3.5 } display = 'flex' style = { { gap : '0.5rem' } } >
293+ < Box >
294+ < Switch checked = { true } />
295+ </ Box >
296+ < Box >
297+ < Typography style = { {
298+ fontSize : '0.875rem' ,
299+ lineHeight : '130%' ,
300+ color : textColor
301+ } } > Override stimulation</ Typography >
302+ < Typography style = { {
303+ marginBottom : '0.25rem' ,
304+ opacity : '0.7' ,
305+ fontSize : '0.75rem' ,
306+ lineHeight : '130%' ,
307+ color : textColor
308+ } } >
309+ Stimulation is automatically set to the same configurations as the VectStim’s stimulation that has been set in ‘Stim. Sources’
310+ </ Typography >
311+ < Button
312+ className = 'noHover'
313+ disableRipple
314+ style = { { color : primaryColor , padding : 0 , textTransform : 'uppercase' , fontSize : '0.75rem' , letterSpacing : '0.01rem' , lineHeight : '200%' } }
315+ variant = 'text'
316+ > View Configurations in stim. source</ Button >
317+ </ Box >
318+ </ Box >
319+ < Box display = 'flex' flexDirection = 'column' style = { { gap : '0.5rem' } } >
320+ < NetPyNEField mb = { 0 } id = "netParams.popParams.cellType" >
321+ < NetPyNESelectField
322+ style = { { mb : 0 } }
323+ method = "netpyne_geppetto.getAvailableCellTypes"
324+ model = {
325+ `netParams.popParams['${ this . props . name } ']['cellType']`
326+ }
327+ postProcessItems = { this . postProcessMenuItems }
328+ />
329+ </ NetPyNEField >
330+
331+ < TextField
332+ variant = "filled"
333+ fullWidth
334+ onChange = { this . handleRenameChange }
335+ value = { this . state . currentName }
336+ disabled = { this . renaming }
337+ label = "Seed"
338+ />
339+
340+ < Box display = 'flex' alignItems = 'center' style = { { gap : '1rem' } } >
341+ < Typography style = { {
342+ color : experimentLabelColor , paddingLeft : '0.625rem' , fontSize : '0.875rem' , lineHeight : '130%' , fontWeight : 400
343+ } }
344+ >
345+ Spiking Pulse / Rate
346+ </ Typography >
347+ < Grid container alignItems = 'center' spacing = { 1 } >
348+ < Grid item xs = { 4 } >
349+ < TextField
350+ variant = "filled"
351+ fullWidth
352+ onChange = { this . handleRenameChange }
353+ value = { this . state . currentName }
354+ disabled = { this . renaming }
355+ label = "Start"
356+ />
357+ </ Grid >
358+ < Grid item xs = { 4 } >
359+ < TextField
360+ variant = "filled"
361+ fullWidth
362+ onChange = { this . handleRenameChange }
363+ value = { this . state . currentName }
364+ disabled = { this . renaming }
365+ label = "End"
366+ />
367+ </ Grid >
368+ < Grid item xs = { 4 } >
369+ < TextField
370+ variant = "filled"
371+ fullWidth
372+ onChange = { this . handleRenameChange }
373+ value = { this . state . currentName }
374+ disabled = { this . renaming }
375+ label = "Noise"
376+ />
377+ </ Grid >
378+ </ Grid >
379+ </ Box >
380+
381+
382+ < Box display = 'flex' alignItems = 'center' style = { { gap : '1rem' } } >
383+ < Typography style = { {
384+ color : experimentLabelColor , paddingLeft : '0.625rem' , fontSize : '0.875rem' , lineHeight : '130%' , fontWeight : 400 , visibility : 'hidden'
385+ } }
386+ >
387+ Spiking Pulse / Rate
388+ </ Typography >
389+ < Grid container alignItems = 'center' spacing = { 1 } >
390+ < Grid item xs = { 4 } >
391+ < TextField
392+ variant = "filled"
393+ fullWidth
394+ onChange = { this . handleRenameChange }
395+ value = { this . state . currentName }
396+ disabled = { this . renaming }
397+ label = "Start"
398+ />
399+ </ Grid >
400+ < Grid item xs = { 4 } >
401+ < TextField
402+ variant = "filled"
403+ fullWidth
404+ onChange = { this . handleRenameChange }
405+ value = { this . state . currentName }
406+ disabled = { this . renaming }
407+ label = "End"
408+ />
409+ </ Grid >
410+ < Grid item xs = { 4 } >
411+ < TextField
412+ variant = "filled"
413+ fullWidth
414+ onChange = { this . handleRenameChange }
415+ value = { this . state . currentName }
416+ disabled = { this . renaming }
417+ label = "Noise"
418+ />
419+ </ Grid >
420+ </ Grid >
421+ </ Box >
422+
423+ < Box pl = { 1.25 } >
424+ < Button
425+ className = 'noHover'
426+ disableRipple
427+ style = { { color : primaryColor , padding : 0 , textTransform : 'uppercase' , fontSize : '0.75rem' , letterSpacing : '0.01rem' , lineHeight : '200%' } }
428+ variant = 'text'
429+ > + add another pulse</ Button >
430+ </ Box >
431+
432+ < TextField
433+ variant = "filled"
434+ fullWidth
435+ onChange = { this . handleRenameChange }
436+ value = { this . state . currentName }
437+ disabled = { this . renaming }
438+ label = "Spike intervals (ms)"
439+ />
440+
441+
442+ < NetPyNEField mb = { 0 } id = "netParams.importCellParams.importSynMechs" >
443+ < Checkbox
444+ fullWidth
445+ noBackground
446+ />
447+ </ NetPyNEField >
448+
449+
450+ < NetPyNEField mb = { 0 } id = "netParams.popParams.cellType" >
451+ < NetPyNESelectField
452+ style = { { mb : 0 } }
453+ method = "netpyne_geppetto.getAvailableCellTypes"
454+ model = {
455+ `netParams.popParams['${ this . props . name } ']['cellType']`
456+ }
457+ postProcessItems = { this . postProcessMenuItems }
458+ />
459+ </ NetPyNEField >
460+
461+ < Box display = 'flex' alignItems = 'center' style = { { gap : '1rem' } } >
462+ < Typography style = { { color : experimentLabelColor , fontSize : '0.875rem' , paddingLeft : '0.625rem' , lineHeight : '130%' , fontWeight : 400 } } > Start</ Typography >
463+ < Grid container alignItems = 'center' spacing = { 1 } >
464+ < Grid item xs = { 6 } >
465+ < TextField
466+ variant = "filled"
467+ fullWidth
468+ onChange = { this . handleRenameChange }
469+ value = { this . state . currentName }
470+ disabled = { this . renaming }
471+ label = "Start"
472+ />
473+ </ Grid >
474+ < Grid item xs = { 3 } >
475+ < TextField
476+ variant = "filled"
477+ fullWidth
478+ onChange = { this . handleRenameChange }
479+ value = { this . state . currentName }
480+ disabled = { this . renaming }
481+ label = "End"
482+ />
483+ </ Grid >
484+ < Grid item xs = { 3 } >
485+ < TextField
486+ variant = "filled"
487+ fullWidth
488+ onChange = { this . handleRenameChange }
489+ value = { this . state . currentName }
490+ disabled = { this . renaming }
491+ label = "Noise"
492+ />
493+ </ Grid >
494+ </ Grid >
495+ </ Box >
496+
497+
498+
499+ < TextField
500+ variant = "filled"
501+ fullWidth
502+ onChange = { this . handleRenameChange }
503+ value = { this . state . currentName }
504+ disabled = { this . renaming }
505+ label = "Frequency (Hz)"
506+ />
507+ </ Box >
508+ { /* <NetPyNECoordsRange
288509 id="xRangePopParams"
289510 name={this.props.name}
290511 model="netParams.popParams"
@@ -330,7 +551,7 @@ class NetPyNEPopulation extends React.Component {
330551 label: 'Normalized',
331552 },
332553 ]}
333- />
554+ /> */ }
334555 </ Box >
335556 ) ;
336557 } else {
0 commit comments