Exemplo n.º 1
0
    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
Exemplo n.º 2
0
    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
Exemplo n.º 3
0
    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
Exemplo n.º 4
0
 def distance(self, inp):
     positions = utilities.extract_positions(inp)
     return self._distance_flat(positions)
Exemplo n.º 5
0
 def distance(self, inp):
     """ returns distance from the surface """
     positions = utilities.extract_positions(inp)
     distance_array = positions[::, 2]
     return distance_array
Exemplo n.º 6
0
 def interpolation(self, inp):
     """ returns interpolated position on the surface """
     positions = utilities.extract_positions(inp)