Home
dhybridrpy is a Python package that allows you to easily load and plot data from dHybridR simulations. It provides programmatic access to simulation input and output data with the ability to quickly visualize that data.
Features¶
- Easy Data Access: Efficiently access simulation input data and output data like timesteps, fields (e.g., magnetic field), phases (e.g., distribution functions), and particle tracks.
- Quick Visualization: Plot 1D, 2D, and 3D output data with a single method call.
- Spectral Analysis: Compute isotropic and directional FFT power spectra, plus 1D spatial averages with statistics.
- Particle Tracks: Follow individual particle trajectories, velocities, and local field values across a simulation.
- Lazy Loading: Handle large datasets efficiently using Dask for lazy loading.
- Flexible API: Perform arithmetic operations on data objects directly.
Quick Example¶
from dhybridrpy import DHybridrpy
# Initialize with your simulation paths
dpy = DHybridrpy(
input_file="path/to/input",
output_folder="path/to/Output"
)
# Get available timesteps
print(dpy.timesteps())
# Access magnetic field data at timestep 1
Bx = dpy.timestep(1).fields.Bx()
print(Bx.data)
# Plot the data
import matplotlib.pyplot as plt
Bx.plot()
plt.show()
Installation¶
Install via pip:
See the Installation Guide for more details.
Getting Help¶
- Browse the Quick Start Guide for an introduction
- Check the API Reference for detailed documentation
- View Examples for common use cases
- Report issues on GitHub
License¶
This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for details.
Authors¶
- Bricker Ostler
- Miha Cernetic