src/pys5p/s5p_msm.py
def sort(self, axis=0):
        """
        Sort data and its coordinate along a given axis

        Parameters
        ----------
        axis  : int, optional
           axis for which the array will be sorted. Default is 0.
        """
        if not isinstance(axis, int):
            raise TypeError('axis not an integer')
        if not 0 <= axis < self.value.ndim:
            raise ValueError('axis out-of-range')

        indx = np.argsort(self.coords[axis][:])
        self.coords[axis][:] = self.coords[axis][indx]

        if axis == 0:
            self.value = self.value[indx, ...]
            if self.error is not None:
                if isinstance(self.error, list):
                    self.error = (self.error[0][indx, ...],
                                  self.error[1][indx, ...])
                else:
                    self.error = self.error[indx, ...]
        elif axis == 1:
            self.value = self.value[:, indx, ...]
            if self.error is not None:
                if isinstance(self.error, list):
                    self.error = (self.error[0][:, indx, :],
                                  self.error[1][:, indx, :])
                else:
                    self.error = self.error[:, indx, :]
        elif axis == 2:
            self.value = self.value[:, :, indx]
            if self.error is not None:
                if isinstance(self.error, list):
                    self.error = (self.error[0][:, :, indx],
                                  self.error[1][:, :, indx])
                else:
                    self.error = self.error[:, :, indx]
        else:
            raise ValueError("S5Pmsm: implemented for ndim <= 3")

        Sort data and its coordinate along a given axis

        Parameters
        ----------
        axis  : int, optional
           axis for which the array will be sorted. Default is 0.
        
Sort data and its coordinate along a given axis
Parameters

axis  : int, optional
axis for which the array will be sorted. Default is 0.
Sort data and its coordinate along a given axis Parameters axis : int optional axis for which the array will be sorted . Default is 0 .
def sort(self, axis=0):
        if not isinstance(axis, int):
            raise TypeError('axis not an integer')
        if not 0 <= axis < self.value.ndim:
            raise ValueError('axis out-of-range')
        indx = np.argsort(self.coords[axis][:])
        self.coords[axis][:] = self.coords[axis][indx]
        if axis == 0:
            self.value = self.value[indx, ...]
            if self.error is not None:
                if isinstance(self.error, list):
                    self.error = (self.error[0][indx, ...],
                                  self.error[1][indx, ...])
                else:
                    self.error = self.error[indx, ...]
        elif axis == 1:
            self.value = self.value[:, indx, ...]
            if self.error is not None:
                if isinstance(self.error, list):
                    self.error = (self.error[0][:, indx, :],
                                  self.error[1][:, indx, :])
                else:
                    self.error = self.error[:, indx, :]
        elif axis == 2:
            self.value = self.value[:, :, indx]
            if self.error is not None:
                if isinstance(self.error, list):
                    self.error = (self.error[0][:, :, indx],
                                  self.error[1][:, :, indx])
                else:
                    self.error = self.error[:, :, indx]
        else:
            raise ValueError("S5Pmsm: implemented for ndim <= 3")
def sort ( self , axis = 0 ) : if not isinstance ( axis , int ) : raise TypeError ( 'axis not an integer' ) if not 0 <= axis < self . value . ndim : raise ValueError ( 'axis out-of-range' ) indx = np . argsort ( self . coords [ axis ] [ : ] ) self . coords [ axis ] [ : ] = self . coords [ axis ] [ indx ] if axis == 0 : self . value = self . value [ indx , ... ] if self . error is not None : if isinstance ( self . error , list ) : self . error = ( self . error [ 0 ] [ indx , ... ] , self . error [ 1 ] [ indx , ... ] ) else : self . error = self . error [ indx , ... ] elif axis == 1 : self . value = self . value [ : , indx , ... ] if self . error is not None : if isinstance ( self . error , list ) : self . error = ( self . error [ 0 ] [ : , indx , : ] , self . error [ 1 ] [ : , indx , : ] ) else : self . error = self . error [ : , indx , : ] elif axis == 2 : self . value = self . value [ : , : , indx ] if self . error is not None : if isinstance ( self . error , list ) : self . error = ( self . error [ 0 ] [ : , : , indx ] , self . error [ 1 ] [ : , : , indx ] ) else : self . error = self . error [ : , : , indx ] else : raise ValueError ( "S5Pmsm: implemented for ndim <= 3" )
Sort data and its coordinate along a given axis
Parameters
Sort data and its coordinate along a given axis Parameters
"""
        Sort data and its coordinate along a given axis

        Parameters
        ----------
        axis  : int, optional
           axis for which the array will be sorted. Default is 0.
        """
self
axis