-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
New OrbitPath function needed
Problem description
When using the orbit_grid function from the OrbitTomography package, the code fails if you try to calculate the jacobians, because the OrbitTomography Package calls OrbitPath(o.path,jacdets)
, and there is no function ready to handle an Orbit Path and an array
Proposed solution
Modify lines 134 to 35 of src/orbit.jl
as:
struct OrbitPath{T}
vacuum::Bool
drift::Bool
energy::Vector{T}
pitch::Vector{T}
r::Vector{T}
z::Vector{T}
phi::Vector{T}
dt::Vector{T}
J::Vector{T}
end
function OrbitPath(T::DataType=Float64; vacuum=false,drift=false)
OrbitPath(vacuum,drift,T[],T[],T[],T[],T[],T[])
end
function OrbitPath(path::OrbitPath; jac::Vector{T})
path.J = jac
return path
end
Metadata
Metadata
Assignees
Labels
No labels