code: def __threshold(self, ymx_i):
          
          return ymx_i - (self.S * np.diff(self.xsn).mean())
docs: Calculates the difference threshold for a
          given difference local maximum.
  
          Parameters
          -----------
          ymx_i : float 
             The normalized y value of a local maximum.