src/Pulses/PulGauss.cc
// ------------------ Gaussian Pulse RF-Field Integral Vector ------------------
Gaussian Pulse RF-Field Integral Vector
Gaussian Pulse RF - Field Integral Vector
row_vector GIntvec(double gamB1, double tau, int N, double fact)
   {
   double den, Z;				
   Gprep(N, fact, den, Z);			
   row_vector Gs = Gvect(gamB1, N, fact);	
   row_vector Gvect(N+1);			
   Gvect.put(complex0, 0);			
   double tdiv = tau/double(N);			
   double time = tdiv;				
   double Int = 0.0;				
   Z = tdiv*360.0;				
   for(int i=1; i<N; i++)			
     {
     time += tdiv;				
     Int += Gs.getRe(i)*Z;			
     Gvect.put(complex(time,Int), i);		
     }
   return Gvect;
   }
row_vector GIntvec ( double gamB1 , double tau , int N , double fact ) { double den , Z ; Gprep ( N , fact , den , Z ) ; row_vector Gs = Gvect ( gamB1 , N , fact ) ; row_vector Gvect ( N + 1 ) ; Gvect . put ( complex0 , 0 ) ; double tdiv = tau / double ( N ) ; double time = tdiv ; double Int = 0.0 ; Z = tdiv * 360.0 ; for ( int i = 1 ; i < N ; i ++ ) { time += tdiv ; Int += Gs . getRe ( i ) * Z ; Gvect . put ( complex ( time , Int ) , i ) ; } return Gvect ; }
Gaussian Pulse RF-Field Integral Vector
Gaussian Pulse RF - Field Integral Vector
// Input        gamB1   : The rf-field strength (Hz) //              tau     : Gaussian pulse length (sec) //              N       : Number of Gaussian steps //		fact    : Cutoff factor // Output       Gvect	: Vector of Gaussian integral //			  in degrees! // Denominator & numerator // Prep. Gaussian values // Vector of Gaussian points // Vector for integral points // First point of int. is 0 // Single step time // Time at point i=1 // Integral at point i // Reuse Z for conversion // Loop over Gaussian steps // Time at point i // Integral (in degrees) // Store integral up to here