src/Pulses/PulGauss.cc
// ----------------- Gaussian Pulse RF-Field Intensity Vector ------------------
Gaussian Pulse RF-Field Intensity Vector
Gaussian Pulse RF - Field Intensity Vector
row_vector GNvect(int N, double fact)
   {
   double num, den, Z;				
   Gprep(N, fact, den, Z);			
   row_vector Gs(N);
   for(int i=0; i<N; i++)			
     {
     if(N-1-i < i)                              
       Gs.put(Gs.get(N-1-i), i);		
     else
       {
       num = double(2*i)-double(N-1);		
       Gs.put(exp(Z*num*num), i);		
       }
     }
   return Gs;
   }
row_vector GNvect ( int N , double fact ) { double num , den , Z ; Gprep ( N , fact , den , Z ) ; row_vector Gs ( N ) ; for ( int i = 0 ; i < N ; i ++ ) { if ( N - 1 - i < i ) Gs . put ( Gs . get ( N - 1 - i ) , i ) ; else { num = double ( 2 * i ) - double ( N - 1 ) ; Gs . put ( exp ( Z * num * num ) , i ) ; } } return Gs ; }
Gaussian Pulse RF-Field Intensity Vector
Gaussian Pulse RF - Field Intensity Vector
// Input        N       : Number of Gaussian steps //		fact    : Cutoff factor // Output       Gvect   : Vector of Gaussian points //			  (in reals) with a maximum of 1 // Denominator & numerator // Prep. Gaussian values // Loop over Gaussian steps //      Use symmetry to avoid //      recalculating same pts // Index Gaussian to middle // Gaussian intensity