diff --git a/Data.txt b/Data.txt new file mode 100644 index 0000000..e69de29 diff --git a/Magnetic field measurements/By_cal.npy b/Magnetic field measurements/By_cal.npy new file mode 100644 index 0000000..815e11d Binary files /dev/null and b/Magnetic field measurements/By_cal.npy differ diff --git a/Magnetic field measurements/By_cal.py.npy b/Magnetic field measurements/By_cal.py.npy new file mode 100644 index 0000000..815e11d Binary files /dev/null and b/Magnetic field measurements/By_cal.py.npy differ diff --git a/Magnetic field measurements/Calibration.txt b/Magnetic field measurements/Calibration.txt new file mode 100644 index 0000000..b641e2b --- /dev/null +++ b/Magnetic field measurements/Calibration.txt @@ -0,0 +1,55 @@ +-3.23 9.68 9.68 +0.0 12.9 6.45 +0.0 9.68 6.45 +3.23 12.9 6.45 +6.45 9.68 9.68 +0.0 3.23 3.23 +0.0 6.45 6.45 +0.0 3.23 6.45 +0.0 3.23 6.45 +0.0 6.45 6.45 +0.0 -6.45 6.45 +0.0 -3.23 6.45 +0.0 -6.45 6.45 +0.0 -6.45 6.45 +3.23 -3.23 6.45 +0.0 -12.9 9.68 +0.0 -16.13 6.45 +0.0 -12.9 9.68 +0.0 -9.68 6.45 +-3.23 -12.9 9.68 +0.0 -19.35 9.68 +0.0 -19.35 9.68 +0.0 -22.58 6.45 +0.0 -19.35 6.45 +0.0 -19.35 6.45 +0.0 -29.03 6.45 +0.0 -29.03 6.45 +-3.23 -29.03 6.45 +0.0 -32.26 9.68 +-3.23 -29.03 9.68 +0.0 -35.48 6.45 +0.0 -38.71 9.68 +0.0 -38.71 6.45 +-3.23 -38.71 6.45 +0.0 -35.48 6.45 +0.0 -45.16 6.45 +0.0 -45.16 9.68 +-3.23 -45.16 6.45 +0.0 -45.16 6.45 +-3.23 -45.16 6.45 +0.0 -51.61 6.45 +-3.23 -51.61 9.68 +-3.23 -51.61 6.45 +-3.23 -54.84 6.45 +-3.23 -51.61 6.45 +-3.23 -61.29 9.68 +-3.23 -61.29 6.45 +0.0 -58.06 9.68 +-3.23 -64.52 9.68 +-3.23 -61.29 9.68 +0.0 -67.74 9.68 +-3.23 -70.97 9.68 +-3.23 -67.74 16.13 +-3.23 -70.97 6.45 +-3.23 -70.97 9.68 diff --git a/Magnetic field measurements/Calibration_calculation.py b/Magnetic field measurements/Calibration_calculation.py index 77b9c2a..af32ab1 100644 --- a/Magnetic field measurements/Calibration_calculation.py +++ b/Magnetic field measurements/Calibration_calculation.py @@ -14,4 +14,14 @@ HH_Coil.set_d_min(47.4) HH_Coil.print_info() -HH_Coil.max_field_one_coil(5) \ No newline at end of file +HH_Coil.max_field_one_coil(5) + +# %% +#By_cal = np.array([9.68, 12.9, 9.68, 12.9, 9.68, 3.23, 6.45, 3.23, 3.23, 6.45, -6.45, -3.23, -6.45, -6.45, -3.23, -12.9, -16.13, -12.9, -9.68, -12.9, -19.35, -19.35, -22.58, -19.35, -19.35, -29.03, -29.03, -29.03, -32.26, -29.03, -35.48, -38.71, -38.71, -38.71, -35.48, -45.16, -45.16, -45.16, -45.16, -45.16, -51.61, -51.61, -51.61, -54.84, -51.61, -61.29, -61.29, -58.06, -64.52, -61.29, -67.74, -70.97, -67.74, -70.97, -70.97]) + +#np.save('Data/By_cal.npy',By_cal) + +# %% +B = np.load('Data/Bz_AHH.npy') +print(B) +print(len(B)) \ No newline at end of file diff --git a/Magnetic field measurements/Data.txt b/Magnetic field measurements/Data.txt new file mode 100644 index 0000000..e69de29 diff --git a/Magnetic field measurements/Data/By_HH.npy b/Magnetic field measurements/Data/By_HH.npy new file mode 100644 index 0000000..78b2ed2 Binary files /dev/null and b/Magnetic field measurements/Data/By_HH.npy differ diff --git a/Magnetic field measurements/Data/By_HH_neg.npy b/Magnetic field measurements/Data/By_HH_neg.npy new file mode 100644 index 0000000..3447440 Binary files /dev/null and b/Magnetic field measurements/Data/By_HH_neg.npy differ diff --git a/Magnetic field measurements/Data/By_cal.npy b/Magnetic field measurements/Data/By_cal.npy new file mode 100644 index 0000000..815e11d Binary files /dev/null and b/Magnetic field measurements/Data/By_cal.npy differ diff --git a/Magnetic field measurements/Data/By_cal_neg.npy b/Magnetic field measurements/Data/By_cal_neg.npy new file mode 100644 index 0000000..1714807 Binary files /dev/null and b/Magnetic field measurements/Data/By_cal_neg.npy differ diff --git a/Magnetic field measurements/Data/Bz_AHH.npy b/Magnetic field measurements/Data/Bz_AHH.npy new file mode 100644 index 0000000..d64ed5a Binary files /dev/null and b/Magnetic field measurements/Data/Bz_AHH.npy differ diff --git a/Magnetic field measurements/Data/Cal_neg.txt b/Magnetic field measurements/Data/Cal_neg.txt new file mode 100644 index 0000000..aaabb8c --- /dev/null +++ b/Magnetic field measurements/Data/Cal_neg.txt @@ -0,0 +1,55 @@ +0.0 9.68 6.45 +0.0 12.9 6.45 +-3.23 9.68 6.45 +0.0 12.9 6.45 +0.0 9.68 6.45 +3.23 19.35 6.45 +0.0 19.35 6.45 +3.23 19.35 3.23 +0.0 19.35 3.23 +0.0 19.35 6.45 +0.0 29.03 3.23 +0.0 25.81 3.23 +0.0 25.81 6.45 +0.0 25.81 6.45 +0.0 25.81 6.45 +3.23 35.48 9.68 +0.0 32.26 3.23 +0.0 35.48 6.45 +3.23 35.48 6.45 +0.0 35.48 6.45 +0.0 45.16 3.23 +0.0 45.16 3.23 +0.0 41.94 3.23 +0.0 45.16 3.23 +0.0 41.94 3.23 +0.0 51.61 3.23 +0.0 51.61 6.45 +0.0 51.61 3.23 +0.0 48.39 3.23 +3.23 48.39 3.23 +3.23 58.06 3.23 +0.0 58.06 3.23 +0.0 61.29 3.23 +0.0 61.29 3.23 +0.0 58.06 3.23 +0.0 67.74 3.23 +3.23 67.74 6.45 +3.23 67.74 3.23 +0.0 67.74 3.23 +0.0 67.74 3.23 +0.0 74.19 3.23 +0.0 77.42 6.45 +3.23 74.19 3.23 +0.0 74.19 3.23 +3.23 74.19 6.45 +0.0 83.87 3.23 +0.0 87.1 0.0 +0.0 80.65 3.23 +3.23 87.1 3.23 +3.23 83.87 3.23 +0.0 93.55 0.0 +6.45 93.55 3.23 +0.0 90.32 0.0 +0.0 93.55 3.23 +3.23 90.32 3.23 diff --git a/Magnetic field measurements/Data/HH_field.txt b/Magnetic field measurements/Data/HH_field.txt new file mode 100644 index 0000000..048126e --- /dev/null +++ b/Magnetic field measurements/Data/HH_field.txt @@ -0,0 +1,55 @@ +0.0 9.68 6.45 +0.0 9.68 6.45 +0.0 12.9 3.23 +0.0 9.68 6.45 +3.23 9.68 6.45 +3.23 3.23 6.45 +0.0 0.0 6.45 +0.0 0.0 6.45 +0.0 0.0 6.45 +0.0 3.23 6.45 +0.0 -9.68 9.68 +0.0 -9.68 6.45 +0.0 -12.9 6.45 +0.0 -9.68 6.45 +0.0 -9.68 9.68 +0.0 -22.58 9.68 +-3.23 -22.58 6.45 +0.0 -22.58 6.45 +0.0 -19.35 6.45 +0.0 -22.58 6.45 +-3.23 -32.26 6.45 +0.0 -32.26 6.45 +-3.23 -32.26 6.45 +0.0 -32.26 6.45 +0.0 -32.26 6.45 +-3.23 -41.94 9.68 +-3.23 -41.94 6.45 +-3.23 -45.16 6.45 +0.0 -45.16 6.45 +-3.23 -45.16 6.45 +0.0 -54.84 9.68 +-3.23 -54.84 6.45 +-3.23 -51.61 9.68 +-3.23 -58.06 9.68 +-3.23 -51.61 6.45 +0.0 -64.52 9.68 +-3.23 -64.52 6.45 +-3.23 -64.52 9.68 +0.0 -61.29 9.68 +-3.23 -64.52 9.68 +0.0 -74.19 9.68 +-3.23 -74.19 12.9 +-3.23 -74.19 9.68 +0.0 -77.42 6.45 +3.23 -74.19 9.68 +0.0 -87.1 12.9 +-3.23 -87.1 9.68 +-3.23 -87.1 9.68 +0.0 -83.87 9.68 +0.0 -83.87 12.9 +-3.23 -96.77 9.68 +-3.23 -96.77 9.68 +-3.23 -96.77 9.68 +-3.23 -96.77 9.68 +-3.23 -96.77 9.68 diff --git a/Magnetic field measurements/Data/HH_neg.txt b/Magnetic field measurements/Data/HH_neg.txt new file mode 100644 index 0000000..6a8387d --- /dev/null +++ b/Magnetic field measurements/Data/HH_neg.txt @@ -0,0 +1,55 @@ +0.0 12.9 6.45 +0.0 12.9 6.45 +0.0 9.68 6.45 +3.23 12.9 6.45 +0.0 12.9 6.45 +3.23 22.58 6.45 +0.0 22.58 6.45 +0.0 19.35 3.23 +0.0 22.58 6.45 +0.0 22.58 6.45 +0.0 35.48 6.45 +0.0 32.26 3.23 +0.0 32.26 6.45 +0.0 32.26 3.23 +0.0 32.26 3.23 +0.0 41.94 3.23 +0.0 41.94 3.23 +0.0 41.94 3.23 +3.23 45.16 6.45 +0.0 41.94 9.68 +0.0 54.84 3.23 +0.0 54.84 3.23 +0.0 54.84 3.23 +0.0 54.84 3.23 +0.0 51.61 3.23 +3.23 67.74 6.45 +3.23 64.52 3.23 +0.0 64.52 6.45 +0.0 64.52 3.23 +3.23 64.52 3.23 +3.23 77.42 3.23 +3.23 77.42 3.23 +3.23 74.19 3.23 +0.0 77.42 9.68 +3.23 80.65 6.45 +0.0 87.1 3.23 +3.23 87.1 3.23 +3.23 87.1 0.0 +0.0 87.1 0.0 +0.0 87.1 3.23 +3.23 96.77 0.0 +3.23 96.77 3.23 +3.23 100.0 6.45 +0.0 96.77 3.23 +3.23 96.77 3.23 +3.23 112.9 3.23 +3.23 109.68 3.23 +3.23 109.68 3.23 +0.0 109.68 0.0 +6.45 109.68 3.23 +3.23 119.35 3.23 +0.0 119.35 0.0 +3.23 122.58 0.0 +3.23 119.35 3.23 +3.23 116.13 0.0 diff --git a/Magnetic field measurements/Data/z_grad.txt b/Magnetic field measurements/Data/z_grad.txt new file mode 100644 index 0000000..e69de29 diff --git a/Magnetic field measurements/measurement test.py b/Magnetic field measurements/measurement test.py index 7f4e841..82232a8 100644 --- a/Magnetic field measurements/measurement test.py +++ b/Magnetic field measurements/measurement test.py @@ -1,19 +1,24 @@ import serial import re import matplotlib.pyplot as plt +import numpy as np #connect to device, check if correct port -ser =serial.Serial('COM4',19200) +ser =serial.Serial('COM3',19200) + +if not ser.isOpen(): + ser.open() +print('com3 is open', ser.isOpen()) Bx=[] By=[] Bz=[] x=[] i=0 -f=open('Data.txt','w') +f=open('Data/Cal_neg.txt','w') fig, axs=plt.subplots(1,3) #plug in number of measurement points (here 35) #save all data in a txt sheet -for k in range(0,10): +for k in range(0, 55 ): a=ser.readline() data=str(a,'utf-8') @@ -44,3 +49,5 @@ axs[2].set_title('Bz') axs[2].set(ylabel='G') print(By) plt.show() + +np.save('Data/By_cal_neg.npy', By)