-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInteractive melanopsin simulator
527 lines (527 loc) · 20.3 KB
/
Interactive melanopsin simulator
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# This calculator will simulate the output of a user defined flickering signal for cones, rods and Melanopsin containing ipRGCs."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Adjusting the opsin types and window frame:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Populating the interactive namespace from numpy and matplotlib\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "955bfa806d484e80ba31502024bae4c5",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(VBox(children=(Label(value='S-cone Peak [nm]'), Label(value='M-cone Peak [nm]'), Label(value='R…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%pylab inline\n",
"from ipywidgets import interact, interactive, fixed, interact_manual, Layout\n",
"import ipywidgets as widgets\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import scipy.integrate\n",
"from decimal import Decimal\n",
"\n",
"horizontaldimensions=10\n",
"verticaldimensions=5\n",
"pylab.rcParams['figure.figsize'] = (horizontaldimensions,verticaldimensions)\n",
"\n",
"#Template for A1 pigments (Rhodopsin):\n",
"#A template for the α-band, v=wavelength, l=peak sensitivity:\n",
"def S1(v,l):\n",
" #A and a determine slope and y-intercept\n",
" A=69.7\n",
" a=0.8795+0.0459*np.e**(-(l-300)**2/11940)\n",
" #more fitting parameters:\n",
" B=28\n",
" b=0.922\n",
" C=-14.9\n",
" c=1.104\n",
" D=0.674\n",
" w=l/v\n",
" S1=(1/((np.e**(A*(a-w))) + (np.e**(B*(b-w))) + (np.e**(C*(c-w))) + D))\n",
" return S1\n",
"\n",
"#A template for the β-band of A1 pigments:\n",
"def S1b(v,l):\n",
" #l_b= Position of the β-Peak as function of the α-Peak l:\n",
" l_b=189+0.315*l\n",
" #Amplitude of the β-band relative to the α-band:\n",
" A_b=0.26\n",
" #Bandwith Parameter b_b:\n",
" b_b=-40.5+0.195*l\n",
" S1b=A_b*np.e**(-(v-l_b)**2/(b_b)**2)\n",
" return S1b\n",
"\n",
"#Total spectral Sensitivity of A1 pigments for wavelength v with peak sensitivity l:\n",
"def A1(v,l):\n",
" A1=S1(v,l)+ S1b(v,l)\n",
" return A1\n",
"\n",
"def spectralsensitivity(S_l,M_l,R_l,Mel_l,Startat_l,Stopat_l,verticaldimensionsl,horizontaldimensionsl):\n",
" x = np.linspace(Startat_l,Stopat_l,1000)\n",
" plt.plot(x,A1(x,S_l),color='#b412ed',label='S-cones')\n",
" plt.plot(x,A1(x,M_l),color='#019309',label='M-cones')\n",
" plt.plot(x,A1(x,R_l),color='k',label='rods')\n",
" plt.plot(x,A1(x,Mel_l),color='#808080', linestyle='dashed',label='melanopsin')\n",
" #Plot attributes---------------------------------------------------------------\n",
" pylab.rcParams['figure.figsize'] = (horizontaldimensionsl,verticaldimensionsl)\n",
" plt.xlim(Startat_l,Stopat_l)\n",
" plt.xlabel('Wavelength [nm]', fontsize=12)\n",
" plt.ylabel('relative spectral sensitivity', fontsize=12)\n",
" plt.legend(loc='upper right')\n",
" plt.title('Spectral Sensitivity of Different Opsin Types', fontsize=14)\n",
" savefig('output/01 - opsins.png', dpi=200)\n",
" plt.show()\n",
" \n",
" #set global variables---------------------------------------------------------------\n",
" global S,M,R,Mel,Startat,Stopat,verticaldimensions,horizontaldimensions\n",
" S=S_l\n",
" M=M_l\n",
" R=R_l\n",
" Mel=Mel_l\n",
" Startat=Startat_l\n",
" Stopat=Stopat_l\n",
" verticaldimensions = verticaldimensionsl\n",
" horizontaldimensions = horizontaldimensionsl\n",
"\n",
" \n",
"#Interaction with plot------------------------------------------------------------------\n",
"interaction1=interactive(spectralsensitivity, \n",
" S_l = widgets.FloatSlider(description=' ', value=365, min=300, max=700,step=1), \n",
" M_l = widgets.FloatSlider(description=' ',value=512, min=300, max=700,step=1), \n",
" R_l = widgets.FloatSlider(description=' ',value=498, min=300, max=700,step=1), \n",
" Mel_l = widgets.FloatSlider(description=' ',value=478, min=300, max=700,step=1), \n",
" Startat_l = widgets.FloatSlider(description=' ',value=350, min=200, max=700,step=10),\n",
" Stopat_l = widgets.FloatSlider(description=' ',value=600, min=300, max=800,step=10),\n",
" verticaldimensionsl = widgets.FloatSlider(description=' ',value=5, min=3, max=20,step=1),\n",
" horizontaldimensionsl= widgets.FloatSlider(description=' ',value=10, min=5, max=30,step=1))\n",
"\n",
"widgets.HBox([widgets.VBox([widgets.Label('S-cone Peak [nm]'),\n",
" widgets.Label('M-cone Peak [nm]'),\n",
" widgets.Label('Rod Peak [nm]'),\n",
" widgets.Label('Melanopsin Peak [nm]'),\n",
" widgets.Label('lower limit [nm]'),\n",
" widgets.Label('upper limit [nm]'),\n",
" widgets.Label('vertical plot size'),\n",
" widgets.Label('horizontal plot size')],layout={'width':'150px'}),\n",
" interaction1])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Defining the light sources:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "cebda17631544bbb987165d54d1effc9",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(VBox(children=(Label(value='Peak Channel 1 [nm]'), Label(value='Peak Channel 2 [nm]'), Label(va…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#normal distribution\n",
"def normald(v,m,s):\n",
" f=1/(s*((2*np.pi)**0.5))*np.e**-(((v-m)**2)/(2*s**2))\n",
" return f\n",
"#normalized normal distribution\n",
"def normaldn(v,m,s):\n",
" f=1/(s*((2*np.pi)**0.5))*np.e**-(((v-m)**2)/(2*s**2))\n",
" F=f*1/max(f)\n",
" return F\n",
"\n",
"#Define Lightsources\n",
"def lightsources(Mu1_l,Mu2_l,Sigma1_l,Sigma2_l):\n",
" x = np.linspace(Startat,Stopat,1000)\n",
" \n",
" #Plot the curves for the light sources\n",
" plt.fill_between(x,0,normaldn(x,m=Mu1_l,s=Sigma1_l),color='#1653DF',alpha=0.5)\n",
" plt.fill_between(x,0,normaldn(x,m=Mu2_l,s=Sigma2_l),color='#0DB80A',alpha=0.5)\n",
" \n",
" #Plot the spectral sensitivities\n",
" plt.plot(x,A1(x,S),color='#b412ed',label='S-cones')\n",
" plt.plot(x,A1(x,M),color='#019309',label='M-cones')\n",
" plt.plot(x,A1(x,R),color='k',label='rods')\n",
" plt.plot(x,A1(x,Mel),color='#808080', linestyle='dashed',label='melanopsin')\n",
" \n",
" #Plot attributes---------------------------------------------------------------\n",
" pylab.rcParams['figure.figsize'] = (horizontaldimensions,verticaldimensions)\n",
" plt.grid(color='k', linestyle='--', alpha=0.25, linewidth=0.5)\n",
" plt.xlim(Startat,Stopat)\n",
" plt.xlabel('Wavelength [nm]', fontsize=12)\n",
" plt.ylabel('normalized spectral sensitivity/radiance', fontsize=12)\n",
" plt.title('Spectral Sensitivity and Radiance', fontsize=18)\n",
" plt.legend(loc='upper right')\n",
" savefig('output/02 - lightsource.png', dpi=200)\n",
" plt.show()\n",
" \n",
" #set global variables---------------------------------------------------------------\n",
" global Mu1, Mu2, Sigma1, Sigma2\n",
" Mu1=Mu1_l\n",
" Mu2=Mu2_l\n",
" Sigma1=Sigma1_l\n",
" Sigma2=Sigma2_l\n",
"\n",
"#Interaction with plot\n",
"interaction2=interactive(lightsources, \n",
" Mu1_l = widgets.FloatSlider(description=' ',value=450, min=300, max=700,step=1),\n",
" Mu2_l = widgets.FloatSlider(description=' ',value=550, min=300, max=700,step=1),\n",
" Sigma1_l = widgets.FloatSlider(description=' ',value=15, min=1, max=50,step=1),\n",
" Sigma2_l = widgets.FloatSlider(description=' ',value=15, min=1, max=50,step=1))\n",
"\n",
"widgets.HBox([widgets.VBox([widgets.Label('Peak Channel 1 [nm]'),\n",
" widgets.Label('Peak Channel 2 [nm]'),\n",
" widgets.Label('Width Channel 1 [nm]'),\n",
" widgets.Label('Width Channel 2 [nm]')],layout={'width':'150px'}),\n",
" interaction2])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Relative contribution of cones and rods"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "303f2da0dbc44f00891b88f011ead373",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(VBox(children=(Label(value='S contribution relative to M [%]'), Label(value='Min. rod contribut…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#comparing the response to first and second light source for an overall silencing stimuli:\n",
"\n",
"#Short wavelength cone:\n",
"#response to Channel 1:\n",
"def rs1(v):\n",
" rs1=(A1(v,S)*normald(v,Mu1,Sigma1))\n",
" return rs1\n",
"RS1 = scipy.integrate.quad(rs1,Startat,Stopat)\n",
"#response to Channel 2:\n",
"def rs2(v):\n",
" rs2=(A1(v,S)*normald(v,Mu2,Sigma2))\n",
" return rs2\n",
"RS2 = scipy.integrate.quad(rs2,Startat,Stopat)\n",
"\n",
"#Medium wavelength cone:\n",
"#response to Channel 1:\n",
"def rm1(v):\n",
" rm1=(A1(v,M)*normald(v,Mu1,Sigma1))\n",
" return rm1\n",
"RM1 = scipy.integrate.quad(rm1,Startat,Stopat)\n",
"#response to Channel 2:\n",
"def rm2(v):\n",
" rm2=(A1(v,M)*normald(v,Mu2,Sigma2))\n",
" return rm2\n",
"RM2 = scipy.integrate.quad(rm2,Startat,Stopat)\n",
"\n",
"#rods:\n",
"#response to Channel 1:\n",
"def rr1(v):\n",
" rr1=(A1(v,R)*normald(v,Mu1,Sigma1))\n",
" return rr1\n",
"RR1 = scipy.integrate.quad(rr1,Startat,Stopat)\n",
"#response to Channel 2:\n",
"def rr2(v):\n",
" rr2=(A1(v,R)*normald(v,Mu2,Sigma2))\n",
" return rr2\n",
"RR2 = scipy.integrate.quad(rr2,Startat,Stopat)\n",
"\n",
"#Melanopsin:\n",
"#response to Channel 1:\n",
"def rmel1(v):\n",
" rmel1=(A1(v,Mel)*normald(v,Mu1,Sigma1))\n",
" return rmel1\n",
"RMel1 = scipy.integrate.quad(rmel1,Startat,Stopat)\n",
"#response to Channel 2:\n",
"def rmel2(v):\n",
" rmel2=(A1(v,Mel)*normald(v,Mu2,Sigma2))\n",
" return rmel2\n",
"RMel2 = scipy.integrate.quad(rmel2,Startat,Stopat)\n",
"\n",
"def opsin_reactions(ConS_inpercent,ConR_inpercent):\n",
" #Contributions of S-Cone and Rods relative to M-cones \n",
" ConS_l=ConS_inpercent/100\n",
" ConR_l=ConR_inpercent/100\n",
"\n",
" #Calculate the relative intensity I2\n",
" RetinalResponse1=RS1[0]*ConS_l+RM1[0]+RR1[0]*ConR_l\n",
" RetinalResponse2=RS2[0]*ConS_l+RM2[0]+RR2[0]*ConR_l\n",
" I2_l=RetinalResponse1/RetinalResponse2\n",
"\n",
" #Create Barplot for relative Opsin contributions:\n",
" RC1con=(RS1[0]*ConS_l,RM1[0],RR1[0]*ConR_l,RS1[0]*ConS_l+RM1[0]+RR1[0]*ConR_l)\n",
" RC2con=(RS2[0]*I2_l*ConS_l,RM2[0]*I2_l,RR2[0]*I2_l*ConR_l,RS2[0]*I2_l*ConS_l+RM2[0]*I2_l+RR2[0]*I2_l*ConR_l)\n",
"\n",
" index=(np.arange(4))\n",
" bar_width=0.25\n",
" plt.bar(index,RC1con,bar_width,label='response to channel 1',color='#1653DF')\n",
" plt.bar(index+bar_width,RC2con,bar_width,label='response to channel 2',color='#0DB80A')\n",
" plt.xticks(index+0.5*bar_width,['S','M','R','Sum'], fontsize=12)\n",
" plt.yticks(fontsize=12)\n",
" plt.legend()\n",
" plt.title('Contribution of the Opsins S, M and R to the Total Retinal Response', fontsize=16) \n",
" pylab.rcParams['figure.figsize'] = (horizontaldimensions,verticaldimensions)\n",
" savefig('output/03 - opsin contribution.png',dpi=200)\n",
" plt.show()\n",
" \n",
" #Create Barplot for relative Opsin excitations:\n",
" RC1=(RS1[0],RM1[0],RR1[0],RMel1[0])\n",
" RC2=(RS2[0]*I2_l,RM2[0]*I2_l,RR2[0]*I2_l,RMel2[0]*I2_l)\n",
"\n",
" index=(np.arange(4))\n",
" bar_width=0.25\n",
" plt.bar(index,RC1,bar_width,label='response to channel 1',color='#1653DF')\n",
" plt.bar(index+bar_width,RC2,bar_width,label='response to channel 2',color='#0DB80A')\n",
" plt.xticks(index+0.5*bar_width,['S','M','R','Mel'], fontsize=12)\n",
" plt.yticks(fontsize=12)\n",
" plt.legend()\n",
" plt.title('Relative Excitation of the Opsins', fontsize=16)\n",
" pylab.rcParams['figure.figsize'] = (horizontaldimensions,verticaldimensions)\n",
" savefig('output/04 - opsin excitation.png', dpi=200)\n",
" plt.show()\n",
"\n",
" #print Melanopsin Amplitude:\n",
"\n",
" print('Intensity of Channel 2 relative to Channel 1: '+'%.3f'% I2_l)\n",
" print('Relative Melanopsin Amplitude: '+'%.3f'%(RMel1[0]/(RMel2[0]*I2_l)))\n",
"\n",
"\n",
"\n",
" \n",
" global I2, ConS, ConR\n",
" I2=I2_l\n",
" ConS=ConS_l\n",
" ConR=ConR_l\n",
"\n",
"interaction3=interactive(opsin_reactions, \n",
" ConS_inpercent = widgets.FloatSlider(description=' ',value=50, min=0, max=200,step=1),\n",
" ConR_inpercent = widgets.FloatSlider(description=' ',value=10, min=0, max=200,step=1))\n",
"\n",
"\n",
"widgets.HBox([widgets.VBox([widgets.Label('S contribution relative to M [%]'), \n",
" widgets.Label('Min. rod contribution rel. to M [%]')],layout={'width':'350px'}), interaction3])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Simulation of the retinal signal"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "90c051eee82c4ebaa8b8c1cfab3f8500",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(VBox(children=(Label(value='Number of displayed phases'), Label(value='ipRGC threshold'), Label…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#Show ERG response to signal\n",
"from scipy import signal\n",
"def Response(nl, threshl, critfreql,Luml,Freql):\n",
" #simulate Melanopsin excitation:\n",
" #define linear space:\n",
" x = np.linspace(-4*nl/Freql,6*nl/Freql,10000)\n",
" #Melanopsin curve:\n",
" #momentary melanopsin excitation:\n",
" def melanopsin(v):\n",
" melanopsin=RMel1[0]*c1curve(v)+RMel2[0]*c2curve(v)\n",
" return melanopsin\n",
" \n",
" #definition of a butterworth lowpass filter\n",
" def filter(v,f):\n",
" b,a=scipy.signal.butter(1, f)\n",
" return scipy.signal.lfilter(b, a, v, axis=-1, zi=None)\n",
" \n",
" samplingrate=(1000*Freql)/(np.pi*nl)\n",
" Criticalfrequency=critfreql/samplingrate/2\n",
" \n",
" def Melsat(v):\n",
" Melsat=filter(melanopsin(v),Criticalfrequency)\n",
" return Melsat\n",
"\n",
" #Curve Channel 1:\n",
" def c1curve(v):\n",
" c1curve=Luml*np.cos(v*Freql*2*np.pi)+max(Luml*np.cos(v*Freql*2*np.pi))\n",
" return c1curve\n",
"\n",
" #Curve Channel 2:\n",
" def c2curve(v):\n",
" c2curve=I2*Luml*np.cos(v*Freql*2*np.pi+np.pi)+max(I2*Luml*np.cos(v*Freql*2*np.pi))\n",
" return c2curve\n",
" \n",
" k=np.linspace(Startat,Stopat,1000)\n",
"\n",
" #Plot\n",
" plt.close()\n",
" fig, (ax1, ax2) = plt.subplots(2, 1, sharex=False)\n",
" \n",
" ax1.plot(x,c1curve(x),color='b', label='intensity channel 1')\n",
" ax1.plot(x,c2curve(x), color='g',label='intensity channel 2')\n",
" ax1.fill_between(x,0,Melsat(x),alpha=0.5,color='#00cdff', label='ipRGC response \\nfor critical frequency of: '+ '%.2f'%critfreql+' Hz'+ '\\nand signal frequency of: '+ '%.2f'%Freql+' Hz') \n",
" ax1.plot(x,melanopsin(x),alpha=0.5,color='k',label='melanopsin excitation')\n",
" ax1.axhline(y=threshl, color='k',alpha=0.5, linestyle='--', label='ipRGC threshold')\n",
" \n",
" ax1.set_xlabel('time [s]', fontsize=12) \n",
" ax1.set_xlim(0,nl/Freql)\n",
" ax1.legend(loc='upper right')\n",
" ax1.set_title('Melanopsin excitation and ipRGC response to flickering stimuli', fontsize=18)\n",
" ax1.set_ylim(0,)\n",
" \n",
" \n",
"\n",
" #Retinal response\n",
" #Amplification of Rod contribution\n",
" Rodamp=(threshl-Melsat(x))*0.1\n",
" Rodamp[Rodamp<0]=0\n",
" #Response of the rods, altered by Rodamp:\n",
" def RodRes(v):\n",
" RodRes=(Rodamp+ConR)*(RR1[0]*c1curve(v)+RR2[0]*c2curve(v))\n",
" return RodRes\n",
" \n",
" #Response of S-cones:\n",
" def SRes(v):\n",
" SRes=ConS*(RS1[0]*c1curve(v)+RS2[0]*c2curve(v))\n",
" return SRes\n",
" \n",
" #Response of M-cones:\n",
" def MRes(v):\n",
" MRes=RM1[0]*c1curve(v)+RM2[0]*c2curve(v)\n",
" return MRes\n",
" \n",
" \n",
" ax2.plot(x, RodRes(x)+SRes(x)+MRes(x),color='r',label='Retinal response') \n",
" ax2.set_xlabel('time [s]', fontsize=12)\n",
" ax2.set_xlim(0,nl/Freql)\n",
" ax2.legend(loc='upper right')\n",
" ax2.set_yticks([])\n",
" ax2.set_ylim(0.5*Luml,3*Luml)\n",
" ax2.set_title('Retinal response to the signal', fontsize=18)\n",
" \n",
" pylab.rcParams['figure.figsize'] = (horizontaldimensions,2*verticaldimensions)\n",
" fig.tight_layout(pad=3)\n",
" savefig('output/05 - output simulation lowpass.png', dpi=200)\n",
" \n",
"\n",
"interaction4=interactive(Response, \n",
" nl=widgets.FloatSlider(description=' ',value=2, min=1, max=10,step=1), \n",
" threshl=widgets.FloatSlider(description=' ',value=75, min=0, max=300,step=5),\n",
" critfreql=widgets.FloatSlider(description=' ',value=1, min=0.05, max=5,step=0.05), \n",
" Luml=widgets.FloatSlider(description=' ',value=100, min=10, max=500,step=1),\n",
" Freql=widgets.FloatSlider(description=' ',value=8, min=0.1, max=20,step=0.1))\n",
"\n",
"textcolumn4=widgets.VBox([widgets.Label('Number of displayed phases'),\n",
" widgets.Label('ipRGC threshold'),\n",
" widgets.Label('Critical frequency of ipRGCs in Hz'),\n",
" widgets.Label('Luminance'),\n",
" widgets.Label('Frequency in Hz')],\n",
" layout={'width':'300px'})\n",
"widgets.HBox([textcolumn4,interaction4])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}