map2loop.interpolators.NormalVectorInterpolator#
- class map2loop.interpolators.NormalVectorInterpolator#
Bases:
Interpolator
This class is a subclass of the Interpolator abstract base class. It implements the normal vector interpolation method for a given set of data points.
- dataframe#
A DataFrame that stores the processed data points for interpolation.
- Type:
pandas.DataFrame
- x#
A numpy array that stores the x-coordinates of the data points.
- Type:
- y#
A numpy array that stores the y-coordinates of the data points.
- Type:
- xi#
A numpy array that stores the x-coordinates of the grid points for interpolation.
- Type:
- yi#
A numpy array that stores the y-coordinates of the grid points for interpolation.
- Type:
- interpolator_label#
A string that stores the label of the interpolator. For this class, it is
- Type:
str
- "NormalVectorInterpolator".
- type()#
Returns the label of the interpolator.
- setup_interpolation(structure_data
pandas.DataFrame): Sets up the interpolation by preparing the data points for interpolation.
- setup_grid(bounding_box
dict): Sets up the grid for interpolation.
- interpolator(ni
Any) -> numpy.ndarray: Performs the interpolation for a given set of values.
- interpolate(bounding_box
dict, structure_data: pandas.DataFrame, interpolator: Any) -> numpy.ndarray: Executes the interpolation method.
Initialiser of for NormalVectorInterpolator class
- __init__()#
Initialiser of for NormalVectorInterpolator class
Methods
__init__
()Initialiser of for NormalVectorInterpolator class
interpolate
(ni[, interpolator])Inverse Distance Weighting interpolation method
setup_grid
(bounding_box)Setup the grid for interpolation
setup_interpolation
(structure_data)Setup the interpolation method (abstract method)
type
()Getter for subclass type label
- interpolate(ni: ~numpy.ndarray | list, interpolator: ~typing.Any = <class 'scipy.interpolate._rbf.Rbf'>) ndarray #
Inverse Distance Weighting interpolation method
- Parameters:
ni (int) – value to interpolate
interpolator – type of interpolator to use by default SciPy Rbf interpolator
- Returns:
Rbf – radial basis function object
- setup_grid(bounding_box: dict)#
Setup the grid for interpolation
- Parameters:
bounding_box (dict) – a dictionary containing the bounding box of the map data.
format (The bounding box dictionary should comply with the following) –
{ “minx”: value, “maxx”: value, “miny”: value, “maxy”: value,
}
- setup_interpolation(structure_data: DataFrame)#
Setup the interpolation method (abstract method)
- Parameters:
structure_data (pandas.DataFrame) – sampled structural data
- type()#
Getter for subclass type label
- Returns:
str – Name of subclass