Skip to content
Snippets Groups Projects
Commit 6e640125 authored by Mr. SQUID's avatar Mr. SQUID
Browse files

Autoscale mode was not working with reference, i think I never checked the...

Autoscale mode was not working with reference, i think I never checked the code, autoscale only based on last trace not ref too
parent 829a5aaa
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
......@@ -106,7 +106,7 @@ Please update the practicum round
```python hide_input=false
academic_year = "2020_2021"
practicum_round = 6
practicum_round = 0
```
Run this code to create the folder where your data will be saved and make a subfolder with a copy of the latest analysis scripts.
......@@ -248,12 +248,12 @@ def update_display():
# Update scaling
if scale_mode.value == "Autoscale":
if plot_ref_button.value:
auto_scale(p1.x_range,np.concatenate(I,np.array(source3.data['x'])))
auto_scale(p1.y_range,np.concatenate(V,np.array(source3.data['y'])))
else:
auto_scale(p1.x_range,I)
auto_scale(p1.y_range,V)
#if plot_ref_button.value:
# auto_scale(p1.x_range,np.concatenate(I,np.array(source3.data['x'])))
# auto_scale(p1.y_range,np.concatenate(V,np.array(source3.data['y'])))
#else:
auto_scale(p1.x_range,I)
auto_scale(p1.y_range,V)
elif scale_mode.value == "Full range":
p1.x_range.start = -x_full_scale
p1.x_range.end = x_full_scale
......@@ -407,7 +407,7 @@ def get_temperature(serial_port, baudrate, timeout):
#Serial read + Temperature calculations:
serial_reply = ser.readline()
try:
Vout = float(str(serial_reply.decode("utf-8")))*(Vin/1023.0) #calculates the voltage from the voltage divider (over the PT1000)
Vout = float(str(serial_reply.decode("utf-8")))*(Vin/1023.0) #calculates the voltage from the voltage divider (over the PT1000)
except:
return serial_reply
Rpt = (Vout*R1)/(Vin-Vout) #calculates the resistance of the PT1000
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment