Exemplo n.º 1
0
    def test_binify_group_to_bin(self):
        """
        Testing group_to_bin function
        """

        self.assertEqual(group_to_bin(self.values, X=self.coordinates),
                         result_group_to_bin)
Exemplo n.º 2
0
    def test_binify_group_to_bin_with_bm(self):
        """
        Testing group_to_bin function
        """

        self.assertEqual(group_to_bin(self.values, bm=group_to_bin_bm),
                         result_group_to_bin)
Exemplo n.º 3
0
    def grouped_pairs(self):
        """
        Result of the group_to_bin function. This property will be used for wrapping the function, in case there are
        alternative grouping functions implemented one day.

        :return:
        """
        if self.is_directional:
            return group_to_bin(self.values,
                                self.bm,
                                X=self._X,
                                azimuth_deg=self.azimuth,
                                tolerance=self.tolerance,
                                maxlag=self.maxlag)
        else:
            return group_to_bin(self.values, self.bm, maxlag=self.maxlag)
Exemplo n.º 4
0
    def test_binify_group_to_bin_with_maxlag(self):
        """
        Testing group_to_bin function with maxlag
        """

        self.assertEqual(
            group_to_bin(self.values, X=self.coordinates, maxlag=4),
            result_group_to_bin_maxlag)
Exemplo n.º 5
0
    def test_binify_group_to_bin_with_azimuth_and_tolerance(self):
        """
        Testing group_to_bin function with azimuth and tolerance
        """

        self.assertEqual(
            group_to_bin(self.values,
                         X=self.coordinates,
                         azimuth_deg=90,
                         tolerance=22.5),
            result_group_to_bin_azimuth_and_tolerance)