Skip to content

Commit

Permalink
use indexing instead of np.float cast in function get_bunch_length_es…
Browse files Browse the repository at this point in the history
…pread of pyat/at/acceptance/touschek.py module (#706)

fsolve indexing in get_bunch_length touschek.py
  • Loading branch information
simoneliuzzo committed Nov 27, 2023
1 parent e3d35ef commit 6a4a554
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyat/at/acceptance/touschek.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def haissinski(x, cst):
nus = ep.f_s/ring.revolution_frequency
cst = (-0.5 * numpy.sqrt(numpy.pi) * bunch_curr * zn /
(vrf * h * cs * (abs(etac) * espread / nus)**3))
bl = numpy.float(bl0*fsolve(haissinski, (1,), args=cst))
bl = bl0*fsolve(haissinski, numpy.array([1.0]), args=cst)[0]
return bl, espread


Expand Down

0 comments on commit 6a4a554

Please sign in to comment.