-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrefp.py
81 lines (68 loc) · 3.11 KB
/
refp.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
from modeledcommandparameter import *
from pseudoregion import *
class Refp(ModeledCommandParameter, PseudoRegion):
"""
Reference particle
"""
begtag = 'REFP'
endtag = ''
models = {
'model_descriptor': {'desc': 'Phase model',
'name': 'phmodref',
'num_parms': 5,
'for001_format': {'line_splits': [5]}},
'0_crossing':
{'desc': '0-crossing phase iterative procedure',
'doc': 'Uses iterative procedure to find 0-crossing phase; tracks through all regions. Only works with ACCEL modesl 1,2 and 13.',
'icool_model_name': 2,
'parms':
{'phmodref': {'pos': 5, 'type': 'String', 'doc': ''},
'bmtype': {'pos': 1, 'type': 'Int', 'doc': ''}}},
'const_v':
{'desc': 'Assumes constant reference particle velocity',
'doc': 'Applies to any region',
'icool_model_name': 3,
'parms':
{'phmodref': {'pos': 5, 'type': 'String', 'doc': ''},
'bmtype': {'pos': 1, 'type': 'Int', 'doc': ''},
'pz0': {'pos': 2, 'type': 'Real', 'doc': ''},
't0': {'pos': 3, 'type': 'Real', 'doc': ''}}},
'en_loss':
{'desc': 'Assumes constant reference particle velocity',
'doc': 'Applies to any region',
'icool_model_name': 4,
'parms':
{'phmodref': {'pos': 5, 'type': 'String', 'doc': ''},
'bmtype': {'pos': 1, 'type': 'Int', 'doc': ''},
'pz0': {'pos': 2, 'type': 'Real', 'doc': ''},
't0': {'pos': 3, 'type': 'Real', 'doc': ''},
'dedz': {'pos': 4, 'type': 'Real', 'doc': ''}}},
'delta_quad_cav':
{'desc': 'Assumes constant reference particle velocity',
'doc': 'Applies to any region',
'icool_model_name': 5,
'parms':
{'phmodref': {'pos': 5, 'type': 'String', 'doc': ''},
'bmtype': {'pos': 1, 'type': 'Int', 'doc': ''},
'e0': {'pos': 2, 'type': 'Real', 'doc': ''},
'dedz': {'pos': 3, 'type': 'Real', 'doc': ''},
'd2edz2': {'pos': 4, 'type': 'Real', 'doc': ''}}},
'delta_quad_any':
{'desc': 'Assumes constant reference particle velocity',
'doc': 'Applies to any region',
'icool_model_name': 6,
'parms':
{'phmodref': {'pos': 5, 'type': 'String', 'doc': ''},
'bmtype': {'pos': 1, 'type': 'Int', 'doc': ''},
'e0': {'pos': 2, 'type': 'Real', 'doc': ''},
'dedz': {'pos': 3, 'type': 'Real', 'doc': ''},
'd2edz2': {'pos': 4, 'type': 'Real', 'doc': ''}}},
}
def __init__(self, **kwargs):
ModeledCommandParameter.__init__(self, kwargs)
def __call__(self, **kwargs):
ModeledCommandParameter.__call__(self, kwargs)
def __setattr__(self, name, value):
ModeledCommandParameter.__setattr__(self, name, value)
def __str__(self):
return ModeledCommandParameter.__str__(self)