Skip to content

Commit 6a013bf

Browse files
committed
Added facility and updated name to machine.
1 parent 2313b02 commit 6a013bf

21 files changed

+46
-29
lines changed

pyaml/accelerator.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Instrument class
2+
Accelerator class
33
"""
44

55
from pydantic import BaseModel, ConfigDict
@@ -17,13 +17,15 @@
1717
class ConfigModel(BaseModel):
1818
model_config = ConfigDict(arbitrary_types_allowed=True, extra="forbid")
1919

20-
name: str
21-
"""Instrument name"""
20+
facility: str
21+
"Facility name"
22+
machine: str
23+
"""Accelerator name"""
2224
energy: float
23-
"""Instrument nominal energy, for ramped machine,
25+
"""Accelerator nominal energy, for ramped machine,
2426
this value can be dynamically set"""
2527
controls: list[ControlSystem] = None
26-
"""List of control system used, an instrument
28+
"""List of control system used, an accelerator
2729
can access several control systems"""
2830
simulators: list[Simulator] = None
2931
"""Simulator list"""

tests/config/EBSOrbit.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
type: pyaml.pyaml
21
type: pyaml.accelerator
3-
name: sr
2+
facility: ESRF
3+
machine: sr
44
energy: 6e9
55
simulators:
66
- type: pyaml.lattice.simulator

tests/config/EBSTune.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
type: pyaml.accelerator
2-
name: sr
2+
facility: ESRF
3+
machine: sr
34
energy: 6e9
45
simulators:
56
- type: pyaml.lattice.simulator

tests/config/EBS_rf.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
type: pyaml.accelerator
2-
name: sr
2+
facility: ESRF
3+
machine: sr
34
energy: 6e9
45
simulators:
56
- type: pyaml.lattice.simulator

tests/config/EBS_rf_multi.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
type: pyaml.accelerator
2-
name: sr
2+
facility: ESRF
3+
machine: sr
34
energy: 6e9
45
simulators:
56
- type: pyaml.lattice.simulator

tests/config/EBS_rf_notrans.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
type: pyaml.accelerator
2-
name: sr
2+
facility: ESRF
3+
machine: sr
34
energy: 6e9
45
simulators:
56
- type: pyaml.lattice.simulator

tests/config/bad_conf.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
type: pyaml.pyaml
22
instruments:
33
- type: pyaml.instrument
4-
name: sr
4+
facility: ESRF
5+
machine: sr
56
energy: 6e9
67
simulators:
78
- type: pyalkqln # Error here

tests/config/bad_conf_cycles.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"type": "pyaml.accelerator",
3-
"name": "sr",
3+
"facility": "ESRF",
4+
"machine": "sr",
45
"energy": 6e9,
56
"simulators": ["../config/bad_conf_cycles.json"],
67
"data_folder": "/data/store",

tests/config/bad_conf_cycles.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
type: pyaml.accelerator
2-
name: sr
2+
facility: ESRF
3+
machine: sr
34
energy: 6e9
45
simulators:
56
- type: pyaml.lattice.simulator

tests/config/bad_conf_duplicate_1.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
type: pyaml.accelerator
2-
name: sr
2+
facility: ESRF
3+
machine: sr
34
energy: 6e9
45
simulators:
56
- type: pyaml.lattice.simulator

0 commit comments

Comments
 (0)