{"id":17694469,"url":"https://github.com/felix-andreas/apace","last_synced_at":"2025-05-12T13:46:49.532Z","repository":{"id":35472499,"uuid":"147238511","full_name":"felix-andreas/apace","owner":"felix-andreas","description":"Another Particle Accelerator Code","archived":false,"fork":false,"pushed_at":"2021-12-20T23:33:52.000Z","size":1482,"stargazers_count":7,"open_issues_count":25,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T06:58:14.658Z","etag":null,"topics":["accelerator-physics","python"],"latest_commit_sha":null,"homepage":"https://apace.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felix-andreas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-03T18:10:16.000Z","updated_at":"2024-05-11T21:38:37.000Z","dependencies_parsed_at":"2022-08-03T02:15:34.710Z","dependency_job_id":null,"html_url":"https://github.com/felix-andreas/apace","commit_stats":null,"previous_names":["felix-andreas/apace","andreasfelix/apace"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felix-andreas%2Fapace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felix-andreas%2Fapace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felix-andreas%2Fapace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felix-andreas%2Fapace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felix-andreas","download_url":"https://codeload.github.com/felix-andreas/apace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253750288,"owners_count":21958279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accelerator-physics","python"],"created_at":"2024-10-24T13:48:52.185Z","updated_at":"2025-05-12T13:46:49.506Z","avatar_url":"https://github.com/felix-andreas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apace\n[![Python Version](https://img.shields.io/pypi/pyversions/apace)](https://pypi.org/project/apace/)\n[![PyPI](https://img.shields.io/pypi/v/apace.svg)](https://pypi.org/project/apace/)\n[![CI](https://github.com/andreasfelix/apace/workflows/CI/badge.svg)](https://github.com/andreasfelix/apace/actions?query=workflow%3ACI)\n[![Docs](https://readthedocs.org/projects/apace/badge/?version=latest)](https://apace.readthedocs.io)\n[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://github.com/andreasfelix/apace/blob/master/LICENSE)\n\n**apace** is yet **a**nother **p**article **a**ccelerator **c**od**e** designed for the optimization of beam optics. It is available as Python package and aims to provide a convenient and straightforward API to make use of Python's numerous scientific libraries.\n\n\n## Installing\nInstall and update using pip:\n\n```sh\npip install -U apace\n```\n\n## Requirements\n- Python 3.6 or higher (CPython or PyPy)\n- CFFI 1.0.0 or higher\n- NumPy/SciPy\n- Matplotlib\n\n\n## Quick Start\nImport apace:\n```python\nimport apace as ap\n```\n\nCreate a ring consisting out of 8 FODO cells:\n```python\nd1 = ap.Drift('D1', length=0.55)\nb1 = ap.Dipole('B1', length=1.5, angle=0.392701, e1=0.1963505, e2=0.1963505)\nq1 = ap.Quadrupole('Q1', length=0.2, k1=1.2)\nq2 = ap.Quadrupole('Q2', length=0.4, k1=-1.2)\nfodo_cell = ap.Lattice('FODO', [q1, d1, b1, d1, q2, d1, b1, d1, q1])\nfodo_ring = ap.Lattice('RING', [fodo_cell] * 8)\n```\n \nCalculate the Twiss parameters:\n```python\ntwiss = ap.Twiss(fodo_ring)\n```\n\nPlot horizontal and vertical beta functions using matplotlib:\n```python\nimport matplotlib.pyplot as plt\nplt.plot(twiss.s, twiss.beta_x, twiss.s, twiss.beta_y)\n```\n\n## Links\n- Documentation: https://apace.readthedocs.io\n- API Reference: https://apace.readthedocs.io/en/stable/reference/apace/index.html\n- Examples: https://apace.readthedocs.io/en/docs/examples/index.html\n- Releases: https://pypi.org/project/apace/\n- Code: https://github.com/andreasfelix/apace\n- Issue tracker: https://github.com/andreasfelix/apace/issues\n\n## License\n[GNU General Public License v3.0](https://github.com/andreasfelix/apace/blob/master/LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelix-andreas%2Fapace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelix-andreas%2Fapace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelix-andreas%2Fapace/lists"}