Package: pleque
PLEQUE -PLasmaEQUilibriumEnjoyment module [pleɪɡ]PLEQUE is a Python module allowing simple visualisation and manipulation of tokamak plasma equilibria.
For more information see the documentation athttps://pleque.readthedocs.io.Note:The work is still in the early development stage, soplequeprobably contains bugs. You are very welcome to submit your wishes, encountered bugs or any other comments as an issue. Minor changes in the code structure may occur before the0.1.0release.Getting StartedPrerequisitesThe following packages are required to installpleque:python>=3.5
numpy
scipy
shapely
scikit-image
xarray
pandas
h5py
omasThey should be automatically handled bypipfurther in the installation process.Download the source codeFirst, pick where you wish to install the code:cd/desired/path/There are two options how to get the code: from PyPI or by cloning the repository.From PyPI (https://pypi.org/project/pleque/)pipinstall--userplequeAlternatively, you may use the unstable experimental release (probably with more fixed bugs):pipinstall--user-ihttps://test.pypi.org/simple/plequeClone the github repositorygitclonehttps://github.com/kripnerl/pleque.gitcdpleque
pipinstall--user.Congratulations, you have just installedpleque!ExamplesThe following example shows how to load an equilibrium saved in theeqdskformat. The equilibrium used here comes from a FIESTA simulation of the COMPASS-Upgrade tokamak.frompleque.ioimportreadersimportpkg_resourcesimportmatplotlibasplt#Locate a test equilibriumfilepath=pkg_resources.resource_filename('pleque','resources/baseline_eqdsk')The heart ofplequeis itsEquilibriumclass, which contains all the equilibrium information (and much more). Typically its instances are calledeq.# Create an instance of the `Equilibrium` classeq=readers.read_geqdsk(filepath)TheEquilibriumclass comes with tons of interesting functions and caveats.# Plot a simple overview of the equilibriumeq.plot_overview()# Calculate the separatrix areasep_area=eq.lcfs.area# Get absolute magnetic field magnitude at given pointR=0.7#mZ=0.1#mB=eq.B_abs(R,Z)Equilibria may be visualised in many different ways; they may be used for mapping or field line tracing; the possibilities are virtually endless. If there's a caveat you find missing frompleque, write to us! Further examples can be found as notebooks in thenotebooksfolder or in theexamplesdirectory.Version0.0.7AuthorsLukáš Kripner-kripnerlMatěj Tomeš-MateesekSee also the list ofcontributorswho participated in this project.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.Related projectsFreeGS- free boundary Grad-Shafranov solver in Python.OMFITis an integrated modeling and experimental data analysis software for magnetically confined thermonuclear fusion experiments. The goal of OMFIT is to enhance existing scientific workflows and enable new integrated modeling capabilities. To achieve these goals OMFIT adopts a bottom-up collaborative development approach.OMAS(Ordered Multidimensional Array Structure) is a Python library designed to simplify the interface of third-party codes with the ITER Integrated Modeling and Analysis Suite (IMAS) . ITER IMAS defines a data model, a data get/put API, and a data storage infrastructure used for manipulating ITER data.ReferencesO. Sauter and S. Yu. Medvedev:Tokamak coordinate conventions: COCOS, Computer Physics Communications184, 293–302 (2013)S. Jardin:Computational Methods in Plasma Physics, CRC Press