예제 #1
0
파일: _linear.py 프로젝트: ckmo/iris
    def _account_for_circular(self, points, data):
        """
        Extend the given data array, and re-centralise coordinate points
        for circular (1D) coordinates.

        """
        for (circular, modulus, index, dim, offset) in self._circulars:
            if modulus:
                # Map all the requested values into the range of the source
                # data (centred over the centre of the source data to allow
                # extrapolation where required).
                points[:, index] = wrap_circular_points(points[:, index],
                                                        offset, modulus)

            # Also extend data if circular (to match the coord points, which
            # 'setup' already extended).
            if circular:
                data = extend_circular_data(data, dim)

        return points, data
예제 #2
0
    def _account_for_circular(self, points, data):
        """
        Extend the given data array, and re-centralise coordinate points
        for circular (1D) coordinates.

        """
        for (circular, modulus, index, dim, offset) in self._circulars:
            if modulus:
                # Map all the requested values into the range of the source
                # data (centred over the centre of the source data to allow
                # extrapolation where required).
                points[:, index] = wrap_circular_points(points[:, index],
                                                        offset, modulus)

            # Also extend data if circular (to match the coord points, which
            # 'setup' already extended).
            if circular:
                data = extend_circular_data(data, dim)

        return points, data