xdyna
Tools to study beam dynamics in xtrack simulations, like dynamic aperture calculations, PYTHIA integration, dynamic indicators, ...
Dynamic aperture studies
The xdyna package provides the DA class which serves as a simple front-end for setting up and running dynamic aperture studies.
To start, a xtrack.line object is required.
The following code then sets up the study and launches the tracking
import xdyna as xd
da = xd.DA(
name='name_of_your_study', # used to generate a directory where files are stored
normalised_emittance=[1,1], # provide normalized emittance for particle initialization in [m]
max_turns=1e5, # number of turns to track
use_files=False
# in case DA studies should run on HTC condor, files are used to collect the information
# if the tracking is performed locally, no files are needed
)
# initialize a grid of particles using 5 angles in x-y space, in a range from 0 to 20 sigmas in steps of 5 sigma.
da.generate_initial_radial(angles=5, r_min=0, r_max=20, r_step=5, delta=0.)
da.line = line # associate prev. created line, holding the lattice and context, with DA object
da.track_job() # start the tracking
da.survival_data # returns a dataframe with the number of survived turns for the initial position of each particle
To use on a platform like HTCondor, perform the same setup as before but using use_files=True.
Each HTCondor job then only requires the following lines
import xdyna as xd
# This will load the existing DA based on the meta file with the same name found in the working directory.
# If the script is ran somewhere else, the path to the metafile can be passed with 'path=...'.
DA = xd.DA(name=study, use_files=True)
# Do the tracking, here for 100 particles.
# The code will automatically look for particles that are not-submitted yet and use these.
DA.track_job(npart=100)
Metadata
Release files for xdyna 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xdyna-0.1.1.tar.gz | 43.8 kB | Without provenance | Details for xdyna-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xdyna-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for xdyna-0.1.1-py3-none-any.whl |
Total release size: 93.0 kB
Release files / xdyna-0.1.1.tar.gz
| Download URL | xdyna-0.1.1.tar.gz |
|---|---|
| Size | 43.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e0bc3b0ceff87d1af7c982b39c9e50c1d383353541b4f0f2bf16b4b45c4ad1c
|
|
BLAKE2b-256 checksum How to use checksums |
7fe76fb50c82f7d4666897e8364f6f052bf7dbf1ce9c8611d9770909ef108a6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.9.12 Linux/4.18.0-408.el8.x86_64
|
Release files / xdyna-0.1.1-py3-none-any.whl
| Download URL | xdyna-0.1.1-py3-none-any.whl |
|---|---|
| Size | 49.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c40ea68c4661eca089051a9e6657c0272dca3d77028674c4ab3d4fb977917bdd
|
|
BLAKE2b-256 checksum How to use checksums |
c1b8873d4bf179516b0fa3e6d3f399aa980a1b49d192649b69d74577b131db8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.9.12 Linux/4.18.0-408.el8.x86_64
|
Security for xdyna 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.