Changeset 780 in ETALON for BPM/motor_control.py


Ignore:
Timestamp:
Jun 18, 2018, 5:32:04 PM (6 years ago)
Author:
moutardier
Message:

add fonction to select part of data and to convert lenght in step on lenght in mm in print_data.py and correct issue in residu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BPM/motor_control.py

    r779 r780  
    3737#horizontal_acquisition(4000,0,-4000,"test")   
    3838
    39 acquisition(-15000,15000,10000,-50000,50000,25000,"test")
     39acquisition(-100000,100000,20000,-50000,50000,10000,"test")
    4040
    4141#acquisition(-10000,10000,1000,-50000,0,5000,"test")
     
    5555
    5656#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 = 0
    67 
    68 
    69 for i in A:
    70     if (i == "\n") :
    71          if l == 0:
    72              X.append(a)
    73              
    74              l += 1
    75          elif l == 1:
    76              Y1.append(a)
    77              #print(a)
    78              l += 1
    79          elif l == 2:
    80              Y2.append(a)
    81              l += 1
    82          elif l == 3:
    83              Y3.append(a)
    84              l += 1
    85          else:
    86              Y4.append(a)
    87              l = 0
    88          a = ""
    89     else:
    90         a += i
    91 
    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 """
    11057
    11158#fichier.close()
Note: See TracChangeset for help on using the changeset viewer.