Skip to main content

GEQDSK and AEQDSK tokamak equilibrium file reader/writer

Project description

FreeQDSK

License py3comp

Read and write the popular "geqdsk" and "aeqdsk" tokamak equilibrium file formats.

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 GEQDSK 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 GEQDSK file. To write a file:

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

Similarly, for AEQDSK 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)

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.2.0.tar.gz (176.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.2.0-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for freeqdsk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 722d1006bece72299bfc0732f4705dd9485eccb63c2833180775c9711568a904
MD5 6d404a5caffd394b489efe155f16bdd0
BLAKE2b-256 d3b11362b87756ff501c4d3a9960fa01a3a7ee8a885e7a06c67ef1c80a7e8d0c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for freeqdsk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e5f9abab04d9bcc87770c1b9bbdfe1e65ce17758b2660f0c516952da1daa4d3
MD5 d9cb9baa6e616425dc3fc631e4dad849
BLAKE2b-256 8371ca0941666d46c9579ee17d62a292277e4e7a1677efdfd50c4f1287c8bb5e

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