src/pys5p/s5p_msm.py
def biweight(self, data_sel=None, axis=0, keepdims=False):
        """
        Returns biweight median of the data in the S5Pmsm

        Parameters
        ----------
        data_sel  :  numpy slice
           A numpy slice generated for example numpy.s_. Can be used to skip
           the first and/or last frame
        axis  : int, optional
           Axis or axes along which the medians are computed. Default is 0.
        keepdims  : bool, optional
           If this is set to True, the axes which are reduced are left in the
           result as dimensions with size one. With this option, the result
           will broadcast correctly against the original arr.

        Returns
        -------
        S5Pmsm object with its data (value & error) replaced by its biweight
        medians along one axis. The coordinates are adjusted, accordingly.
        """
        if data_sel is None:
            if self.error is not None:
                self.value = biweight(self.value, axis=axis)
                self.error = biweight(self.error, axis=axis)
            else:
                (self.value, self.error) = biweight(self.value,
                                                    axis=axis, spread=True)
        else:
            if self.error is not None:
                self.value = biweight(self.value[data_sel], axis=axis)
                self.error = biweight(self.error[data_sel], axis=axis)
            else:
                (self.value, self.error) = biweight(self.value[data_sel],
                                                    axis=axis, spread=True)
        if keepdims:
            self.value = np.expand_dims(self.value, axis=axis)
            self.error = np.expand_dims(self.error, axis=axis)

        # adjust the coordinates
        if keepdims:
            key = self.coords._fields[axis]
            if self.coords[axis][0] == 0:
                dims = [0]
            else:
                dims = np.median(self.coords[axis], keepdims=keepdims)
            self.coords = self.coords._replace(**{key: dims})
        else:
            keys = []
            dims = []
            for ii in range(self.value.ndim+1):
                if ii != axis:
                    keys.append(self.coords._fields[ii])
                    dims.append(self.coords[ii][:])
            coords_namedtuple = namedtuple('Coords', keys)
            self.coords = coords_namedtuple._make(dims)

        return self

        Returns biweight median of the data in the S5Pmsm

        Parameters
        ----------
        data_sel  :  numpy slice
           A numpy slice generated for example numpy.s_. Can be used to skip
           the first and/or last frame
        axis  : int, optional
           Axis or axes along which the medians are computed. Default is 0.
        keepdims  : bool, optional
           If this is set to True, the axes which are reduced are left in the
           result as dimensions with size one. With this option, the result
           will broadcast correctly against the original arr.

        Returns
        -------
        S5Pmsm object with its data (value & error) replaced by its biweight
        medians along one axis. The coordinates are adjusted, accordingly.
        
Returns biweight median of the data in the S5Pmsm
Parameters



Returns

S5Pmsm object with its data (value & error) replaced by its biweight
medians along one axis. The coordinates are adjusted, accordingly.
Returns biweight median of the data in the S5Pmsm Parameters Returns S5Pmsm object with its data ( value & error ) replaced by its biweight medians along one axis . The coordinates are adjusted accordingly .
def biweight(self, data_sel=None, axis=0, keepdims=False):
        if data_sel is None:
            if self.error is not None:
                self.value = biweight(self.value, axis=axis)
                self.error = biweight(self.error, axis=axis)
            else:
                (self.value, self.error) = biweight(self.value,
                                                    axis=axis, spread=True)
        else:
            if self.error is not None:
                self.value = biweight(self.value[data_sel], axis=axis)
                self.error = biweight(self.error[data_sel], axis=axis)
            else:
                (self.value, self.error) = biweight(self.value[data_sel],
                                                    axis=axis, spread=True)
        if keepdims:
            self.value = np.expand_dims(self.value, axis=axis)
            self.error = np.expand_dims(self.error, axis=axis)
        if keepdims:
            key = self.coords._fields[axis]
            if self.coords[axis][0] == 0:
                dims = [0]
            else:
                dims = np.median(self.coords[axis], keepdims=keepdims)
            self.coords = self.coords._replace(**{key: dims})
        else:
            keys = []
            dims = []
            for ii in range(self.value.ndim+1):
                if ii != axis:
                    keys.append(self.coords._fields[ii])
                    dims.append(self.coords[ii][:])
            coords_namedtuple = namedtuple('Coords', keys)
            self.coords = coords_namedtuple._make(dims)
        return self
def biweight ( self , data_sel = None , axis = 0 , keepdims = False ) : if data_sel is None : if self . error is not None : self . value = biweight ( self . value , axis = axis ) self . error = biweight ( self . error , axis = axis ) else : ( self . value , self . error ) = biweight ( self . value , axis = axis , spread = True ) else : if self . error is not None : self . value = biweight ( self . value [ data_sel ] , axis = axis ) self . error = biweight ( self . error [ data_sel ] , axis = axis ) else : ( self . value , self . error ) = biweight ( self . value [ data_sel ] , axis = axis , spread = True ) if keepdims : self . value = np . expand_dims ( self . value , axis = axis ) self . error = np . expand_dims ( self . error , axis = axis ) if keepdims : key = self . coords . _fields [ axis ] if self . coords [ axis ] [ 0 ] == 0 : dims = [ 0 ] else : dims = np . median ( self . coords [ axis ] , keepdims = keepdims ) self . coords = self . coords . _replace ( ** { key : dims } ) else : keys = [ ] dims = [ ] for ii in range ( self . value . ndim + 1 ) : if ii != axis : keys . append ( self . coords . _fields [ ii ] ) dims . append ( self . coords [ ii ] [ : ] ) coords_namedtuple = namedtuple ( 'Coords' , keys ) self . coords = coords_namedtuple . _make ( dims ) return self
Returns biweight median of the data in the S5Pmsm
Parameters
Returns biweight median of the data in the S5Pmsm Parameters
"""
        Returns biweight median of the data in the S5Pmsm

        Parameters
        ----------
        data_sel  :  numpy slice
           A numpy slice generated for example numpy.s_. Can be used to skip
           the first and/or last frame
        axis  : int, optional
           Axis or axes along which the medians are computed. Default is 0.
        keepdims  : bool, optional
           If this is set to True, the axes which are reduced are left in the
           result as dimensions with size one. With this option, the result
           will broadcast correctly against the original arr.

        Returns
        -------
        S5Pmsm object with its data (value & error) replaced by its biweight
        medians along one axis. The coordinates are adjusted, accordingly.
        """ # adjust the coordinates
self
data_sel
axis
keepdims