def testLorentzian(self):
     """ Test the Fourier transform of a exponential is a Lorentzian"""
     # Target parameters
     tg = {'tau': 100.0,    # picoseconds
           'beta': 1.0,    # exponential
           'height': 1.0  # We want identity, not just proporcionality
           }
     # Initial guess reasonably far from target parameters
     fString = "name=StretchedExpFT,Height=3.0,Tau=50,Beta=1.5,Centre=0.0002;" +\
               "name=FlatBackground,A0=0.0"
     # carry out the fit
     self.assertTrue(*do_fit(tg, fString, 'Lorentzian'))
 def testLorentzian(self):
     """ Test the Fourier transform of a exponential is a Lorentzian"""
     # Target parameters
     tg = {'tau': 100.0,    # picoseconds
           'beta': 1.0,    # exponential
           'height': 1.0  # We want identity, not just proporcionality
           }
     # Initial guess reasonably far from target parameters
     fString = "name=StretchedExpFT,Height=3.0,Tau=50,Beta=1.5,Centre=0.0002;" +\
               "name=FlatBackground,A0=0.0"
     # carry out the fit
     self.assertTrue(*do_fit(tg, fString, 'Lorentzian'))
 def testGaussian(self):
     """ Test PrimStretchedExpFT against the binned-integrated of
      the Fourier transform of a gaussian
     """
     # Target parameters
     tg = {'tau': 20.0,    # picoseconds
           'beta': 2.0,    # gaussian
           'height': 1.0  # We want identity, not just proporcionality
           }
     # Initial guess reasonably far from target parameters
     fString = "name=PrimStretchedExpFT,Height=2.0,Tau=30,Beta=1.5,Centre=0.0002;" +\
               "name=FlatBackground,A0=0.0"
     # Carry out the fit
     self.assertTrue(*do_fit(tg, fString, 'GaussianIntegrated'))
 def testGaussian(self):
     """ Test PrimStretchedExpFT against the binned-integrated of
      the Fourier transform of a gaussian
     """
     # Target parameters
     tg = {
         'tau': 20.0,  # picoseconds
         'beta': 2.0,  # gaussian
         'height': 1.0  # We want identity, not just proporcionality
     }
     # Initial guess reasonably far from target parameters
     fString = "name=PrimStretchedExpFT,Height=2.0,Tau=30,Beta=1.5,Centre=0.0002;" +\
               "name=FlatBackground,A0=0.0"
     # Carry out the fit
     self.assertTrue(*do_fit(tg, fString, 'GaussianIntegrated'))