SimpleStorageRing
SimpleStorageRing is a python project to simulate single particle dynamics in a simple storage ring and calculate lattice data.
You can sort the components to generate a ring, and then calculate the data of storage ring by Courant-Snyder method.
Installation
Download from PyPi:
pip install -U simplestoragering
or download the source files and then compile them using Cython:
git clone https://github.com/wei0852/simplestoragering.git
cd simplestoragering
pip install .
Usage
see example_features.py.
set reference particle (electron) energy first:
set_ref_energy(energy_MeV: float)
or
set_ref_gamma(gamma: float)
components
A storage ring consists of many magnets to guide electron beam,
MarkDriftHBend, horizontal bend.QuadrupoleSextupoleOctupole
$k_n = \dfrac{q}{P_0} \dfrac{\partial^n B_y}{\partial x^n}$. All the components are child classes of the Element class.
Courant-Snyder lattice
CSLattice(ele_list: list[Element], n_periods: int), lattice solved by C-S method.
Functions
symplectic_track(particle, lattice, n_turns: int, record = True)
track_4d_closed_orbit(lattice: CSLattice, delta, resdl_limit=1e-16, matrix_precision=1e-9)
output_opa_file(lattice: CSLattice, file_name=None)
output_elegant_file(lattice: CSLattice, filename=None, new_version=True)
chromaticity_correction(lattice: CSLattice, sextupole_name_list: list, target: list=None, initial_k2=None, update_sext=True, verbose=True)
adjust_tunes(lattice: CSLattice, quadrupole_name_list: list, target: list, iterations=5, initialize=True)
DA & LMA
- XYGrid()
- XDeltaGrid()
- NLine()
- LocalMomentumAperture()
and some functions:
plot_layout_in_ax(ele_list: list, ax: Axes, ratio=0.03)
plot_resonance_line_in_ax(ax: Axes, order: int = 3, refnux: float=None, refnuy: float=None)
plot_lattice(ele_list, parameter: str or list[str], with_layout=True)
or use get_col(ele_list, parameter) to get a column of the parameter along the element list.
Release files for simplestoragering 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| simplestoragering-0.1.0.tar.gz | 2.2 MB | Details |
Built distributions (wheels)
Total release size: 81.7 MB
Release files / simplestoragering-0.1.0.tar.gz
| Download URL | simplestoragering-0.1.0.tar.gz |
|---|---|
| Size | 2.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
efcfbdaf3ce4de21716a1ab384798f19a425a68ba4493fa7257934bf973f3bed
|
|
BLAKE2b-256 checksum How to use checksums |
ccf90898006749861f24a6737fa5ee02e636fc2fc85822dacfbb88ed8e6a5d28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp312-cp312-win_amd64.whl
| Download URL | simplestoragering-0.1.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
67ec243c26859302fc22fa7c3322e91ce53bff8f2156302ee0ba62da8a46e8ff
|
|
BLAKE2b-256 checksum How to use checksums |
b25cb6a721bc72dcd98d36743679d6a2f1281968527de5a736d9b3e4b05ff8c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | simplestoragering-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 10.0 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
115de692b845b884f2135ab84f72d08bb14218858f3b1611467ba8f4618e6597
|
|
BLAKE2b-256 checksum How to use checksums |
454241ff8fe039afcf3b5f5ea26caabc1024bfd611e95475ab3b64e435da7ef6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | simplestoragering-0.1.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3dcf362d246bd2a5203e1e4a32bcda6de1edcdb848bc100e76fd8a0038364e4c
|
|
BLAKE2b-256 checksum How to use checksums |
b4e575d16275acf5641cf36c9e0e6587ec9b8d4c4983fb375d2c7fb1004cfe11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl
| Download URL | simplestoragering-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.12 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
ccccfc94fcda179717d5c948cd5fb102f1c28e5866e2dffe259feab0f996feeb
|
|
BLAKE2b-256 checksum How to use checksums |
eaa818f5a8ba1c77e2bb88c8d0e1e51ee10fabc3425437e6b9310b467f28f72c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp311-cp311-win_amd64.whl
| Download URL | simplestoragering-0.1.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3e29fa95f2c536bba58f2504ed2a486b1eb4f69eafcd11c9a96b4ce6e34d1bfe
|
|
BLAKE2b-256 checksum How to use checksums |
e4122097440fb1460cab00af06424cfcd26d0e3bfa5ace48ae7c645e80c6ab06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | simplestoragering-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 10.1 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
9db2d438c68df89a94f1ea1861f1c95095a56bad092d279392040b29dab6b62e
|
|
BLAKE2b-256 checksum How to use checksums |
7770369f2a918af71219cada0e7be9b07adabf1421edae770ec9776ff387fe3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | simplestoragering-0.1.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
eba2780e157cc31c72cb9f7411c6bb55d69822e4f953fa0b7037ace6088bd4b0
|
|
BLAKE2b-256 checksum How to use checksums |
e70ad8827aa351208d220ee457f5f758022d17f850c50ad7e0b1298996ebad14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | simplestoragering-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
edeabfd43f12eb1f964b6680573ad3a0a186e1cdd0c49157269a10791164d694
|
|
BLAKE2b-256 checksum How to use checksums |
5108dc3f894b4467ad07e14e79c537f41a5d12e5c8686a3333bb754aaef0ddd8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp310-cp310-win_amd64.whl
| Download URL | simplestoragering-0.1.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a9a2cc8e7ba05e7eb5d692392871e7f08ee89585db846557c5ba4f1b97062419
|
|
BLAKE2b-256 checksum How to use checksums |
9c4d89535c2387f7b27b3239805c5c41df4caa060e1e9c2080a32c838b79f4f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | simplestoragering-0.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 9.6 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
2d97aaeca6eca0ba0edf70d83adc4c30f119b314e26220045f819ee0d692ae40
|
|
BLAKE2b-256 checksum How to use checksums |
a6ab8ee1c2416126bfb6642772ac8122138cf1f7824625f3ccc19217e0a81a44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | simplestoragering-0.1.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
dae51c608a1852102efcadfee861e5982c63d96b7582d0785617094f6ae2cfe3
|
|
BLAKE2b-256 checksum How to use checksums |
e8b0c8c8f0a5a8d2c3398a1104d3f29a81f9c81acc00fe41cc4f616355e04328
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | simplestoragering-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
9943d9ef4fe902fad0d0956583cb810fa1c7b82724047e4850bbfb0db6a39e4d
|
|
BLAKE2b-256 checksum How to use checksums |
545e8b49f831d9c8e97ba956441bfce8d5845b386d475cd015d7295e667a61fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp39-cp39-win_amd64.whl
| Download URL | simplestoragering-0.1.0-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7e077bbc026ac8699b831b382c4915651c440cc47c62bec257b642503a58811d
|
|
BLAKE2b-256 checksum How to use checksums |
f35119103427733fda9ab6bcbd87bc5837bbc5e777ce55be537bc608de902f0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | simplestoragering-0.1.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 9.6 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
24290a107c87d7f4d2970361bfbf1379db85776cb7269f9a65f977ee8f68bc66
|
|
BLAKE2b-256 checksum How to use checksums |
38582d6607c59301e9afc30b6dc0b00d9cb7d0c0fc4a103857e6a3e003a60967
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | simplestoragering-0.1.0-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
59e4a9121908e6fa7087ee20c04bf08a40708b0d27e51476af2dee18b1f627c8
|
|
BLAKE2b-256 checksum How to use checksums |
d74448e13888ad86dd12274aa81a24d48c80c7887c2aedcfd045951b1be20afa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / simplestoragering-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl
| Download URL | simplestoragering-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.9 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
20b3fba5f5b1e9736504b64e34923b76fb8d5bfe15bbc9ace489580fbfcfde8f
|
|
BLAKE2b-256 checksum How to use checksums |
095bfa8f406475e33fe71afca4caa7aa9b039f93089f699c7bf5466795fad487
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency log