InterpIdw¶
Class that performs inverse distance weighted interpolation
-
class
xmsinterp.interpolate.
InterpIdw
(points=None, triangles=None, scalars=None, **kwargs)¶ -
__init__
(points=None, triangles=None, scalars=None, **kwargs)¶ x.__init__(…) initializes x; see help(type(x)) for signature
-
interpolate_to_point
(point)¶ Interpolates to the location specified by a_pt and returns the value.
Parameters: point (tuple) – The location of the interpolation point. Returns: The interpolated value.
-
interpolate_to_points
(points)¶ Interpolates to an array of points and fills in an array of scalars.
Parameters: points (iterable) – Array of points to interpolate to.
-
interpolate_weights
(point)¶ Given a location and an array of points the weights associated with array of points are calculated.
Parameters: point (tuple) – Location of the interpolation point
-
nodal_function_number_nearest_points
¶ Gets the nodal function number nearest the points
-
nodal_function_type
¶ Gets the nodal function type
-
nodal_function_use_quadrant_search
¶ Gets the nodal function using quadrant search
-
point_activity
¶ Gets the point activity
-
points
¶ Gets all of the points
-
power
¶ Gets the power
-
scalars
¶ Gets all of the scalars
-
search_options_number_nearest_points
¶ Gets the search options number nearest points
-
search_options_use_quadrant_search
¶ Gets the search options using quadrant search
-
set_multithreading
(use_multithreading)¶ Sets the flag for multi-threading.
Parameters: use_multithreading (bool) – Specifies if multi-threading will be used
-
set_nodal_function
(nodal_function_type='constant', number_of_nearest_points=16, quadrant_oct=False, progress=None)¶ Sets the type of nodal function as well as options for computing nodal functions.
Parameters: - nodal_function_type (string) – The nodal function methodology: constant (0), gradient plane (1), quadratic (2).
- number_of_nearest_points (int) – The nearest number of points to use when calculating the nodal functions.
- quadrant_oct (bool) – Find the nearest number of points in each quadrant (2d) or octant (3d) when computing nodal functions.
- progress (float) – Progress bar to give user feedback.
-
set_observer
(progress=None)¶ Set the observer class so that feedback on the interpolation process can be received.
Parameters: progress (observer) – The observer
-
set_points
(points, is_2d)¶ Sets the points that will be used to do the interpolation.
Parameters: - points (iterable) – Array of the point locations
- is_2d (bool) – Flag if this is 2D
-
set_points_and_triangles
(points, triangles)¶ Sets the points that will be used to do the interpolation.
Parameters: - points (iterable) – Array of the point locations
- triangles (iterable) – All of the triangles
-
set_save_weights
(save)¶ Sets the flag for saving weights.
Parameters: save (bool) – Specifies if the weights should be saved
-
set_search_options
(nearest_point, quadrant_oct_search)¶ Sets the search options for how to find the nearest points to the interpolation point. The number of nearest points can be specified as well as whether to find the nearest points in each quadrant or octant.
Parameters: - nearest_point (int) – The number of nearest points to the interpolation point. These points are used to do the interpolation.
- quadrant_oct_search (bool) – Specifies if the search criterion should find the nearest points in each quadrant (2d) or octant (3d)
-
set_truncation
(maximum, minimum)¶ Set the truncation values for the interpolation and turn on truncation.
Parameters: - maximum (float) – The maximum value for truncation.
- minimum (float) – The minimum value for truncation.
-
triangle_activity
¶ Gets the triangle activity
-
triangles
¶ Gets all of the triangles
-
truncate_interpolation_values
¶ Gets the truncation interpolation values
-
truncate_max
¶ Gets the truncation maximum
-
truncate_min
¶ Gets the truncation minimum
-
weight_calculation_method
¶ Gets the weight calculation method
-