Skip to content

Commit 2f0d91d

Browse files
committed
Move __lattice and __refpts of BPMScalarAggregator to public namespace
1 parent 22565ed commit 2f0d91d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pyaml/lattice/abstract_impl.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ class BPMScalarAggregator(ScalarAggregator):
158158
"""
159159

160160
def __init__(self, ring:at.Lattice):
161-
self.__lattice = ring
162-
self.__refpts = []
161+
self.lattice = ring
162+
self.refpts = []
163163

164164
def add_elem(self,elem:at.Element):
165-
self.__refpts.append(self.__lattice.index(elem))
165+
self.refpts.append(self.lattice.index(elem))
166166

167167
def set(self, value: NDArray[np.float64]):
168168
pass
@@ -171,7 +171,7 @@ def set_and_wait(self, value: NDArray[np.float64]):
171171
pass
172172

173173
def get(self) -> np.array:
174-
_, orbit = at.find_orbit(self.__lattice, refpts=self.__refpts)
174+
_, orbit = at.find_orbit(self.lattice, refpts=self.refpts)
175175
return orbit[:, [0, 2]].flatten()
176176

177177
def readback(self) -> np.array:
@@ -188,7 +188,7 @@ class BPMHScalarAggregator(BPMScalarAggregator):
188188
"""
189189

190190
def get(self) -> np.array:
191-
_, orbit = at.find_orbit(self._BPMScalarAggregator__lattice, refpts=self._BPMScalarAggregator__refpts)
191+
_, orbit = at.find_orbit(self.lattice, refpts=self.refpts)
192192
return orbit[:, 0]
193193

194194
#------------------------------------------------------------------------------
@@ -199,7 +199,7 @@ class BPMVScalarAggregator(BPMScalarAggregator):
199199
"""
200200

201201
def get(self) -> np.array:
202-
_, orbit = at.find_orbit(self._BPMScalarAggregator__lattice, refpts=self._BPMScalarAggregator__refpts)
202+
_, orbit = at.find_orbit(self.lattice, refpts=self.refpts)
203203
return orbit[:, 2]
204204

205205
#------------------------------------------------------------------------------

0 commit comments

Comments
 (0)