Skip to content

Commit

Permalink
add context to transverse damper
Browse files Browse the repository at this point in the history
  • Loading branch information
lgiacome committed Jan 15, 2025
1 parent 8cb5f20 commit 101345d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xwakes/beam_elements/transverse_damper.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ def __init__(self, gain_x, gain_y, zeta_range, num_slices,
'py': gain_y,
}

self.xoinitialize(**kwargs)

self.slicer = xf.UniformBinSlicer(
filling_scheme=filling_scheme,
bunch_selection=bunch_selection,
zeta_range=zeta_range,
num_slices=num_slices,
bunch_spacing_zeta=bunch_spacing_zeta,
moments=['px', 'py']
moments=['px', 'py'],
_context=self.context
)

if filling_scheme is not None:
Expand All @@ -74,7 +77,8 @@ def __init__(self, gain_x, gain_y, zeta_range, num_slices,
bunch_spacing_zeta=bunch_spacing_zeta,
num_periods=num_periods,
num_turns=1,
circumference=circumference
circumference=circumference,
_context=self.context
)

def _reconfigure_for_parallel(self, n_procs, my_rank):
Expand Down

0 comments on commit 101345d

Please sign in to comment.