This folder contains a small, self-contained set of Jupyter notebooks used for an Xsuite tutorial. The examples are based on the PIMM lattice (proton and ion therapy synchrotron, CERN/PS 99-010).
The notebooks are meant to be run in order:
notebook_00_environment.ipynb– the Xtrack environment: variables, deferred expressions, elements and linesnotebook_01_lattice_design.ipynb– building the PIMM lattice (cells, arcs, ring, sextupoles, RF) and saving it topimm.jsonnotebook_02_load_lattices.ipynb– loading lattices from Python, JSON and MAD-X files, loading optics/strength filesnotebook_03_optics_matching.ipynb– twiss, tune/dispersion matching, chromaticity correction, saving strengths topimm_strengths.jsonnotebook_04_tracking.ipynb– tracking with turn-by-turn monitor: phase space close to the 3rd order resonance (slow extraction)notebook_05_rf_wakefield_beamstatsmon.ipynb– RF and longitudinal phase space, transverse wakefield, beam statistics monitor
pimm_seq.py,pimm.json,PIMM.seq– the PIMM lattice as Python script, Xsuite JSON and MAD-X sequencepimm_extr.json– PIMM lattice used in the tracking examplepimm_strengths.json,example_strengths.json,example_strengths.madx– optics/strength files
Requires xtrack, xpart, xwakes, matplotlib and Jupyter. From this directory:
jupyter notebook