Skip to main content

MEGPy

Project description

MEGPy: Magnetic Equilibrium Geometry Python

MEGPy is a package for quick extraction of (local) equilibrium quantities and visualisation of 2D magnetic equilibria used in magnetic confinement fusion research. It offers both a command line interface (CLI) and Python API.

Getting started

To get MEGPy clone and install the latest version:

$ git clone git@github.com:gsnoep/megpy.git
$ cd megpy
$ pip install --user -e .

To use MEGPy call the CLI:

$ python -m megpy <file_path> <parameterization> <x_fs>

For details on the CLI options:

$ python -m megpy -h

Or use the Python API, of which some examples can be found in /examples/.

Join the repository to contribute or raise issues!

Supported equilibrium formats

  • EQDSK (g-file) from EFIT, ESCO, CHEASE or LIUQE

To be added:

  • IMAS equilibrium IDS

Supported flux-surface geometries

  • Miller (doi)
  • Turnbull-Miller (doi)
  • Fourier / generalised Miller (doi)
  • Miller eXtended Harmonic (MXH) (doi)

Citation

If you use MEGPy in your research, please cite (bibtex):

G. Snoep, J.T.W. Koenders, C. Bourdelle, J. Citrin and JET contributors, "Improved flux-surface parameterization through constrained nonlinear optimization," Physics of Plasmas 30, 063906 (2023)

                .#&%%%-.
            <===#%%%%%%%%%%.
               ?==%%( )%%%%%
                )%%%%%%%%%%%%\
                )%%%%%%%%%%%..%%%
                )%%%%%%%%&..    .\%.
                 %%%%%%%% &\,.  ..\%.
                 M%%%%%%%...&&%\%%%%%%%%%-
                   %%%%%.       .\%%%%%%%%%%.
                    %%%..             .\%%%%%%%.
                     E...               .\%%%%%%%-.
                        &...              )%%%%(%%%.
                           G..   .&).     )GS\   \%%%%%%-.
                              \&))  \&(%^^          \&%%%%%&.
                               )%%    %%                 \%%%%%%%&.
                            .&&     .%                        \&\\%%%%\\&..
                         .%<       (\                               %    \
                  .::-P-..-&  &&-Y&--.

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

megpy-1.2.0.tar.gz (36.6 kB view details)

Uploaded Source

Built Distribution

megpy-1.2.0-py2.py3-none-any.whl (37.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file megpy-1.2.0.tar.gz.

File metadata

  • Download URL: megpy-1.2.0.tar.gz
  • Upload date:
  • Size: 36.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for megpy-1.2.0.tar.gz
Algorithm Hash digest
SHA256 783fff7f75af3d4badb6a1a86461ad5c9f2d974e98f1416e84ece88507cf60b2
MD5 26ca92520c3ddecab4d197de814789a5
BLAKE2b-256 984aafa4c433fc5f1e47e4c5886f8052c4bf7387d212e1b7085a648c94acafca

See more details on using hashes here.

File details

Details for the file megpy-1.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: megpy-1.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 37.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for megpy-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d3a4455752899806cb6243501f55d739705e8763b5c5680bf6d8def07e74370b
MD5 7ce39d79a504346e745ee0ba5ca9a4bf
BLAKE2b-256 e542378eeaced4b079ac4bc317c8e3fcab5d24ea31e6034eddc0d45a2f388381

See more details on using hashes here.

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