Skip to content

Commit 7fccc08

Browse files
committed
Hotfix: Linear longitudinal tracking accepts Qs...
...in the form of a 1D array with length of one, as provided by the PyHEADTAIL synchrotron.
1 parent da0b0b9 commit 7fccc08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

trackers/simple_long_tracking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ def __init__(self, alpha_array, circumference, Qs, D_x=0, D_y=0,*args, **kwargs)
701701
'''
702702
super(LinearMap, self).__init__(alpha_array, circumference,
703703
*args, **kwargs)
704-
assert (np.isscalar(Qs)), "Qs has to be a scalar"
704+
assert (len(np.atleast_1d(Qs)) == 1), "Qs can only have one entry!"
705705
self.Qs = Qs
706706
self.D_x = D_x
707707
self.D_y = D_y

0 commit comments

Comments
 (0)