Skip to main content

FreeQDSK

License py3comp

Read and write G-EQDSK, A-EQDSK, and P-EQDSK file formats, which are used to describe the tokamak fusion devices.

It has more features than other implementations, including aeqdsk and peqdsk formats, support for COCOS numbers != 1, some customisation of the header format.

It aims to be a well maintained community package, allowing to replace custom implementations by a feature complete, freely available implementation.

Installation

To install, you may need to update pip to the latest version:

$ python3 -m pip install --upgrade pip

You can then install using:

$ python3 -m pip install .

To run tests:

$ python3 -m install .[tests]
$ pytest -v

To build the docs:

$ python3 -m install .[docs]
$ cd docs
$ make html

Usage

A G-EQDSK file may be read using the geqdsk.read function:

from freeqdsk import geqdsk

with open(filename, "r") as f:
    data = geqdsk.read(f)

The result is a dict containing data from the G-EQDSK file. To write a file:

with open(filename, "w") as f:
    geqdsk.write(data, f)

Similarly, for A-EQDSK files:

from freeqdsk import aeqdsk

with open(filename, "r") as f:
    data = aeqdsk.read(f)

with open(filename, "w") as f:
    aeqdsk.write(data, f)

And again for P-EQDSK files:

from freeqdsk import peqdsk

with open(filename, "r") as f:
    data = peqdsk.read(f)

with open(filename, "w") as f:
    peqdsk.write(data, f)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

freeqdsk-0.5.2.tar.gz (201.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

freeqdsk-0.5.2-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

Details for the file freeqdsk-0.5.2.tar.gz.

File metadata

  • Download URL: freeqdsk-0.5.2.tar.gz
  • Upload date:
  • Size: 201.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for freeqdsk-0.5.2.tar.gz
Algorithm Hash digest
SHA256 7b40430f8368a9ac130d441d43aa50944b4165c8c44fc49b752836bd8e822b4b
MD5 973c034c2207d6298b43207414e5a2a3
BLAKE2b-256 51cda98eea70d69fbee460278d54ca94370ad659f4245e96f1383471749c7e57

See more details on using hashes here.

File details

Details for the file freeqdsk-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: freeqdsk-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for freeqdsk-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 36f9b614b03b7af930b5239e1f9e0ea2da4a8b16de8284b8e8c96a8160a08895
MD5 1dcf1e8f181def17424bd92af22618ca
BLAKE2b-256 3bc327c40f49900c200ff1655af3070cd5f9e796e39e85e3d7edb452a9874f30

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page