Metadata-Version: 2.3
Name: flekspy
Version: 0.2.13
Summary: Python utilities for processing FLEKS data
Author: Yuxi Chen
Author-email: yuxichen@umich.edu>, Hongyang Zhou <hyzhou@umich.edu
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: matplotlib (>=3.8.2,<4.0.0)
Requires-Dist: numpy (>=1.26.4)
Requires-Dist: requests (>=2.32.3,<3.0.0)
Requires-Dist: scipy (>=1.14.1,<2.0.0)
Requires-Dist: yt (>=4.3.0,<5.0.0)
Description-Content-Type: text/markdown

# flekspy

<p align="center">
  <a href="https://badge.fury.io/py/flekspy">
    <img src="https://badge.fury.io/py/flekspy.svg" alt="PyPI version" height="18">
  </a>
  <a href="https://github.com/henry2004y/flekspy/actions">
    <img src="https://github.com/henry2004y/flekspy/actions/workflows/CI.yml/badge.svg">
  </a>
  <a href="https://henry2004y.github.io/flekspy/">
    <img src="https://img.shields.io/badge/docs-dev-blue">
  </a>
  <a href="LICENSE">
    <img src="https://img.shields.io/badge/license-MIT-blue">
  </a>
  <a href="https://app.codecov.io/gh/henry2004y/flekspy/">
    <img src="https://img.shields.io/codecov/c/github/henry2004y/flekspy">
  </a>
</p>

Python package for processing [FLEKS](https://github.com/SWMFsoftware/FLEKS) (FLexible Exascale Kinetic Simulator) data.

## Installation

```bash
python -m pip install flekspy
```

## Usage

`flekspy` can load files generated from FLEKS.

```python
import flekspy

ds = flekspy.load("sample_data/3*amrex")
```

Plotting is supported via Matplotlib and YT. For more detailed usage and contribution guide, please refer to the [documentation](https://henry2004y.github.io/flekspy/).

### ParaView Plugin

`flekspy` provides a ParaView plugin for visualizing FLEKS data. To use the plugin, follow these steps:

1. Make sure the ParaView version is 5.13 or higher.

2. Install flekspy for pvpython.
  - Go into the ParaView directory and create a virtual environment for Python

```bash
./bin/pvpython -m venv .venv
```

  - Check the Python version of `pvpython`

```bash
./bin/pvpython -c "import sys; print(sys.version)"
```

  - Install flekspy in the directory right in the venv. You may need to adjust the target path if `pvpython` does not detect `flekspy`. Assuming the Python version is 3.10.11, run

```bash
python3 -m pip  install --only-binary=:all: --python-version 3.10.11 --target ./.venv/lib/python3.10/site-packages/ flekspy
```

3. Launch ParaView with the virtual environment

```bash
./bin/paraview --venv .venv
```

4. In Tools > Manage Plugins, load the `BATSRUSReader` plugin.

## License

`flekspy` is licensed under the terms of the MIT license.

