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 https://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/.
To contribute, open a pull request or raise an issue!
Supported equilibrium formats
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&--.
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 megpy-2.0.5.tar.gz.
File metadata
- Download URL: megpy-2.0.5.tar.gz
- Upload date:
- Size: 56.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84acb77ddfd9209325ef6d50e10fbadffad16a61edcf5a193f01bb78bc4d6d59
|
|
| MD5 |
6f2ac05167137483d469d91ae9461ab4
|
|
| BLAKE2b-256 |
e9752aba7d40355c5fe08f58a0e8387a125c3b130a377d429667eef07054a773
|
File details
Details for the file megpy-2.0.5-py2.py3-none-any.whl.
File metadata
- Download URL: megpy-2.0.5-py2.py3-none-any.whl
- Upload date:
- Size: 57.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53d548b7cbb1a6841d1833fa1556b08263039d4d09607e939a766f24685fe736
|
|
| MD5 |
b1979bf97c34d0386cf3518acf2cea1c
|
|
| BLAKE2b-256 |
ecf9d6f9cfe3d1669fffe4e2375b03e5b494733443d93995b35436f6e0974f38
|