A python interface to MAD-NG running as subprocess
Project description
PyMAD-NG
Python interface to MAD-NG running as a subprocess
🚀 Installation
Install via pip from PyPI:
pip install pymadng
🧠 Getting Started
Before diving into PyMAD-NG, we recommend you:
- Familiarise yourself with MAD-NG — understanding MAD-NG is essential.
- Read the Quick Start Guide to see how to control MAD-NG from Python.
Explore Key Examples
- LHC Matching Example – Real-world optics matching with intermediate feedback.
- Examples Page - List of examples in an easy to read format.
- GitHub Examples Directory – List of avaliable examples on the repository
If anything seems unclear:
- Refer to the API Reference
- Check the MAD-NG Docs
- Or open an issue
📚 Documentation
Full documentation and example breakdowns are hosted at: https://pymadng.readthedocs.io/en/latest/
To build locally:
git clone https://github.com/MethodicalAcceleratorDesign/MAD-NG.py.git
cd MAD-NG.py/docs
make html
🧪 Running Examples
Examples are stored in the examples/ folder.
Run any script with:
python3 examples/ex-fodos.py
You can also batch-run everything using:
python3 runall.py
💡 Features
- High-level Python interface to MAD-NG
- Access to MAD-NG functions, sequences, optics, and tracking
- Dynamic
send()andrecv()communication - Python-native handling of MAD tables and expressions
- Optional integration with
pandasandtfs-pandas
🤝 Contributing
We welcome contributions! See CONTRIBUTING.md or the Contributing Guide in the docs.
Bug reports, feature requests, and pull requests are encouraged.
📜 License
PyMAD-NG is licensed under the GNU General Public License v3.0.
🙌 Acknowledgements
Built on top of MAD-NG, developed at CERN. This interface aims to bring MAD's power to the Python ecosystem with minimal friction.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymadng-0.7.1.tar.gz.
File metadata
- Download URL: pymadng-0.7.1.tar.gz
- Upload date:
- Size: 10.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08d5946e825985dd134a2ea696721f0675e8bdd9d4b9df97fbb2cb8651fa7d9d
|
|
| MD5 |
ea7156d7e71889696550af7355872a14
|
|
| BLAKE2b-256 |
ac8c52df882a095e6751ca734d54547b0f398cef630cc7ef59c791efc900db3e
|
Provenance
The following attestation bundles were made for pymadng-0.7.1.tar.gz:
Publisher:
python-publish.yml on MethodicalAcceleratorDesign/MAD-NG.py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymadng-0.7.1.tar.gz -
Subject digest:
08d5946e825985dd134a2ea696721f0675e8bdd9d4b9df97fbb2cb8651fa7d9d - Sigstore transparency entry: 347725418
- Sigstore integration time:
-
Permalink:
MethodicalAcceleratorDesign/MAD-NG.py@5cebb3318c5e27de4de6d3137d0c5288c098c624 -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/MethodicalAcceleratorDesign
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5cebb3318c5e27de4de6d3137d0c5288c098c624 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pymadng-0.7.1-py3-none-any.whl.
File metadata
- Download URL: pymadng-0.7.1-py3-none-any.whl
- Upload date:
- Size: 9.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fbe41d87d55e188cc6ce8e5fe952c56234ffc3a8f84b189d0c27c4fb363d561
|
|
| MD5 |
d256c93d703358c7594d488c2588b0b8
|
|
| BLAKE2b-256 |
051fac4a5bf1ed8e58147c9ee1f3633ee38941f47f4d2a91d052834ac3142eff
|
Provenance
The following attestation bundles were made for pymadng-0.7.1-py3-none-any.whl:
Publisher:
python-publish.yml on MethodicalAcceleratorDesign/MAD-NG.py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymadng-0.7.1-py3-none-any.whl -
Subject digest:
3fbe41d87d55e188cc6ce8e5fe952c56234ffc3a8f84b189d0c27c4fb363d561 - Sigstore transparency entry: 347725424
- Sigstore integration time:
-
Permalink:
MethodicalAcceleratorDesign/MAD-NG.py@5cebb3318c5e27de4de6d3137d0c5288c098c624 -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/MethodicalAcceleratorDesign
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5cebb3318c5e27de4de6d3137d0c5288c098c624 -
Trigger Event:
release
-
Statement type: