Skip to main content

GEQDSK and AEQDSK tokamak equilibrium file reader/writer

Project description

FreeQDSK

License py3comp

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

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)

Project details


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.3.1.tar.gz (197.6 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.3.1-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: freeqdsk-0.3.1.tar.gz
  • Upload date:
  • Size: 197.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for freeqdsk-0.3.1.tar.gz
Algorithm Hash digest
SHA256 5c8f83b2f93cbf8020879d727dde98c6e8e5fb03a278df8b3a40782e1fffcf21
MD5 b984e1c0b50f447cdd9f836b91fd07a2
BLAKE2b-256 e9a7eea8c88586125939d447944c3e5db8504bb5b4835ba1eba029c789359683

See more details on using hashes here.

File details

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

File metadata

  • Download URL: freeqdsk-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for freeqdsk-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7fb43b721c757d1cd448c58cfee76cf760d5b6ffe72a8832ca2c53f80e3e2ba4
MD5 184f31fd6982b0a61a6e7620bc37739c
BLAKE2b-256 d48b8f1e1d0e6746bb83848a9e739c80fa1345e504512ba294aab4456442d6d3

See more details on using hashes here.

Supported by

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