1212default_pot_K = - 77
1313default_pot_L = - 54.387
1414default_t0 = 0
15- default_tn = 450
15+ default_tn = 150
1616default_deltat = 0.01
17- default_amplitude = 50
18- default_width = 0
19- default_translation = 50
17+ default_amplitude = 10
18+ default_width = 100
19+ default_translation = 25
2020
2121#function to reset input values to default on button click
2222def resetTodefault (_ ):
@@ -42,13 +42,14 @@ def showDefault(response):
4242
4343#function to change slider handle colour when move from default
4444def highlight_slider ():
45- inputList = [slider_capacitance , slider_cond_Na , slider_cond_K , slider_cond_L , slider_pot_Na , slider_pot_K , slider_pot_L ]
46- inputDefault = [default_capacitance , default_cond_Na , default_cond_K , default_cond_L , default_pot_Na , default_pot_K , default_pot_L ]
45+ inputList = [slider_capacitance , slider_cond_Na , slider_cond_K , slider_cond_L , slider_pot_Na , slider_pot_K , slider_pot_L , slider_amplitude , slider_width , slider_translation ]
46+ inputDefault = [default_capacitance , default_cond_Na , default_cond_K , default_cond_L , default_pot_Na , default_pot_K , default_pot_L , default_amplitude , default_width , default_translation ]
4747 for l , d in zip (inputList ,inputDefault ):
4848 if l .value == d :
4949 l .style .handle_color = 'white'
5050 else :
5151 l .style .handle_color = 'orange'
52+ """
5253 if slider_width.value == default_width:
5354 slider_amplitude.style.handle_color = 'white'
5455 slider_width.style.handle_color = 'white'
@@ -57,6 +58,7 @@ def highlight_slider():
5758 slider_amplitude.style.handle_color = 'orange'
5859 slider_width.style.handle_color = 'orange'
5960 slider_translation.style.handle_color = 'orange'
61+ """
6062
6163#defining the widgets
6264#Header or texts as HTMLMath to include symbols
@@ -80,9 +82,9 @@ def highlight_slider():
8082slider_translation = ipywidgets .FloatSlider (value = default_translation ,min = 0 ,max = 250 ,step = 0.1 ,description = 'Time Delay' ,readout = False ,continuous_update = False )
8183
8284#text box widgets
83- time_start = ipywidgets .FloatText (value = 0 ,description = 'Start Time' ,disabled = True )
84- time_end = ipywidgets .FloatText (value = 450 ,description = 'Total Time' ,disabled = False )
85- time_step = ipywidgets .FloatText (value = 0.01 ,description = 'Time Step' ,disabled = False )
85+ time_start = ipywidgets .FloatText (value = default_t0 ,description = 'Start Time' ,disabled = True )
86+ time_end = ipywidgets .FloatText (value = default_tn ,description = 'Total Time' ,disabled = False )
87+ time_step = ipywidgets .FloatText (value = default_deltat ,description = 'Time Step' ,disabled = False )
8688
8789#text box widgets to link with sliders (included to type in values for slider inputs also)
8890textBox_capacitance = ipywidgets .FloatText (value = default_capacitance ,step = 0.1 ,layout = ipywidgets .Layout (width = '5%' ))
0 commit comments