https://github.com/fusion-power-plant-framework/eqdsk
g-eqdsk reading and writing with identification and conversion between COCOS versions
https://github.com/fusion-power-plant-framework/eqdsk
eqdsk equilibrium file-format nuclear-fusion plasma-physics
Last synced: 5 months ago
JSON representation
g-eqdsk reading and writing with identification and conversion between COCOS versions
- Host: GitHub
- URL: https://github.com/fusion-power-plant-framework/eqdsk
- Owner: Fusion-Power-Plant-Framework
- License: lgpl-2.1
- Created: 2022-12-21T16:46:37.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-02-16T19:50:18.000Z (5 months ago)
- Last Synced: 2026-02-16T22:27:29.898Z (5 months ago)
- Topics: eqdsk, equilibrium, file-format, nuclear-fusion, plasma-physics
- Language: Python
- Homepage: https://fusion-power-plant-framework.github.io/eqdsk/
- Size: 1.69 MB
- Stars: 9
- Watchers: 5
- Forks: 4
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Eqdsk
[](https://github.com/pypa/hatch)
[](https://github.com/astral-sh/ruff)

[](https://github.com//Fusion-Power-Plant-Framework/eqdsk/actions)
An EQDSK reader and writer for GEQDSK (more soon), with COCOS identification and conversion.
There is support for writing an eqdsk to a JSON format (which is now preferred) and an IMAS database integration.
We have extended the EQDSK standard to optionally allow for the definition of a CoilSet.
## Setup
We are pip installable therefore for the most recent release:
```bash
pip install eqdsk
```
or for the most recent commit
```bash
pip install git+https://github.com/Fusion-Power-Plant-Framework/eqdsk.git
```
For a developer setup please see [CONTRIBUTING.md](CONTRIBUTING.md#setup-with-hatch)
## Basic Usage
To read in an eqdsk (json or eqdsk) in its raw state:
```python
from eqdsk import EQDSKInterface
EQDSKInterface.from_file('file.json', no_cocos=True)
```
To read in an eqdsk file with a known cocos format and convert it to a given cocos format:
```python
EQDSKInterface.from_file('file.eqdsk', from_cocos=11, to_cocos=17)
```
Alternatively if the direction (clockwise or anticlockwise) and the units of phi (V.s or V.s/rad) are known,
the cocos standard will be calculated for you:
```python
EQDSKInterface.from_file('file.eqdsk', clockwise_phi=True, volt_seconds_per_radian=True)
```
## CLI
This package includes a CLI tool for eqdsk exploration.
This can be accessed by running `eqdsk` in the terminal after installing the package (or in the Hatch `cli` environment, see [CONTRIBUTING.md](CONTRIBUTING.md#setup-with-hatch)).
For more information on the CLI tool, run `eqdsk --help`.