bmad-sim / NonlinearNormalForm.jl

Nonlinear normal form analysis using truncated power series
https://bmad-sim.github.io/NonlinearNormalForm.jl/
GNU General Public License v3.0
1 stars 0 forks source link

rand(DAMap, spin=true) does not give higher order spin terms. #26

Closed DavidSagan closed 3 months ago

DavidSagan commented 4 months ago
julia> d = Descriptor(2,2);
julia> m = rand(DAMap, spin=true) # Rand symplectic map including spin
DAMap{Float64, TPS, Quaternion{TPS}, Nothing}:
Reference Orbit Vector{Float64}:
1:   0.0
2:   0.0

Orbital Ray Vector{TPS}:
  Out  Coefficient                Order   Exponent
----------------------------------------------------
   1:   8.1101993966198205e-01      1      1   0
   1:  -1.6248124638669312e-01      1      0   1
   1:  -2.4366333428567447e-01      2      2   0
   1:  -1.4374421426166708e+00      2      1   1
   1:  -1.2069500706559679e+00      2      0   2
----------------------------------------------------
   2:   2.0066006241921230e-01      1      1   0
   2:   1.1928146962222499e+00      1      0   1
   2:   1.1918359785245087e+00      2      2   0
   2:  -1.1645682660555752e-01      2      1   1
   2:   7.7011103482282994e-01      2      0   2

Quaternion{TPS}:
  Out  Coefficient                Order   Exponent
----------------------------------------------------
  q0:   1.0745368850792125e-01      0      0   0
----------------------------------------------------
  q1:   6.9840876842554311e-01      0      0   0
----------------------------------------------------
  q2:   6.9444018451635481e-01      0      0   0
----------------------------------------------------
  q3:   1.3576349708684621e-01      0      0   0
mattsignorelli commented 4 months ago

I am unable to replicate this - it could likely be related to a bug in the current release of GTPSA, which Laurent fixed (waiting on jll people to merge).

Could you dev GTPSA and see if it goes away?

mattsignorelli commented 4 months ago

You'd have to dev NonlinearNormalForm too

DavidSagan commented 4 months ago

Yup. I do not see the problem with the dev version.

mattsignorelli commented 4 months ago

Great, once the Julia people merge the new binary I will create a new release of GTPSA and fix NonlinearNormalForm's GTPSA compat requirement