ttricco / sarracen

A Python library for smoothed particle hydrodynamics (SPH) analysis and visualization.
https://sarracen.readthedocs.io
GNU General Public License v3.0
15 stars 18 forks source link

Interpolation of 3D data to a 3D grid #31

Closed AndrewHarris709 closed 2 years ago

AndrewHarris709 commented 2 years ago

Creates a new interpolation functioninterpolate_3d_grid, which takes a 3D SarracenDataFrame and returns an interpolated 3D grid with the specified number of 3D pixels. This function does not have a corresponding rendering function, unlike every other interpolation function prior to this point.

As well, an sdf.sph_interpolate() method has been included, which interpolates data within a SarracenDataFrame to either a 2D or 3D grid, depending on the number of dimensions within the data. The method is named sph_interpolate and not just interpolate to avoid conflict the existing DataFrame.interpolate() method within pandas.