From 688e9b766629b0b7168efd9568139b59550ccf37 Mon Sep 17 00:00:00 2001 From: schoener Date: Tue, 6 Sep 2022 11:57:32 +0200 Subject: [PATCH] measurement data transfer --- Data.txt | 0 Magnetic field measurements/By_cal.npy | Bin 0 -> 568 bytes Magnetic field measurements/By_cal.py.npy | Bin 0 -> 568 bytes Magnetic field measurements/Calibration.txt | 55 ++++++++++++++++++ .../Calibration_calculation.py | 12 +++- Magnetic field measurements/Data.txt | 0 Magnetic field measurements/Data/By_HH.npy | Bin 0 -> 568 bytes .../Data/By_HH_neg.npy | Bin 0 -> 568 bytes Magnetic field measurements/Data/By_cal.npy | Bin 0 -> 568 bytes .../Data/By_cal_neg.npy | Bin 0 -> 568 bytes Magnetic field measurements/Data/Bz_AHH.npy | Bin 0 -> 808 bytes Magnetic field measurements/Data/Cal_neg.txt | 55 ++++++++++++++++++ Magnetic field measurements/Data/HH_field.txt | 55 ++++++++++++++++++ Magnetic field measurements/Data/HH_neg.txt | 55 ++++++++++++++++++ Magnetic field measurements/Data/z_grad.txt | 0 .../measurement test.py | 13 ++++- 16 files changed, 241 insertions(+), 4 deletions(-) create mode 100644 Data.txt create mode 100644 Magnetic field measurements/By_cal.npy create mode 100644 Magnetic field measurements/By_cal.py.npy create mode 100644 Magnetic field measurements/Calibration.txt create mode 100644 Magnetic field measurements/Data.txt create mode 100644 Magnetic field measurements/Data/By_HH.npy create mode 100644 Magnetic field measurements/Data/By_HH_neg.npy create mode 100644 Magnetic field measurements/Data/By_cal.npy create mode 100644 Magnetic field measurements/Data/By_cal_neg.npy create mode 100644 Magnetic field measurements/Data/Bz_AHH.npy create mode 100644 Magnetic field measurements/Data/Cal_neg.txt create mode 100644 Magnetic field measurements/Data/HH_field.txt create mode 100644 Magnetic field measurements/Data/HH_neg.txt create mode 100644 Magnetic field measurements/Data/z_grad.txt 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 0000000000000000000000000000000000000000..815e11dcd6de7300a8a915c8631052854d6b0ca7 GIT binary patch literal 568 zcmbR27wQ`j$;eQ~P_3SlTAW;@Zl$1ZlV+i=qoAIaUsO_*m=~X4l#&V(cT3DEP6dh= zXCxM+0{I%IraGEB3bhL41Fo3R^c3v9Wrb3)ZgI>7ia8lqnk zCVv1begG;Cr%}Z<4?L_AS?8{30F~D~0JR^^pEVN*B8?BgXrStcRa4C1e3-Zg$RKvx z1L!owd~7kB`j54Hy=4gfdX0zd!& literal 0 HcmV?d00001 diff --git a/Magnetic field measurements/By_cal.py.npy b/Magnetic field measurements/By_cal.py.npy new file mode 100644 index 0000000000000000000000000000000000000000..815e11dcd6de7300a8a915c8631052854d6b0ca7 GIT binary patch literal 568 zcmbR27wQ`j$;eQ~P_3SlTAW;@Zl$1ZlV+i=qoAIaUsO_*m=~X4l#&V(cT3DEP6dh= zXCxM+0{I%IraGEB3bhL41Fo3R^c3v9Wrb3)ZgI>7ia8lqnk zCVv1begG;Cr%}Z<4?L_AS?8{30F~D~0JR^^pEVN*B8?BgXrStcRa4C1e3-Zg$RKvx z1L!owd~7kB`j54Hy=4gfdX0zd!& literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..78b2ed2e6ddb40ffd4b41609590d6c598d627f94 GIT binary patch literal 568 zcmbR27wQ`j$;eQ~P_3SlTAW;@Zl$1ZlV+i=qoAIaUsO_*m=~X4l#&V(cT3DEP6dh= zXCxM+0{I%IraGEB3bhL41Fo3k5a6U|2WS#rNswrj%(CJw-fgsWtF8;6zs6x@<03mvZTR^c3v9Wrb3)ZgI>7ia8lqnk zCVv1begG;Cr%}Z<4?L_AS?8{30F~D~0JR^^pEVN*B8?BgXrStcRa4C1e3-Zg$RKvx z1L!owd~7kB`j54Hy=4gfdX0zd!& literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..171480709d8961d560a42ad358ccf21f6db068b3 GIT binary patch literal 568 zcmbR27wQ`j$;eQ~P_3SlTAW;@Zl$1ZlV+i=qoAIaUsO_*m=~X4l#&V(cT3DEP6dh= zXCxM+0{I%IraGEB3bhL41Fo3M!xfgsY@fe`KSuu5bdyR8G* z*z=Y+X^v9_~f&HwPHKL$398;13rJK1i9!IZp?4ItZk} z(8B>nL)_=<0HcAX?T}mQ=K!N&;$Zi`4}iEI4-F2lo*;*6kOQNFA>jw)!^B}U*xc_S d4rw58EEE!sng~8j-WUXu!yRBW#NS~Ud;kT^JwS-=KlD{2=Da1;J~Iq@)=VIXG(K?l3miUtQ@G^)HLR2^;_=z5?RI33Vw1~d=@cA&BY#C%By7$2R6y2AlRL*4CwPDB0c zK!}EhuLCX`VvmCZG@jrzDEb0_xHzEG(D-(MrUM5UADss3-XXWt&jCh5;?Eb(hlzvT j|2_a>&b~m1e}H_LIE;p*k6=i+^#nP<_%IqAjzDn$@|a^M literal 0 HcmV?d00001 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)