Skip to main content

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,

  • Mark
  • Drift
  • HBend, horizontal bend.
  • Quadrupole
  • Sextupole
  • Octupole

$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.

Metadata

Release files for simplestoragering 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simplestoragering 0.1.2
File Size Uploaded Provenance Actions
simplestoragering-0.1.2.tar.gz 2.4 MB With provenance Details for simplestoragering-0.1.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for simplestoragering 0.1.2
File Actions
simplestoragering-0.1.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for simplestoragering-0.1.2-cp312-cp312-win_amd64.whl
simplestoragering-0.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for simplestoragering-0.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
simplestoragering-0.1.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for simplestoragering-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
simplestoragering-0.1.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for simplestoragering-0.1.2-cp311-cp311-win_amd64.whl
simplestoragering-0.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for simplestoragering-0.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
simplestoragering-0.1.2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for simplestoragering-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
simplestoragering-0.1.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for simplestoragering-0.1.2-cp310-cp310-win_amd64.whl
simplestoragering-0.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for simplestoragering-0.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
simplestoragering-0.1.2-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details for simplestoragering-0.1.2-cp310-cp310-macosx_11_0_arm64.whl
simplestoragering-0.1.2-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for simplestoragering-0.1.2-cp39-cp39-win_amd64.whl
simplestoragering-0.1.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for simplestoragering-0.1.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
simplestoragering-0.1.2-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details for simplestoragering-0.1.2-cp39-cp39-macosx_11_0_arm64.whl

Total release size: 72.5 MB

Release files / simplestoragering-0.1.2.tar.gz

Download URL simplestoragering-0.1.2.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
083eb525ab8f6208ffe108864cccacc48d23f1c2d02ec443bc824e954e128bd1
BLAKE2b-256 checksum
How to use checksums
85a00f5eefb30a043b7c513ac6f120d112ddfedc730b3287891ef0cdabd57001
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / simplestoragering-0.1.2-cp312-cp312-win_amd64.whl

Download URL simplestoragering-0.1.2-cp312-cp312-win_amd64.whl
Size 3.5 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
312c30263b86df7d383a8a58d8ee9584fb117dd4d7e76a63a106042e2244dd86
BLAKE2b-256 checksum
How to use checksums
6d64fa73e05378c93492f2454c97b48712c993e27f10fbef01563f69af5b9fd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / simplestoragering-0.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL simplestoragering-0.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 10.7 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d1fb86366953d2bf981cdd124f5fc78fddfe4ed13748a79bc9ceaffe2d73318d
BLAKE2b-256 checksum
How to use checksums
aeac6082c58753640d95a46514887af92a380d6b1fad84651c5b2278934ca02e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / simplestoragering-0.1.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL simplestoragering-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
Size 3.5 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
bdd91396583ceb16d135916a294aa6f5e9c76fbfa5a6dd159a77b202f6ad814a
BLAKE2b-256 checksum
How to use checksums
c3f26f58702ee22b90619c42b6e50dd3833a42b877265d0c4ae39038fe96bc3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / simplestoragering-0.1.2-cp311-cp311-win_amd64.whl

Download URL simplestoragering-0.1.2-cp311-cp311-win_amd64.whl
Size 3.5 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
fca4bb5902766997208cce746a9d65279887cbb08beeccc4df20d8497ba149e8
BLAKE2b-256 checksum
How to use checksums
58f2b531d5c726d974a645821ad2bb815dc9130e8684f08c3d6affebcf797ea3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / simplestoragering-0.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL simplestoragering-0.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 10.8 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6d6c48b06b25a2b5c9f4ede0c4b472574bbc654c88d95626b3c07a8a37c35018
BLAKE2b-256 checksum
How to use checksums
8d6957045feb5d7d6468aa9caadeb4647c8a77470b9623ed40eeab31a1114012
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / simplestoragering-0.1.2-cp311-cp311-macosx_11_0_arm64.whl

Download URL simplestoragering-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
Size 3.5 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b64bae85480d77059c95426d874a2fadef0da065b9a84f57c1605aae781d940c
BLAKE2b-256 checksum
How to use checksums
f49e2e5f9ceccdfecb93614086abc1ef79163eb9029cd5ee707649f034078185
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / simplestoragering-0.1.2-cp310-cp310-win_amd64.whl

Download URL simplestoragering-0.1.2-cp310-cp310-win_amd64.whl
Size 3.5 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
fb1bc01ee7d23c996c1900bfda66e0f2beabe5e3685463fe918fcd9cf4a2e5f2
BLAKE2b-256 checksum
How to use checksums
15edf6dd27356e9128c9167538ea93eff3b6670975323e89d718bc6126366c25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / simplestoragering-0.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL simplestoragering-0.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 10.3 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5ead00a79b42f5af33acffd63cc0845a1a7e2f84bbce0305911fe0bec3f86c62
BLAKE2b-256 checksum
How to use checksums
6ff35174e893b05c72484f1b2a9a49ead634d737287a60564baa33ed180a0581
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / simplestoragering-0.1.2-cp310-cp310-macosx_11_0_arm64.whl

Download URL simplestoragering-0.1.2-cp310-cp310-macosx_11_0_arm64.whl
Size 3.5 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
57637e04f537928f967b874bc8e8bd601422ea7cfc6f5e838a2f90d974f04a5f
BLAKE2b-256 checksum
How to use checksums
a66c6acb6b8f94b38578d05a6191e0a658bf62be6617bbf7e224cdf9becf8193
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / simplestoragering-0.1.2-cp39-cp39-win_amd64.whl

Download URL simplestoragering-0.1.2-cp39-cp39-win_amd64.whl
Size 3.5 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
2af20ecd6d39df6062fe736056a05909e1588cf67a17e97a608b28fef218a6e2
BLAKE2b-256 checksum
How to use checksums
14bf5a1f3a28b566b90c0ba185bbd1dc81b5c89cb01701dab85f82354738d4d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / simplestoragering-0.1.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL simplestoragering-0.1.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 10.3 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b2e41b5b21dc9f2f738e206745765f36ddb296a00722c66de500ee95844f4f89
BLAKE2b-256 checksum
How to use checksums
46fce60dbf16db5fef003f6dc41aa9ac2a36ae00d9dc81eb872be45c2322d560
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / simplestoragering-0.1.2-cp39-cp39-macosx_11_0_arm64.whl

Download URL simplestoragering-0.1.2-cp39-cp39-macosx_11_0_arm64.whl
Size 3.5 MB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9a29da1bd7c17a8f1eaf628d69c21cd441faaa8ceb129351d617acc904457be4
BLAKE2b-256 checksum
How to use checksums
6e52e398a173620e6600f0ad4d982db740fa6a2a4d58cc6eb148a771b655165f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Security for simplestoragering 0.1.2

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.

Full provenance

All 13 files in this release have been uploaded with provenance metadata.

Select from 13 files

Attestation for simplestoragering-0.1.2.tar.gz

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 Oct 26, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page