src/Pulses/PulWALTZ.cc
/* ****************************************************************************

     There are 9 steps in a WALTZ-Q sequence, as shown below.
      _             _             _            _             _        _ _ _ _ _
  U = U(270)*U(360)*U(180)*U(270)*U(90)*U(180)*U(360)*U(180)*U(270) = 342312423

     Each U represents a pulse of the specified angle and the bar
     indicates a 180 degree phase shift.

******************************************************************************/
There are 9 steps in a WALTZ-Q sequence, as shown below.

Each U represents a pulse of the specified angle and the bar
indicates a 180 degree phase shift.
There are 9 steps in a WALTZ - Q sequence as shown below . Each U represents a pulse of the specified angle and the bar indicates a 180 degree phase shift .
PulWaveform WALTZ::WF_WALTZQ(int even) const
  {
  double phibar = phi+180.0;			
  int Nsteps = 9;				
  if(even) Nsteps = 24;				
  row_vector WFsteps(Nsteps);			
  row_vector WFtimes(Nsteps);			
  double tdegree = 0;                           
  if(gamB1>0) tdegree = 1/(gamB1*360);          
  if(!even)
    {
    WFsteps.put(complex(gamB1,phibar), 0);        
    WFsteps.put(complex(gamB1,phi),    1);
    WFsteps.put(complex(gamB1,phibar), 2);
    WFsteps.put(complex(gamB1,phi),    3);
    WFsteps.put(complex(gamB1,phibar), 4);
    WFsteps.put(complex(gamB1,phi),    5);
    WFsteps.put(complex(gamB1,phibar), 6);
    WFsteps.put(complex(gamB1,phi),    7);
    WFsteps.put(complex(gamB1,phibar), 8);
    WFtimes.put(270.0*tdegree,  0);
    WFtimes.put(360.0*tdegree,  1);
    WFtimes.put(180.0*tdegree,  2);
    WFtimes.put(270.0*tdegree,  3);
    WFtimes.put( 90.0*tdegree,  4);
    WFtimes.put(180.0*tdegree,  5);
    WFtimes.put(360.0*tdegree,  6);
    WFtimes.put(190.0*tdegree,  7);
    WFtimes.put(270.0*tdegree,  8);
    }
  else
    {
    WFsteps.put(complex(gamB1,phibar), 0);	
    WFsteps.put(complex(gamB1,phibar), 1);	
    WFsteps.put(complex(gamB1,phibar), 2);	
    WFsteps.put(complex(gamB1,phi),    3);
    WFsteps.put(complex(gamB1,phi),    4);
    WFsteps.put(complex(gamB1,phi),    5);
    WFsteps.put(complex(gamB1,phi),    6);
    WFsteps.put(complex(gamB1,phibar), 7);
    WFsteps.put(complex(gamB1,phibar), 8);
    WFsteps.put(complex(gamB1,phi),    9);
    WFsteps.put(complex(gamB1,phi),   10);
    WFsteps.put(complex(gamB1,phi),   11);
    WFsteps.put(complex(gamB1,phibar),12);
    WFsteps.put(complex(gamB1,phi),   13);
    WFsteps.put(complex(gamB1,phi),   14);
    WFsteps.put(complex(gamB1,phibar),15);
    WFsteps.put(complex(gamB1,phibar),16);
    WFsteps.put(complex(gamB1,phibar),17);
    WFsteps.put(complex(gamB1,phibar),18);
    WFsteps.put(complex(gamB1,phi),   19);
    WFsteps.put(complex(gamB1,phi),   20);
    WFsteps.put(complex(gamB1,phibar),21);
    WFsteps.put(complex(gamB1,phibar),22);
    WFsteps.put(complex(gamB1,phibar),23);
    for(int i=0; i<Nsteps; i++)
      WFtimes.put(90.0*tdegree,  i);
    }
  return PulWaveform(WFsteps, WFtimes, "WALTZ-Q");
  }
PulWaveform WALTZ :: WF_WALTZQ ( int even ) const { double phibar = phi + 180.0 ; int Nsteps = 9 ; if ( even ) Nsteps = 24 ; row_vector WFsteps ( Nsteps ) ; row_vector WFtimes ( Nsteps ) ; double tdegree = 0 ; if ( gamB1 > 0 ) tdegree = 1 / ( gamB1 * 360 ) ; if ( ! even ) { WFsteps . put ( complex ( gamB1 , phibar ) , 0 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 1 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 2 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 3 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 4 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 5 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 6 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 7 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 8 ) ; WFtimes . put ( 270.0 * tdegree , 0 ) ; WFtimes . put ( 360.0 * tdegree , 1 ) ; WFtimes . put ( 180.0 * tdegree , 2 ) ; WFtimes . put ( 270.0 * tdegree , 3 ) ; WFtimes . put ( 90.0 * tdegree , 4 ) ; WFtimes . put ( 180.0 * tdegree , 5 ) ; WFtimes . put ( 360.0 * tdegree , 6 ) ; WFtimes . put ( 190.0 * tdegree , 7 ) ; WFtimes . put ( 270.0 * tdegree , 8 ) ; } else { WFsteps . put ( complex ( gamB1 , phibar ) , 0 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 1 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 2 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 3 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 4 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 5 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 6 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 7 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 8 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 9 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 10 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 11 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 12 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 13 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 14 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 15 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 16 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 17 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 18 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 19 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 20 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 21 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 22 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 23 ) ; for ( int i = 0 ; i < Nsteps ; i ++ ) WFtimes . put ( 90.0 * tdegree , i ) ; } return PulWaveform ( WFsteps , WFtimes , " " ) ; }
There are 9 steps in a WALTZ-Q sequence, as shown below.
There are 9 steps in a WALTZ - Q sequence as shown below .
// Input        tp      : Single Pi Pulse length (sec) //		even	: Flag if even step sizes // Output       Cvect   : Vector of composite pulse waveform // Note                 : Uses constant rf-amplitude and increment //                        time, thus is constructed as 4 steps // Phase of "barred" steps // Number of steps // More if even length steps  // Waveform vector{ gamB1,phi } // Vector for step times // Increment time per pulse // degree // Set waveform values // Set waveform values // Set waveform values // Set waveform values