Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rp-squid-python-code
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Python for Applied Physics
rp-squid-python-code
Commits
59ddfc8d
Commit
59ddfc8d
authored
4 years ago
by
Mr. SQUID
Browse files
Options
Downloads
Patches
Plain Diff
added ref curve = awesome
parent
a026c507
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
SQUID measurement software.ipynb
+54
-43
54 additions, 43 deletions
SQUID measurement software.ipynb
SQUID measurement software.md
+27
-2
27 additions, 2 deletions
SQUID measurement software.md
update file.ipynb
+3
-3
3 additions, 3 deletions
update file.ipynb
with
84 additions
and
48 deletions
SQUID measurement software.ipynb
+
54
−
43
View file @
59ddfc8d
This diff is collapsed.
Click to expand it.
SQUID measurement software.md
+
27
−
2
View file @
59ddfc8d
...
...
@@ -6,7 +6,7 @@ jupyter:
extension
:
.md
format_name
:
markdown
format_version
:
'
1.2'
jupytext_version
:
1.
3
.0
jupytext_version
:
1.
6
.0
kernelspec
:
display_name
:
Python
3
language
:
python
...
...
@@ -128,7 +128,7 @@ for file in "autoplot.py", "Plot all my data.ipynb":
# IV vs Time Live Display
<!-- #endregion -->
```
python hide_input=
tru
e
```
python hide_input=
fals
e
I = []
V = []
t = []
...
...
@@ -220,6 +220,10 @@ print("Live view done")
# IV Live Display
```
python hide_input=true
I = []
V = []
t = []
def update_display():
global I,V,t
ipython.kernel.do_one_iteration()
...
...
@@ -257,19 +261,27 @@ def update_display():
else:
slope_line.visible = False
if plot_ref_button.value:
ref_trace.visible = True
else:
ref_trace.visible = False
range1 = Range1d()
range2 = Range1d()
source1 = ColumnDataSource()
source2 = ColumnDataSource()
source3 = ColumnDataSource()
p1 = figure(title="IV", plot_height=500, plot_width=600,toolbar_location=None, x_range = range1, y_range = range2)
p1.yaxis.axis_label = 'Measured Voltage (uV)'
p1.xaxis.axis_label = 'Applied Current (uA)'
ref_trace = p1.line('x','y',source=source3, color='magenta')
ref_trace.visible = False
p1.line('x', 'y', source=source1)
slope_line = p1.line('x','y',source=source2, color='red')
slope_line.visible = False
x_full_scale = I_full_scale #uA
y_full_scale = V_full_scale # uV
...
...
@@ -298,6 +310,15 @@ def fit_slope(w):
line_slope.value = coef[0]
fit_slope_button.on_click(fit_slope)
plot_ref_button = widgets.ToggleButton(description="Plot ref")
take_ref_button = widgets.Button(description="Take as ref")
def take_ref(w):
global source3, I, V
source3.data = dict(x=I, y=V)
take_ref_button.on_click(take_ref)
for w in (I_avg_w, V_avg_w, I_ptp_w, V_ptp_w, R_ptp_w, R_avg_w):
w.layout.width = '150px'
...
...
@@ -312,6 +333,7 @@ save_button.on_click(save_data)
filename = widgets.HTML(description="Last filename: ",style=style)
filename.value = "(none)"
take_ref([])
update_display()
target = show(p1, notebook_handle=True)
rows = []
...
...
@@ -319,6 +341,7 @@ rows = []
rows.append(widgets.HBox([I_avg_w, V_avg_w, R_avg_w]))
rows.append(widgets.HBox([I_ptp_w, V_ptp_w, R_ptp_w]))
rows.append(widgets.HBox([plot_line_button, line_slope, fit_slope_button]))
rows.append(widgets.HBox([plot_ref_button, take_ref_button]))
rows.append(widgets.HBox([save_button, filename]))
rows.append(widgets.HBox([stop_button,pause_button,scale_mode,mrsquid_mode]))
controls = widgets.VBox(rows)
...
...
@@ -395,6 +418,8 @@ def take_measurement():
source2.data = dict(x=tm,y=R)
source3.data = dict(x=tm,y=T)
source4.data = dict(x=T,y=R)
p2.title.text = "R vs time R = %.2f Ohms" % R[-1]
p3.title.text = "T vs time T = %.2f K" % T[-1]
# The plots
...
...
This diff is collapsed.
Click to expand it.
update file.ipynb
+
3
−
3
View file @
59ddfc8d
...
...
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count":
7
,
"execution_count":
1
,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -19,7 +19,7 @@
},
{
"cell_type": "code",
"execution_count":
9
,
"execution_count":
2
,
"metadata": {},
"outputs": [
{
...
...
@@ -28,7 +28,7 @@
"'.\\\\SQUID measurement software.ipynb'"
]
},
"execution_count":
9
,
"execution_count":
2
,
"metadata": {},
"output_type": "execute_result"
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment