latools/latools.py
def ratio(self, internal_standard=None):
        """
        Calculates the ratio of all analytes to a single analyte.

        Parameters
        ----------
        internal_standard : str
            The name of the analyte to divide all other analytes
            by.

        Returns
        -------
        None
        """
        if 'bkgsub' not in self.stages_complete:
            raise RuntimeError('Cannot calculate ratios before background subtraction.')

        if internal_standard is not None:
            self.internal_standard = internal_standard
            self.minimal_analytes.update([internal_standard])

        with self.pbar.set(total=len(self.data), desc='Ratio Calculation') as prog:
            for s in self.data.values():
                s.ratio(internal_standard=self.internal_standard)
                prog.update()

        self.stages_complete.update(['ratios'])
        self.focus_stage = 'ratios'
        return
def ratio(self, internal_standard=None):
        if 'bkgsub' not in self.stages_complete:
            raise RuntimeError('Cannot calculate ratios before background subtraction.')

        if internal_standard is not None:
            self.internal_standard = internal_standard
            self.minimal_analytes.update([internal_standard])

        with self.pbar.set(total=len(self.data), desc='Ratio Calculation') as prog:
            for s in self.data.values():
                s.ratio(internal_standard=self.internal_standard)
                prog.update()

        self.stages_complete.update(['ratios'])
        self.focus_stage = 'ratios'
        return
def ratio ( self , internal_standard = None ) : if 'bkgsub' not in self . stages_complete : raise RuntimeError ( 'Cannot calculate ratios before background subtraction.' ) if internal_standard is not None : self . internal_standard = internal_standard self . minimal_analytes . update ( [ internal_standard ] ) with self . pbar . set ( total = len ( self . data ) , desc = 'Ratio Calculation' ) as prog : for s in self . data . values ( ) : s . ratio ( internal_standard = self . internal_standard ) prog . update ( ) self . stages_complete . update ( [ 'ratios' ] ) self . focus_stage = 'ratios' return
Calculates the ratio of all analytes to a single analyte.

        Parameters
        ----------
        internal_standard : str
            The name of the analyte to divide all other analytes
            by.

        Returns
        -------
        None
Calculates the ratio of all analytes to a single analyte .