Skip to main content

A python interface to MAD-NG running as subprocess

Project description

pymadng

Python interface to MAD-NG running as subprocess

Install using below, see The Python Package Index (PyPi);

pip install pymadng

Familiarising yourself with pymadng

First, we recommend familiarising yourself with MAD-NG, documentation can be found here.

Then reading through the Low-Level Example Explained on the pymadng documentation should be sufficient (alongside knowledge of MAD-NG), assuming you are not planning to use any "syntactic sugar". If you plan to use the available pythonic looking code, there are plenty of examples to look at.

In the documentation, FODO Examples Explained, is a chapter that goes into detail on what is happening on each line of the FODO example, while LHC Example gives an example of loading the LHC and how to grab intermediate results from a match.

The only other example that may be of use is the ps-twiss example. This is an extremely simple example, extending the FODO example to perform a twiss on the PS sequence. If anything does not seem fully explained, initially check the API Reference and/or the MAD-NG Documentation, then feel free to open an issue so improvements can be made.

Documentation

Documentation, including explanation of a couple of examples and the limitations of the API can be found here.

The API reference is also included in this documentation. You can also compile to documentation yourself by cloning the repository and running make html in the docs folder.

Getting the examples working

You can run the example with python3 EXAMPLE_NAME.py

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

pymadng-0.4.6.tar.gz (9.9 MB view hashes)

Uploaded Source

Built Distribution

pymadng-0.4.6-py3-none-any.whl (9.3 MB view hashes)

Uploaded Python 3

Supported by

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