Skip to main content

An extension module for yt, adding a frontend for Idefix

Project description

yt_idefix

PyPI Supported Python Versions yt-project

CI pre-commit.ci status Code style: black Imports: isort

A maturing yt frontend for Idefix, packaged as an extension for yt. This frontend is a candidate for integration in the core yt code base.

Installation

Make sure you have Python 3.7 or newer, then run

python3 -m pip install yt_idefix

If you don't already have yt it will be installed along.

Usage

After importing yt itself, make sure to activate the extension

import yt
import yt.extensions.idefix

Single dump files as well as time series can be loaded directly with yt.load, e.g.,

ds = yt.load("dump.0054.dmp")
ts = yt.load("dump.00??.dmp")

But vtk files currently require a little additional work

# load a single dataset
from yt_idefix.api import IdefixVtkDataset

ds = IdefixVtkDataset("data.0042.vtk")

# load time series
class IdefixVtkDatasetSeries(yt.DatasetSeries):
    _dataset_cls = IdefixVtkDataset


ts = IdefixVtkDatasetSeries("data.00??.vtk")

This is because of a bug that will be fixed in yt's next release, see after.

Current limitations

As of version 0.5.0 of this project, I/O performances are yet to be optimized for both dump and vtk files.

Vtk support is limited to cartesian geometries and currently slightly hacky. It will received better care in upcoming releases.

As of yt 4.0.1:

  • Non-uniform grids (using log spacing) are not supported, which makes this frontend of very limited use for Idefix.
  • yt.load() is not suitable for vtk files because they are considered ambiguous since all vtk files are (erroneously) recognized as Athena. This bug is resolved on yt's dev branch (https://github.com/yt-project/yt/pull/3424)

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

yt_idefix-0.6.5.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

yt_idefix-0.6.5-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file yt_idefix-0.6.5.tar.gz.

File metadata

  • Download URL: yt_idefix-0.6.5.tar.gz
  • Upload date:
  • Size: 26.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for yt_idefix-0.6.5.tar.gz
Algorithm Hash digest
SHA256 8ce59ab0bf9610d71b992f7d71811e95e0a902c1344e6a48e3ef3997f415b9c2
MD5 acfcd378bf9045fd0b6c93eee8a4aa5f
BLAKE2b-256 b2cd07ec1625e0f96110a4f9d05123770f2ce0f305df43d0102a6c102819fa9d

See more details on using hashes here.

Provenance

File details

Details for the file yt_idefix-0.6.5-py3-none-any.whl.

File metadata

  • Download URL: yt_idefix-0.6.5-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for yt_idefix-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c31fb6b4efafc4c1a4cdee4c5c5967be10d11d244eca29e06cd67b59415c51b8
MD5 45af3960794620e882945677901352a0
BLAKE2b-256 7a86c93f8e5e8ed1aa993fbcc17d340f499042ccf464f402ffd746ce3a348813

See more details on using hashes here.

Provenance

Supported by

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