Skip to content

Commit 03d1677

Browse files
committed
Use at.All for refpts rather than building an array
1 parent 8a76d3d commit 03d1677

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

atip/simulator.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ class ATSimulator(object):
7979
_at_lat (at.lattice_object.Lattice): The centralised instance of an
8080
AT lattice from which the
8181
physics data is calculated.
82-
_rp (numpy.array): A boolean array to be used as refpts for the
83-
physics calculations.
8482
_disable_emittance (bool): Whether or not to perform the beam
8583
envelope based emittance calculations.
8684
_lattice_data (LatticeData): calculated physics data
@@ -119,13 +117,12 @@ def __init__(self, at_lattice, callback=None, disable_emittance=False):
119117
f"If passed, 'callback' should be callable, {callback} is not."
120118
)
121119
self._at_lat = at_lattice
122-
self._rp = numpy.ones(len(at_lattice) + 1, dtype=bool)
123120
self._disable_emittance = disable_emittance
124121
self._at_lat.radiation_on()
125122

126123
# Initial phys data calculation.
127124
self._lattice_data = calculate_optics(
128-
self._at_lat, self._rp, self._disable_emittance
125+
self._at_lat, at.All, self._disable_emittance
129126
)
130127

131128
# Threading stuff initialisation.
@@ -194,7 +191,7 @@ def _recalculate_phys_data(self, callback):
194191
if bool(self._paused) is False:
195192
try:
196193
self._lattice_data = calculate_optics(
197-
self._at_lat, self._rp, self._disable_emittance
194+
self._at_lat, at.All, self._disable_emittance
198195
)
199196
except Exception as e:
200197
warn(at.AtWarning(e))

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ include_package_data = true
2323
install_requires =
2424
numpy
2525
scipy
26-
pytac>=0.3.0
27-
accelerator-toolbox>=0.2.0
26+
pytac>=0.6.0
27+
accelerator-toolbox>=0.4.0
2828
cothread
2929
softioc
3030

0 commit comments

Comments
 (0)