nsrdb.utilities.interpolation.nn
- nn(data, indices, distance=None, dist_thresh=None)[source]
Nearest Neighbor Spatial Interpolation.
- Parameters:
data (np.array) – Coarse resolution NSRDB data to be interpolated. Must be for a single timestep and be flattened/raveled.
indices (np.ndarray) – Index array generated by a sklearn Tree query.
distance (np.ndarray) – Optional distance array generated by a sklearn Tree query for distance filtering.
dist_thresh (int | float) – Distance threshold. Neighbors with distance greater than this value are not interpolated.
- Returns:
out (np.array) – Fine resolution NSRDB data that has been interpolated.