freeqdsk


Namefreeqdsk JSON
Version 0.4.0 PyPI version JSON
download
home_page
SummaryGEQDSK and AEQDSK tokamak equilibrium file reader/writer
upload_time2023-10-20 12:24:28
maintainer
docs_urlNone
authorBen Dudson, Peter Hill, Liam Pattinson
requires_python>=3.8
licenseCopyright 2016 Ben Dudson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords geqdsk aeqdsk plasma equilibrium
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FreeQDSK

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://img.shields.io/badge/license-MIT-blue.svg)
[![py3comp](https://img.shields.io/badge/py3-compatible-brightgreen.svg)](https://img.shields.io/badge/py3-compatible-brightgreen.svg)

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:

```bash
$ python3 -m pip install --upgrade pip
```

You can then install using:

```bash
$ python3 -m pip install .
```

To run tests:

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

To build the docs:

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

## Usage

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

```python
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:

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

Similarly, for A-EQDSK files:

```python
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:

```python
from freeqdsk import peqdsk

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

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

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "freeqdsk",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "GEQDSK,AEQDSK,plasma,equilibrium",
    "author": "Ben Dudson, Peter Hill, Liam Pattinson",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/42/30/a67ba040a5a69fa2fc6e139df2798317f70ba7d80e28fe7bab0e375a9861/freeqdsk-0.4.0.tar.gz",
    "platform": null,
    "description": "# FreeQDSK\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://img.shields.io/badge/license-MIT-blue.svg)\n[![py3comp](https://img.shields.io/badge/py3-compatible-brightgreen.svg)](https://img.shields.io/badge/py3-compatible-brightgreen.svg)\n\nRead and write G-EQDSK, A-EQDSK, and P-EQDSK file formats, which are used to describe\nthe tokamak fusion devices.\n\n## Installation\n\nTo install, you may need to update `pip` to the latest version:\n\n```bash\n$ python3 -m pip install --upgrade pip\n```\n\nYou can then install using:\n\n```bash\n$ python3 -m pip install .\n```\n\nTo run tests:\n\n```bash\n$ python3 -m install .[tests]\n$ pytest -v\n```\n\nTo build the docs:\n\n```bash\n$ python3 -m install .[docs]\n$ cd docs\n$ make html\n```\n\n## Usage\n\nA G-EQDSK file may be read using the `geqdsk.read` function:\n\n```python\nfrom freeqdsk import geqdsk\n\nwith open(filename, \"r\") as f:\n    data = geqdsk.read(f)\n```\n\nThe result is a dict containing data from the G-EQDSK file. To write a file:\n\n```python\nwith open(filename, \"w\") as f:\n    geqdsk.write(data, f)\n```\n\nSimilarly, for A-EQDSK files:\n\n```python\nfrom freeqdsk import aeqdsk\n\nwith open(filename, \"r\") as f:\n    data = aeqdsk.read(f)\n\nwith open(filename, \"w\") as f:\n    aeqdsk.write(data, f)\n```\n\nAnd again for P-EQDSK files:\n\n```python\nfrom freeqdsk import peqdsk\n\nwith open(filename, \"r\") as f:\n    data = peqdsk.read(f)\n\nwith open(filename, \"w\") as f:\n    peqdsk.write(data, f)\n```\n",
    "bugtrack_url": null,
    "license": "Copyright 2016 Ben Dudson  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "GEQDSK and AEQDSK tokamak equilibrium file reader/writer",
    "version": "0.4.0",
    "project_urls": {
        "Source": "https://github.com/freegs-plasma/FreeQDSK",
        "Tracker": "https://github.com/freegs-plasma/FreeQDSK/issues"
    },
    "split_keywords": [
        "geqdsk",
        "aeqdsk",
        "plasma",
        "equilibrium"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "05e982d6834495cc9dd9ad9ad193a4180191c0dd0cf787f6f01cc6a68101b4e8",
                "md5": "67c535d1dae428306189f5056e08d53e",
                "sha256": "a9347765ad36019979c505c0fdbf398ac4e0d121438743c6b5788bf411ddc97b"
            },
            "downloads": -1,
            "filename": "freeqdsk-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "67c535d1dae428306189f5056e08d53e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 23332,
            "upload_time": "2023-10-20T12:24:27",
            "upload_time_iso_8601": "2023-10-20T12:24:27.585421Z",
            "url": "https://files.pythonhosted.org/packages/05/e9/82d6834495cc9dd9ad9ad193a4180191c0dd0cf787f6f01cc6a68101b4e8/freeqdsk-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4230a67ba040a5a69fa2fc6e139df2798317f70ba7d80e28fe7bab0e375a9861",
                "md5": "8a6c87326cb2c26531f522c51e033c76",
                "sha256": "aa48ac3332e05fe704070f4296e17ef2fd3d7e6ba04d0102c0787b2bf1c38ec7"
            },
            "downloads": -1,
            "filename": "freeqdsk-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8a6c87326cb2c26531f522c51e033c76",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 198704,
            "upload_time": "2023-10-20T12:24:28",
            "upload_time_iso_8601": "2023-10-20T12:24:28.945032Z",
            "url": "https://files.pythonhosted.org/packages/42/30/a67ba040a5a69fa2fc6e139df2798317f70ba7d80e28fe7bab0e375a9861/freeqdsk-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-20 12:24:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "freegs-plasma",
    "github_project": "FreeQDSK",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "freeqdsk"
}
        
Elapsed time: 0.13737s