diff --git a/pyaml/arrays/octupole.py b/pyaml/arrays/octupole.py new file mode 100644 index 00000000..62069847 --- /dev/null +++ b/pyaml/arrays/octupole.py @@ -0,0 +1,19 @@ +from .array import ArrayModel +from .array import Array +from ..lattice.element_holder import ElementHolder,MagnetType + +# Define the main class name for this module +PYAMLCLASS = "Octupole" + +class ConfigModel(ArrayModel):... + +class Octupole(Array): + """ + Class that implements access to arrays (families) + """ + def __init__(self, cfg: ArrayModel): + super().__init__(cfg) + + def fill_array(self,holder:ElementHolder): + holder.fill_magnet_array(MagnetType.OCTUPOLE,self._cfg.name,self._cfg.elements) + diff --git a/pyaml/arrays/sextupole.py b/pyaml/arrays/sextupole.py new file mode 100644 index 00000000..bc45aaeb --- /dev/null +++ b/pyaml/arrays/sextupole.py @@ -0,0 +1,19 @@ +from .array import ArrayModel +from .array import Array +from ..lattice.element_holder import ElementHolder,MagnetType + +# Define the main class name for this module +PYAMLCLASS = "Sextupole" + +class ConfigModel(ArrayModel):... + +class Sextupole(Array): + """ + Class that implements access to arrays (families) + """ + def __init__(self, cfg: ArrayModel): + super().__init__(cfg) + + def fill_array(self,holder:ElementHolder): + holder.fill_magnet_array(MagnetType.SEXTUPOLE,self._cfg.name,self._cfg.elements) + diff --git a/pyaml/arrays/skewoctu.py b/pyaml/arrays/skewoctu.py new file mode 100644 index 00000000..8907ccab --- /dev/null +++ b/pyaml/arrays/skewoctu.py @@ -0,0 +1,19 @@ +from .array import ArrayModel +from .array import Array +from ..lattice.element_holder import ElementHolder,MagnetType + +# Define the main class name for this module +PYAMLCLASS = "SkewOctu" + +class ConfigModel(ArrayModel):... + +class SkewOctu(Array): + """ + Class that implements access to arrays (families) + """ + def __init__(self, cfg: ArrayModel): + super().__init__(cfg) + + def fill_array(self,holder:ElementHolder): + holder.fill_magnet_array(MagnetType.SKEWOCTU,self._cfg.name,self._cfg.elements) + diff --git a/pyaml/arrays/skewquad.py b/pyaml/arrays/skewquad.py new file mode 100644 index 00000000..d744e277 --- /dev/null +++ b/pyaml/arrays/skewquad.py @@ -0,0 +1,19 @@ +from .array import ArrayModel +from .array import Array +from ..lattice.element_holder import ElementHolder,MagnetType + +# Define the main class name for this module +PYAMLCLASS = "SkewQuad" + +class ConfigModel(ArrayModel):... + +class SkewQuad(Array): + """ + Class that implements access to arrays (families) + """ + def __init__(self, cfg: ArrayModel): + super().__init__(cfg) + + def fill_array(self,holder:ElementHolder): + holder.fill_magnet_array(MagnetType.SKEWQUAD,self._cfg.name,self._cfg.elements) + diff --git a/pyaml/arrays/skewsext.py b/pyaml/arrays/skewsext.py new file mode 100644 index 00000000..754e21b5 --- /dev/null +++ b/pyaml/arrays/skewsext.py @@ -0,0 +1,19 @@ +from .array import ArrayModel +from .array import Array +from ..lattice.element_holder import ElementHolder,MagnetType + +# Define the main class name for this module +PYAMLCLASS = "SkewSext" + +class ConfigModel(ArrayModel):... + +class SkewSext(Array): + """ + Class that implements access to arrays (families) + """ + def __init__(self, cfg: ArrayModel): + super().__init__(cfg) + + def fill_array(self,holder:ElementHolder): + holder.fill_magnet_array(MagnetType.SKEWSEXT,self._cfg.name,self._cfg.elements) +