-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtestscript.py
More file actions
executable file
·59 lines (48 loc) · 1.78 KB
/
testscript.py
File metadata and controls
executable file
·59 lines (48 loc) · 1.78 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
'''
SimBlend, a Blender import module for SIMION ion trajectory data
Copyright (C) 2013 - Physical and Theoretical Chemistry /
Institute of Pure and Applied Mass Spectrometry
of the University of Wuppertal, Germany
This file is part of SimBlend
SimBlend is free software: You may redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
------------
testscript.py
a testscript to create artificial ion trajectory data for testing purposes
Original author: Dominik Sand
Version: 0.1
'''
from .helper import *
from .windowed import *
def output_list(list):
for item in list:
for i in range(0,list[item].datacount):
x = float(list[item].GetXYZ(i)[0])
y = float(list[item].GetXYZ(i)[1])
z = float(list[item].GetXYZ(i)[2])
ion_n = str(list[item].GetIonN())
print('Ion: {0},x: {1}, y: {2}, z: {3}\n'.format(ion_n,x,y,z))
def main():
ions = 2
steps = 25
merge_ammount = 5
Ionlist = CreateSyntheticIonData(ions, steps)
windowed_list = windowedMeans(Ionlist, merge_ammount)
output_list(Ionlist)
print("Line Break\n")
ions = 2
steps = 25
merge_ammount = 1
Ionlist = CreateSyntheticIonData(ions, steps)
windowed_list = windowedMeans(Ionlist, merge_ammount)
output_list(Ionlist)
if __name__ == "__main__":
main()