diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 91a0e877..10bb0ab6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,6 +32,7 @@ jobs: pip install scipy pip install pydantic pip install accelerator-toolbox + pip install accelerator-commissioning pip install matplotlib pip install h5py pip install PyYaml diff --git a/.gitmodules b/.gitmodules index 787fc63e..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "pyaml/external/pySC"] - path = pyaml/external/pySC - url = https://github.com/kparasch/pySC.git diff --git a/pyaml/external/pySC b/pyaml/external/pySC deleted file mode 160000 index f509fee8..00000000 --- a/pyaml/external/pySC +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f509fee8bdd60812d304e8d1a6cdbd1d6a03e3a2 diff --git a/pyaml/tuning_tools/dispersion.py b/pyaml/tuning_tools/dispersion.py index 3eaa3588..8ec686ec 100644 --- a/pyaml/tuning_tools/dispersion.py +++ b/pyaml/tuning_tools/dispersion.py @@ -3,9 +3,9 @@ from typing import List, Optional from pydantic import BaseModel, ConfigDict +from pySC.apps import measure_dispersion from ..common.element_holder import ElementHolder -from ..external.pySC.pySC.apps import measure_dispersion from ..external.pySC_interface import pySCInterface logger = logging.getLogger(__name__) diff --git a/pyaml/tuning_tools/orbit.py b/pyaml/tuning_tools/orbit.py index 8c8f8785..33a8f41f 100644 --- a/pyaml/tuning_tools/orbit.py +++ b/pyaml/tuning_tools/orbit.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ..common.element_holder import ElementHolder -# from ..external.pySC.pySC import ResponseMatrix as pySC_ResponseMatrix +from pySC import ResponseMatrix as pySC_ResponseMatrix +from pySC.apps import orbit_correction + from ..arrays.magnet_array import MagnetArray from ..common.element import Element, ElementConfigModel from ..common.exception import PyAMLException from ..configuration.factory import Factory from ..configuration.fileloader import get_path, load -from ..external.pySC.pySC import ResponseMatrix as pySC_ResponseMatrix -from ..external.pySC.pySC.apps import orbit_correction from ..external.pySC_interface import pySCInterface from .response_matrix import ResponseMatrix diff --git a/pyaml/tuning_tools/orbit_response_matrix.py b/pyaml/tuning_tools/orbit_response_matrix.py index 144ca77f..5323c5bd 100644 --- a/pyaml/tuning_tools/orbit_response_matrix.py +++ b/pyaml/tuning_tools/orbit_response_matrix.py @@ -2,13 +2,13 @@ from pathlib import Path from typing import List, Optional +import pySC from pydantic import BaseModel, ConfigDict +from pySC.apps import measure_ORM +from pySC.apps.codes import ResponseCode from ..common.element_holder import ElementHolder from ..common.exception import PyAMLException -from ..external.pySC import pySC -from ..external.pySC.pySC.apps import measure_ORM -from ..external.pySC.pySC.apps.codes import ResponseCode from ..external.pySC_interface import pySCInterface logger = logging.getLogger(__name__) diff --git a/pyaml/tuning_tools/response_matrix.py b/pyaml/tuning_tools/response_matrix.py index dfdf79c7..f78f5ed2 100644 --- a/pyaml/tuning_tools/response_matrix.py +++ b/pyaml/tuning_tools/response_matrix.py @@ -32,8 +32,3 @@ class ConfigModel(BaseModel): class ResponseMatrix(object): def __init__(self, cfg: ConfigModel): self._cfg = cfg - - # self.matrix = cfg.matrix - # self.input_names = cfg.input_names - # self.output_names = cfg.output_names - # self.rf_response = cfg.rf_response diff --git a/pyproject.toml b/pyproject.toml index 54bdaa63..aff501ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,6 +45,7 @@ dependencies = [ "accelerator-toolbox>=0.6.1", "PyYAML>=6.0.2", "pydantic>=2.11.7", + "accelerator-commissioning==0.4.0", #pySC "h5py", "matplotlib" ]