Skip to main content

An extension module for yt, adding a frontend for Idefix

Project description

yt_idefix

PyPI Supported Python Versions yt-project

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.5.0.tar.gz (25.7 kB view hashes)

Uploaded Source

Built Distribution

yt_idefix-0.5.0-py3-none-any.whl (26.3 kB view hashes)

Uploaded Python 3

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