Skip to content
Snippets Groups Projects

Nonlinear chromaticity

Merged GUBAIDULIN requested to merge feature-nonlinear-chromaticity into develop
2 unresolved threads

Hello,

Nonlinear chromaticity implementation is now ready for a merge request. The list of changes is below. To trigger nonlinear chromaticity, you simply need to define the ring.chro = [Qx', Qy', Qx'', Qy'',..]. All orders are implemented. Orders < 4 are implemented separately to gain some performance over the numpy.polynomial.

Jupyter notebook to test the implementation: Nonlinear_chromaticity.ipynb

  • added nonlinear chromaticity calculation to TransverseMap and TransverseSectorMap
  • TransverseMap now inherits from TransverseSectorMap
  • chromaticity phase shift is computed in _compute_chromatic_phase_advances()
  • some optimisation of the code, (250 ms -> <50 ms) speed up for typical simulation Slight improvements for SynchrotronRadiation
  • np.random.normal -> np.random.standard_normal, 10% faster
  • N = len(bunch) to compute the number of particles only once
Edited by GUBAIDULIN

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 503 425 chrox = np.interp(pos, s, Chrox)
    504 426 chroy = np.interp(pos, s, Chroy)
    505 427
    506 428 return np.array([chrox, chroy])
    • Very nice, in particular the code factorisation for TransverseMap/TransverseSectorMap and speed improvement. Do we have a standard way to compute these higher orders ? This could be a feature to add to Synchrotron class in the future.

    • Do you mean higher orders of chromaticity? You can compute that in pyAT, similar to how you compute linear chromaticity. I've done it at some point to see how big the 2nd order chromaticity is in SOLEIL II lattice.

    • Do you mean higher orders of chromaticity? You can do that in pyAT, in a similar way you compute linear chromaticity for sectormapgenerator.

    • Yes that's what I mean. I think we should add a standard way to compute it in mbtrack2 using pyAT like done in Synchrotron.get_adts and Synchrotron.get_mcf_order for example.

    • I've added a way to do that to transverse_map_sector_generator. And removed your old way to get the chromaticity, which was probably not OK because you only looked at tune difference which includes all orders of chromaticity.

    • NVM, the method does not compute it from point to point (s_0 to s_1) but does the whole ring. So, for sector generation I need to modify it still.

    • Please register or sign in to reply
  • GUBAIDULIN added 1 commit

    added 1 commit

    • cf5c6230 - - _compute_chromatic_phase_advance() -> _compute_chromatic_tune_advance()

    Compare with previous version

  • GUBAIDULIN added 2 commits

    added 2 commits

    • 7e809eba - - _compute_chromatic_phase_advance() -> _compute_chromatic_tune_advance()
    • 454b0e7a - Merge branch 'feature-nonlinear-chromaticity' of...

    Compare with previous version

  • GUBAIDULIN added 1 commit

    added 1 commit

    • 4770618a - changed chromaticity computation in _compute_chro() of...

    Compare with previous version

  • GUBAIDULIN added 1 commit

    added 1 commit

    • 9529ba34 - added get_chroma() method to compute chromaticity up to arbitrary order from the lattice file.

    Compare with previous version

  • GUBAIDULIN added 2 commits

    added 2 commits

    • b4d900f8 - added get_chroma() method to compute chromaticity up to arbitrary order from the lattice file.
    • fd592ca3 - Merge branch 'feature-nonlinear-chromaticity' of...

    Compare with previous version

  • Alexis GAMELIN
  • Alexis GAMELIN
  • GUBAIDULIN added 1 commit

    added 1 commit

    Compare with previous version

  • added 1 commit

    • 6233924f - Add lattice check to get_chroma.

    Compare with previous version

  • Alexis GAMELIN approved this merge request

    approved this merge request

  • GUBAIDULIN mentioned in commit 65908062

    mentioned in commit 65908062

  • merged

  • Please register or sign in to reply
    Loading