latools/filtering/filt_obj.py
def add(self, name, filt, info='', params=(), setn=None):
        """
        Add filter.

        Parameters
        ----------
        name : str
            filter name
        filt : array_like
            boolean filter array
        info : str
            informative description of the filter
        params : tuple
            parameters used to make the filter

        Returns
        -------
        None
        """

        iname = '{:.0f}_'.format(self.n) + name
        self.index[self.n] = iname

        if setn is None:
            setn = self.maxset + 1
        self.maxset = setn

        if setn not in self.sets.keys():
            self.sets[setn] = [iname]
        else:
            self.sets[setn].append(iname)

        # self.keys is not added to?
        self.components[iname] = filt
        self.info[iname] = info
        self.params[iname] = params
        for a in self.analytes:
            self.switches[a][iname] = False
        self.n += 1
        return
def add(self, name, filt, info='', params=(), setn=None):
        iname = '{:.0f}_'.format(self.n) + name
        self.index[self.n] = iname

        if setn is None:
            setn = self.maxset + 1
        self.maxset = setn

        if setn not in self.sets.keys():
            self.sets[setn] = [iname]
        else:
            self.sets[setn].append(iname)

        # self.keys is not added to?
        self.components[iname] = filt
        self.info[iname] = info
        self.params[iname] = params
        for a in self.analytes:
            self.switches[a][iname] = False
        self.n += 1
        return
def add ( self , name , filt , info = '' , params = ( ) , setn = None ) : iname = '{:.0f}_' . format ( self . n ) + name self . index [ self . n ] = iname if setn is None : setn = self . maxset + 1 self . maxset = setn if setn not in self . sets . keys ( ) : self . sets [ setn ] = [ iname ] else : self . sets [ setn ] . append ( iname ) # self.keys is not added to? self . components [ iname ] = filt self . info [ iname ] = info self . params [ iname ] = params for a in self . analytes : self . switches [ a ] [ iname ] = False self . n += 1 return
Add filter.

        Parameters
        ----------
        name : str
            filter name
        filt : array_like
            boolean filter array
        info : str
            informative description of the filter
        params : tuple
            parameters used to make the filter

        Returns
        -------
        None
Add filter .