[yt-dev] field interpolater question

Britton Smith brittonsmith at gmail.com
Tue May 7 14:48:55 PDT 2013


Hi all,

I'm working on some analysis that requires interpolating from some data
tables.  Normally, I would use the Unilinear, Bilinear, and
TrilinearFieldInterpolators in yt, but they only accept evenly spaced bins,
which I don't have.  It actually looks like the cython function which does
the calculation accepts the bins as arrays, which the python function
creates from the given bounds.

I'd like to change this behavior to allow me to give the bins to the python
function.  Currently, the call to create the interpolator looks like this:
BilinearInterpolator(table, boundaries, field_names)

where boundaries is (x_0, x_n, y_0, y_n) or the min/max of the x and y
bins.  Would it be ok if I changed this so that boundaries can also be a
pair of arrays?  I would just have the function check and still maintain
the old way as well.  By doing it this way, it shouldn't break backward
compatibility either.  Would this be an ok solution?

Britton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20130507/3178eca4/attachment.htm>


More information about the yt-dev mailing list