src/Level1/Lorentzian.cc
/* These functions test Lorentzian "resolution", i.e. how well a Lorentzian
   is characterized by the discrete points.  If few points are taken or the
   Lorentzian is very broad it may be that the discrete function poorly
   represents the function.

           Input        Lint  : A flag or array of flags which signal
                                Lorentzian  poor digital resolution
                        R     : A Lorentzian rate or matrix whose 1st column
                                contains Lorentzian rates (1/sec)
                        winc  : Frequency between points (1/sec)
                        N     : Number of points acceptable per lwhh
           Output       void  : Lint value(s) set to 0 or 1 based
                                on whether the discrete Lorentzian function
                                is sufficiently digitized.
                                 0=Well digitized; 1=Poorly digitized
 
   Note that these function DO NOT return Lorentzians.  They only return
   flags regarding Lorentzian digitization.  These flags may be subsequently
   used in other Lorentzian functions (section A) in determining the best way
   to make discrete Lorentzians (section A).  The mathematical description is
   given at the end of the header file.
 
   The test is based on how many points span the Lorentzian linewidth at
   half-height.  For a well sampled function its assumed that the condition
 
                           N*winc < lwhh = 2*R
 
   is satisfied, i.e. that there will be at least N points sampled before a
   single linewidth is spanned.  The default value of N is 5 implying that at
   least 5 should characterize the peak.  A lower value will allow for poorer
   digitized functions to be deemed acceptable, but this may result in faster
   Lorentzian computations if the returned flags are used to decide how GAMMA
   Lorentzians are generated.  In contrast, a higher N value will make the
   flags require well digitized functions (vs. linewidth) but may imply more
   CPU intensive calculations when used to decide computation routes.        */
These functions test Lorentzian "resolution", i.e. how well a Lorentzian
is characterized by the discrete points.  If few points are taken or the
Lorentzian is very broad it may be that the discrete function poorly
represents the function.



Note that these function DO NOT return Lorentzians.  They only return
flags regarding Lorentzian digitization.  These flags may be subsequently
used in other Lorentzian functions (section A) in determining the best way
to make discrete Lorentzians (section A).  The mathematical description is
given at the end of the header file.

The test is based on how many points span the Lorentzian linewidth at
half-height.  For a well sampled function its assumed that the condition

N*winc < lwhh = 2*R


These functions test Lorentzian " resolution " i . e . how well a Lorentzian is characterized by the discrete points . If few points are taken or the Lorentzian is very broad it may be that the discrete function poorly represents the function . Note that these function DO NOT return Lorentzians . They only return flags regarding Lorentzian digitization . These flags may be subsequently used in other Lorentzian functions ( section A ) in determining the best way to make discrete Lorentzians ( section A ) . The mathematical description is given at the end of the header file . The test is based on how many points span the Lorentzian linewidth at half - height . For a well sampled function its assumed that the condition N * winc < lwhh = 2 * R
void Lorentz_int(int& Lint, double R, double winc, int N)
  {
  double nw = double(N)*winc;		
  if(2.0*R < nw) Lint = 1;		
  else Lint = 0;			
  }
void Lorentz_int ( int & Lint , double R , double winc , int N ) { double nw = double ( N ) * winc ; if ( 2.0 * R < nw ) Lint = 1 ; else Lint = 0 ; }
These functions test Lorentzian "resolution", i.e.
These functions test Lorentzian " resolution " i . e .
// Compute the N*winc value // If 2R<N*winc, should integrate // If not, integration not needed