Changeset 780 in ETALON for BPM/motor_control.py
- Timestamp:
- Jun 18, 2018, 5:32:04 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BPM/motor_control.py
r779 r780 37 37 #horizontal_acquisition(4000,0,-4000,"test") 38 38 39 acquisition(-1 5000,15000,10000,-50000,50000,25000,"test")39 acquisition(-100000,100000,20000,-50000,50000,10000,"test") 40 40 41 41 #acquisition(-10000,10000,1000,-50000,0,5000,"test") … … 55 55 56 56 #fichier = open("24-05-2018_acquisition_from_0_to_400000_step_of_1000.txt", "r") 57 """58 A = fichier.read()59 60 X = []61 Y1 = []62 Y2 = []63 Y3 = []64 Y4 = []65 a = ""66 l = 067 68 69 for i in A:70 if (i == "\n") :71 if l == 0:72 X.append(a)73 74 l += 175 elif l == 1:76 Y1.append(a)77 #print(a)78 l += 179 elif l == 2:80 Y2.append(a)81 l += 182 elif l == 3:83 Y3.append(a)84 l += 185 else:86 Y4.append(a)87 l = 088 a = ""89 else:90 a += i91 92 def float_list(l):93 L = []94 for i in l:95 L.append(float(i))96 return(L)97 98 X = float_list(X)99 Y1 = float_list(Y1)100 Y2 = float_list(Y2)101 Y3 = float_list(Y3)102 Y4 = float_list(Y4)103 104 plt.plot(X,Y1)105 plt.plot(X,Y2)106 plt.plot(X,Y3)107 plt.plot(X,Y4)108 plt.show()109 """110 57 111 58 #fichier.close()
Note: See TracChangeset
for help on using the changeset viewer.