Skip to content

Latest commit

 

History

History
executable file
·
61 lines (52 loc) · 2.47 KB

README.md

File metadata and controls

executable file
·
61 lines (52 loc) · 2.47 KB

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 [email protected]: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/.

To contribute, open a pull request or raise an issue!

Supported equilibrium formats

  • EQDSK (g-file) from EFIT, ESCO, CHEASE or LIUQE
  • EX2GK pickle file
  • IMAS equilibrium IDS

To be added:

  • VMEC

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&--.