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

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.1.0.tar.gz (15.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.1.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: freeqdsk-0.1.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for freeqdsk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e5b30af546f4fdfb75d01f2eedfdedec2c731ddfc498a4066a83d581ce9be1fe
MD5 42ec7e632a53d53b5d62c9d4c938060c
BLAKE2b-256 20f1f71af9e8227697b49ab22ed3952a4ba514b610fb113a7d42ddb65b239ec7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: freeqdsk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for freeqdsk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68b776c3f5b432d316c99ad46cf02c8fc108ff909f6e6e53381fba9dedf3782d
MD5 9cc8a5e50f4704df66d6446b11782d0b
BLAKE2b-256 85df1c1c5888a29f0fb569c276af58de34b2a1b3fb80fb336de725c7538bdbcf

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