def interpolation(self, inp): positions = utilities.extract_positions(inp) upper_set = positions[positions[:, 2] >= 0] lower_set = positions[positions[:, 2] < 0] elevation = np.zeros(len(positions)) upper_interp = self.surface_from_modes(upper_set, self.modes[0]) lower_interp = self.surface_from_modes(lower_set, self.modes[1]) elevation[np.where(positions[:, 2] >= 0)] = upper_interp elevation[np.where(positions[:, 2] < 0)] = lower_interp return elevation
def interpolation(self, inp): positions = utilities.extract_positions(inp) upper_set = positions[positions[:, 2] >= 0] lower_set = positions[positions[:, 2] < 0] elevation = np.zeros(len(positions)) self._initialize_distance_interpolator_flat(layer=self._layer) upper_interp = self._interpolator[0](upper_set[:, 0:2]) lower_interp = self._interpolator[1](lower_set[:, 0:2]) elevation[np.where(positions[:, 2] >= 0)] = upper_interp elevation[np.where(positions[:, 2] < 0)] = lower_interp return elevation
def interpolation(self, inp): positions = utilities.extract_positions(inp) upper_set = positions[positions[:, 2] >= 0] lower_set = positions[positions[:, 2] < 0] elevation = np.zeros(len(positions)) try: self.options['from_modes'] upper_interp = self.surface_from_modes(upper_set, self.modes[0]) lower_interp = self.surface_from_modes(lower_set, self.modes[1]) except (TypeError, KeyError): self._initialize_distance_interpolator_flat(layer=self._layer) upper_interp = self._interpolator[0](upper_set[:, 0:2]) lower_interp = self._interpolator[1](lower_set[:, 0:2]) elevation[np.where(positions[:, 2] >= 0)] = upper_interp elevation[np.where(positions[:, 2] < 0)] = lower_interp return elevation
def distance(self, inp): positions = utilities.extract_positions(inp) return self._distance_flat(positions)
def distance(self, inp): """ returns distance from the surface """ positions = utilities.extract_positions(inp) distance_array = positions[::, 2] return distance_array
def interpolation(self, inp): """ returns interpolated position on the surface """ positions = utilities.extract_positions(inp)