src/Pulses/PulTrainSCyc.cc
/* These functions allow for the filling up two arrays of propagators for each
   step in the waveform (Usteps and Usums).  These will usually be generated
   during construction of the pulse train supercycle, they are system dependent.  */
These functions allow for the filling up two arrays of propagators for each
step in the waveform (Usteps and Usums).  These will usually be generated
during construction of the pulse train supercycle, they are system dependent.
These functions allow for the filling up two arrays of propagators for each step in the waveform ( Usteps and Usums ) . These will usually be generated during construction of the pulse train supercycle they are system dependent .
void PulTrainSCyc::SetUs(PulCycle& PTC)
  {
  if(!SCycnosteps) return;		
  if(!Usteps)				
      Usteps = new HSprop[SCycnosteps];	
  if(!Usums)				
      Usums = new HSprop[SCycnosteps];	
  HSprop Ubase = PTC.GetU();		
  gen_op RZ;				
  double phi;                           
  for(int i=0; i<SCycnosteps; i++)
    {
    phi = DEG2RAD*SCycsteps.getRe(i);	
    RZ = exp((-complexi*phi)*PTC.FZ());
    Usteps[i] = Ubase.sim_trans(RZ);	
    if(i) Usteps[i] *= Usteps[i-1];	
    }
  }
void PulTrainSCyc :: SetUs ( PulCycle & PTC ) { if ( ! SCycnosteps ) return ; if ( ! Usteps ) Usteps = new HSprop [ SCycnosteps ] ; if ( ! Usums ) Usums = new HSprop [ SCycnosteps ] ; HSprop Ubase = PTC . GetU ( ) ; gen_op RZ ; double phi ; for ( int i = 0 ; i < SCycnosteps ; i ++ ) { phi = DEG2RAD * SCycsteps . getRe ( i ) ; RZ = exp ( ( - complexi * phi ) * PTC . FZ ( ) ) ; Usteps [ i ] = Ubase . sim_trans ( RZ ) ; if ( i ) Usteps [ i ] *= Usteps [ i - 1 ] ; } }
These functions allow for the filling up two arrays of propagators for each
step in the waveform (Usteps and Usums).
These functions allow for the filling up two arrays of propagators for each step in the waveform ( Usteps and Usums ) .
// Input                PTSC	: A pulse train supercycle (this) //                      PTC     : A pulse train cycle // Output               void	: Propagators for each step of the //                                pulse train supercycle are calculated // Note				: This assumes that the propagators //                                in PTC have already been calculated! // Do nothing if no cycle steps defined // If no cycle step propagators // allocate space for them // If no cycle step summed propagators // allocate space for them // Begin with pulse waveform propagator // Rotation operator for phasing // Cycle step phase // Cycle step i phase (rad) // Rotation operator for phi // Phase the base propagator // Add in previous cycle steps