ECOdyagnostics/operations.py
def _get_position(self, da, skip=None):
        """
        Returns the spatial position of the data variable of data vector.
        Note: Output does not include 't'-dimension

        :param da:  data variable or vector as xarray.DataArray or List(xarray.DataArray, ...)

        :return:    position of data variable or vector
        """

        # If da is a list (vector), return a list with the dimension tuple for every direction.
        if skip != None:
            da = self._data_skip(da, skip)
        dims = self._get_dims(da)
        if type(dims) is list:
            positions = []
            for dim in dims:
                for pos in self.points:
                    if dim in self.points[pos]:
                        positions.append(pos)
                        break
            if len(positions) != len(dims):
                raise Exception("""Could not get an appropriate grip point position for the given dimensions:
                                    %s """ % (dims,))
            return positions
        else:
            position = None
            for pos in self.points:
                if dims in self.points[pos]:
                    position = pos
                    break
            if position is None:
                raise Exception("""Dimension does not match any know grip point position: %s """ % (dims,))
            return position

        Returns the spatial position of the data variable of data vector.
        Note: Output does not include 't'-dimension

        :param da:  data variable or vector as xarray.DataArray or List(xarray.DataArray, ...)

        :return:    position of data variable or vector
        
Returns the spatial position of the data variable of data vector.
Note: Output does not include 't'-dimension
Returns the spatial position of the data variable of data vector . Note : Output does not include ' t ' - dimension
def _get_position(self, da, skip=None):
        if skip != None:
            da = self._data_skip(da, skip)
        dims = self._get_dims(da)
        if type(dims) is list:
            positions = []
            for dim in dims:
                for pos in self.points:
                    if dim in self.points[pos]:
                        positions.append(pos)
                        break
            if len(positions) != len(dims):
                raise Exception("""Could not get an appropriate grip point position for the given dimensions:
                                    %s """ % (dims,))
            return positions
        else:
            position = None
            for pos in self.points:
                if dims in self.points[pos]:
                    position = pos
                    break
            if position is None:
                raise Exception("""Dimension does not match any know grip point position: %s """ % (dims,))
            return position
def _get_position ( self , da , skip = None ) : if skip != None : da = self . _data_skip ( da , skip ) dims = self . _get_dims ( da ) if type ( dims ) is list : positions = [ ] for dim in dims : for pos in self . points : if dim in self . points [ pos ] : positions . append ( pos ) break if len ( positions ) != len ( dims ) : raise Exception ( """Could not get an appropriate grip point position for the given dimensions:
                                    %s """ % ( dims , ) ) return positions else : position = None for pos in self . points : if dims in self . points [ pos ] : position = pos break if position is None : raise Exception ( """Dimension does not match any know grip point position: %s """ % ( dims , ) ) return position
Returns the spatial position of the data variable of data vector.
Returns the spatial position of the data variable of data vector .
"""
        Returns the spatial position of the data variable of data vector.
        Note: Output does not include 't'-dimension

        :param da:  data variable or vector as xarray.DataArray or List(xarray.DataArray, ...)

        :return:    position of data variable or vector
        """ # If da is a list (vector), return a list with the dimension tuple for every direction.
position of data variable or vector
position of data variable or vector
self
da
data variable or vector as xarray.DataArray or List(xarray.DataArray, ...)
data variable or vector as xarray . DataArray or List ( xarray . DataArray ... )
skip