Skip to main content

Smoothed particle hydrodynamics interpolation to a grid.

Project description

sph-interp

Smoothed particle hydrodynamics interpolation to a grid.

The core functionality of sph-interp is a set of interpolation functions derived from the Splash Fortran code rewritten in Python. It uses numba, a Python JIT compiler, for performance on par with the Fortran code.

For the original Splash source code, see https://github.com/danieljprice/splash.

Usage

Import sph-interp.

>>> import sphinterp as interp

Interpolate particles via projection.

>>> pixel_grid = interp.projection(x, y, z, h, weight, data, ...)

Install

Install from source.

git clone https://github.com/dmentipl/sph-interp
cd sph-interp
pip install -e .

Requirements

Python 3.6+ with numpy and numba.

License

sph-interp is licensed under GPL-2.0 following Splash. See LICENSE for details.

Citation

If you use sph-interp in a publication, please cite the Splash paper.

Price, D. J., 2007, PASA, 24, 159

To-do

  • add license
  • add tests
  • modularise code
  • add non-Cartesian interpolation
  • add perspective rendering
  • add opacity rendering
  • add exact rendering
  • add interpolate to 3D grid
  • add missing docstrings

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

sphinterp-0.0.1.tar.gz (15.3 kB view hashes)

Uploaded Source

Built Distribution

sphinterp-0.0.1-py3-none-any.whl (17.6 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