-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyscript-local-equivalent_circuit.html
697 lines (610 loc) · 61.3 KB
/
pyscript-local-equivalent_circuit.html
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
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title> Equivalent Circuit 'R0-(R1,C1)'</title>
<link rel="icon" href="https://panel.holoviz.org/_static/icons/favicon.ico" type="">
<meta name="name" content=" Equivalent Circuit 'R0-(R1,C1)'">
<link rel="stylesheet" href="https://cdn.holoviz.org/panel/0.14.4/dist/css/debugger.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.holoviz.org/panel/0.14.4/dist/css/alerts.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.holoviz.org/panel/0.14.4/dist/css/card.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.holoviz.org/panel/0.14.4/dist/css/widgets.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.holoviz.org/panel/0.14.4/dist/css/markdown.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.holoviz.org/panel/0.14.4/dist/css/json.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.holoviz.org/panel/0.14.4/dist/css/loading.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.holoviz.org/panel/0.14.4/dist/css/dataframe.css" type="text/css" />
<style>
.bk.pn-loading.arc:before {
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXJnaW46IGF1dG87IGJhY2tncm91bmQ6IG5vbmU7IGRpc3BsYXk6IGJsb2NrOyBzaGFwZS1yZW5kZXJpbmc6IGF1dG87IiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPiAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjYzNjM2MzIiBzdHJva2Utd2lkdGg9IjEwIiByPSIzNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTY0LjkzMzYxNDMxMzQ2NDE1IDU2Ljk3Nzg3MTQzNzgyMTM4Ij4gICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJyb3RhdGUiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjFzIiB2YWx1ZXM9IjAgNTAgNTA7MzYwIDUwIDUwIiBrZXlUaW1lcz0iMDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+ICA8L2NpcmNsZT48L3N2Zz4=");
background-size: auto calc(min(50%, 400px));
}
</style>
<script type="text/javascript" src="src/bokeh-2.4.3.min.js"></script>
<script type="text/javascript" src="src/bokeh-gl-2.4.3.min.js"></script>
<script type="text/javascript" src="src/bokeh-widgets-2.4.3.min.js"></script>
<script type="text/javascript" src="src/bokeh-tables-2.4.3.min.js"></script>
<script type="text/javascript" src="src/bokeh-mathjax-2.4.3.min.js"></script>
<script type="text/javascript" src="src/panel.min.js"></script>
<script type="text/javascript">
Bokeh.set_log_level("info");
</script>
<script defer src="src/pyscript.js"></script><!-- Template CSS -->
<link rel="stylesheet"
href="https://cdn.holoviz.org/panel/0.14.4/dist/bundled/css/[email protected]/src/css/goldenlayout-base.css">
<link rel="stylesheet" href="https://cdn.holoviz.org/panel/0.14.4/dist/bundled/goldentemplate/golden.css">
<link rel="stylesheet" href="https://cdn.holoviz.org/panel/0.14.4/dist/bundled/defaulttheme/default.css">
<link rel="stylesheet" href="https://cdn.holoviz.org/panel/0.14.4/dist/bundled/goldentemplate/default.css">
<!-- Template JS -->
<script src="src/jquery.slim.min.js"></script>
<script src="src/goldenlayout.min.js"></script>
</head>
<body class="bk pn-loading arc">
<header class="app-bar" id="header" style="background-color: #008835 !important;">
<div style="display: contents;">
<div class="app-header">
<a class="title" href="/">Interactive Electrochemistry</a><span class="title">-</span><a class="title" href="">
Equivalent Circuit 'R0-(R1,C1)'</a>
</div>
<section class="header-contents">
</section>
<div class="pn-busy-container">
<div class="bk-root" id="709a63d3-04c3-4da3-820a-a5dcd0313a60" data-root-id="1230"></div>
</div>
</div>
</header>
<div class="main-area header-adjust" id="main">
<main class="main-content" id="main-content"></main>
<div id="pn-Modal" class="pn-modal header-adjust">
<div class="pn-modal-content">
<span class="pn-modalclose" id="pn-closeModal">×</span>
</div>
</div>
</div>
<script>
var config = {
content: [
{
type: 'row',
content: [
{
type: 'component',
componentName: 'view',
componentState: {
title: "Sidebar",
model: '<div class="sidebar-contents"> <div class="bk-root" id="d3535a6e-9255-436e-86a0-7de4ebb6e433" data-root-id="1303"></div> <div class="bk-root" id="bea27ce8-edbb-4edc-9ca3-d5bbc8a37bf8" data-root-id="1326"></div> <div class="bk-root" id="95611a68-c1cf-463f-9463-80e18b0066a5" data-root-id="1396"></div> <div class="bk-root" id="edb5594e-ca23-4886-8cf3-483b67af5c25" data-root-id="1419"></div> </div>'
},
width: 16,
isClosable: false
},
{
type: 'stack',
width: 100 - 16,
content: [
{
type: 'component',
componentName: 'view',
componentState: {
model: '<div class="bk-root" id="644e5092-58a6-4d2b-bc02-acc2558d46a4" data-root-id="1231"></div>',
title: ""
},
},
]
}
]
}
],
settings: {
showPopoutIcon: false
}
};
var myLayout = new GoldenLayout(config, $('#main-content'));
var resizing = false;
var resize_dispatcher = () => {
resizing = true;
window.dispatchEvent(new Event("resize"))
resizing = false;
}
myLayout.registerComponent('view', function (container, componentState) {
const { width, css_classes } = componentState
if (width) {
container.on('open', () => container.setSize(width, container.height))
}
if (css_classes) {
css_classes.map((item) => container.getElement().addClass(item))
}
container.setTitle(componentState.title)
container.getElement().html(componentState.model);
container.on("resize", resize_dispatcher)
})
// Absolute hackery to get GoldenLayout to initialize even though
// document is not ready. Without this bokeh will complain that
// DOM nodes to render roots into are not initialized in time.
Object.defineProperty(document, 'readyState', {
get() { return readyState },
set(value) { return readyState = value },
});
document.readyState = 'complete'
myLayout.init()
window.addEventListener('resize', (event) => {
if (!resizing) {
myLayout.updateSize($('#main-content').width(), $('#main-content').height())
}
});
var modal = document.getElementById("pn-Modal");
var span = document.getElementById("pn-closeModal");
span.onclick = function () {
modal.style.display = "none";
}
window.onclick = function (event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>
<div class="bk-root" id="e8193e02-1887-41b9-acf3-d5a64e9e011c" data-root-id="1227"></div>
<div class="bk-root" id="43495ab8-8ba6-4abd-87a9-ea5ebd92e99e" data-root-id="1229"></div>
<div class="bk-root" id="ba04bee4-d589-4c6d-b36d-752302bfc57b" data-root-id="1225"></div>
<py-config>
packages =
['https://cdn.holoviz.org/panel/0.14.4/dist/wheels/bokeh-2.4.3-py3-none-any.whl','https://cdn.holoviz.org/panel/0.14.4/dist/wheels/panel-0.14.4-py3-none-any.whl','pyodide-http==0.1.0','numpy']
</py-config>
<py-script>
import asyncio
from panel.io.pyodide import init_doc, write_doc
init_doc()
"""
This is a Python + Panel-based interactive visualisation of the frequency
dependent impedance of a simple electrical circuit (otherwise known as
equivalent circuit or equivalent circuit model in electrochemistry), 'R0-p(R1,C1)''.
The data is displayed in a Complex plane plot (or) Nyquist plot (Plot 1) and a Bode plot (Plot 2).
"""
import numpy as np
import panel as pn
from bokeh.models.formatters import PrintfTickFormatter
from bokeh.models import ColumnDataSource
from bokeh.plotting import figure
pn.extension(sizing_mode="stretch_width")
# Creation of sliders, radio and toggle buttons, etc.
# ------------
r0 = pn.widgets.EditableFloatSlider(start=1, end=20, value=10, step=0.5,
format=PrintfTickFormatter(
format='%.1f Ohm'),
bar_color='#ff0000')
r1 = pn.widgets.EditableFloatSlider(start=1, end=40, value=20, step=0.5,
format=PrintfTickFormatter(
format='%.1f Ohm'),
bar_color='#ff0000')
c1 = pn.widgets.EditableFloatSlider(start=1e-6, end=1e-4, value=1e-5, step=1e-6,
format=PrintfTickFormatter(
format='%.6f F'),
bar_color='#ff00ff')
fstart = pn.widgets.EditableFloatSlider(start=1000 / 2, end=10000000,
value=9685000, step=500,
format=PrintfTickFormatter(
format='%.0f Hz'),
bar_color='#3339ff')
fstop = pn.widgets.EditableFloatSlider(start=1000000 / 10000000, end=1000 / 2,
value=0.09685000, step=0.001 / 2,
format=PrintfTickFormatter(
format='%.3f Hz'),
bar_color='#3339ff')
pts_per_decade = pn.widgets.EditableFloatSlider(start=1, end=15, value=12,
step=1,
format=PrintfTickFormatter(
format='%.0f'),
bar_color='#000000')
Line_and_Markers_Checkbox = pn.widgets.Checkbox(
name='Check the box to display \'Line along with Markers\'', value=True)
plot1width = pn.widgets.EditableIntSlider(start=200, end=800, value=450,
step=25,
format=PrintfTickFormatter(
format='%.0f #unit'),
bar_color='#808080', max_width=400)
plot2width = pn.widgets.EditableIntSlider(start=200, end=800, value=450,
step=25,
format=PrintfTickFormatter(
format='%.0f #unit'),
bar_color='#808080', max_width=400)
plot1height = pn.widgets.EditableIntSlider(start=200, end=800, value=450,
step=25,
format=PrintfTickFormatter(
format='%.0f #unit'),
bar_color='#808080', max_width=400)
plot2height = pn.widgets.EditableIntSlider(start=200, end=800, value=450,
step=25,
format=PrintfTickFormatter(
format='%.0f #unit'),
bar_color='#808080', max_width=400)
range_setting = np.logspace(np.log10(fstart.value), np.log10(fstop.value), (
int((np.log10(fstart.value) - np.log10(fstop.value))) * 12))
plot1_range_axis = pn.widgets.EditableRangeSlider(start=0, end=80, step=1,
value=(0, 60),
format=PrintfTickFormatter(
format='%.1f Ohm'),
bar_color='#ff0000')
plot2_range_xaxis = pn.widgets.EditableRangeSlider(start=min(range_setting),
end=max(range_setting),
step=0.0001,
value=(min(range_setting),
max(range_setting)),
format=PrintfTickFormatter(
format='%.1f Hz'),
bar_color='#ff0000')
plot2_range_yaxis = pn.widgets.EditableRangeSlider(start=0, end=80,
step=1,
value=(0, 60),
format=PrintfTickFormatter(
format='%.5f Ohm'),
bar_color='#ff0000')
reset_button = pn.widgets.Toggle(name='Press me twice to Reset',
button_type='danger', max_width=400-20)
plot_properties_radio = pn.widgets.RadioButtonGroup(name='Radio Button Group',
options=['Default',
'Manual'],
button_type='success',
max_width=400-20)
# Creation of Markdowns for sliders, radio and toggle buttons, etc.
# ------------
r0_Markdown = pn.pane.Markdown("""Ohmic (or) Solution resistance: $$R_0$$""")
r1_Markdown = pn.pane.Markdown(
r"""Reaction resistance: $$R_1$$""")
c1_Markdown = pn.pane.Markdown("""Double layer capacitance: $$C_1$$""")
fstart_Markdown = pn.pane.Markdown("Start frequency: $$f_{start}$$""")
fstop_Markdown = pn.pane.Markdown(
"""Stop frequency: $$f_{stop}$$""")
pts_per_decade_Markdown = pn.pane.Markdown("""Points per decade:""")
Slider_Markdown_heading = pn.pane.Markdown(
'### Editable Sliders for Variables')
# Creation of Markdowns for other parts
# ------------
Info_Markdown = pn.pane.Markdown("""
##Equivalent Circuit 'R0-p(R1,C1)'
Elements in series are separated by a dash '**-**', and those in parallel are written in '**p( , )**', where
elements are separated by a comma '**,**'.
Here, an interactive visualization for the equivalent circuit '**R0-p(R1,C1)**' is presented.
All the elements are grouped under '*System / Observation Parameters*' dropdown and can be varied. Start, stop
frequencies, and resolution of measurement can be adjusted using sliders present under a second '*Measurement
Parameters*' dropdown.
---
$$ Z_{R_{0}} = R_{0}$$
$$Z_{C_{1}} = -\\frac{j}{\\omega * C_{1}}$$ (or) $$ \\frac{1}{j* \\omega * C_{1}}$$
$$Z_{R_{1}C_{1}} = \\biggl(\\frac{1}{ \\frac{1}{Z_{R_{1}}} + \\frac{1}{Z_{C_{1}}}} \\biggl)$$
---
## $$Z = Z_{R_{0}} + Z_{R_{1}C_{1}}$$
in words, **R0 in series with parallel of (R1, C1)**
---
""", max_width=400)
plot_properties_Markdown = pn.pane.Markdown("""
#### Use the below radio button group to choose between 'Default' and 'Manual' setting for plot properties - size
and range
""", max_width=400)
# Non-Interactive (I-0) and Interactive (I-1) Function(s)
# Function 1 (I-0) to Generate angular frequency range
# ------------
def ang_freq_range(fstart, fstop, pts_per_decade):
"""returns an angular frequency range as a numpy array,
between fstart [Hz] and fstop [Hz], with a set number
of points per decade"""
decades = np.log10(fstart) - np.log10(fstop)
pts_total = np.around(decades * pts_per_decade)
frange = np.logspace(np.log10(fstop), np.log10(fstart), num=int(pts_total),
endpoint=True)
return 2 * np.pi * frange
# ------------#
# Function 2 (I-0) to Reset all sliders to their default state
# ------------
def reset_variable_values():
"""
Returns pre-fixed default non-plot property slider values,
which replaces the existing variable values in the calling function
Input
=====
none
Output
=====
default non-plot property slider values to overwrite existing ones in the
calling function
"""
r0.value = 10
r1.value = 20
c1.value = 1e-5
fstart.value = 9685000
fstop.value = 0.09685
pts_per_decade.value = 12
return r0.value, r1.value, c1.value, fstart.value, fstop.value, pts_per_decade.value
# ------------#
# Function 3 (I-0) to Reset the plot property sliders i.e., size
# ------------
def reset_plot_size_values():
"""
Returns pre-fixed default plot size slider values,
which replaces the existing plot size values in the calling function.
Input
=====
none
Output
=====
default plot size slider values to overwrite existing ones in the calling
function
"""
plot1width.value = 450
plot1height.value = 450
plot2width.value = 450
plot2height.value = 450
return plot1width.value, plot1height.value, plot2width.value, plot2height.value
# ------------#
# Function 4 (I-0) to Reset the plot property sliders i.e., plot range
# ------------
def reset_plot_range_values():
"""
Returns pre-fixed default plot range slider values,
which replaces the existing plot range values in the calling function
Input
=====
none
Output
=====
default plot range slider values to overwrite existing ones in the calling
function
"""
plot1_range_axis.value = (0, 60)
plot2_range_xaxis.value = (min(range_setting), max(range_setting))
plot2_range_yaxis.value = (0, 60)
return plot1_range_axis.value, plot2_range_xaxis.value, plot2_range_yaxis.value
# ------------#
# Function 5 (I-0) to Return the calculated complex impedance of the circuit
# ------------
def z_r0_r1c1(r0, r1, c1, w):
"""
Returns the impedance of a 'R0-p(R1,C1)' circuit.
Input
=====
R0 = series resistance (Ohmic resistance) of circuit
R1 = resistance of parallel connected circuit element
C1 = capacitance of parallel connected circuit element
w = angular frequency
Output
======
The frequency dependent impedance as a complex number.
"""
z_r0 = r0
z_r1 = r1
z_c1 = -1j / (w * c1) # capacitive reactance
z_r1c1 = 1 / (1 / z_r1 + 1 / z_c1) # parallel connection
return z_r0 + z_r1c1 # Z_R0 and Z_R1,C1 connected in series
# ------------#
# Function 6 (I-1) to Calculate, and update Nyquist and Bode plots while also,
# updating when any parameter is changed
# ------------
@pn.depends(r0.param.value, r1.param.value, c1.param.value,
fstart.param.value, fstop.param.value, pts_per_decade.param.value,
plot1width.param.value, plot1height.param.value,
plot2width.param.value, plot2height.param.value,
plot_properties_radio.param.value, reset_button.param.value,
plot1_range_axis.param.value, plot2_range_xaxis.param.value,
plot2_range_yaxis.param.value, Line_and_Markers_Checkbox.param.value)
def z(r0, r1, c1, fstart, fstop, pts_per_decade,
plot1width, plot1height, plot2width, plot2height,
setting, reset, plot1_range_axis,
plot2_range_xaxis, plot2_range_yaxis, line_and_markers_checkbox):
"""
Returns the complex plane/nyquist plot and bode plot, reset the
plot properties mode, reset all sliders to their default state.
Input
=====
R0 = ohmic/solution/series resistance of circuit
R1 = resistance of parallel connected circuit element
C1 = capacitance of parallel connected circuit element
fstart = start frequency
fstop = stop frequency
pts_per_decade = resolution i.e., sampling points per decade
plot sizes
plot ranges
state of toggle to reset all sliders
plot properties mode between Default and Manual
Output
======
Nyquist and Bode plots with computed Impedance
"""
plot1_x_left = plot1_range_axis[0]
plot1_x_right = plot1_range_axis[1]
plot1_y_bottom = plot1_range_axis[0]
plot1_y_top = plot1_range_axis[1]
plot2_x_left = plot2_range_xaxis[0]
plot2_x_right = plot2_range_xaxis[1]
plot2_y_bottom = plot2_range_yaxis[0]
plot2_y_top = plot2_range_yaxis[1]
if reset is True:
reset_variable_values()
reset_plot_size_values()
if setting == 'Default':
reset_plot_size_values()
w = ang_freq_range(fstart, fstop, pts_per_decade)
z = z_r0_r1c1(r0, r1, c1, (w / 2 * np.pi))
if setting == 'Default':
plot2_y_top = 20
plot1_nyquist = ColumnDataSource(data=dict(x=z.real, y=-1 * z.imag))
plot2_bode = ColumnDataSource(data=dict(x=w / (2 * np.pi), y=-1 * z.imag))
plot1 = figure(name='Plot 1', title="Nyquist Plot", aspect_ratio=1,
tools="pan, wheel_zoom, box_zoom, reset, save, box_select",
x_axis_label="Z Real [Ohm]",
y_axis_label="-Z Imaginary [Ohm]",
width=plot1width, height=plot1width,
x_range=(plot1_x_left, plot1_x_right),
y_range=(plot1_y_bottom, plot1_y_top))
plot1.circle('x', 'y', source=plot1_nyquist, line_width=2, color="blue")
if line_and_markers_checkbox is True:
plot1.line('x', 'y', source=plot1_nyquist, line_width=2, color="blue")
plot1.circle('x', 'y', source=plot1_nyquist,
line_width=2, color="blue")
plot2 = figure(name='Plot 2', title="Bode Plot", aspect_ratio=1,
tools="pan,wheel_zoom, box_zoom, reset, save, box_select",
x_axis_type="log", y_axis_type="linear",
x_axis_label="frequency [Hz]",
y_axis_label="-Z Imaginary [Ohm]",
width=plot2width, height=plot2height,
x_range=(plot2_x_left, plot2_x_right),
y_range=(plot2_y_bottom, plot2_y_top))
plot2.circle('x', 'y', source=plot2_bode, line_width=2, color="blue")
if line_and_markers_checkbox is True:
plot2.line('x', 'y', source=plot2_bode,
line_width=2, color="blue")
plot2.circle('x', 'y', source=plot2_bode,
line_width=2, color="blue")
if setting == 'Default':
plot1 = figure(name='Plot 1', title="Nyquist Plot", aspect_ratio=1,
tools="pan, wheel_zoom, box_zoom, reset, save, box_select",
x_axis_label="Z Real [Ohm]",
y_axis_label="-Z Imaginary [Ohm]",
width=plot1width, height=plot1width,
x_range=(plot1_x_left, plot1_x_right),
y_range=(plot1_y_bottom, plot1_y_top))
plot1.circle('x', 'y', source=plot1_nyquist,
line_width=2, color="blue")
if line_and_markers_checkbox is True:
plot1.line('x', 'y', source=plot1_nyquist,
line_width=2, color="blue")
plot1.circle('x', 'y', source=plot1_nyquist,
line_width=2, color="blue")
plot2 = figure(name='Plot 2', title="Bode Plot", aspect_ratio=1,
tools="pan,wheel_zoom,box_zoom,reset,save,box_select",
x_axis_type="log", y_axis_type="linear",
x_axis_label="frequency [Hz]",
y_axis_label='-Z Imaginary [Ohm]',
y_range=(plot2_y_bottom, plot2_y_top),
width=plot2width, height=plot2height)
plot2.circle('x', 'y', source=plot2_bode, line_width=2, color="blue")
if line_and_markers_checkbox is True:
plot2.line('x', 'y', source=plot2_bode,
line_width=2, color="blue")
plot2.circle('x', 'y', source=plot2_bode,
line_width=2, color="blue")
return pn.Column(pn.Tabs(plot1, width=plot1width+100,
height=plot1width+100, closable=True),
pn.Tabs(plot2, width=plot2width+100,
height=plot2height+100, closable=True))
# ------------#
# Function 7 (I-1) to Select between Default and Manual mode for plot size, and
# range parameters.
# ------------
@pn.depends(plot_properties_radio.param.value, reset_button.param.value)
def set_and_reset_plot_size_and_limits(setting, reset):
"""
Returns Default message or shows Manual mode with plot size and range sliders.
Further, also take in the state of Radio and Toggle panes to set the modes,
and reset the size and range values.
Input
=====
State of Reset panel-'Toggle' button
Output
=====
Display plot properties panel-Sliders grouped under 'Default' and 'Manual'
panel-Radio button
"""
text = """
### Default mode enabled!
<hr>
"""
plot1_limits = pn.Column(plot1_range_axis)
plot2_xlimits = pn.Column(plot2_range_xaxis)
plot2_ylimits = pn.Column(plot2_range_yaxis)
if reset is True:
reset_plot_size_values()
reset_plot_range_values()
if setting == 'Default':
return pn.pane.Alert(text, alert_type="success", max_width=400-10)
return pn.Column('### Plot size',
pn.Accordion(('Nyquist plot width', plot1width),
('Nyquist plot height', plot1height),
('Bode plot width', plot2width),
('Bode plot height', plot2height),
max_width=400, header_color='#FFFFFF',
header_background='#008835',
active_header_background='#008835'),
'### Plot range', pn.Accordion(
('Nyquist plot limits', plot1_limits),
('Bode plot x-axis limits', plot2_xlimits),
('Bode plot y-axis limits', plot2_ylimits), max_width=400,
header_color='#FFFFFF', header_background='#008835',
active_header_background='#008835'))
# Function 8 (I-1) to Display and Update all butler-volmer current slider variables
# ------------
@pn.depends(reset_button.param.value)
def changing_variables(reset):
"""
Returns a Markdown/Heading of the section with a current density display,
and Accordion(s) with variable sliders grouped under. Additionally,
the slider variable values will also be reset to Default if reset button
is pressed twice.
Input
=====
State of Reset panel-'Toggle' button
Output
=====
Reset the all sliders and output the grouped panel-sliders
under respective heading and accordion(s)
"""
if reset is True:
reset_variable_values()
tab1 = pn.Column(r0_Markdown, r0, r1_Markdown, r1, c1_Markdown, c1)
tab2 = pn.Column(fstart_Markdown, fstart, fstop_Markdown, fstop,
pts_per_decade_Markdown, pts_per_decade)
return pn.Column(Slider_Markdown_heading,
pn.Accordion(
('System / Observation parameters', tab1),
('Measurement parameters', tab2),
header_color='#FFFFFF',
header_background='#008835',
active_header_background='#008835', max_width=400))
# ------------
Info = z
plot_properties = pn.Column(Line_and_Markers_Checkbox, plot_properties_Markdown, plot_properties_radio,
set_and_reset_plot_size_and_limits)
pn.template.GoldenTemplate(accent_base_color='#008835',
header_background='#008835',
site="Interactive Electrochemistry",
title=" Equivalent Circuit 'R0-(R1,C1)'",
sidebar=[Info_Markdown, changing_variables,
reset_button, plot_properties],
main=[Info], sidebar_width=16).servable(target='simple_app')
asyncio.ensure_future(write_doc());
</py-script>
<script type="application/json" id="1629">
{"6be48433-6511-4961-a799-5ef16684a004":{"defs":[{"extends":null,"module":null,"name":"ReactiveHTML1","overrides":[],"properties":[]},{"extends":null,"module":null,"name":"FlexBox1","overrides":[],"properties":[{"default":"flex-start","kind":null,"name":"align_content"},{"default":"flex-start","kind":null,"name":"align_items"},{"default":"row","kind":null,"name":"flex_direction"},{"default":"wrap","kind":null,"name":"flex_wrap"},{"default":"flex-start","kind":null,"name":"justify_content"}]},{"extends":null,"module":null,"name":"GridStack1","overrides":[],"properties":[{"default":"warn","kind":null,"name":"mode"},{"default":null,"kind":null,"name":"ncols"},{"default":null,"kind":null,"name":"nrows"},{"default":true,"kind":null,"name":"allow_resize"},{"default":true,"kind":null,"name":"allow_drag"},{"default":[],"kind":null,"name":"state"}]},{"extends":null,"module":null,"name":"click1","overrides":[],"properties":[{"default":"","kind":null,"name":"terminal_output"},{"default":"","kind":null,"name":"debug_name"},{"default":0,"kind":null,"name":"clears"}]},{"extends":null,"module":null,"name":"NotificationAreaBase1","overrides":[],"properties":[{"default":"bottom-right","kind":null,"name":"position"},{"default":0,"kind":null,"name":"_clear"}]},{"extends":null,"module":null,"name":"NotificationArea1","overrides":[],"properties":[{"default":[],"kind":null,"name":"notifications"},{"default":"bottom-right","kind":null,"name":"position"},{"default":0,"kind":null,"name":"_clear"},{"default":[{"background":"#ffc107","icon":{"className":"fas fa-exclamation-triangle","color":"white","tagName":"i"},"type":"warning"},{"background":"#007bff","icon":{"className":"fas fa-info-circle","color":"white","tagName":"i"},"type":"info"}],"kind":null,"name":"types"}]},{"extends":null,"module":null,"name":"Notification","overrides":[],"properties":[{"default":null,"kind":null,"name":"background"},{"default":3000,"kind":null,"name":"duration"},{"default":null,"kind":null,"name":"icon"},{"default":"","kind":null,"name":"message"},{"default":null,"kind":null,"name":"notification_type"},{"default":false,"kind":null,"name":"_destroyed"}]},{"extends":null,"module":null,"name":"TemplateActions1","overrides":[],"properties":[{"default":0,"kind":null,"name":"open_modal"},{"default":0,"kind":null,"name":"close_modal"}]},{"extends":null,"module":null,"name":"MaterialTemplateActions1","overrides":[],"properties":[{"default":0,"kind":null,"name":"open_modal"},{"default":0,"kind":null,"name":"close_modal"}]}],"roots":{"references":[{"attributes":{"fill_alpha":{"value":0.2},"fill_color":{"value":"blue"},"hatch_alpha":{"value":0.2},"hatch_color":{"value":"blue"},"line_alpha":{"value":0.2},"line_color":{"value":"blue"},"line_width":{"value":2},"x":{"field":"x"},"y":{"field":"y"}},"id":"1170","type":"Circle"},{"attributes":{"align":"end","margin":[0,0,0,0],"name":"","sizing_mode":"stretch_width"},"id":"1359","type":"Div"},{"attributes":{},"id":"1176","type":"DataRange1d"},{"attributes":{"source":{"id":"1015"}},"id":"1172","type":"CDSView"},{"attributes":{"aspect_ratio":1,"below":[{"id":"1184"}],"center":[{"id":"1187"},{"id":"1191"}],"height":450,"left":[{"id":"1188"}],"name":"Plot 2","renderers":[{"id":"1211"},{"id":"1217"},{"id":"1223"}],"title":{"id":"1174"},"toolbar":{"id":"1200"},"width":450,"x_range":{"id":"1176"},"x_scale":{"id":"1180"},"y_range":{"id":"1178"},"y_scale":{"id":"1182"}},"id":"1173","subtype":"Figure","type":"Plot"},{"attributes":{"children":[{"id":"1330"},{"id":"1352"}],"margin":[0,0,0,0],"max_width":400,"name":"Accordion00254","sizing_mode":"stretch_width"},"id":"1329","type":"Column"},{"attributes":{"align":"end","css_classes":["slider-edit"],"js_property_callbacks":{"change:value":[{"id":"1538"}]},"margin":[0,0,0,0],"min_width":75,"placeholder":"0","step":500,"value":9685000,"value_throttled":0,"width":75},"id":"1360","type":"Spinner"},{"attributes":{"children":[{"id":"1364"},{"id":"1367"}],"margin":[5,10,5,10],"min_width":300,"name":"Column00129","width":300},"id":"1363","type":"Column"},{"attributes":{"children":[{"id":"1336"},{"id":"1339"}],"margin":[5,10,5,10],"min_width":300,"name":"Column00101","width":300},"id":"1335","type":"Column"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"blue"},"hatch_alpha":{"value":0.1},"hatch_color":{"value":"blue"},"line_alpha":{"value":0.1},"line_color":{"value":"blue"},"line_width":{"value":2},"x":{"field":"x"},"y":{"field":"y"}},"id":"1169","type":"Circle"},{"attributes":{"coordinates":null,"data_source":{"id":"1015"},"glyph":{"id":"1162"},"group":null,"hover_glyph":null,"muted_glyph":{"id":"1164"},"nonselection_glyph":{"id":"1163"},"view":{"id":"1166"}},"id":"1165","type":"GlyphRenderer"},{"attributes":{},"id":"1249","type":"BasicTickFormatter"},{"attributes":{},"id":"1250","type":"AllLabels"},{"attributes":{"children":[{"id":"1365"},{"id":"1366"}],"margin":[0,0,0,0],"name":"Row00134","sizing_mode":"stretch_width"},"id":"1364","type":"Row"},{"attributes":{"ticker":null},"id":"1252","type":"LogTickFormatter"},{"attributes":{"align":"end","margin":[0,0,0,0],"name":"","sizing_mode":"stretch_width"},"id":"1371","type":"Div"},{"attributes":{"align":"end","margin":[0,0,0,0],"name":"","sizing_mode":"stretch_width"},"id":"1365","type":"Div"},{"attributes":{"fill_color":{"value":"blue"},"hatch_color":{"value":"blue"},"line_color":{"value":"blue"},"line_width":{"value":2},"x":{"field":"x"},"y":{"field":"y"}},"id":"1168","type":"Circle"},{"attributes":{"align":"end","css_classes":["slider-edit"],"js_property_callbacks":{"change:value":[{"id":"1561"}]},"margin":[0,0,0,0],"min_width":75,"placeholder":"0","step":0.0005,"value":0.09685,"value_throttled":0,"width":75},"id":"1366","type":"Spinner"},{"attributes":{},"id":"1237","type":"AllLabels"},{"attributes":{"bar_color":"#3339ff","end":500.0,"format":{"id":"1006"},"margin":[0,0,5,0],"show_value":false,"sizing_mode":"stretch_width","start":0.1,"step":0.0005,"value":0.09685},"id":"1367","type":"Slider"},{"attributes":{"children":[{"id":"1348"},{"id":"1351"}],"margin":[5,10,5,10],"min_width":300,"name":"Column00115","width":300},"id":"1347","type":"Column"},{"attributes":{"name":"TemplateActions00262"},"id":"1228","type":"TemplateActions1"},{"attributes":{"css_classes":["markdown"],"margin":[5,5,5,5],"name":"Markdown00213","sizing_mode":"stretch_width","text":"&lt;p&gt;Points per decade:&lt;/p&gt;"},"id":"1368","type":"panel.models.markup.HTML"},{"attributes":{"bottom_units":"screen","coordinates":null,"fill_alpha":0.5,"fill_color":"lightgrey","group":null,"left_units":"screen","level":"overlay","line_alpha":1.0,"line_color":"black","line_dash":[4,4],"line_width":2,"right_units":"screen","syncable":false,"top_units":"screen"},"id":"1199","type":"BoxAnnotation"},{"attributes":{"line_alpha":0.2,"line_color":"blue","line_width":2,"x":{"field":"x"},"y":{"field":"y"}},"id":"1164","type":"Line"},{"attributes":{"css_classes":["loader","light"],"height":20,"margin":[5,10,5,10],"name":"busy_indicator","sizing_mode":"fixed","width":20},"id":"1230","type":"panel.models.markup.HTML"},{"attributes":{"axis_label":"frequency [Hz]","coordinates":null,"formatter":{"id":"1252"},"group":null,"major_label_policy":{"id":"1253"},"ticker":{"id":"1185"}},"id":"1184","type":"LogAxis"},{"attributes":{},"id":"1180","type":"LogScale"},{"attributes":{"children":[{"id":"1232"}],"margin":[10,15,10,10],"name":"140678578550144","sizing_mode":"stretch_width","tags":["main"]},"id":"1231","type":"Row"},{"attributes":{"data":{"x":{"__ndarray__":"DJa88///PUB/Ue3t//89QLR4XeX//z1ADEK/2P//PUD3wibG//89QJEGv6r//z1AGadbgv//PUB9GtZG//89QAnrHe/+/z1A2FjXbf7/PUB7lFKv/f89QPNFjJb8/z1AMIPC+Pr/PUBy//GW+P89QMOtPRT1/z1AKObK5+//PUBZFetH6P89QK89Zwvd/z1ATZVBfMz/PUAqVQwVtP89QJZBtR6Q/z1ArhzfH1v/PUBhlt8HDf89QBtGMvWZ/j1AXkQtaPD9PUCGXeic9vw9QOiRp6eG+z1ACHTCwWj5PUDAJuz0SvY9QCVaLvq08T1AS7vzq/bqPUCsAlDXDuE9QEm1upeH0j1AdGWK7kS9PUDsF2h7Qp49QMBPXEU/cT1A0vVtp1wwPUD8pSx4w9M8QLLtCS99UTxAumZ77tedO0Du0dM+16w6QH4uFp8wdTlAyuzyfsn0N0CU8P2AXDU2QO7Eaf5qTjRAyurzTbphMkC+9s1FqJIwQEHZ+F1B+S1AMeCUhHZbK0BnHETOU04pQHkQ0xq9widAKvv7zp6hJkDOi/3Y9NIlQL07Hp2QQSVAzEH25GvcJEB6Kzmtm5YkQCAjmA6uZiRAk7l39uVFJECYjWqRiC8kQNEjB0RNICRAbsapxPAVJEBWXwDc5Q4kQPqzehYdCiRAjbsoX90GJEAT6a+2qAQkQIt2xW0pAyRAa6PrSSUCJEDyFRS+dAEkQAdwLe/8ACRAu+n6oasAJEAWWIt2dAAkQN4B0AZPACRAObKonzUAJEDs4eZiJAAkQNHQnLAYACRAP//VwBAAJEDFFS1eCwAkQFaFsLYHACRAO/rqOwUAJEBLHjKNAwAkQIZR7mgCACRAYaWdogEAJEDhxgwcAQAkQDSlvcAAACRAaY3IggAAJEACFL5YAAAkQNg/NzwAACRAn/LbKAAAJEDYjLkbAAAkQK8C0BIAACRAz+HDDAAAJEATaKkIAAAkQHSc4AUAACRAc/L8AwAAJEBNwrQCAAAkQIcR1gEAACRA","dtype":"float64","order":"little","shape":[96]},"y":{"__ndarray__":"RMnCqm1Sbz/YjaswGANzP0mMY6KKFHc/9yv9mdUEfD+U7ToT1AGBP2YzE61ypYQ/1CIamGkQiT9vFCaDYG2OP3r7pc8PeJI/6ClHxcFrlj8VwzQV7jebP6MSTlRzhaA/KJAAOnMOpD+YbdYOGFmoP+DBk0rQjq0/Mq70kfPwsT/gSaiytMe1P3WRlMC4cLo/4k4qJnwMwD/HRb+fg3vDP4Mov/GPpsc/NPuopM21zD8uCXIe+2zRP2Hd37UNJ9U/Ftp+oeas2T9SHSSZ1CnfP5049oQX6eI/aGUOEYvy5j9wOjIQN9frPxroe49B4vA/4bLNrTB49D+kOn7zHM34P+I6V6qsBf4/TyERV5IlAkBNfOahAuUFQMNtlq9eVwpAdsHH3pOPD0CP7OtHxMsSQCscyLJ8MxZAu+rs40/rGUA/aHBzqMgdQIjbkfMzwiBAQyXQAUheIkCkEt0elYEjQMw/FOuY/SNAwg40/4O8I0D2hCZ778kiQBk4WzEmTiFA0kmTB4r+HkBVXySItyIbQDW8yTcmWRdAZUKzrQzVE0CvhniUgrAQQJWFp16U5wtABZnQIHM4B0DD+UG2ykIDQILMfQP14f8/FHLDwQ9Z+j9EBLX/YsD1P0QLXBbA8fE/c9RtLMiX7T+j73EUxGToP5xVsVh2GuQ/RGo2wq+Q4D9/kCLz8EvbP3rOIWUUfdY/y2dR1MyG0j/qAROyLobOPxmgN4QjJck/EXiPT6+2xD9aJolgHhDBP/kQssd6HLw/Ss11hRMotz/ldH7NNxOzP4UrKfgGba8/3ogVOAXjqT/3bHbF8VKlP+H+nQXAkKE/ngQTHE3wnD++qewkgtaXP5wjYeLfopM/fN3MFdUskD/RvZPd7aWKPwYvKOV884U/omM6d/0Ugj8z2ts4KMp9Pxs9sQj2iXg/qTbR07E2dD+YzKKqmKZwPx7k+AOIbms/sZwlHbuYZj8ZB7dWG51iPx0lmeVnql4/MV/f5K5CWT/siM10285UP+1vLULwI1E/","dtype":"float64","order":"little","shape":[96]}},"selected":{"id":"1242"},"selection_policy":{"id":"1241"}},"id":"1015","type":"ColumnDataSource"},{"attributes":{"data":{"x":{"__ndarray__":"CRueXinLuD9JvbA0Txm+P7p1ovAIRcI/DisjT9Atxj/tRMd/vOzKP/hJI/XPV9A/jFkugA3X0z9xL46q2hXYP/rlj9A0Pd0/U7C+Um+/4T/1U5lToIvlP5+I+S/YJ+o/Hb3/OprA7z9gllwP+EXzP12U8M25Zfc/NyUL92Nn/D+kCwWupj0BQPBvBl4S7gRAu21PrpNoCUDyS75vaNgOQH/tq5EHuRJAA9xT6aC6FkDqgxaurpcbQBfLLBqTvyBAfQRrjQRVJEAUmvbZxa4oQJ1qwprY9i1ASBi8uB0wMkD9LToyaxQ2QCiF3EvozTpAXf4AexlFQECGXob4VcBDQCOC3r5G+kdA3vxoO7obTUBYQ8sTHatRQAYGMOv0clVAJIkjbeUJWkCLTxj1PpxfQHnkwqbmL2NAkRIhje9KZ0BQrr0z3kZsQDZuYQnpKXFAnswcXBvWdEAaa/nre0t5QB0H3QYXtX5ArChWiZejgkD0LKqQmqCGQI5EWb4WeItAGBYq0WWskEC8osvKvD2UQNxYo9aCkphAS3G7donUnUBZQZN0ShuiQAgsHCkj+6VAdQiKZDevqkAv2fpteDKwQJfFqnO4qbNAn/DPZtLet0Cvh5n7Zfq8QMz2bRnilsFAaLHvwWVaxUAqKMT0FOzJQGyTC1ANeM9A+vq/gu4Z00D6wAn5QzDXQLnuda19JtxA82It/0EW4UDICs3KP77kQMUDWHmFLulAhmJsDu6R7kDKgtAMQI7yQNdTaASyhvZA2uFR+6JY+0Bfpkx9TpkAQRaKHbCPJgRBWGVsL2B2CEHlG22bYbINQaUUuwiPBhJBMft9EvjhFUGY4WShqZAaQexiiLXsHyBB+DbT0zSTI0GYszp+fcMnQXQ4PeU32SxBx3sCSb6CMUExo4C38kE1QREImJ9mzjlBuGcvHAVUP0FbTGWGDwRDQb48i+62FUdB3o+QOUIGTEGcbYd1sQJRQT36q4p/plRBWvhGMLARWUFOyx5Y7W5eQQEAAAABeWJB","dtype":"float64","order":"little","shape":[96]},"y":{"__ndarray__":"RMnCqm1Sbz/YjaswGANzP0mMY6KKFHc/9yv9mdUEfD+U7ToT1AGBP2YzE61ypYQ/1CIamGkQiT9vFCaDYG2OP3r7pc8PeJI/6ClHxcFrlj8VwzQV7jebP6MSTlRzhaA/KJAAOnMOpD+YbdYOGFmoP+DBk0rQjq0/Mq70kfPwsT/gSaiytMe1P3WRlMC4cLo/4k4qJnwMwD/HRb+fg3vDP4Mov/GPpsc/NPuopM21zD8uCXIe+2zRP2Hd37UNJ9U/Ftp+oeas2T9SHSSZ1CnfP5049oQX6eI/aGUOEYvy5j9wOjIQN9frPxroe49B4vA/4bLNrTB49D+kOn7zHM34P+I6V6qsBf4/TyERV5IlAkBNfOahAuUFQMNtlq9eVwpAdsHH3pOPD0CP7OtHxMsSQCscyLJ8MxZAu+rs40/rGUA/aHBzqMgdQIjbkfMzwiBAQyXQAUheIkCkEt0elYEjQMw/FOuY/SNAwg40/4O8I0D2hCZ778kiQBk4WzEmTiFA0kmTB4r+HkBVXySItyIbQDW8yTcmWRdAZUKzrQzVE0CvhniUgrAQQJWFp16U5wtABZnQIHM4B0DD+UG2ykIDQILMfQP14f8/FHLDwQ9Z+j9EBLX/YsD1P0QLXBbA8fE/c9RtLMiX7T+j73EUxGToP5xVsVh2GuQ/RGo2wq+Q4D9/kCLz8EvbP3rOIWUUfdY/y2dR1MyG0j/qAROyLobOPxmgN4QjJck/EXiPT6+2xD9aJolgHhDBP/kQssd6HLw/Ss11hRMotz/ldH7NNxOzP4UrKfgGba8/3ogVOAXjqT/3bHbF8VKlP+H+nQXAkKE/ngQTHE3wnD++qewkgtaXP5wjYeLfopM/fN3MFdUskD/RvZPd7aWKPwYvKOV884U/omM6d/0Ugj8z2ts4KMp9Pxs9sQj2iXg/qTbR07E2dD+YzKKqmKZwPx7k+AOIbms/sZwlHbuYZj8ZB7dWG51iPx0lmeVnql4/MV/f5K5CWT/siM10285UP+1vLULwI1E/","dtype":"float64","order":"little","shape":[96]}},"selected":{"id":"1255"},"selection_policy":{"id":"1254"}},"id":"1016","type":"ColumnDataSource"},{"attributes":{"active":[0],"labels":["Check the box to display 'Line along with Markers'"],"margin":[5,10,5,10],"sizing_mode":"stretch_width"},"id":"1420","type":"CheckboxGroup"},{"attributes":{"height":550,"margin":[0,0,0,0],"sizing_mode":"fixed","tabs":[{"id":"1245"}],"width":550},"id":"1233","type":"panel.models.tabs.Tabs"},{"attributes":{"active":0,"button_type":"success","labels":["Default","Manual"],"margin":[5,10,5,10],"max_width":380,"sizing_mode":"stretch_width"},"id":"1422","type":"RadioButtonGroup"},{"attributes":{"children":[{"id":"1327"}],"margin":[0,0,0,0],"name":"140678578552256","sizing_mode":"stretch_width","tags":["nav"]},"id":"1326","type":"Row"},{"attributes":{"child":{"id":"1121"},"closable":true,"name":"Plot 1","title":"Plot 1"},"id":"1245","type":"Panel"},{"attributes":{"coordinates":null,"group":null,"text":"Bode Plot"},"id":"1174","type":"Title"},{"attributes":{"format":"%.0f"},"id":"1007","type":"PrintfTickFormatter"},{"attributes":{"num_minor_ticks":10},"id":"1185","type":"LogTicker"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"blue"},"hatch_alpha":{"value":0.1},"hatch_color":{"value":"blue"},"line_alpha":{"value":0.1},"line_color":{"value":"blue"},"line_width":{"value":2},"x":{"field":"x"},"y":{"field":"y"}},"id":"1209","type":"Circle"},{"attributes":{"axis_label":"-Z Imaginary [Ohm]","coordinates":null,"formatter":{"id":"1249"},"group":null,"major_label_policy":{"id":"1250"},"ticker":{"id":"1189"}},"id":"1188","type":"LinearAxis"},{"attributes":{},"id":"1182","type":"LinearScale"},{"attributes":{},"id":"1236","type":"BasicTickFormatter"},{"attributes":{"axis":{"id":"1184"},"coordinates":null,"group":null,"ticker":null},"id":"1187","type":"Grid"},{"attributes":{"line_color":"blue","line_width":2,"x":{"field":"x"},"y":{"field":"y"}},"id":"1214","type":"Line"},{"attributes":{"bar_color":"#000000","end":15,"format":{"id":"1007"},"margin":[0,0,5,0],"show_value":false,"sizing_mode":"stretch_width","start":1,"value":12},"id":"1373","type":"Slider"},{"attributes":{"overlay":{"id":"1198"}},"id":"1197","type":"BoxSelectTool"},{"attributes":{},"id":"1192","type":"PanTool"},{"attributes":{"overlay":{"id":"1199"}},"id":"1194","type":"BoxZoomTool"},{"attributes":{"children":[{"id":"1424"}],"margin":[0,0,0,0],"name":"Row00225","sizing_mode":"stretch_width"},"id":"1423","type":"Row"},{"attributes":{"axis":{"id":"1188"},"coordinates":null,"dimension":1,"group":null,"ticker":null},"id":"1191","type":"Grid"},{"attributes":{"fill_alpha":{"value":0.2},"fill_color":{"value":"blue"},"hatch_alpha":{"value":0.2},"hatch_color":{"value":"blue"},"line_alpha":{"value":0.2},"line_color":{"value":"blue"},"line_width":{"value":2},"x":{"field":"x"},"y":{"field":"y"}},"id":"1222","type":"Circle"},{"attributes":{},"id":"1189","type":"BasicTicker"},{"attributes":{"css_classes":["markdown"],"margin":[5,5,5,5],"name":"Markdown00211","sizing_mode":"stretch_width","text":"&lt;p&gt;Stop frequency: $$f_{stop}$$&lt;/p&gt;"},"id":"1362","type":"panel.models.markup.HTML"},{"attributes":{"coordinates":null,"data_source":{"id":"1016"},"glyph":{"id":"1220"},"group":null,"hover_glyph":null,"muted_glyph":{"id":"1222"},"nonselection_glyph":{"id":"1221"},"view":{"id":"1224"}},"id":"1223","type":"GlyphRenderer"},{"attributes":{"child":{"id":"1173"},"closable":true,"name":"Plot 2","title":"Plot 2"},"id":"1258","type":"Panel"},{"attributes":{"children":[{"id":"1420"},{"id":"1421"},{"id":"1422"},{"id":"1423"}],"margin":[0,0,0,0],"name":"140678578547936","sizing_mode":"stretch_width","tags":["nav"]},"id":"1419","type":"Column"},{"attributes":{"source":{"id":"1016"}},"id":"1224","type":"CDSView"},{"attributes":{"format":"%.1f Ohm"},"id":"1003","type":"PrintfTickFormatter"},{"attributes":{"line_alpha":0.1,"line_color":"blue","line_width":2,"x":{"field":"x"},"y":{"field":"y"}},"id":"1215","type":"Line"},{"attributes":{},"id":"1130","type":"LinearScale"},{"attributes":{"children":[{"id":"1370"},{"id":"1373"}],"margin":[5,10,5,10],"min_width":300,"name":"Column00136","width":300},"id":"1369","type":"Column"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"blue"},"hatch_alpha":{"value":0.1},"hatch_color":{"value":"blue"},"line_alpha":{"value":0.1},"line_color":{"value":"blue"},"line_width":{"value":2},"x":{"field":"x"},"y":{"field":"y"}},"id":"1221","type":"Circle"},{"attributes":{"css_classes":["markdown"],"margin":[5,5,5,5],"name":"Markdown00215","sizing_mode":"stretch_width","text":"&lt;h3&gt;Editable Sliders for Variables&lt;/h3&gt;"},"id":"1328","type":"panel.models.markup.HTML"},{"attributes":{"args":{"slider":{"id":"1339"},"source":{"id":"1338"}},"code":"try { \n if (cb_obj.value < slider.start)\n slider.start = cb_obj.value\n else if (cb_obj.value > slider.end)\n slider.end = cb_obj.value\n } catch(err) { console.log(err) }","tags":[[140678577557504,[null,"value"],[null,null]]]},"id":"1469","type":"CustomJS"},{"attributes":{"coordinates":null,"data_source":{"id":"1016"},"glyph":{"id":"1214"},"group":null,"hover_glyph":null,"muted_glyph":{"id":"1216"},"nonselection_glyph":{"id":"1215"},"view":{"id":"1218"}},"id":"1217","type":"GlyphRenderer"},{"attributes":{"args":{"slider":{"id":"1345"},"source":{"id":"1344"}},"code":"try { \n if (cb_obj.value < slider.start)\n slider.start = cb_obj.value\n else if (cb_obj.value > slider.end)\n slider.end = cb_obj.value\n } catch(err) { console.log(err) }","tags":[[140678577557168,[null,"value"],[null,null]]]},"id":"1492","type":"CustomJS"},{"attributes":{"fill_color":{"value":"blue"},"hatch_color":{"value":"blue"},"line_color":{"value":"blue"},"line_width":{"value":2},"x":{"field":"x"},"y":{"field":"y"}},"id":"1220","type":"Circle"},{"attributes":{"line_alpha":0.2,"line_color":"blue","line_width":2,"x":{"field":"x"},"y":{"field":"y"}},"id":"1216","type":"Line"},{"attributes":{"aspect_ratio":1,"below":[{"id":"1132"}],"center":[{"id":"1135"},{"id":"1139"}],"height":450,"left":[{"id":"1136"}],"name":"Plot 1","renderers":[{"id":"1159"},{"id":"1165"},{"id":"1171"}],"title":{"id":"1122"},"toolbar":{"id":"1148"},"width":450,"x_range":{"id":"1124"},"x_scale":{"id":"1128"},"y_range":{"id":"1126"},"y_scale":{"id":"1130"}},"id":"1121","subtype":"Figure","type":"Plot"},{"attributes":{"fill_alpha":{"value":0.2},"fill_color":{"value":"blue"},"hatch_alpha":{"value":0.2},"hatch_color":{"value":"blue"},"line_alpha":{"value":0.2},"line_color":{"value":"blue"},"line_width":{"value":2},"x":{"field":"x"},"y":{"field":"y"}},"id":"1158","type":"Circle"},{"attributes":{},"id":"1141","type":"WheelZoomTool"},{"attributes":{"source":{"id":"1016"}},"id":"1218","type":"CDSView"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"blue"},"hatch_alpha":{"value":0.1},"hatch_color":{"value":"blue"},"line_alpha":{"value":0.1},"line_color":{"value":"blue"},"line_width":{"value":2},"x":{"field":"x"},"y":{"field":"y"}},"id":"1157","type":"Circle"},{"attributes":{},"id":"1195","type":"ResetTool"},{"attributes":{},"id":"1128","type":"LinearScale"},{"attributes":{},"id":"1196","type":"SaveTool"},{"attributes":{"args":{"slider":{"id":"1351"},"source":{"id":"1350"}},"code":"try { \n if (cb_obj.value < slider.start)\n slider.start = cb_obj.value\n else if (cb_obj.value > slider.end)\n slider.end = cb_obj.value\n } catch(err) { console.log(err) }","tags":[[140678577569504,[null,"value"],[null,null]]]},"id":"1515","type":"CustomJS"},{"attributes":{"axis_label":"Z Real [Ohm]","coordinates":null,"formatter":{"id":"1239"},"group":null,"major_label_policy":{"id":"1240"},"ticker":{"id":"1133"}},"id":"1132","type":"LinearAxis"},{"attributes":{"end":60},"id":"1124","type":"Range1d"},{"attributes":{"source":{"id":"1016"}},"id":"1212","type":"CDSView"},{"attributes":{"children":[{"id":"1334"},{"id":"1335"},{"id":"1340"},{"id":"1341"},{"id":"1346"},{"id":"1347"}],"margin":[0,0,0,0],"name":"Column00252","sizing_mode":"stretch_width"},"id":"1333","type":"Column"},{"attributes":{"css_classes":["card-title"],"margin":[5,0,5,0],"name":"HTML00284","sizing_mode":"stretch_width","text":"System / Observation parameters"},"id":"1332","type":"panel.models.markup.HTML"},{"attributes":{"children":[{"id":"1328"},{"id":"1329"}],"margin":[0,0,0,0],"name":"Column00255","sizing_mode":"stretch_width"},"id":"1327","type":"Column"},{"attributes":{"coordinates":null,"data_source":{"id":"1015"},"glyph":{"id":"1156"},"group":null,"hover_glyph":null,"muted_glyph":{"id":"1158"},"nonselection_glyph":{"id":"1157"},"view":{"id":"1160"}},"id":"1159","type":"GlyphRenderer"},{"attributes":{"children":[{"id":"1332"}],"css_classes":["card-header-row"],"margin":[0,0,0,0],"name":"Row00282","sizing_mode":"stretch_width"},"id":"1331","type":"Row"},{"attributes":{"args":{"slider":{"id":"1361"},"source":{"id":"1360"}},"code":"try { \n if (cb_obj.value < slider.start)\n slider.start = cb_obj.value\n else if (cb_obj.value > slider.end)\n slider.end = cb_obj.value\n } catch(err) { console.log(err) }","tags":[[140678577567488,[null,"value"],[null,null]]]},"id":"1538","type":"CustomJS"},{"attributes":{"active_header_background":"#008835","button_css_classes":["card-button"],"children":[{"id":"1331"},{"id":"1333"}],"css_classes":["accordion"],"header_background":"#008835","header_color":"#FFFFFF","header_css_classes":["accordion-header"],"margin":[5,5,0,5],"name":"Card00283","sizing_mode":"stretch_width"},"id":"1330","type":"panel.models.layout.Card"},{"attributes":{"tools":[{"id":"1140"},{"id":"1141"},{"id":"1142"},{"id":"1143"},{"id":"1144"},{"id":"1145"}]},"id":"1148","type":"Toolbar"},{"attributes":{"bottom_units":"screen","coordinates":null,"fill_alpha":0.5,"fill_color":"lightgrey","group":null,"left_units":"screen","level":"overlay","line_alpha":1.0,"line_color":"black","line_dash":[4,4],"line_width":2,"right_units":"screen","syncable":false,"top_units":"screen"},"id":"1198","type":"BoxAnnotation"},{"attributes":{"args":{"slider":{"id":"1367"},"source":{"id":"1366"}},"code":"try { \n if (cb_obj.value < slider.start)\n slider.start = cb_obj.value\n else if (cb_obj.value > slider.end)\n slider.end = cb_obj.value\n } catch(err) { console.log(err) }","tags":[[140678577566192,[null,"value"],[null,null]]]},"id":"1561","type":"CustomJS"},{"attributes":{"line_color":"blue","line_width":2,"x":{"field":"x"},"y":{"field":"y"}},"id":"1162","type":"Line"},{"attributes":{"css_classes":["alert","alert-success","markdown"],"margin":[0,0,25,0],"max_width":390,"name":"Alert00229","sizing_mode":"stretch_width","text":"&lt;h3&gt;Default mode enabled!&lt;/h3&gt;\n&lt;hr&gt;"},"id":"1424","type":"panel.models.markup.HTML"},{"attributes":{"source":{"id":"1015"}},"id":"1160","type":"CDSView"},{"attributes":{"height":550,"margin":[0,0,0,0],"sizing_mode":"fixed","tabs":[{"id":"1258"}],"width":550},"id":"1246","type":"panel.models.tabs.Tabs"},{"attributes":{"source":{"id":"1015"}},"id":"1166","type":"CDSView"},{"attributes":{"active_header_background":"#008835","button_css_classes":["card-button"],"children":[{"id":"1353"},{"id":"1355"}],"css_classes":["accordion"],"header_background":"#008835","header_color":"#FFFFFF","header_css_classes":["accordion-header"],"margin":[0,5,5,5],"name":"Card00287","sizing_mode":"stretch_width"},"id":"1352","type":"panel.models.layout.Card"},{"attributes":{"fill_color":{"value":"blue"},"hatch_color":{"value":"blue"},"line_color":{"value":"blue"},"line_width":{"value":2},"x":{"field":"x"},"y":{"field":"y"}},"id":"1156","type":"Circle"},{"attributes":{"children":[{"id":"1358"},{"id":"1361"}],"margin":[5,10,5,10],"min_width":300,"name":"Column00122","width":300},"id":"1357","type":"Column"},{"attributes":{"format":"%.3f Hz"},"id":"1006","type":"PrintfTickFormatter"},{"attributes":{"css_classes":["markdown"],"margin":[5,5,5,5],"name":"Markdown00203","sizing_mode":"stretch_width","text":"&lt;p&gt;Ohmic (or) Solution resistance: $$R_0$$&lt;/p&gt;"},"id":"1334","type":"panel.models.markup.HTML"},{"attributes":{},"id":"1241","type":"UnionRenderers"},{"attributes":{"children":[{"id":"1342"},{"id":"1345"}],"margin":[5,10,5,10],"min_width":300,"name":"Column00108","width":300},"id":"1341","type":"Column"},{"attributes":{"args":{"slider":{"id":"1373"},"source":{"id":"1372"}},"code":"try { \n if (cb_obj.value < slider.start)\n slider.start = cb_obj.value\n else if (cb_obj.value > slider.end)\n slider.end = cb_obj.value\n } catch(err) { console.log(err) }","tags":[[140678577564032,[null,"value"],[null,null]]]},"id":"1584","type":"CustomJS"},{"attributes":{"bar_color":"#ff0000","end":20,"format":{"id":"1002"},"margin":[0,0,5,0],"show_value":false,"sizing_mode":"stretch_width","start":1,"step":0.5,"value":10},"id":"1339","type":"Slider"},{"attributes":{"css_classes":["markdown"],"margin":[5,5,5,5],"name":"Markdown00205","sizing_mode":"stretch_width","text":"&lt;p&gt;Reaction resistance: $$R_1$$&lt;/p&gt;"},"id":"1340","type":"panel.models.markup.HTML"},{"attributes":{"children":[{"id":"1337"},{"id":"1338"}],"margin":[0,0,0,0],"name":"Row00106","sizing_mode":"stretch_width"},"id":"1336","type":"Row"},{"attributes":{"format":"%.0f Hz"},"id":"1005","type":"PrintfTickFormatter"},{"attributes":{"align":"end","margin":[0,0,0,0],"name":"","sizing_mode":"stretch_width"},"id":"1337","type":"Div"},{"attributes":{"coordinates":null,"group":null,"text":"Nyquist Plot"},"id":"1122","type":"Title"},{"attributes":{"children":[{"id":"1359"},{"id":"1360"}],"margin":[0,0,0,0],"name":"Row00127","sizing_mode":"stretch_width"},"id":"1358","type":"Row"},{"attributes":{"end":60},"id":"1126","type":"Range1d"},{"attributes":{"align":"end","css_classes":["slider-edit"],"js_property_callbacks":{"change:value":[{"id":"1469"}]},"margin":[0,0,0,0],"min_width":75,"placeholder":"0","step":0.5,"value":10,"value_throttled":0,"width":75},"id":"1338","type":"Spinner"},{"attributes":{"css_classes":["markdown"],"margin":[5,5,5,5],"name":"Markdown00207","sizing_mode":"stretch_width","text":"&lt;p&gt;Double layer capacitance: $$C_1$$&lt;/p&gt;"},"id":"1346","type":"panel.models.markup.HTML"},{"attributes":{"align":"end","margin":[0,0,0,0],"name":"","sizing_mode":"stretch_width"},"id":"1343","type":"Div"},{"attributes":{},"id":"1240","type":"AllLabels"},{"attributes":{"children":[{"id":"1349"},{"id":"1350"}],"margin":[0,0,0,0],"name":"Row00120","sizing_mode":"stretch_width"},"id":"1348","type":"Row"},{"attributes":{"css_classes":["markdown"],"margin":[5,5,5,5],"max_width":400,"name":"140678578547600","sizing_mode":"stretch_width","tags":["nav"],"text":"&lt;h2&gt;Equivalent Circuit &amp;lsquo;R0-p(R1,C1)&amp;rsquo;&lt;/h2&gt;\n&lt;p&gt;Elements in series are separated by a dash &amp;lsquo;&lt;strong&gt;-&lt;/strong&gt;&amp;rsquo;, and those in parallel are written in &amp;lsquo;&lt;strong&gt;p( , )&lt;/strong&gt;&amp;rsquo;, where elements are separated by a comma &amp;lsquo;&lt;strong&gt;,&lt;/strong&gt;&amp;rsquo;.&lt;/p&gt;\n&lt;p&gt;Here, an interactive visualization for the equivalent circuit &amp;lsquo;&lt;strong&gt;R0-p(R1,C1)&lt;/strong&gt;&amp;lsquo; is presented.&lt;/p&gt;\n&lt;p&gt;All the elements are grouped under &amp;lsquo;&lt;em&gt;System / Observation Parameters&lt;/em&gt;&amp;lsquo; dropdown and can be varied. Start, stop frequencies, and resolution of measurement can be adjusted using sliders present under a second &amp;lsquo;&lt;em&gt;Measurement Parameters&lt;/em&gt;&amp;lsquo; dropdown.&lt;/p&gt;\n&lt;hr&gt;\n&lt;p&gt;$$ Z_{R_{0}} = R_{0}$$&lt;/p&gt;\n&lt;p&gt;$$Z_{C_{1}} = -\\frac{j}{\\omega * C_{1}}$$ (or) $$ \\frac{1}{j* \\omega * C_{1}}$$&lt;/p&gt;\n&lt;p&gt;$$Z_{R_{1}C_{1}} = \\biggl(\\frac{1}{ \\frac{1}{Z_{R_{1}}} + \\frac{1}{Z_{C_{1}}}} \\biggl)$$&lt;/p&gt;\n&lt;hr&gt;\n&lt;h2&gt;$$Z = Z_{R_{0}} + Z_{R_{1}C_{1}}$$&lt;/h2&gt;\n&lt;p&gt;in words, &lt;strong&gt;R0 in series with parallel of (R1, C1)&lt;/strong&gt;&lt;/p&gt;\n&lt;hr&gt;"},"id":"1303","type":"panel.models.markup.HTML"},{"attributes":{"button_type":"danger","icon":null,"label":"Press me twice to Reset","margin":[5,10,5,10],"max_width":380,"name":"140678578545584","sizing_mode":"stretch_width","tags":["nav"]},"id":"1396","type":"Toggle"},{"attributes":{"children":[{"id":"1233"},{"id":"1246"}],"margin":[0,0,0,0],"name":"Column00244","sizing_mode":"stretch_width"},"id":"1232","type":"Column"},{"attributes":{"align":"end","margin":[0,0,0,0],"name":"","sizing_mode":"stretch_width"},"id":"1349","type":"Div"},{"attributes":{"css_classes":["markdown"],"margin":[5,5,5,5],"max_width":400,"name":"Markdown00219","sizing_mode":"stretch_width","text":"&lt;h4&gt;Use the below radio button group to choose between &amp;lsquo;Default&amp;rsquo; and &amp;lsquo;Manual&amp;rsquo; setting for plot properties - size and range&lt;/h4&gt;"},"id":"1421","type":"panel.models.markup.HTML"},{"attributes":{},"id":"1133","type":"BasicTicker"},{"attributes":{"axis":{"id":"1132"},"coordinates":null,"group":null,"ticker":null},"id":"1135","type":"Grid"},{"attributes":{},"id":"1239","type":"BasicTickFormatter"},{"attributes":{"axis_label":"-Z Imaginary [Ohm]","coordinates":null,"formatter":{"id":"1236"},"group":null,"major_label_policy":{"id":"1237"},"ticker":{"id":"1137"}},"id":"1136","type":"LinearAxis"},{"attributes":{"height":0,"margin":[0,0,0,0],"name":"js_area","sizing_mode":"fixed","width":0},"id":"1227","type":"panel.models.markup.HTML"},{"attributes":{"align":"end","css_classes":["slider-edit"],"js_property_callbacks":{"change:value":[{"id":"1515"}]},"margin":[0,0,0,0],"min_width":75,"placeholder":"0","step":1e-06,"value":1e-05,"value_throttled":0,"width":75},"id":"1350","type":"Spinner"},{"attributes":{"axis":{"id":"1136"},"coordinates":null,"dimension":1,"group":null,"ticker":null},"id":"1139","type":"Grid"},{"attributes":{"name":"location","reload":false},"id":"1225","type":"panel.models.location.Location"},{"attributes":{"css_classes":["card-title"],"margin":[5,0,5,0],"name":"HTML00288","sizing_mode":"stretch_width","text":"Measurement parameters"},"id":"1354","type":"panel.models.markup.HTML"},{"attributes":{},"id":"1137","type":"BasicTicker"},{"attributes":{"bar_color":"#ff00ff","end":0.0001,"format":{"id":"1004"},"margin":[0,0,5,0],"show_value":false,"sizing_mode":"stretch_width","start":1e-06,"step":1e-06,"value":1e-05},"id":"1351","type":"Slider"},{"attributes":{"data":{"id":"1228"},"margin":[0,0,0,0],"name":"actions","scripts":{"close_modal":["document.getElementById(&#x27;pn-Modal&#x27;).style.display = &#x27;none&#x27;"],"open_modal":["document.getElementById(&#x27;pn-Modal&#x27;).style.display = &#x27;block&#x27;"]},"subscribed_events":["dom_event"]},"id":"1229","type":"panel.models.reactive_html.ReactiveHTML"},{"attributes":{"children":[{"id":"1354"}],"css_classes":["card-header-row"],"margin":[0,0,0,0],"name":"Row00286","sizing_mode":"stretch_width"},"id":"1353","type":"Row"},{"attributes":{"overlay":{"id":"1146"}},"id":"1145","type":"BoxSelectTool"},{"attributes":{"format":"%.1f Ohm"},"id":"1002","type":"PrintfTickFormatter"},{"attributes":{},"id":"1140","type":"PanTool"},{"attributes":{"overlay":{"id":"1147"}},"id":"1142","type":"BoxZoomTool"},{"attributes":{},"id":"1143","type":"ResetTool"},{"attributes":{},"id":"1144","type":"SaveTool"},{"attributes":{"fill_alpha":{"value":0.2},"fill_color":{"value":"blue"},"hatch_alpha":{"value":0.2},"hatch_color":{"value":"blue"},"line_alpha":{"value":0.2},"line_color":{"value":"blue"},"line_width":{"value":2},"x":{"field":"x"},"y":{"field":"y"}},"id":"1210","type":"Circle"},{"attributes":{},"id":"1254","type":"UnionRenderers"},{"attributes":{"align":"end","css_classes":["slider-edit"],"js_property_callbacks":{"change:value":[{"id":"1584"}]},"margin":[0,0,0,0],"min_width":75,"placeholder":"0","value":12,"value_throttled":0,"width":75},"id":"1372","type":"Spinner"},{"attributes":{"bottom_units":"screen","coordinates":null,"fill_alpha":0.5,"fill_color":"lightgrey","group":null,"left_units":"screen","level":"overlay","line_alpha":1.0,"line_color":"black","line_dash":[4,4],"line_width":2,"right_units":"screen","syncable":false,"top_units":"screen"},"id":"1146","type":"BoxAnnotation"},{"attributes":{"bottom_units":"screen","coordinates":null,"fill_alpha":0.5,"fill_color":"lightgrey","group":null,"left_units":"screen","level":"overlay","line_alpha":1.0,"line_color":"black","line_dash":[4,4],"line_width":2,"right_units":"screen","syncable":false,"top_units":"screen"},"id":"1147","type":"BoxAnnotation"},{"attributes":{"fill_color":{"value":"blue"},"hatch_color":{"value":"blue"},"line_color":{"value":"blue"},"line_width":{"value":2},"x":{"field":"x"},"y":{"field":"y"}},"id":"1208","type":"Circle"},{"attributes":{"end":20},"id":"1178","type":"Range1d"},{"attributes":{},"id":"1242","type":"Selection"},{"attributes":{"children":[{"id":"1343"},{"id":"1344"}],"margin":[0,0,0,0],"name":"Row00113","sizing_mode":"stretch_width"},"id":"1342","type":"Row"},{"attributes":{},"id":"1255","type":"Selection"},{"attributes":{"bar_color":"#ff0000","end":40,"format":{"id":"1003"},"margin":[0,0,5,0],"show_value":false,"sizing_mode":"stretch_width","start":1,"step":0.5,"value":20},"id":"1345","type":"Slider"},{"attributes":{},"id":"1193","type":"WheelZoomTool"},{"attributes":{"children":[{"id":"1371"},{"id":"1372"}],"margin":[0,0,0,0],"name":"Row00141","sizing_mode":"stretch_width"},"id":"1370","type":"Row"},{"attributes":{"coordinates":null,"data_source":{"id":"1016"},"glyph":{"id":"1208"},"group":null,"hover_glyph":null,"muted_glyph":{"id":"1210"},"nonselection_glyph":{"id":"1209"},"view":{"id":"1212"}},"id":"1211","type":"GlyphRenderer"},{"attributes":{"css_classes":["markdown"],"margin":[5,5,5,5],"name":"Markdown00209","sizing_mode":"stretch_width","text":"&lt;p&gt;Start frequency: $$f_{start}$$&lt;/p&gt;"},"id":"1356","type":"panel.models.markup.HTML"},{"attributes":{"bar_color":"#3339ff","end":10000000,"format":{"id":"1005"},"margin":[0,0,5,0],"show_value":false,"sizing_mode":"stretch_width","start":500.0,"step":500,"value":9685000},"id":"1361","type":"Slider"},{"attributes":{"line_alpha":0.1,"line_color":"blue","line_width":2,"x":{"field":"x"},"y":{"field":"y"}},"id":"1163","type":"Line"},{"attributes":{},"id":"1253","type":"AllLabels"},{"attributes":{"tools":[{"id":"1192"},{"id":"1193"},{"id":"1194"},{"id":"1195"},{"id":"1196"},{"id":"1197"}]},"id":"1200","type":"Toolbar"},{"attributes":{"coordinates":null,"data_source":{"id":"1015"},"glyph":{"id":"1168"},"group":null,"hover_glyph":null,"muted_glyph":{"id":"1170"},"nonselection_glyph":{"id":"1169"},"view":{"id":"1172"}},"id":"1171","type":"GlyphRenderer"},{"attributes":{"align":"end","css_classes":["slider-edit"],"js_property_callbacks":{"change:value":[{"id":"1492"}]},"margin":[0,0,0,0],"min_width":75,"placeholder":"0","step":0.5,"value":20,"value_throttled":0,"width":75},"id":"1344","type":"Spinner"},{"attributes":{"children":[{"id":"1356"},{"id":"1357"},{"id":"1362"},{"id":"1363"},{"id":"1368"},{"id":"1369"}],"margin":[0,0,0,0],"name":"Column00253","sizing_mode":"stretch_width"},"id":"1355","type":"Column"},{"attributes":{"format":"%.6f F"},"id":"1004","type":"PrintfTickFormatter"}],"root_ids":["1225","1227","1229","1230","1231","1303","1326","1396","1419"]},"title":" Equivalent Circuit 'R0-(R1,C1)'","version":"2.4.3"}}
</script>
<script type="text/javascript">
(function () {
const fn = function () {
Bokeh.safely(function () {
(function (root) {
function embed_document(root) {
const docs_json = document.getElementById('1629').textContent;
const render_items = [{ "docid": "6be48433-6511-4961-a799-5ef16684a004", "root_ids": ["1225", "1227", "1229", "1230", "1231", "1303", "1326", "1396", "1419"], "roots": { "1225": "ba04bee4-d589-4c6d-b36d-752302bfc57b", "1227": "e8193e02-1887-41b9-acf3-d5a64e9e011c", "1229": "43495ab8-8ba6-4abd-87a9-ea5ebd92e99e", "1230": "709a63d3-04c3-4da3-820a-a5dcd0313a60", "1231": "644e5092-58a6-4d2b-bc02-acc2558d46a4", "1303": "d3535a6e-9255-436e-86a0-7de4ebb6e433", "1326": "bea27ce8-edbb-4edc-9ca3-d5bbc8a37bf8", "1396": "95611a68-c1cf-463f-9463-80e18b0066a5", "1419": "edb5594e-ca23-4886-8cf3-483b67af5c25" } }];
root.Bokeh.embed.embed_items(docs_json, render_items);
}
if (root.Bokeh !== undefined) {
embed_document(root);
} else {
let attempts = 0;
const timer = setInterval(function (root) {
if (root.Bokeh !== undefined) {
clearInterval(timer);
embed_document(root);
} else {
attempts++;
if (attempts > 100) {
clearInterval(timer);
console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing");
}
}
}, 10, root)
}
})(window);
});
};
if (document.readyState != "loading") fn();
else document.addEventListener("DOMContentLoaded", fn);
})();
</script>
</body>
</html>