-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresult_separation.py
35 lines (28 loc) · 984 Bytes
/
result_separation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
results = []
y_targ = []
mass_list = []
order_list = []
# set molar masses
masses = [58000, 69000, 112000]
# cycle for standard separation
with open('Results_3004.txt', 'r') as file:
next(file)
for line in file:
values = line.strip().split('\t')
y_targ.append(round(float(values[3])))
results.append([round(float(values[3])), round(float(values[4]))])
base = min(y_targ)
high_base = base + 0.1 * base
low_base = base - 0.1 * base
# cykle for sample separation
with open('Results_3004.txt', 'r') as file:
next(file)
for line in file:
values = line.strip().split('\t')
if not round(float(values[3])) < high_base and round(float(values[3])) > low_base:
order_list.append(round(float(values[4])))
masses = sorted(masses)
order_list = sorted(order_list)
for i in range(len(order_list)):
mass_list.append([order_list[i], masses[i]])
print(mass_list)