bmad-sim / bmad-sim/BeamTracking.jl
Tracking with wrong sign for R_ref gives NaN with no message
Open
bug
- Dominant language
- Julia
- Stars
- 8
- Forks
- 8
- Avg merge
- 16h 2m
- Merged PRs (30d)
- 6
Description
Test program:
```
using BeamTracking
using Beamlines
@eles begin
q = Drift(L = 1, tracking_method = Exact())
end
bb = Beamline([q], R_ref = -1e7, species_ref = Species("electron"))
v1 = [0.0 0.0 0.0 0.0 0.0 0.0]
b1 = Bunch(deepcopy(v1), species=Species("electron"), R_ref = -1e7)
track!(b1, q)
println(b1.coords.v)
b2 = Bunch(deepcopy(v1), species=Species("electron"), R_ref = 1e7)
track!(b2, q)
println(b2.coords.v)
```
Output is:
```
julia> include("local/z.jl")
[0.0 0.0 0.0 0.0 0.0 0.0]
[0.0 0.0 0.0 0.0 NaN 0.0]
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.