List of functions and classes (API)#

Interpolators#

Spline([damping, force_coords, parallel])

Biharmonic spline interpolation using Green's functions.

SplineCV([dampings, force_coords, cv, ...])

Cross-validated biharmonic spline interpolation.

KNeighbors([k, reduction])

Nearest neighbor interpolation.

Linear([rescale])

Piecewise linear interpolation.

Cubic([rescale])

Piecewise cubic interpolation.

VectorSpline2D([poisson, mindist, damping, ...])

Elastically coupled interpolation of 2-component vector data.

Data Processing#

BlockReduce(reduction[, block_shape, ...])

Apply a reduction/aggregation operation to the data in blocks/windows.

BlockMean([block_shape, block_size, region, ...])

Apply a (weighted) mean to the data in blocks/windows.

Trend(degree)

Fit a 2D polynomial trend to spatial data.

Composite Estimators#

Vector(components)

Fit an estimator to each component of multi-component vector data.

Model Selection#

train_test_split(coordinates, data[, ...])

Split a dataset into a training and a testing set for cross-validation.

cross_val_score(estimator, coordinates, data)

Score an estimator/gridder using cross-validation.

BlockShuffleSplit([block_size, block_shape, ...])

Random permutation of spatial blocks cross-validator.

BlockKFold([block_size, block_shape, ...])

K-Folds over spatial blocks cross-validator.

Coordinate Manipulation#

grid_coordinates(region[, shape, spacing, ...])

Generate the coordinates for each point on a regular grid.

scatter_points(region, size[, random_state, ...])

Generate the coordinates for a random scatter of points.

profile_coordinates(point1, point2, size[, ...])

Coordinates for a profile along a straight line between two points.

get_region(coordinates)

Get the bounding region of the given coordinates.

pad_region(region, pad)

Extend the borders of a region by the given amount.

inside(coordinates, region)

Determine which points fall inside a given region.

rolling_window(coordinates, size[, spacing, ...])

Select points on a rolling (moving) window.

expanding_window(coordinates, center, sizes)

Select points on windows of changing size around a center point.

Projection#

project_region(region, projection)

Calculate the bounding box of a region in projected coordinates.

project_grid(grid, projection[, method, ...])

Apply the given map projection to a grid and re-sample it.

Masking#

distance_mask(data_coordinates, maxdist[, ...])

Mask grid points that are too far from the given data points.

convexhull_mask(data_coordinates[, ...])

Mask grid points that are outside the convex hull of the given data points.

Utilities#

maxabs(*args[, nan])

Calculate the maximum absolute value of the given array(s).

variance_to_weights(variance[, tol, dtype])

Converts data variances to weights for gridding.

grid_to_table(grid)

Convert a grid to a table with the values and coordinates of each point.

make_xarray_grid(coordinates, data, data_names)

Create an xarray.Dataset grid from 2D numpy arrays

median_distance(coordinates[, k_nearest, ...])

Median distance between the k nearest neighbors of each point.

Input/Output#

load_surfer(fname[, dtype])

Read data from a Surfer ASCII grid file.

Synthetic data#

synthetic.CheckerBoard([amplitude, region, ...])

Generate synthetic data in a checkerboard pattern.

Base Classes and Functions#

base.BaseGridder()

Base class for gridders.

base.BaseBlockCrossValidator([block_size, ...])

Base class for spatially blocked cross-validators.

base.n_1d_arrays(arrays, n)

Get the first n elements from a tuple/list, convert to arrays, and ravel.

base.least_squares(jacobian, data, weights)

Solve a weighted least-squares problem with optional damping regularization