latools/latools.py
def zeroscreen(self, focus_stage=None):
        """
        Remove all points containing data below zero (which are impossible!)
        """
        if focus_stage is None:
            focus_stage = self.focus_stage

        for s in self.data.values():
            ind = np.ones(len(s.Time), dtype=bool)
            for v in s.data[focus_stage].values():
                ind = ind & (nominal_values(v) > 0)

            for k in s.data[focus_stage].keys():
                s.data[focus_stage][k][~ind] = unc.ufloat(np.nan, np.nan)

        self.set_focus(focus_stage)

        return
def zeroscreen(self, focus_stage=None):
        """
        Remove all points containing data below zero (which are impossible!)
        """
        if focus_stage is None:
            focus_stage = self.focus_stage

        for s in self.data.values():
            ind = np.ones(len(s.Time), dtype=bool)
            for v in s.data[focus_stage].values():
                ind = ind & (nominal_values(v) > 0)

            for k in s.data[focus_stage].keys():
                s.data[focus_stage][k][~ind] = unc.ufloat(np.nan, np.nan)

        self.set_focus(focus_stage)

        return
def zeroscreen ( self , focus_stage = None ) : if focus_stage is None : focus_stage = self . focus_stage for s in self . data . values ( ) : ind = np . ones ( len ( s . Time ) , dtype = bool ) for v in s . data [ focus_stage ] . values ( ) : ind = ind & ( nominal_values ( v ) > 0 ) for k in s . data [ focus_stage ] . keys ( ) : s . data [ focus_stage ] [ k ] [ ~ ind ] = unc . ufloat ( np . nan , np . nan ) self . set_focus ( focus_stage ) return
Remove all points containing data below zero (which are impossible!)
Remove all points containing data below zero ( which are impossible! )