pencil.math.interpolation ========================= .. py:module:: pencil.math.interpolation .. autoapi-nested-parse:: Interpolation routines for scalar and vector fields. Functions --------- .. autoapisummary:: pencil.math.interpolation.vec_int Module Contents --------------- .. py:function:: vec_int(xyz, field, dxyz, oxyz, nxyz, interpolation='trilinear', splines=None) vec_int(xyz, field, dxyz, oxyz, nxyz, interpolation='trilinear') Interpolates the field around position xyz. :param xyz: Position vector around which will be interpolated. :type xyz: ndarray :param field: Vector field to be interpolated with shape [nz, ny, nx]. :type field: ndarray :param dxyz: Array with the three deltas. :type dxyz: ndarray :param oxyz: Array with the position of the origin. :type oxyz: ndarray :param nxyz: Number of grid points in each direction. :type nxyz: ndarray :param interpolation: Interpolation method. Can be 'mean', 'trilinear' or 'tricubic'. If 'tricubic' interpolation is chosen, then the splines functions need to be specified. :type interpolation: string :param splines: Field data for tricubic interpolation (deprecated, uses field parameter instead). :type splines: ndarray, optional :rtype: ndarray with interpolated vector field.