From 785b150aab5b401ba3eebb14782a63be732dfb80 Mon Sep 17 00:00:00 2001 From: T-Nicholls Date: Fri, 25 Jul 2025 14:33:13 +0100 Subject: [PATCH 1/2] We always want the lattice energy in eV --- src/atip/load_sim.py | 2 +- src/atip/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/atip/load_sim.py b/src/atip/load_sim.py index 076aaa0..9aa70d3 100644 --- a/src/atip/load_sim.py +++ b/src/atip/load_sim.py @@ -32,7 +32,7 @@ def load_from_filepath( at_lattice = at.load.load_mat( at_lattice_filepath, name=pytac_lattice.name, - energy=pytac_lattice.get_value("energy"), + energy=pytac_lattice.get_value("energy", units=pytac.PHYS), ) return load(pytac_lattice, at_lattice, callback, disable_emittance) diff --git a/src/atip/utils.py b/src/atip/utils.py index eb57037..5712480 100644 --- a/src/atip/utils.py +++ b/src/atip/utils.py @@ -50,7 +50,7 @@ def loader(mode="I04", callback=None, disable_emittance=False): at_lattice = load_at_lattice( mode, periodicity=1, - energy=pytac_lattice.get_value("energy"), + energy=pytac_lattice.get_value("energy", units=pytac.PHYS), ) lattice = atip.load_sim.load(pytac_lattice, at_lattice, callback, disable_emittance) return lattice From 85714f148a313806ae4aea65174df093d0717114 Mon Sep 17 00:00:00 2001 From: T-Nicholls Date: Thu, 11 Sep 2025 12:45:41 +0100 Subject: [PATCH 2/2] Update minimum Pytac version now changes have been released. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1aa2a5c..673d0d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ description = "Accelerator Toolbox Interface for Pytac" dependencies = [ "numpy", "scipy", - "pytac>=0.3.0", + "pytac>=0.6.1", "accelerator-toolbox (>=0.2.0,<0.7.1)", "cothread", "softioc",