Skip to content

Commit

Permalink
Many changes in BBA
Browse files Browse the repository at this point in the history
    fits and error propagation in data analysis
    streamlined and sped up the beam reach scan
    removed unnecessary parameters, typically cuts
    separated real and simulation-only observables
    merge pseudoBBA and fake measurement functionality to fake_bba
  • Loading branch information
lmalina committed Sep 7, 2023
1 parent 60cb6b7 commit 2395247
Show file tree
Hide file tree
Showing 3 changed files with 276 additions and 230 deletions.
10 changes: 10 additions & 0 deletions pySC/core/simulated_commissioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def register_magnets(self, ords: ndarray, **kwargs):
if ind not in self.SIG.Magnet.keys():
self.SIG.Magnet[ind] = DotDict()
self.SIG.Magnet[ind].update(nvpairs)
# TODO Correctors
for ab in AB:
order = len(getattr(self.RING[ind], f"Polynom{ab}"))
for field in ("NomPolynom", "SetPoint", "CalError"):
Expand Down Expand Up @@ -314,6 +315,15 @@ def support_offset_and_roll(self, s_locations: ndarray) -> Tuple[ndarray, ndarra
return off, roll
return off0, roll0

def very_deep_copy(self):
copied_structure = copy.deepcopy(self)
copied_structure.RING = self.RING.deepcopy()
copied_structure.IDEALRING = self.IDEALRING.deepcopy()
for ind, element in enumerate(self.RING):
copied_structure.RING[ind] = element.deepcopy()
copied_structure.IDEALRING[ind] = element.deepcopy()
return copied_structure

def verify_structure(self):
# BPMs
if n_bpms := len(self.ORD.BPM) == 0:
Expand Down
Loading

0 comments on commit 2395247

Please sign in to comment.