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.0.3.tar.gz (1.6 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.0.3-cp312-cp312-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.12Windows x86-64

simplestoragering-0.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (6.6 MB view details)

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

simplestoragering-0.0.3-cp312-cp312-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

simplestoragering-0.0.3-cp312-cp312-macosx_10_13_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

simplestoragering-0.0.3-cp311-cp311-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.11Windows x86-64

simplestoragering-0.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (6.5 MB view details)

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

simplestoragering-0.0.3-cp311-cp311-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

simplestoragering-0.0.3-cp311-cp311-macosx_10_9_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

simplestoragering-0.0.3-cp310-cp310-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.10Windows x86-64

simplestoragering-0.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (6.2 MB view details)

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

simplestoragering-0.0.3-cp310-cp310-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

simplestoragering-0.0.3-cp310-cp310-macosx_10_9_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

simplestoragering-0.0.3-cp39-cp39-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.9Windows x86-64

simplestoragering-0.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (6.2 MB view details)

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

simplestoragering-0.0.3-cp39-cp39-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

simplestoragering-0.0.3-cp39-cp39-macosx_10_9_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for simplestoragering-0.0.3.tar.gz
Algorithm Hash digest
SHA256 e88aea0a17dcbfbe432702fcd0ea9e500a445ed0f4465bc35b7ed90f69aa0439
MD5 1c7c7940c658e8eab7c8249b06b9d376
BLAKE2b-256 65912749ef06a8b50cfaa01fbd34eb5574d8e6a7b0b80f480a5b44e34d43f4ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3.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.0.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 859663cba99c67ec032763126fecd6aaec7fb8ed631f902af0657679d1b53db2
MD5 1df54f85fd082eeffa8640c2215b54c2
BLAKE2b-256 e95c9750213e40cca6172cef19b8603389859ba9e66ac653d5410085e1f8dd0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e3490eea505d1292f1e2f495069164efd3ec97f390363181d6b594f9f65c3677
MD5 a01ca2c036dfc8e37af2fe5adaa74dc4
BLAKE2b-256 f971605689f4e093a7e5bb75f72ae6d18b92ac3b67de584d97f3f8538932269c

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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.0.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 45ffc65a9abb4172bab598fcf4e8f412bd830ac20e7f723e120bcc123596ae4a
MD5 4a05bceb29b18113a7d81b9038b425d1
BLAKE2b-256 ba392361d10823905b7694d63749d37fb2a67e204eb2b83f373fb4f0db2b879e

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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.0.3-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 949d11da1f41b1791d9888a037a2d79e9b9de3d9e226ca455aa4f5f189456d1f
MD5 96e7c8e3010c2d0cb66e4c5f1cdcd6fb
BLAKE2b-256 333fbf91292b4c89259e774807d66dd51b11b9175930d631829ad74b3ff62881

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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.0.3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8b71f21adcbe32e35ef5850159c3b15ea38a29a120efd7b9868d1c03d98821bc
MD5 7e0b982f990a901f4667be22bb67846e
BLAKE2b-256 0c2220925d85baa7cb75dd9669347d3311bf71d007df375dc1a2ba2a6bb89f64

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2984ff08f4d44c6f28f883ef32ad3480f348571e241c9f4894c5bf9ac8232c2c
MD5 4e26f391c4903c8354c7b9dc07d0657e
BLAKE2b-256 63dd8b76b34741927b9952d6895002c9d2912dc88f7bda279ddd4e8bfd7281b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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.0.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3b4f1ba8acbedaaf95591d7f9f3af7e7cb7f8526de7d93e874e086ef097695db
MD5 5077373d9d0201a288deeb342bde9e7d
BLAKE2b-256 f9767552d1a25738adfc630e6fd67dfa21174682e58b9d09b9513095bb4773cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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.0.3-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 51cda9baa79c64153bc630ebbd9595057cd324e18b379dcb647533e5f843757b
MD5 2e3dc9d89c916d76612b6958d4771f81
BLAKE2b-256 3056f023160817e17262d0c55d4a48af0194b654c336c1207da6a5d49303be75

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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.0.3-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3e0a3fc4eb967d7aee7bfffc79b111f56c0d475ebefca80032a6d8d48ca4b97c
MD5 6ff231b227fb01b9ad444f11a956838a
BLAKE2b-256 806ab1471b683dc0ac33601d46d6de90884d7f481706ef66d06e8fb7479d0597

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6cef7c88dd7ec2cb20b4c015b5b8a55d7f73b856414a7fc50dd6878d77928df0
MD5 1f3104e968a932a396c3c5d89b8f5ec6
BLAKE2b-256 bbe0092d3342696a7a35336d66f8bd61c2a0d614ae438c74bdf1e6047db7e53f

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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.0.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5a5f31c0453619873dcbb4f62f5dce56f5a701a77fd85d5c30929799d30f5b74
MD5 d0d2847c423ba5448f73b301ef77bd17
BLAKE2b-256 e4ab99e398ddeff77a5d2e2d027a18add58164f7e668a9c01c91c9abe7f2398e

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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.0.3-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a5ec561524a05c95fa8c99b3c02c3acf50b98a6747acee0c790892f23baf9d76
MD5 b4114691d4b783478cdf6afc84a7e495
BLAKE2b-256 74e1e249be7739b8c91e7bb3367d6dedbe9b00a16b7c5aa9a2ace0ea06d5cdf4

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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.0.3-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0988f484ada8a82c368817260a24870f68fd08951142d332981f68c309ccf076
MD5 11323625d9d8bf072140238435384e89
BLAKE2b-256 1c4de0c9df9130a55e6a8ac452d6da5611d6dc3df6b801f096ffbc14abd47ae4

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d7e3e81323826214967ef50e39e731eade307a8d73402c143af4a6828c2b285d
MD5 987ce8ad61052dff43f90e90f30a66f5
BLAKE2b-256 0c304488a2e8cbb02bc7b3475aaa126b23801dec7b12ac67fd9bf725764d8aae

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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.0.3-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ddad9c98bc748e5ee46fcfd92660ccc4d6e9ed98986d53e33c01bc9778074d60
MD5 540bb162af1ab741c29057e43079ab32
BLAKE2b-256 08302f210649c869b207c4389fca160444a01acf341f45ed608c7efb16790ee3

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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.0.3-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for simplestoragering-0.0.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 da765e0dad6cee8666bd6953b0299e8438b9043dad80c2aadab9cd667f752c04
MD5 c858cba9d2e74a8c6189706de4bd14f5
BLAKE2b-256 b97843a0b5f7b04811d10d9354ab05b39b3a03e9943c00d49b95dd3d83e1e78c

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplestoragering-0.0.3-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