Get["QUADRUPOLE"];

(* 
One - dimensional SPAM MQMAS of a spin I  =  
              5/2, 
Three pulse sequence with three x phases,
3  
              Q echo amplitude optimization with the second pulse,
Coherence pathway 0  
                Q  ->  3  
                  Q  ->  0  Q  ->  -1 Q, 
Wolfram Mathematica 5.0,
Author :  R .  HAJJAR 
*)

  
quadrupoleSpin = 2.5;
larmorFrequencyMhz = 208.61889974;  

  
quadrupoleOrder = 2;
QCCMHz = 5;               η = -1;

  
(Subscript[α, PR]) = 0;           (Subscript[β, PR]) = 
        0;              (Subscript[γ, PR]) = 0;

  
startOperator = Iz; 
ωRFkHz = 90;           
ωRF3kHz = 9.3;      
spinRatekHz = 5;
powderFile = "rep100_simp";
numberOfGammaAngles = 10;
t1 = 4;         
t2 = 4;        
t3 = 9;                 
Δt = 0.25;        
np = t2/Δt;     

  
elements1 = {{2, 5}};    
coherence2 = {0};           
detectelt = {{4, 3}};   

fsimulation:=(
pulse[t1, ωRFkHz];          
filterElt[elements1];                 
acq0;

For [p = 1,p ≤ np, p++,{
  pulse[Δt, ωRFkHz];    
	store[2];
	filterCoh[coherence2];  
  pulse[t3, ωRF3kHz];   
        acq[p];
	recall[2];
}];
);

  
run;
tabgraph["spam_P2_3Q0Qxxx"];