imas2xarray


Nameimas2xarray JSON
Version 0.3.0 PyPI version JSON
download
home_page
SummaryImas2xarray is a tool reading IMAS data in hdf5 format into xarray.
upload_time2023-12-11 14:36:28
maintainer
docs_urlNone
authorVictor Azizi
requires_python>=3.9
licenseApache 2.0 License
keywords modelling tokamak fusion-reactor imas
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Documentation Status](https://readthedocs.org/projects/imas2xarray/badge/?version=latest)](https://imas2xarray.readthedocs.io/en/latest/?badge=latest)
[![Tests](https://github.com/duqtools/imas2xarray/actions/workflows/test.yaml/badge.svg)](https://github.com/duqtools/imas2xarray/actions/workflows/test.yaml)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/imas2xarray)](https://pypi.org/project/imas2xarray/)
[![PyPI](https://img.shields.io/pypi/v/imas2xarray.svg?style=flat)](https://pypi.org/project/imas2xarray/)
![Coverage](https://gist.githubusercontent.com/stefsmeets/f635ee4ac999ce969fa1d23a57e006ae/raw/covbadge.svg)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10256040.svg)](https://doi.org/10.5281/zenodo.10256040)

![imas2xarray banner](https://raw.githubusercontent.com/duqtools/imas2xarray/main/src/imas2xarray/data/logo.png)


# imas2xarray

**Imas2xarray** is a library that makes it as simple and intuitive as possible to load an IMAS dataset in HDF5 format into Python. There is no need to manually define the paths or fiddle with the different dimensions and long keys.

```python
>>> from imas2xarray import to_xarray
>>>
>>> path = '/pfs/work/g2aho/public/imasdb/test/3/92436/1/'
>>> ids = 'equilibrium'
>>>
>>> ds = to_xarray(path, ids)
>>> ds
<xarray.Dataset>
Dimensions:         (time: 1, rho_tor_norm: 101, ion: 4)
Coordinates:
  * time            (time) float64 50.04
  * rho_tor_norm    (rho_tor_norm) float64 0.0 0.01 0.02 0.03 ... 0.98 0.99 1.0
Dimensions without coordinates: ion
Data variables: (12/14)
    q               (time, rho_tor_norm) float64 0.7887 0.7888 ... 4.262 4.845
    collisionality  (time, rho_tor_norm) float64 23.23 7.554 ... 7.31 10.19
    t_i_ave         (time, rho_tor_norm) float64 1.036e+04 1.036e+04 ... 508.4
    ...              ...
    n_e             (time, rho_tor_norm) float64 7.976e+19 ... 1.742e+19
    p_i             (time, ion, rho_tor_norm) float64 1.242e+05 ... 0.2948
    n_e_tot         (time, rho_tor_norm) float64 7.976e+19 ... 1.742e+19
```

For more advanced use-cases and examples, please see the [documentation](https://imas2xarray.readthedocs.io).

## Installing imas2xarray

To install:

```console
pip install imas2xarray
```

Imas2xarray is supported on Python versions 3.9 or newer.

## Development

Check out our [Contributing Guidelines](CONTRIBUTING.md#Getting-started-with-development) to get started with development.

Suggestions, improvements, and edits are most welcome.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "imas2xarray",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "modelling,tokamak,fusion-reactor,imas",
    "author": "Victor Azizi",
    "author_email": "Stef Smeets <s.smeets@esciencecenter.nl>",
    "download_url": "https://files.pythonhosted.org/packages/6e/29/befbf8bc94d0f3d0bbd5f2a6af3cd9c3c2afce91e68bb8198cbdb4cf8510/imas2xarray-0.3.0.tar.gz",
    "platform": null,
    "description": "[![Documentation Status](https://readthedocs.org/projects/imas2xarray/badge/?version=latest)](https://imas2xarray.readthedocs.io/en/latest/?badge=latest)\n[![Tests](https://github.com/duqtools/imas2xarray/actions/workflows/test.yaml/badge.svg)](https://github.com/duqtools/imas2xarray/actions/workflows/test.yaml)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/imas2xarray)](https://pypi.org/project/imas2xarray/)\n[![PyPI](https://img.shields.io/pypi/v/imas2xarray.svg?style=flat)](https://pypi.org/project/imas2xarray/)\n![Coverage](https://gist.githubusercontent.com/stefsmeets/f635ee4ac999ce969fa1d23a57e006ae/raw/covbadge.svg)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10256040.svg)](https://doi.org/10.5281/zenodo.10256040)\n\n![imas2xarray banner](https://raw.githubusercontent.com/duqtools/imas2xarray/main/src/imas2xarray/data/logo.png)\n\n\n# imas2xarray\n\n**Imas2xarray** is a library that makes it as simple and intuitive as possible to load an IMAS dataset in HDF5 format into Python. There is no need to manually define the paths or fiddle with the different dimensions and long keys.\n\n```python\n>>> from imas2xarray import to_xarray\n>>>\n>>> path = '/pfs/work/g2aho/public/imasdb/test/3/92436/1/'\n>>> ids = 'equilibrium'\n>>>\n>>> ds = to_xarray(path, ids)\n>>> ds\n<xarray.Dataset>\nDimensions:         (time: 1, rho_tor_norm: 101, ion: 4)\nCoordinates:\n  * time            (time) float64 50.04\n  * rho_tor_norm    (rho_tor_norm) float64 0.0 0.01 0.02 0.03 ... 0.98 0.99 1.0\nDimensions without coordinates: ion\nData variables: (12/14)\n    q               (time, rho_tor_norm) float64 0.7887 0.7888 ... 4.262 4.845\n    collisionality  (time, rho_tor_norm) float64 23.23 7.554 ... 7.31 10.19\n    t_i_ave         (time, rho_tor_norm) float64 1.036e+04 1.036e+04 ... 508.4\n    ...              ...\n    n_e             (time, rho_tor_norm) float64 7.976e+19 ... 1.742e+19\n    p_i             (time, ion, rho_tor_norm) float64 1.242e+05 ... 0.2948\n    n_e_tot         (time, rho_tor_norm) float64 7.976e+19 ... 1.742e+19\n```\n\nFor more advanced use-cases and examples, please see the [documentation](https://imas2xarray.readthedocs.io).\n\n## Installing imas2xarray\n\nTo install:\n\n```console\npip install imas2xarray\n```\n\nImas2xarray is supported on Python versions 3.9 or newer.\n\n## Development\n\nCheck out our [Contributing Guidelines](CONTRIBUTING.md#Getting-started-with-development) to get started with development.\n\nSuggestions, improvements, and edits are most welcome.\n",
    "bugtrack_url": null,
    "license": "Apache 2.0 License",
    "summary": "Imas2xarray is a tool reading IMAS data in hdf5 format into xarray.",
    "version": "0.3.0",
    "project_urls": {
        "changelog": "https://github.com/duqtools/imas2xarray/releases",
        "documentation": "https://imas2xarray.readthedocs.io",
        "homepage": "https://github.com/duqtools/imas2xarray",
        "issues": "https://github.com/duqtools/imas2xarray/issues"
    },
    "split_keywords": [
        "modelling",
        "tokamak",
        "fusion-reactor",
        "imas"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "88ce898f3cd60ddb1c2d27f279f548166fbf7bfc7c0e5518bd7f5706b10feea4",
                "md5": "ff8127fdaaeb300e5ba63bb19eec9ded",
                "sha256": "33f533cdfe503b32e7cd4ca269a8778b5203326b825449892ca34095ebfa96ff"
            },
            "downloads": -1,
            "filename": "imas2xarray-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ff8127fdaaeb300e5ba63bb19eec9ded",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 17591,
            "upload_time": "2023-12-11T14:36:26",
            "upload_time_iso_8601": "2023-12-11T14:36:26.936044Z",
            "url": "https://files.pythonhosted.org/packages/88/ce/898f3cd60ddb1c2d27f279f548166fbf7bfc7c0e5518bd7f5706b10feea4/imas2xarray-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6e29befbf8bc94d0f3d0bbd5f2a6af3cd9c3c2afce91e68bb8198cbdb4cf8510",
                "md5": "34cc469a81291bbd94bf92e56cc41713",
                "sha256": "acc0fc11be34ccbb331d57eb35a27dc311d265af4716194d7fb0203595de84d8"
            },
            "downloads": -1,
            "filename": "imas2xarray-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "34cc469a81291bbd94bf92e56cc41713",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 20231,
            "upload_time": "2023-12-11T14:36:28",
            "upload_time_iso_8601": "2023-12-11T14:36:28.599452Z",
            "url": "https://files.pythonhosted.org/packages/6e/29/befbf8bc94d0f3d0bbd5f2a6af3cd9c3c2afce91e68bb8198cbdb4cf8510/imas2xarray-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-11 14:36:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "duqtools",
    "github_project": "imas2xarray",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "imas2xarray"
}
        
Elapsed time: 6.72047s