Skip to main content

simple storage ring for single particle dynamics simulation.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simplestoragering-0.1.0.tar.gz (2.2 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

simplestoragering-0.1.0-cp312-cp312-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.12Windows x86-64

simplestoragering-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (10.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

simplestoragering-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

simplestoragering-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

simplestoragering-0.1.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

simplestoragering-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (10.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

simplestoragering-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

simplestoragering-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

simplestoragering-0.1.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

simplestoragering-0.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

simplestoragering-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

simplestoragering-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

simplestoragering-0.1.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

simplestoragering-0.1.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

simplestoragering-0.1.0-cp39-cp39-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

simplestoragering-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

Details for the file simplestoragering-0.1.0.tar.gz.

File metadata

  • Download URL: simplestoragering-0.1.0.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for simplestoragering-0.1.0.tar.gz
Algorithm Hash digest
SHA256 efcfbdaf3ce4de21716a1ab384798f19a425a68ba4493fa7257934bf973f3bed
MD5 b0f46d225c76589e931f33139635c00c
BLAKE2b-256 ccf90898006749861f24a6737fa5ee02e636fc2fc85822dacfbb88ed8e6a5d28

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0.tar.gz:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 67ec243c26859302fc22fa7c3322e91ce53bff8f2156302ee0ba62da8a46e8ff
MD5 8c100d452368b626a6c07e6c6c7d57e3
BLAKE2b-256 b25cb6a721bc72dcd98d36743679d6a2f1281968527de5a736d9b3e4b05ff8c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 115de692b845b884f2135ab84f72d08bb14218858f3b1611467ba8f4618e6597
MD5 79e580453ae60bc5b12aeb100fad0923
BLAKE2b-256 454241ff8fe039afcf3b5f5ea26caabc1024bfd611e95475ab3b64e435da7ef6

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3dcf362d246bd2a5203e1e4a32bcda6de1edcdb848bc100e76fd8a0038364e4c
MD5 b605756d46eacef2334a15d23bb0a965
BLAKE2b-256 b4e575d16275acf5641cf36c9e0e6587ec9b8d4c4983fb375d2c7fb1004cfe11

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 ccccfc94fcda179717d5c948cd5fb102f1c28e5866e2dffe259feab0f996feeb
MD5 78eb4798da940371e181cf31a8f41c13
BLAKE2b-256 eaa818f5a8ba1c77e2bb88c8d0e1e51ee10fabc3425437e6b9310b467f28f72c

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3e29fa95f2c536bba58f2504ed2a486b1eb4f69eafcd11c9a96b4ce6e34d1bfe
MD5 d3dcce681ab345daf4b1591d73bf45dc
BLAKE2b-256 e4122097440fb1460cab00af06424cfcd26d0e3bfa5ace48ae7c645e80c6ab06

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9db2d438c68df89a94f1ea1861f1c95095a56bad092d279392040b29dab6b62e
MD5 6cd7eb15fd275775b30551c22c0487d7
BLAKE2b-256 7770369f2a918af71219cada0e7be9b07adabf1421edae770ec9776ff387fe3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eba2780e157cc31c72cb9f7411c6bb55d69822e4f953fa0b7037ace6088bd4b0
MD5 0bcdc1ed1279f4a9f197ed10cb6e660e
BLAKE2b-256 e70ad8827aa351208d220ee457f5f758022d17f850c50ad7e0b1298996ebad14

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 edeabfd43f12eb1f964b6680573ad3a0a186e1cdd0c49157269a10791164d694
MD5 c9a93c67c7a47b845b17c259d4fa529a
BLAKE2b-256 5108dc3f894b4467ad07e14e79c537f41a5d12e5c8686a3333bb754aaef0ddd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a9a2cc8e7ba05e7eb5d692392871e7f08ee89585db846557c5ba4f1b97062419
MD5 b54f4c993554b84e33ad36bc155758e1
BLAKE2b-256 9c4d89535c2387f7b27b3239805c5c41df4caa060e1e9c2080a32c838b79f4f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp310-cp310-win_amd64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2d97aaeca6eca0ba0edf70d83adc4c30f119b314e26220045f819ee0d692ae40
MD5 fe5ca683e395ce778a5d874a0c1007d8
BLAKE2b-256 a6ab8ee1c2416126bfb6642772ac8122138cf1f7824625f3ccc19217e0a81a44

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dae51c608a1852102efcadfee861e5982c63d96b7582d0785617094f6ae2cfe3
MD5 aef3547d273a9a9d1f4f5b1b00955f1d
BLAKE2b-256 e8b0c8c8f0a5a8d2c3398a1104d3f29a81f9c81acc00fe41cc4f616355e04328

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9943d9ef4fe902fad0d0956583cb810fa1c7b82724047e4850bbfb0db6a39e4d
MD5 2d46826bd07b727661f3b565771cf717
BLAKE2b-256 545e8b49f831d9c8e97ba956441bfce8d5845b386d475cd015d7295e667a61fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7e077bbc026ac8699b831b382c4915651c440cc47c62bec257b642503a58811d
MD5 7842ad8aa686435eaa12585563dbeffb
BLAKE2b-256 f35119103427733fda9ab6bcbd87bc5837bbc5e777ce55be537bc608de902f0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp39-cp39-win_amd64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 24290a107c87d7f4d2970361bfbf1379db85776cb7269f9a65f977ee8f68bc66
MD5 fbb34bccaede8000ec669a856c5b2bbc
BLAKE2b-256 38582d6607c59301e9afc30b6dc0b00d9cb7d0c0fc4a103857e6a3e003a60967

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 59e4a9121908e6fa7087ee20c04bf08a40708b0d27e51476af2dee18b1f627c8
MD5 1c1f380242069442b5706cb937ace717
BLAKE2b-256 d74448e13888ad86dd12274aa81a24d48c80c7887c2aedcfd045951b1be20afa

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplestoragering-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 20b3fba5f5b1e9736504b64e34923b76fb8d5bfe15bbc9ace489580fbfcfde8f
MD5 639b7a2ee118b4c77ecabb94a57e5cc7
BLAKE2b-256 095bfa8f406475e33fe71afca4caa7aa9b039f93089f699c7bf5466795fad487

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl:

Publisher: publish.yml on wei0852/simplestoragering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page