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.3.tar.gz (9.9 MB view details)

Uploaded Source

Built Distribution

pymadng-0.4.3-py3-none-any.whl (9.3 MB view details)

Uploaded Python 3

File details

Details for the file pymadng-0.4.3.tar.gz.

File metadata

  • Download URL: pymadng-0.4.3.tar.gz
  • Upload date:
  • Size: 9.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pymadng-0.4.3.tar.gz
Algorithm Hash digest
SHA256 a3aa86c50f314ae78919651755260f46d71937248f2b059010c597a6cc73fc37
MD5 1ba0a4a6593500544450d38c6d3bebde
BLAKE2b-256 b92e667bc064b485a8257fb1f83697759f86df0237aced9ab9eb76e7ddc46687

See more details on using hashes here.

File details

Details for the file pymadng-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: pymadng-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 9.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pymadng-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e4ed509613b1883c70621cc9f3d3cec57de76932f5a626e4719ad7458cba10c9
MD5 6d2d4b1a6bdd07da033485fb15c7cb5b
BLAKE2b-256 2364c4b3da2d3d27acb2e6b2f7039a4907a1732d05150b6b2732d3602affcc8e

See more details on using hashes here.

Supported by

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