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

     There are 5 steps in a WALTZ-K sequence, as shown below.
                  _             _             _       _ _ _
              U = U(180)*U(360)*U(180)*U(270)*U(90) = 24231

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

******************************************************************************/
There are 5 steps in a WALTZ-K sequence, as shown below.

Each U represents a pulse of the specified angle and the bar
indicates a 180 degree phase shift.
There are 5 steps in a WALTZ - K 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_WALTZK(int even) const
  {
  double phibar = phi+180.0;			
  int Nsteps=5;					
  if(even) Nsteps = 12;				
  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);
    WFtimes.put(180.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);
    }
  else
    {
    WFsteps.put(complex(gamB1,phibar), 0);
    WFsteps.put(complex(gamB1,phibar), 1);
    WFsteps.put(complex(gamB1,phi),    2);
    WFsteps.put(complex(gamB1,phi),    3);
    WFsteps.put(complex(gamB1,phi),    4);
    WFsteps.put(complex(gamB1,phi),    5);
    WFsteps.put(complex(gamB1,phibar), 6);
    WFsteps.put(complex(gamB1,phibar), 7);
    WFsteps.put(complex(gamB1,phi),    8);
    WFsteps.put(complex(gamB1,phi),    9);
    WFsteps.put(complex(gamB1,phi),   10);
    WFsteps.put(complex(gamB1,phibar),11);
    WFtimes.put(90.0*tdegree,  0);
    WFtimes.put(90.0*tdegree,  1);
    WFtimes.put(90.0*tdegree,  2);
    WFtimes.put(90.0*tdegree,  3);
    WFtimes.put(90.0*tdegree,  4);
    WFtimes.put(90.0*tdegree,  5);
    WFtimes.put(90.0*tdegree,  6);
    WFtimes.put(90.0*tdegree,  7);
    WFtimes.put(90.0*tdegree,  8);
    WFtimes.put(90.0*tdegree,  9);
    WFtimes.put(90.0*tdegree, 10);
    WFtimes.put(90.0*tdegree, 11);
    }
  return PulWaveform(WFsteps, WFtimes, "WALTZ-K");
  }
PulWaveform WALTZ :: WF_WALTZK ( int even ) const { double phibar = phi + 180.0 ; int Nsteps = 5 ; if ( even ) Nsteps = 12 ; 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 ) ; WFtimes . put ( 180.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 ) ; } else { WFsteps . put ( complex ( gamB1 , phibar ) , 0 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 1 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 2 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 3 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 4 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 5 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 6 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 7 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 8 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 9 ) ; WFsteps . put ( complex ( gamB1 , phi ) , 10 ) ; WFsteps . put ( complex ( gamB1 , phibar ) , 11 ) ; WFtimes . put ( 90.0 * tdegree , 0 ) ; WFtimes . put ( 90.0 * tdegree , 1 ) ; WFtimes . put ( 90.0 * tdegree , 2 ) ; WFtimes . put ( 90.0 * tdegree , 3 ) ; WFtimes . put ( 90.0 * tdegree , 4 ) ; WFtimes . put ( 90.0 * tdegree , 5 ) ; WFtimes . put ( 90.0 * tdegree , 6 ) ; WFtimes . put ( 90.0 * tdegree , 7 ) ; WFtimes . put ( 90.0 * tdegree , 8 ) ; WFtimes . put ( 90.0 * tdegree , 9 ) ; WFtimes . put ( 90.0 * tdegree , 10 ) ; WFtimes . put ( 90.0 * tdegree , 11 ) ; } return PulWaveform ( WFsteps , WFtimes , " " ) ; }
There are 5 steps in a WALTZ-K sequence, as shown below.
There are 5 steps in a WALTZ - K sequence as shown below .
// Input        gamB1	: RF field strength (Hz) //		even	: Flag if even step sizes //		phi	: RF field phase // Output       PWF     : Composite pulse waveform // Note                 : Uses constant rf-amplitude. // Phase of "barred" steps // Set number of steps // More if even length steps  // Waveform vector{ gamB1,phi } // Vector for step times // Increment time per pulse // degree // Set waveform values