simba-accelerator 0.6.0__tar.gz → 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- simba_accelerator-0.7.0/.github/workflows/tests.yml +77 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/PKG-INFO +6 -2
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/SimCodes.rst +2 -1
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/index.rst +1 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/ring-studies.rst +75 -7
- simba_accelerator-0.7.0/docs/source/simba.Codes.ImpactX.rst +21 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Codes.rst +1 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/meta.yml +1 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/pyproject.toml +9 -1
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/ASTRA/ASTRA.py +9 -52
- simba_accelerator-0.7.0/simba/Codes/BDSIM/BDSIM.py +460 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Bmad/Bmad.py +249 -26
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Cheetah/Cheetah.py +25 -11
- simba_accelerator-0.7.0/simba/Codes/Cheetah/cheetah_defaults.yaml +2 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Elegant/Elegant.py +1 -1
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Executables.py +8 -0
- simba_accelerator-0.7.0/simba/Codes/FBPIC/FBPIC.py +1153 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/GPT/GPT.py +68 -30
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Generators/gpt.py +2 -3
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Genesis/Genesis.py +31 -4
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Genesis/commands_Genesis.yaml +11 -7
- simba_accelerator-0.7.0/simba/Codes/ImpactX/ImpactX.py +745 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/MADX/MADX.py +50 -12
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/OPAL/OPAL.py +33 -18
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Ocelot/Ocelot.py +80 -22
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Ocelot/savebeamopenpmd.py +4 -1
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Wake_T/Wake_T.py +17 -5
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Xsuite/Xsuite.py +137 -27
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Executables.yaml +5 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Framework.py +16 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/FrameworkHelperFunctions.py +23 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Framework_Settings.py +2 -3
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Framework_lattices.py +3 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Framework_objects.py +297 -22
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/Particles/__init__.py +7 -4
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/__init__.py +174 -4
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/astra.py +11 -1
- simba_accelerator-0.7.0/simba/Modules/Beams/bdsim.py +417 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/cheetah.py +10 -3
- simba_accelerator-0.7.0/simba/Modules/Beams/fbpic.py +249 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/gdf.py +10 -5
- simba_accelerator-0.7.0/simba/Modules/Beams/impactx.py +91 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/ocelot.py +16 -5
- simba_accelerator-0.7.0/simba/Modules/Beams/openpmd.py +313 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/sdds.py +12 -8
- simba_accelerator-0.7.0/simba/Modules/Beams/wake_t.py +80 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/xsuite.py +68 -32
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Twiss/__init__.py +4 -0
- simba_accelerator-0.7.0/simba/Modules/plotting/__init__.py +0 -0
- simba_accelerator-0.7.0/simba/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/exceptions.py +110 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba_accelerator.egg-info/PKG-INFO +6 -2
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba_accelerator.egg-info/SOURCES.txt +27 -1
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba_accelerator.egg-info/requires.txt +6 -1
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba_accelerator.egg-info/scm_file_list.json +28 -2
- simba_accelerator-0.7.0/simba_accelerator.egg-info/scm_version.json +8 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/helpers.py +1 -1
- simba_accelerator-0.7.0/unit_tests/test_bdsim_physics.py +434 -0
- simba_accelerator-0.7.0/unit_tests/test_bdsim_turns.py +92 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_beam.py +10 -0
- simba_accelerator-0.7.0/unit_tests/test_beam_species.py +409 -0
- simba_accelerator-0.7.0/unit_tests/test_bmad_native_multipass.py +51 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_chicane_group.py +23 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_cross_code_ring.py +44 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_dynamic_aperture.py +46 -1
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_energy_ramp.py +7 -6
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_framework_lattice.py +80 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_generator.py +37 -1
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_genesis_bugs.py +13 -0
- simba_accelerator-0.7.0/unit_tests/test_gpt_cathode_csr.py +54 -0
- simba_accelerator-0.7.0/unit_tests/test_gpt_crest_peak.py +22 -0
- simba_accelerator-0.7.0/unit_tests/test_gpt_path.py +19 -0
- simba_accelerator-0.7.0/unit_tests/test_gpt_screens.py +28 -0
- simba_accelerator-0.7.0/unit_tests/test_impactx.py +295 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_jfel_code_comparison.py +9 -5
- simba_accelerator-0.7.0/unit_tests/test_local_frame.py +72 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_madx_native_turns.py +21 -5
- simba_accelerator-0.7.0/unit_tests/test_multipass_outputs.py +66 -0
- simba_accelerator-0.7.0/unit_tests/test_ocelot_wake_file.py +25 -0
- simba_accelerator-0.7.0/unit_tests/test_opal_bugs.py +52 -0
- simba_accelerator-0.7.0/unit_tests/test_plasma_beam_conversion.py +80 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_radiation.py +1 -1
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_rf_modes.py +9 -6
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_ring_outputs.py +26 -6
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_ring_reference_energy.py +8 -4
- simba_accelerator-0.7.0/unit_tests/test_sdds_weighted_beam.py +38 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_simcodes_tracking.py +76 -2
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_solenoid_and_alignment.py +15 -1
- simba_accelerator-0.7.0/unit_tests/test_species_tracking.py +208 -0
- simba_accelerator-0.7.0/unit_tests/test_xsuite_apertures.py +89 -0
- simba_accelerator-0.7.0/unit_tests/test_xsuite_wakes.py +60 -0
- simba_accelerator-0.6.0/.github/workflows/tests.yml +0 -53
- simba_accelerator-0.6.0/simba/Codes/Cheetah/cheetah_defaults.yaml +0 -1
- simba_accelerator-0.6.0/simba/Modules/Beams/openpmd.py +0 -171
- simba_accelerator-0.6.0/simba/Modules/Beams/wake_t.py +0 -52
- simba_accelerator-0.6.0/simba_accelerator.egg-info/scm_version.json +0 -8
- simba_accelerator-0.6.0/unit_tests/test_opal_bugs.py +0 -7
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/.github/workflows/python-publish.yml +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/.gitignore +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/LICENSE +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/MANIFEST.in +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/Makefile +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/README.md +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/.venv/pyvenv.cfg +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/Makefile +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/make.bat +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/rebuild.sh +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/requirements.txt +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/Framework.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/Framework_elements.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/Framework_objects.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/assets/elegant-fodo.png +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/assets/ocelot-fodo.png +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/conf.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/examples/notebooks/CLA-S02-DIA-SCR-03.openpmd.hdf5 +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/examples/notebooks/beams_example.ipynb +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/examples/notebooks/getting_started.ipynb +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/examples/notebooks/utility_functions.ipynb +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/getting-started.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/installation.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/loading-a-lattice.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/references.bib +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Codes.ASTRA.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Codes.Bmad.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Codes.CSRTrack.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Codes.Cheetah.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Codes.Elegant.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Codes.GPT.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Codes.Generators.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Codes.Genesis.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Codes.MADX.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Codes.OPAL.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Codes.Ocelot.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Codes.Wake_T.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Codes.Xsuite.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Modules.Beams.Particles.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Modules.Beams.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Modules.Matrices.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Modules.Twiss.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Modules.plotting.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.Modules.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/docs/source/simba.rst +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/examples/notebooks/CLA-S02-DIA-SCR-03.openpmd.hdf5 +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/examples/notebooks/beams_example.ipynb +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/examples/notebooks/getting_started.ipynb +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/examples/notebooks/params.yaml +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/examples/notebooks/utility_functions.ipynb +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/examples/ring_studies/da_fma.png +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/examples/ring_studies/da_fma.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/make.bat +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/readthedocs.yml +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/requirements.txt +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/setup.cfg +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/setup.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/.gitignore +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/ASTRA/ASTRARules.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/ASTRA/__init__.py +0 -0
- {simba_accelerator-0.6.0/simba/Codes/CSRTrack → simba_accelerator-0.7.0/simba/Codes/BDSIM}/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Bmad/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/CSRTrack/CSRTrack.py +0 -0
- {simba_accelerator-0.6.0/simba/Codes/Cheetah → simba_accelerator-0.7.0/simba/Codes/CSRTrack}/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/CSRTrack/csrtrack_defaults.yaml +0 -0
- {simba_accelerator-0.6.0/simba/Codes/Elegant → simba_accelerator-0.7.0/simba/Codes/Cheetah}/__init__.py +0 -0
- {simba_accelerator-0.6.0/simba/Codes/GPT → simba_accelerator-0.7.0/simba/Codes/Elegant}/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Elegant/commands_Elegant.yaml +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Elegant/keyword_conversion_rules_elegant.yaml +0 -0
- {simba_accelerator-0.6.0/simba/Codes/Genesis → simba_accelerator-0.7.0/simba/Codes/FBPIC}/__init__.py +0 -0
- {simba_accelerator-0.6.0/simba/Codes/OPAL → simba_accelerator-0.7.0/simba/Codes/GPT}/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Generators/Generators.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Generators/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Generators/aliases.yaml +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Generators/astra.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Generators/astra.yaml +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Generators/elegant.yaml +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Generators/gpt.yaml +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Generators/keywords.yaml +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Generators/opal.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Generators/opal.yaml +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Generators/species.yaml +0 -0
- {simba_accelerator-0.6.0/simba/Codes/Ocelot → simba_accelerator-0.7.0/simba/Codes/Genesis}/__init__.py +0 -0
- {simba_accelerator-0.6.0/simba/Codes/Wake_T → simba_accelerator-0.7.0/simba/Codes/ImpactX}/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/MADX/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/MADX/madx_defaults.yaml +0 -0
- {simba_accelerator-0.6.0/simba/Codes/Xsuite → simba_accelerator-0.7.0/simba/Codes/OPAL}/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/OPAL/commands_Opal.yaml +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/OPAL/globals_Opal.yaml +0 -0
- {simba_accelerator-0.6.0/simba/Modules/plotting → simba_accelerator-0.7.0/simba/Codes/Ocelot}/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Ocelot/bendmaps.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Ocelot/cavitymaps.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Ocelot/fixedreference.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Ocelot/latticefile.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Ocelot/mbi.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Ocelot/navigator.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/Ocelot/ocelot_defaults.yaml +0 -0
- {simba_accelerator-0.6.0/simba → simba_accelerator-0.7.0/simba/Codes/Wake_T}/__init__.py +0 -0
- /simba_accelerator-0.6.0/unit_tests/downloaded_files/dashboard.lock → /simba_accelerator-0.7.0/simba/Codes/Xsuite/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Codes/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Framework_elements.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/.gitignore +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/Particles/centroids.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/Particles/emittance.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/Particles/kde.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/Particles/minimumVolumeEllipse.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/Particles/mve.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/Particles/sigmas.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/Particles/slice.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/Particles/twiss.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/genesis.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/hdf5.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/mad8.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/madx.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/opal.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Beams/plot.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/DeviceProgram.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/EnergyRamp.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/MathParser.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Matrices/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Matrices/elegant.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/SDDSFile.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Twiss/astra.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Twiss/bmad.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Twiss/cheetah.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Twiss/elegant.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Twiss/genesis.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Twiss/gpt.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Twiss/hdf5.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Twiss/madx.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Twiss/ocelot.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Twiss/opal.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Twiss/plot.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Twiss/xsuite.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/Wavefronts/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/__init__.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/constants.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/gdf_beam.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/gdf_emit.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/plotting/plotting.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/plotting/ring.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/rf_focusing.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Modules/units.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/Vision_Mission.docx +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/elementkeywords.yaml +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/hosts.yaml +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba/yaml_checker.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba_accelerator.egg-info/dependency_links.txt +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/simba_accelerator.egg-info/top_level.txt +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/tests/test_ocelot_tw1.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/tests/test_tw1_cavity.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/conftest.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_bmad_bugs.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_bmad_turn_handback.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_bpm_has_no_beam_file.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_closed_orbit.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_collective_flags.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_csrtrack_bugs.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_device_programs.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_energy_program.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_exceptions.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_executables.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_framework.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_framework_objects.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_frequency_map.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_ocelot_bugs.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_ocelot_cavity_maps.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_ocelot_lattice_file.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_ocelot_navigator.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_one_turn_map.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_otm_conventions.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_output_collisions.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_path_arc_lengths.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_periodic.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_plotting.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_ring_backend_guards.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_ring_parameters.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_ring_plots.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_sdds_file.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_single_particle.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_summary_scaling.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_superperiods.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_turn_axis.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_turn_count.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_twiss_readers.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_units.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_write_turns.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_xsuite_bugs.py +0 -0
- {simba_accelerator-0.6.0 → simba_accelerator-0.7.0}/unit_tests/test_xsuite_space_charge.py +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main]
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: "0 3 * * *"
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
unit-tests:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
cache: pip
|
|
21
|
+
|
|
22
|
+
- name: Install simba
|
|
23
|
+
run: |
|
|
24
|
+
python -m pip install --upgrade pip
|
|
25
|
+
pip install -e .[test,simcodes]
|
|
26
|
+
|
|
27
|
+
- name: Use LAURA's branch of the same name, if there is one
|
|
28
|
+
run: |
|
|
29
|
+
laura=https://github.com/astec-stfc/laura.git
|
|
30
|
+
branch="${{ github.head_ref || github.ref_name }}"
|
|
31
|
+
if git ls-remote --exit-code --heads "$laura" "$branch" >/dev/null; then
|
|
32
|
+
# LAURA's v* tags are lightweight, so a branch build describes itself as 0.9b1.postN,
|
|
33
|
+
# below simba's laura-accelerator>=1.1.0: version it as the latest release + the branch
|
|
34
|
+
release=$(git ls-remote --tags --sort=-v:refname "$laura" 'v*' | grep -v '\^{}' | head -1 | sed 's|.*refs/tags/v||')
|
|
35
|
+
export SETUPTOOLS_SCM_PRETEND_VERSION_FOR_LAURA_ACCELERATOR="$release+$(echo "$branch" | tr -c '[:alnum:]\n' '.')"
|
|
36
|
+
pip install "laura-accelerator @ git+$laura@$branch"
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
- name: Run unit tests (no container image needed)
|
|
40
|
+
run: pytest unit_tests/ -v -m "not needs_container"
|
|
41
|
+
|
|
42
|
+
container-tests:
|
|
43
|
+
# The simcodes image is several GB, so only pull it nightly or on demand.
|
|
44
|
+
if: github.event_name != 'pull_request'
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
timeout-minutes: 60
|
|
47
|
+
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v4
|
|
50
|
+
|
|
51
|
+
- uses: actions/setup-python@v5
|
|
52
|
+
with:
|
|
53
|
+
python-version: "3.12"
|
|
54
|
+
cache: pip
|
|
55
|
+
|
|
56
|
+
- name: Install simba
|
|
57
|
+
run: |
|
|
58
|
+
python -m pip install --upgrade pip
|
|
59
|
+
pip install -e .[test,simcodes]
|
|
60
|
+
|
|
61
|
+
- name: Use LAURA's branch of the same name, if there is one
|
|
62
|
+
run: |
|
|
63
|
+
laura=https://github.com/astec-stfc/laura.git
|
|
64
|
+
branch="${{ github.head_ref || github.ref_name }}"
|
|
65
|
+
if git ls-remote --exit-code --heads "$laura" "$branch" >/dev/null; then
|
|
66
|
+
# LAURA's v* tags are lightweight, so a branch build describes itself as 0.9b1.postN,
|
|
67
|
+
# below simba's laura-accelerator>=1.1.0: version it as the latest release + the branch
|
|
68
|
+
release=$(git ls-remote --tags --sort=-v:refname "$laura" 'v*' | grep -v '\^{}' | head -1 | sed 's|.*refs/tags/v||')
|
|
69
|
+
export SETUPTOOLS_SCM_PRETEND_VERSION_FOR_LAURA_ACCELERATOR="$release+$(echo "$branch" | tr -c '[:alnum:]\n' '.')"
|
|
70
|
+
pip install "laura-accelerator @ git+$laura@$branch"
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
- name: Pull simcodes image
|
|
74
|
+
run: docker pull ghcr.io/astec-stfc/simcodes-docker:master
|
|
75
|
+
|
|
76
|
+
- name: Run tracking tests via docker
|
|
77
|
+
run: pytest unit_tests/ -v -m needs_container
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: simba-accelerator
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: A python framework for particle accelerator simulations
|
|
5
5
|
Author-email: James Jones <james.jones@stfc.ac.uk>
|
|
6
6
|
Maintainer-email: James Jones <james.jones@stfc.ac.uk>, Alex Brynes <alexander.brynes@stfc.ac.uk>, Mark Johnson <mark.johnson@stfc.ac.uk>
|
|
@@ -36,15 +36,19 @@ Requires-Dist: pyfftw
|
|
|
36
36
|
Requires-Dist: numexpr
|
|
37
37
|
Requires-Dist: openpmd-beamphysics>=0.10
|
|
38
38
|
Requires-Dist: xopt
|
|
39
|
-
Requires-Dist: laura-accelerator>=1.1.
|
|
39
|
+
Requires-Dist: laura-accelerator>=1.1.2
|
|
40
40
|
Requires-Dist: pytao>=1.0.0
|
|
41
41
|
Requires-Dist: nafflib
|
|
42
42
|
Provides-Extra: simcodes
|
|
43
43
|
Requires-Dist: ocelot-desy==25.06.0; extra == "simcodes"
|
|
44
44
|
Requires-Dist: xsuite>=0.39.0; extra == "simcodes"
|
|
45
|
+
Requires-Dist: xwakes>=0.2; extra == "simcodes"
|
|
45
46
|
Requires-Dist: cheetah-accelerator>=0.8.4; extra == "simcodes"
|
|
46
47
|
Requires-Dist: Wake-T>=0.8.0; extra == "simcodes"
|
|
47
48
|
Requires-Dist: cpymad>=1.19.0; extra == "simcodes"
|
|
49
|
+
Provides-Extra: fbpic
|
|
50
|
+
Requires-Dist: fbpic>=0.27; extra == "fbpic"
|
|
51
|
+
Requires-Dist: periodictable; extra == "fbpic"
|
|
48
52
|
Provides-Extra: test
|
|
49
53
|
Requires-Dist: pytest; extra == "test"
|
|
50
54
|
Requires-Dist: pytest-cov; extra == "test"
|
|
@@ -26,6 +26,7 @@ whether a container runtime is used for the other codes:
|
|
|
26
26
|
|
|
27
27
|
* `Ocelot <https://github.com/ocelot-collab/ocelot>`_ :cite:`OCELOT`
|
|
28
28
|
* `Xsuite <https://github.com/xsuite>`_ :cite:`Xsuite`
|
|
29
|
+
* `ImpactX <https://impactx.readthedocs.io>`_
|
|
29
30
|
* `Cheetah <https://github.com/desy-ml/cheetah>`_ :cite:`Cheetah`
|
|
30
31
|
* `Wake-T <https://github.com/AngelFP/Wake-T>`_ :cite:`WakeT`
|
|
31
32
|
|
|
@@ -118,7 +119,7 @@ image via the local Docker daemon instead of writing a ``.sif`` file to the ``si
|
|
|
118
119
|
| ``container_runtime`` covers ASTRA, Elegant, CSRTrack, OPAL, and Genesis. **GPT is not included**,
|
|
119
120
|
as it is proprietary and requires a license; it must be installed locally (see
|
|
120
121
|
:func:`~simba.Codes.Executables.Executables.define_gpt_command`) and run with ``GPTLICENSE`` set.
|
|
121
|
-
| The python-based codes (Ocelot, Xsuite, Cheetah, Wake-T) run in-process and are unaffected by
|
|
122
|
+
| The python-based codes (Ocelot, Xsuite, ImpactX, Cheetah, Wake-T) run in-process and are unaffected by
|
|
122
123
|
``container_runtime`` - install them locally via the ``simcodes`` extra regardless.
|
|
123
124
|
|
|
124
125
|
.. _windows-wsl:
|
|
@@ -17,6 +17,7 @@ It provides a wrapper for several well-known particle tracking codes:
|
|
|
17
17
|
* `Ocelot <https://github.com/ocelot-collab/ocelot>`_ :cite:`OCELOT`
|
|
18
18
|
* `Cheetah <https://github.com/desy-ml/cheetah>`_ :cite:`Cheetah`
|
|
19
19
|
* `Xsuite <https://github.com/xsuite>`_ :cite:`Xsuite`
|
|
20
|
+
* `ImpactX <https://impactx.readthedocs.io>`_
|
|
20
21
|
* `Wake-T <https://github.com/AngelFP/Wake-T>`_ :cite:`WakeT`
|
|
21
22
|
* `MAD-X <https://mad.web.cern.ch/mad/>`_
|
|
22
23
|
* `Bmad <https://www.classe.cornell.edu/bmad/>`_
|
|
@@ -257,8 +257,9 @@ is :math:`n \cdot T_{rev}` for 0-based :math:`n`, so each backend converts.
|
|
|
257
257
|
**Values are the element's strength as the lattice states it** — a deflection angle
|
|
258
258
|
in radians for a steering element, positive toward positive *x* (or *y*), not a
|
|
259
259
|
fraction of anything. Each backend converts into its own code's attribute: a
|
|
260
|
-
corrector's angle is Ocelot's ``angle``, MAD-X's ``kick
|
|
261
|
-
unchanged, but Xtrack's ``knl[0]`` with
|
|
260
|
+
corrector's angle is Ocelot's ``angle``, MAD-X's ``kick``, elegant's ``ANGLE``
|
|
261
|
+
and ImpactX's ``xkick``/``ykick`` unchanged, but Xtrack's ``knl[0]`` with
|
|
262
|
+
the **sign reversed**, because a positive
|
|
262
263
|
normal multipole deflects the other way there.
|
|
263
264
|
|
|
264
265
|
**The default rule is** ``hold``, **and that is no code's default.** Every tracking
|
|
@@ -409,13 +410,18 @@ How each code does it
|
|
|
409
410
|
* - MAD-X
|
|
410
411
|
- Between turns of SIMBA's loop: the ring's reference ``p0c`` and time are
|
|
411
412
|
carried from turn to turn rather than taken from the bunch.
|
|
413
|
+
* - ImpactX
|
|
414
|
+
- Between turns of SIMBA's loop, as Ocelot: the reference is moved and each
|
|
415
|
+
particle's ``pt``, ``px`` and ``py`` re-expressed. Its strengths are
|
|
416
|
+
normalised, so the magnets follow. The exact solenoid's ``bz`` is a
|
|
417
|
+
field, so it is scaled with the reference's momentum each turn.
|
|
412
418
|
* - Bmad
|
|
413
419
|
- Not supported yet; its tracking path here is single-pass.
|
|
414
420
|
|
|
415
|
-
``unit_tests/test_energy_ramp.py`` tracks one ramped ring through all
|
|
421
|
+
``unit_tests/test_energy_ramp.py`` tracks one ramped ring through all five
|
|
416
422
|
codes. Over a 2% ramp with no RF, the ramp moves the orbit by about 1.2e-4 m.
|
|
417
|
-
Xsuite and
|
|
418
|
-
lenses are thin, agrees to 2e-5 m.
|
|
423
|
+
Xsuite, Ocelot and ImpactX agree with elegant to 1e-7 m, 3e-6 m and 6e-8 m.
|
|
424
|
+
MAD-X, whose lenses are thin, agrees to 2e-5 m.
|
|
419
425
|
|
|
420
426
|
.. _rf-mode:
|
|
421
427
|
|
|
@@ -474,6 +480,10 @@ own. The reference reaches a cavity at
|
|
|
474
480
|
- synchronous
|
|
475
481
|
- each cavity's ``phi`` between passes. Its sign is the opposite of the
|
|
476
482
|
others', because Ocelot's phase is cosine-based.
|
|
483
|
+
* - ImpactX
|
|
484
|
+
- synchronous
|
|
485
|
+
- each ``ShortRF``'s ``phase`` between passes; the lattice is rebuilt
|
|
486
|
+
every pass.
|
|
477
487
|
|
|
478
488
|
.. note::
|
|
479
489
|
**Ocelot's cavity moves the reference.** Its cavity map always adds
|
|
@@ -555,9 +565,34 @@ A code that cannot honour a setting warns and carries on.
|
|
|
555
565
|
- yes
|
|
556
566
|
- no
|
|
557
567
|
- no
|
|
568
|
+
* - ImpactX
|
|
569
|
+
- yes
|
|
570
|
+
- yes
|
|
571
|
+
- quantum only
|
|
572
|
+
- yes
|
|
573
|
+
- yes
|
|
574
|
+
- yes
|
|
575
|
+
- yes
|
|
576
|
+
- no
|
|
577
|
+
- yes
|
|
578
|
+
* - BDSIM
|
|
579
|
+
- yes (circular mode)
|
|
580
|
+
- no
|
|
581
|
+
- no
|
|
582
|
+
- no
|
|
583
|
+
- no
|
|
584
|
+
- no
|
|
585
|
+
- no
|
|
586
|
+
- no
|
|
587
|
+
- no
|
|
558
588
|
|
|
559
589
|
ASTRA, GPT, Cheetah, OPAL, Wake-T and CSRTrack track a line once and have none of these.
|
|
560
590
|
|
|
591
|
+
BDSIM's turns run inside one Geant4 process, so nothing can change between them.
|
|
592
|
+
It has no reference-momentum ramp, and its field modulators (a sinusoid, or one
|
|
593
|
+
top-hat or linear window in time) cannot express a knotted program, so programs
|
|
594
|
+
and ramps are left unsupported rather than approximated.
|
|
595
|
+
|
|
561
596
|
.. _native-turns:
|
|
562
597
|
|
|
563
598
|
Who Counts the Turns
|
|
@@ -591,8 +626,8 @@ The two paths are the same tracking, and ``unit_tests/test_madx_native_turns.py`
|
|
|
591
626
|
holds them to it turn by turn. The override is what lets that test run both.
|
|
592
627
|
|
|
593
628
|
.. note::
|
|
594
|
-
Ocelot and
|
|
595
|
-
count to switch to.
|
|
629
|
+
Ocelot, Bmad and ImpactX still count turns in Python, and none has a native
|
|
630
|
+
turn count to switch to.
|
|
596
631
|
|
|
597
632
|
**Bmad.** Tao has no multi-turn beam tracking: ``beam_init`` carries no turn
|
|
598
633
|
count, ``tao.track_beam`` is one pass, and the only turn counts in Tao are
|
|
@@ -607,6 +642,39 @@ holds them to it turn by turn. The override is what lets that test run both.
|
|
|
607
642
|
``track_nturns``, despite the name, takes a list of single particles and is
|
|
608
643
|
the dynamic-aperture tool, not a ``ParticleArray`` path.
|
|
609
644
|
|
|
645
|
+
.. note::
|
|
646
|
+
**BDSIM** takes the count natively, in its circular mode
|
|
647
|
+
(``option, circular=1, nturns=N``).
|
|
648
|
+
BDSIM builds the line in 3D and adds a terminator, which counts the turns,
|
|
649
|
+
and a teleporter, which moves each particle back to the start. The
|
|
650
|
+
teleporter only bridges a gap of 0.03 µm to 1 m along the beam, so the line
|
|
651
|
+
must close *geometrically*, through its bends.
|
|
652
|
+
A ring that closes exactly fails too, so SIMBA takes 2 µm off the last
|
|
653
|
+
drift. 1 µm of that goes to a drift after the last element, because a
|
|
654
|
+
sampler next to the terminator counts every turn twice (seen with BDSIM
|
|
655
|
+
1.7.7).
|
|
656
|
+
|
|
657
|
+
A single pass round a closed ring also runs in circular mode, with
|
|
658
|
+
``nturns=1``. Otherwise nothing stops the particles and the run never ends.
|
|
659
|
+
|
|
660
|
+
Read ``z`` from BDSIM with care. SIMBA rebuilds it from the arrival time,
|
|
661
|
+
and BDSIM's default ``bdsimmatrix`` integrators leave each particle's path
|
|
662
|
+
length through a bend out of that time. Through dispersion, ``z`` then keeps
|
|
663
|
+
its starting spread while MAD-X and elegant show the bunch lengthen, and
|
|
664
|
+
SIMBA warns (:class:`~simba.exceptions.BunchLengthWarning`). The
|
|
665
|
+
``bdsimtwo`` and ``geant4`` sets get the time right; pick one in the
|
|
666
|
+
``tracking`` block:
|
|
667
|
+
|
|
668
|
+
.. code-block:: yaml
|
|
669
|
+
|
|
670
|
+
tracking: {turns: 1000, integrator_set: bdsimtwo}
|
|
671
|
+
|
|
672
|
+
On a test ring all three sets agreed with MAD-X particle by particle,
|
|
673
|
+
``bdsimtwo`` and ``geant4`` on the bunch length as well. LAURA writes a
|
|
674
|
+
quadrupole's ``k1`` negated for a negative beam in the ``bdsim*`` sets,
|
|
675
|
+
whose quadrupole sets the field for a positive particle, and as it is for
|
|
676
|
+
``geant4``; every other strength follows the particle's charge in all sets.
|
|
677
|
+
|
|
610
678
|
What a Ring Run Reports
|
|
611
679
|
-----------------------
|
|
612
680
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
simba.Codes.ImpactX package
|
|
2
|
+
===========================
|
|
3
|
+
|
|
4
|
+
Submodules
|
|
5
|
+
----------
|
|
6
|
+
|
|
7
|
+
simba.Codes.ImpactX.ImpactX module
|
|
8
|
+
----------------------------------
|
|
9
|
+
|
|
10
|
+
.. automodule:: simba.Codes.ImpactX.ImpactX
|
|
11
|
+
:members:
|
|
12
|
+
:show-inheritance:
|
|
13
|
+
:undoc-members:
|
|
14
|
+
|
|
15
|
+
Module contents
|
|
16
|
+
---------------
|
|
17
|
+
|
|
18
|
+
.. automodule:: simba.Codes.ImpactX
|
|
19
|
+
:members:
|
|
20
|
+
:show-inheritance:
|
|
21
|
+
:undoc-members:
|
|
@@ -40,7 +40,7 @@ dependencies = [
|
|
|
40
40
|
"numexpr",
|
|
41
41
|
"openpmd-beamphysics>=0.10",
|
|
42
42
|
"xopt",
|
|
43
|
-
"laura-accelerator>=1.1.
|
|
43
|
+
"laura-accelerator>=1.1.2",
|
|
44
44
|
"pytao>=1.0.0",
|
|
45
45
|
"nafflib",
|
|
46
46
|
]
|
|
@@ -57,11 +57,19 @@ classifiers = [
|
|
|
57
57
|
simcodes = [
|
|
58
58
|
"ocelot-desy==25.06.0",
|
|
59
59
|
"xsuite>=0.39.0",
|
|
60
|
+
"xwakes>=0.2",
|
|
60
61
|
"cheetah-accelerator>=0.8.4",
|
|
61
62
|
"Wake-T>=0.8.0",
|
|
62
63
|
"cpymad>=1.19.0",
|
|
63
64
|
]
|
|
64
65
|
|
|
66
|
+
# FBPIC on a GPU also needs cupy built for the local CUDA version
|
|
67
|
+
# (e.g. cupy-cuda12x or cupy-cuda13x), which is left to the user.
|
|
68
|
+
fbpic = [
|
|
69
|
+
"fbpic>=0.27",
|
|
70
|
+
"periodictable",
|
|
71
|
+
]
|
|
72
|
+
|
|
65
73
|
test = [
|
|
66
74
|
"pytest",
|
|
67
75
|
"pytest-cov",
|
|
@@ -22,7 +22,7 @@ from ...FrameworkHelperFunctions import expand_substitution, saveFile
|
|
|
22
22
|
from ...Modules import Beams as rbf
|
|
23
23
|
from laura.models.diagnostic import DiagnosticElement
|
|
24
24
|
from laura.models.element import Screen
|
|
25
|
-
from laura.models.physical import PhysicalElement
|
|
25
|
+
from laura.models.physical import PhysicalElement
|
|
26
26
|
from laura.translator.converters.codes.astra import (
|
|
27
27
|
AstraNewRun,
|
|
28
28
|
AstraCharge,
|
|
@@ -59,6 +59,9 @@ class astraLattice(frameworkLattice):
|
|
|
59
59
|
code: str = "astra"
|
|
60
60
|
"""String indicating the lattice object type"""
|
|
61
61
|
|
|
62
|
+
tracks_multiple_species: ClassVar[bool] = True
|
|
63
|
+
"""ASTRA reads each particle's species from the index column of its distribution."""
|
|
64
|
+
|
|
62
65
|
allow_negative_drifts: bool = True
|
|
63
66
|
"""Flag to indicate whether negative drifts are allowed"""
|
|
64
67
|
|
|
@@ -88,9 +91,6 @@ class astraLattice(frameworkLattice):
|
|
|
88
91
|
astra_headers: Dict[str, Any] = Field(default_factory=dict)
|
|
89
92
|
"""Headers for ASTRA input file"""
|
|
90
93
|
|
|
91
|
-
local_frame: bool | None = None
|
|
92
|
-
"""Write the deck in the lattice's own frame (see :meth:`to_local`) rather than world coordinates."""
|
|
93
|
-
|
|
94
94
|
def model_post_init(self, __context: Any) -> None:
|
|
95
95
|
super().model_post_init(__context)
|
|
96
96
|
self.starting_offset = (
|
|
@@ -108,11 +108,6 @@ class astraLattice(frameworkLattice):
|
|
|
108
108
|
else self.starting_rotation
|
|
109
109
|
)
|
|
110
110
|
|
|
111
|
-
if "local_frame" in self.file_block:
|
|
112
|
-
self.local_frame = bool(self.file_block["local_frame"])
|
|
113
|
-
elif self.local_frame is None:
|
|
114
|
-
self.local_frame = abs(self.starting_rotation[2]) > 1e-9
|
|
115
|
-
|
|
116
111
|
# Create a "newrun" block
|
|
117
112
|
if "input" not in self.file_block:
|
|
118
113
|
self.file_block["input"] = {}
|
|
@@ -269,48 +264,9 @@ class astraLattice(frameworkLattice):
|
|
|
269
264
|
self._toffset = toffset
|
|
270
265
|
self.astra_headers["newrun"].toffset = 1e9 * toffset
|
|
271
266
|
|
|
272
|
-
def
|
|
273
|
-
"""
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
Parameters
|
|
277
|
-
----------
|
|
278
|
-
point: Position | Sequence[float]
|
|
279
|
-
LAURA ``Position`` or ``(x, y, z)``
|
|
280
|
-
|
|
281
|
-
Returns
|
|
282
|
-
-------
|
|
283
|
-
np.ndarray
|
|
284
|
-
``(x, y, z)`` in the deck's frame; unchanged if not :attr:`local_frame`
|
|
285
|
-
"""
|
|
286
|
-
p = np.asarray(getattr(point, "array", point), dtype=float)
|
|
287
|
-
if not self.local_frame:
|
|
288
|
-
return p
|
|
289
|
-
physical = self.startObject.physical
|
|
290
|
-
origin = np.asarray(physical.start.array, dtype=float)
|
|
291
|
-
local = physical.rotation_matrix.T @ (p - origin)
|
|
292
|
-
return np.round(local, 9)
|
|
293
|
-
|
|
294
|
-
@property
|
|
295
|
-
def deck_section(self):
|
|
296
|
-
"""
|
|
297
|
-
The section as written out; with :attr:`local_frame`, a deep copy moved into that frame.
|
|
298
|
-
|
|
299
|
-
Returns
|
|
300
|
-
-------
|
|
301
|
-
SectionLatticeTranslator
|
|
302
|
-
"""
|
|
303
|
-
if not self.local_frame:
|
|
304
|
-
return self.section
|
|
305
|
-
section = self.section.model_copy(deep=True)
|
|
306
|
-
for element in section.elements.elements.values():
|
|
307
|
-
physical = getattr(element, "physical", None)
|
|
308
|
-
if physical is None or physical.middle is None:
|
|
309
|
-
continue
|
|
310
|
-
x, y, z = self.to_local(physical.middle)
|
|
311
|
-
physical.middle = Position(x=x, y=y, z=z)
|
|
312
|
-
physical.global_rotation.theta += self.starting_rotation[2]
|
|
313
|
-
return section
|
|
267
|
+
def _frame_rotation(self) -> float:
|
|
268
|
+
"""ASTRA's frame turns by ``starting_rotation``, which a file block may set."""
|
|
269
|
+
return float(self.starting_rotation[2])
|
|
314
270
|
|
|
315
271
|
def write(self) -> None:
|
|
316
272
|
"""Write :attr:`deck_section` as ASTRA input to ``<master_subdir>/<objectname>.in``."""
|
|
@@ -488,7 +444,7 @@ class astraLattice(frameworkLattice):
|
|
|
488
444
|
).strip('"'),
|
|
489
445
|
normaliseZ=False,
|
|
490
446
|
)
|
|
491
|
-
if not self.
|
|
447
|
+
if not self.in_local_frame:
|
|
492
448
|
rbf.hdf5.rotate_beamXZ(
|
|
493
449
|
beam,
|
|
494
450
|
-1 * self.starting_rotation[2],
|
|
@@ -501,6 +457,7 @@ class astraLattice(frameworkLattice):
|
|
|
501
457
|
rbf.openpmd.write_openpmd_beam_file(
|
|
502
458
|
beam,
|
|
503
459
|
self.global_parameters["master_subdir"] + "/" + HDF5filename,
|
|
460
|
+
toffset=float(beam._beam.toffset.val),
|
|
504
461
|
)
|
|
505
462
|
if self.global_parameters["delete_tracking_files"]:
|
|
506
463
|
os.remove(
|