Skip to content

Commit 0c12d7b

Browse files
SebastienJolySebastienJoly
authored andcommitted
Added deepcopy around variables to prevent next line to set their first element to zero.
1 parent b58d83b commit 0c12d7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pySC/lattice_properties/response_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ def SCgetModelRING(SC: SimulatedCommissioning, includeAperture: bool =False) ->
160160
ring = SC.IDEALRING.deepcopy()
161161
for ord in range(len(SC.RING)):
162162
if hasattr(SC.RING[ord], 'SetPointA') and hasattr(SC.RING[ord], 'SetPointB'):
163-
ring[ord].PolynomA = SC.RING[ord].SetPointA
164-
ring[ord].PolynomB = SC.RING[ord].SetPointB
163+
ring[ord].PolynomA = copy.deepcopy(SC.RING[ord].SetPointA)
164+
ring[ord].PolynomB = copy.deepcopy(SC.RING[ord].SetPointB)
165165
ring[ord].PolynomA[0] = 0.0
166166
ring[ord].PolynomB[0] = 0.0
167167
if includeAperture:

0 commit comments

Comments
 (0)