예제 #1
0
pulsesequence() {

// Define Variables and Objects and Get Parameter Values
   MPSEQ dec = getblew("blewH",0,0.0,0.0,0,1);
   strncpy(dec.ch,"dec",3);
   putCmd("chHblew='dec'\n");

   CP hx = getcp("HX",0.0,0.0,0,1);
   strncpy(hx.fr,"dec",3);
   strncpy(hx.to,"obs",3);
   putCmd("frHX='dec'\n");
   putCmd("toHX='obs'\n");

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

   putCmd("groupcopy('current','processed','acquisition')");

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwH90") + getval("tHX") + getval("rd") + getval("ad") + at;
   d.dutyoff = d1 + 4.0e-6;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables

   settable(phH90,4,table1);
   settable(phXhx,4,table2);
   settable(phHhx,4,table3);
   settable(phRec,4,table4);
   setreceiver(phRec);

// Begin Sequence

   txphase(phXhx); decphase(phH90);
   obspwrf(getval("aXhx")); decpwrf(getval("aH90"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// H to X Cross Polarization

   decrgpulse(getval("pwH90"),phH90,0.0,0.0);
   decphase(phHhx);
    _cp_(hx,phHhx,phXhx);

// Begin Acquisition

   _mpseqon(dec, phHhx);
   obsblank(); _blank34();
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _mpseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
예제 #2
0
void pulsesequence() {

// Set the Maximum Dynamic Table and v-var Numbers

   settablenumber(20);
   setvvarnumber(30);

// Define Variables and Objects and Get Parameter Values

   MPSEQ dumbo = getdumbogen("dumboX","dcf1X",0,0.0,0.0,0,1);
   strncpy(dumbo.ch,"obs",3); 
   putCmd("chXdumbo='obs'\n");

   MPSEQ c7 = getpostc7("c7X",0,0.0,0.0,0,1);  
   MPSEQ c7ref = getpostc7("c7X",c7.iSuper,c7.phAccum,c7.phInt,1,1);
   strncpy(c7.ch,"obs",3);
   putCmd("chXc7='obs'\n");

   WMPA wdumbo = getwdumbogen("wdumboX","dcfX");
   strncpy(wdumbo.ch,"obs",3);
   putCmd("chXwdumbo='obs'\n");

   double tXzfinit = getval("tXzf");            //Define the Z-filter delay in the sequence
   double tXzf = tXzfinit - 5.0e-6 - wdumbo.r1;

// Set Constant-time Period for d2. 

   if (d2_index == 0) d2_init = getval("d2");
   double d2_ = (ni - 1)/sw1 + d2_init;
   putCmd("d2acqret = %f\n",roundoff(d2_,12.5e-9));
   putCmd("d2dwret = %f\n",roundoff(1.0/sw1,12.5e-9));

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

   putCmd("groupcopy('current','processed','acquisition')");

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = c7.t + getval("pwXtilt") + d2_ + getval("pwXtilt") + c7ref.t + getval("pwX90") +
                   + wdumbo.q*wdumbo.cycles*wdumbo.pw;
   d.dutyoff = 4.0e-6 + d1 + tXzfinit + wdumbo.r2 + at - wdumbo.q*wdumbo.cycles*wdumbo.pw;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0); 

// Set Phase Tables

   settable(ph1Xc7,4,table1);
   settable(phXdumbo,4,table2);
   settable(ph2Xc7,4,table3);
   settable(phX90,16,table4);
   settable(phXwdumbo,4,table5);
   settable(phRec,16,table6);
   settable(ph1Xtilt,4,table7);
   settable(ph2Xtilt,4,table8);

// Set the Small-Angle Prep Phase

   double obsstep = 360.0/(PSD*8192);
   obsstepsize(obsstep);
   int phfX90 = initphase(0.0, obsstep);

//Add STATES Quadrature Phase

   if (phase1 == 2)
      initval((45.0/obsstep),v1);
   else
      initval(0.0,v1);

   initval((d2*c7.of[0]*360.0/obsstep),v2);
   initval(0.0,v3);
   obsstepsize(obsstep);
   setreceiver(phRec);

// Begin Sequence

   xmtrphase(v1); txphase(ph1Xc7);
   obspwrf(getval("aXc7"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// C7 Recoupling of 2Q coherence

   _mpseq(c7, ph1Xc7);

// F1 Evolution With DUMBO

   xmtrphase(v3);
   if (!getval("scXdcf1")){
   	obspwrf(getval("aX90"));
   	rgpulse(getval("pwXtilt"),ph1Xtilt,0.0,0.0);
   }
   obspwrf(getval("aXdumbo"));
   obsunblank();
   _mpseqon(dumbo,phXdumbo);
   delay(d2);
   _mpseqoff(dumbo);
   if (!getval("scXdcf1")){
   	obspwrf(getval("aX90"));
   	rgpulse(getval("pwXtilt"),ph2Xtilt,0.0,0.0);
   }
   obspwrf(getval("aX90"));
   obsunblank();

// C7 Transfer to 1Q Coherence

   xmtrphase(v2);
   _mpseq(c7ref, ph2Xc7);

// Z-filter Delay

   delay(tXzf);

// Detection Pulse

   txphase(phX90);
   obspwrf(getval("aX90"));
   startacq(5.0e-6);
   rcvroff();
   delay(wdumbo.r1);
   rgpulse(getval("pwX90"), phX90, 0.0, 0.0);
   obsunblank();
   xmtrphase(v3);
   delay(wdumbo.r2);

// Apply WPMLG Cycles During Acqusition

   decblank(); _blank34();
   _wdumbo(wdumbo,phXwdumbo);
   endacq();
   obsunblank(); decunblank(); _unblank34();  
}
예제 #3
0
void pulsesequence() {

//======================================================
// Define Variables and Objects and Get Parameter Values
//======================================================

// --------------------------------
// Acquisition Decoupling
// -------------------------------

   char Xseq[MAXSTR];
   getstr("Xseq",Xseq);
   DSEQ dec = getdseq("X");
   strncpy(dec.t.ch,"dec",3);
   putCmd("chXtppm='dec'\n");
   strncpy(dec.s.ch,"dec",3);
   putCmd("chXspinal='dec'\n");

//-------------------------------------
// Homonuclear Decoupling During Echo
//-------------------------------------

   MPDEC homo1 = getmpdec("hdec1H",0,0.0,0.0,0,1);
   strncpy(homo1.mps.ch,"obs",3);
   putCmd("chHhdec1='obs'\n"); 

// --------------------
// H echo calculation
// --------------------

   double t1Hecho = getval("t1Hecho") - getval("pwHecho")/2.0 - 
                    ((!strcmp(homo1.dm,"y"))?getval("pwHshort1")*2.:0.0);
   if (t1Hecho < 0.0) t1Hecho = 0.0;
   double t2Hecho = getval("t2Hecho") - getval("pwHecho")/2.0 - 
                    ((!strcmp(homo1.dm,"y"))?getval("pwHshort1")*2.:0.0) - 
                    getval("rd")- getval("ad");
   if (t2Hecho < 0.0) t2Hecho = 0.0;
 

   double t1H_echo = 0.0; 
   double t2H_echo = 0.0;
   double t1H_left = 0.0; 
   double t2H_left = 0.0;
   if (!strcmp(homo1.dm,"y")) {
      t2H_echo = homo1.mps.t*((int)(t2Hecho/homo1.mps.t));
      t2H_left = t2Hecho - t2H_echo;
      t1H_echo = t2H_echo;
      t1H_left = t1Hecho - t1H_echo;
   }

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

   putCmd("groupcopy('current','processed','acquisition')");

//----------------------
// Dutycycle Protection
//----------------------

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwH90");
   d.dutyoff = d1 + 4.0e-6;
   if (!strcmp(homo1.dm,"y"))
     d.dutyon += t1H_echo + t2H_echo;
   else
     d.dutyoff += t1H_echo + t2H_echo;
   d.c1 = d.c1 + (!strcmp(Xseq,"tppm"));
   d.c1 = d.c1 + ((!strcmp(Xseq,"tppm")) && (dec.t.a > 0.0));
   d.t1 = getval("rd") + getval("ad") + at;
   d.c2 = d.c2 + (!strcmp(Xseq,"spinal"));
   d.c2 = d.c2 + ((!strcmp(Xseq,"spinal")) && (dec.s.a > 0.0));
   d.t2 = getval("rd") + getval("ad") + at;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

//------------------------
// Set Phase Tables
//-----------------------

   settable(phH90,4,table1);    
   settable(phHecho,8,table2);
   settable(phRec,4,table3);
   setreceiver(phRec);

//=======================    
// Begin Sequence
//=======================

   txphase(phH90); decphase(zero);
   obspwrf(getval("aH90")); 
   obsunblank(); decunblank(); _unblank34();
   delay(d1);  
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

//------------------------  
// H Direct Polarization 
//------------------------
  
   rgpulse(getval("pwH90"),phH90,0.0,0.0);
   obsunblank(); decunblank(); _unblank34();

// -----------------------------
// H Hahn Echo
// -----------------------------

   if (!strcmp(homo1.dm,"y")) {
      delay (t1H_left);
      if (getval("pwHshort1") > 0.0 ) {
         obspwrf(getval("aHhdec1"));
         rgpulse(getval("pwHshort1"),three,0.0,0.0);  
         obsunblank();
      }
      if (!strcmp(homo1.dm,"y")) _mpseqon(homo1.mps,zero);
      delay(t1H_echo);
      if (!strcmp(homo1.dm,"y")) _mpseqoff(homo1.mps);

      if (getval("pwHshort1") > 0.0 ) {
         obspwrf(getval("aHhdec1")); txphase(one);
         rgpulse(getval("pwHshort1"),one,0.0,0.0);  
         obsunblank();
      }
   }
   else delay(t1Hecho);
   txphase(phHecho);
   obspwrf(getval("aHecho"));
   rgpulse(getval("pwHecho"),phHecho,0.0,0.0);
   obsunblank();

   if (!strcmp(homo1.dm,"y")) {
      if (getval("pwHshort1") > 0.0 ) {
         obspwrf(getval("aHhdec1"));
         rgpulse(getval("pwHshort1"),three,0.0,0.0);  
         obsunblank();
      }
      if (!strcmp(homo1.dm,"y")) _mpseqon(homo1.mps,zero);
      delay(t2H_echo);
      if (!strcmp(homo1.dm,"y")) _mpseqoff(homo1.mps);

      if(getval("pwHshort1")>0 )  {
         obspwrf(getval("aHhdec1"));
         rgpulse(getval("pwHshort1"),one,0.0,0.0);  
         obsunblank();
      }
      delay(t2H_left);
   }
   else delay(t2Hecho);


//====================
// Begin Acquisition 
//====================

   _dseqon(dec);    
   obsblank(); decblank(); _blank34();
   delay(getval("rd"));  
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec); 
   obsunblank(); decunblank(); _unblank34();
}
예제 #4
0
void pulsesequence() {

// Define Variables and Objects and Get Parameter Values

   double aXhxpto2 = getval("aXhxpto2");
   double pw1Xhxpto2 = getval("pw1Xhxpto2");
   double pw2Xhxpto2 = getval("pw2Xhxpto2");
   double t1HXpto2init = getval("t1HXpto2");
   double tau1 = t1HXpto2init - pw1Xhxpto2/2.0;
   double t2HXpto2init = getval("t2HXpto2");
   double tau2 = t2HXpto2init - pw1Xhxpto2/2.0 - pw2Xhxpto2/2.0; 
   double t3HXpto2init = getval("t3HXpto2");
   double tau3 = t3HXpto2init - pw2Xhxpto2/2.0;

   MPSEQ r18 = getr1825("r18H",0,0.0,0.0,0,1);
   MPSEQ r18ref = getr1825("r18H",r18.iSuper,r18.phAccum,r18.phInt,1,1); 
   strncpy(r18.ch,"dec",3);
   strncpy(r18ref.ch,"dec",3);
   putCmd("chHr18='dec'\n");

   DSEQ dec = getdseq("H");
   strncpy(dec.t.ch,"dec",3);
   putCmd("chHtppm='dec'\n"); 
   strncpy(dec.s.ch,"dec",3);
   putCmd("chHspinal='dec'\n");

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

   putCmd("groupcopy('current','processed','acquisition')");

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = tau1 + tau2 + pw1Xhxpto2 + tau3 + pw2Xhxpto2;
   d.dutyoff = d1 + 4.0e-6;
   d.c1 = d.c1 + (!strcmp(dec.seq,"tppm"));
   d.c1 = d.c1 + ((!strcmp(dec.seq,"tppm")) && (dec.t.a > 0.0));
   d.t1 = getval("rd") + getval("ad") + at;
   d.c2 = d.c2 + (!strcmp(dec.seq,"spinal"));
   d.c2 = d.c2 + ((!strcmp(dec.seq,"spinal")) && (dec.s.a > 0.0));
   d.t2 = getval("rd") + getval("ad") + at;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables

   settable(ph1Hhxpto2,4,table1);
   settable(ph2Hhxpto2,4,table2);
   settable(ph1Xhxpto2,4,table3);
   settable(ph2Xhxpto2,4,table4);
   settable(phHdec,4,table5);
   settable(phRec,4,table6);
   setreceiver(phRec);

// Begin Sequence

   txphase(ph1Xhxpto2); decphase(ph1Hhxpto2);
   obspwrf(aXhxpto2); decpwrf(r18.a);
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// H to X Cross Polarization with PRESTO1

   _mpseqon(r18,ph1Hhxpto2);
   delay(tau1);
   rgpulse(pw1Xhxpto2/2.0,ph1Xhxpto2,0.0,0.0);
   _mpseqoff(r18);
   _mpseqon(r18ref,ph2Hhxpto2);
   rgpulse(pw1Xhxpto2/2.0,ph1Xhxpto2,0.0,0.0);
   delay(tau2);
   _mpseqoff(r18ref);
   decphase(zero);
   _dseqon(dec);
   rgpulse(pw2Xhxpto2,ph2Xhxpto2,0.0,0.0);
   delay(tau3);
   decphase(zero);

// Begin Acquisition

   _dseqon(dec);
   obsblank(); _blank34();
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
예제 #5
0
pulsesequence() {

// Define Variables and Objects and Get Parameter Values

   SHAPE p1 = getpulse("90H",0.0,0.0,1,0);
   strncpy(p1.pars.ch,"dec",3);
   putCmd("chH90='dec'\n");
   p1.pars.array = disarry("xx", p1.pars.array);
   p1 = update_shape(p1,0.0,0.0,1);

   MPSEQ ph = getpmlgxmx("pmlgH",0,0.0,0.0,1,0);
   strncpy(ph.ch,"dec",3);
   putCmd("chHpmlg='dec'\n");
   double pwHpmlg = getval("pwHpmlg");
   ph.nelem = (int) (d2/(2.0*pwHpmlg) + 0.1);
   ph.array = disarry("xx", ph.array);
   ph = update_mpseq(ph,0,p1.pars.phAccum,p1.pars.phInt,1);

   SHAPE p2 = getpulse("90H",0.0,0.0,2,0);
   strncpy(p2.pars.ch,"dec",3);
   putCmd("chH90='dec'\n");
   p2.pars.array = disarry("xx", p2.pars.array);
   p2 = update_shape(p2,ph.phAccum,ph.phInt,2);
   double pwX180 = getval("pwX180");
   double d22 = ph.t/2.0 - pwX180/2.0;
   if (d22 < 0.0) d22 = 0.0;

// CP hx and DSEQ dec Return to the Reference Phase

   CP hx = getcp("HX",0.0,0.0,0,1);
   strncpy(hx.fr,"dec",3);
   strncpy(hx.to,"obs",3);
   putCmd("frHX='dec'\n");
   putCmd("toHX='obs'\n");

   DSEQ dec = getdseq("H");
   strncpy(dec.t.ch,"dec",3);
   putCmd("chHtppm='dec'\n"); 
   strncpy(dec.s.ch,"dec",3);
   putCmd("chHspinal='dec'\n");

// Set Constant-time Period for d2. 

   if (d2_index == 0) d2_init = getval("d2");
   double d2_ = (ni - 1)/sw1 + d2_init;
   putCmd("d2acqret = %f\n",roundoff(d2_,12.5e-9));
   putCmd("d2dwret = %f\n",roundoff(1.0/sw1,12.5e-9));

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

   putCmd("groupcopy('current','processed','acquisition')");

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = p1.pars.t + d2_ + p2.pars.t + getval("pwH90") + getval("pwHtilt") +
              getval("tHX");
   d.dutyoff = d1 + 4.0e-6 + getval("tHmix");
   d.c1 = d.c1 + (!strcmp(dec.seq,"tppm"));
   d.c1 = d.c1 + ((!strcmp(dec.seq,"tppm")) && (dec.t.a > 0.0));
   d.t1 = getval("rd") + getval("ad") + at;
   d.c2 = d.c2 + (!strcmp(dec.seq,"spinal"));
   d.c2 = d.c2 + ((!strcmp(dec.seq,"spinal")) && (dec.s.a > 0.0));
   d.t2 = getval("rd") + getval("ad") + at;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables

   settable(ph1H90,4,table1);
   settable(phHpmlg,4,table2);
   settable(ph2H90,4,table3);
   settable(ph3H90,4,table4);
   settable(phHtilt,4,table5);
   settable(phXhx,4,table6);
   settable(phHhx,4,table7);
   settable(phRec,4,table8);

//Add STATES TPPI ("States with "FAD")

   tsadd(phRec,2*d2_index,4);
   if (phase1 == 2) {
      tsadd(ph2H90,2*d2_index+3,4);
   }
   else {
      tsadd(ph2H90,2*d2_index,4);
   }
   setreceiver(phRec);

//  Begin Sequence

   txphase(phXhx); decphase(ph1H90);
   obspwrf(getval("aX180")); decpwrf(getval("aH90"));
   obsunblank();decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// Offset H Preparation with a Tilt Pulse

   _shape(p1,ph1H90);

// Offset SAMn Spinlock on H During F1 with Optional pwX180

   _mpseqon(ph,phHpmlg);
   delay(d22);
   rgpulse(pwX180,zero,0.0,0.0);
   obspwrf(getval("aX90"));
   txphase(phXhx);
   delay(d22);
   _mpseqoff(ph);

// Offset 90-degree Pulse to Zed and Spin-Diffusion Mix

   _shape(p2,ph2H90);
   decpwrf(getval("aH90"));
   delay(getval("tHmix"));

// H90, 35-degree Tilt and H-to-X Cross Polarization with LG Offset

   decrgpulse(getval("pwH90"),ph3H90,0.0,0.0);
   decunblank(); 
   decrgpulse(getval("pwHtilt"),phHtilt,0.0,0.0);
   decphase(phHhx);
   _cp_(hx,phHhx,phXhx);

// Begin Acquisition

   obsblank(); _blank34();
   _dseqon(dec);
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
예제 #6
0
void pulsesequence() {

// Define Variables and Objects and Get Parameter Values

   MPSEQ fh = getfslg("fslgH",0,0.0,0.0,0,1);
   strncpy(fh.ch,"dec",3);
   putCmd("chHfslg='dec'\n");

   double tHXhmqc = getval("tHXhmqc");     //parameters for hmqcHX implemented
   double pwHhxhmqc = getval("pwHhxhmqc"); //directly in the pulse sequence
   double pmHhxhmqc = getval("pmHhxhmqc");
   double pwXhxhmqc = getval("pwXhxhmqc");
   double aXhxhmqc = getval("aXhxhmqc");
   double aHhxhmqc = getval("aHhxhmqc");
   double d2init = getval("d2");
   d2init = d2init - pwXhxhmqc;
   if (d2init < 0.0) d2init = 0.0;
   double d22 = d2init/2.0; 

   CP hx = getcp("HX",0.0,0.0,0,1);
   strncpy(hx.fr,"dec",3);
   strncpy(hx.to,"obs",3);
   putCmd("frHX='dec'\n");
   putCmd("toHX='obs'\n");

   DSEQ dec = getdseq("H");
   strncpy(dec.t.ch,"dec",3);
   putCmd("chHtppm='dec'\n");
   strncpy(dec.s.ch,"dec",3);
   putCmd("chHspinal='dec'\n");

// Set Constant-time Period for d2. 

   if (d2_index == 0) d2_init = getval("d2");
   double d2_ = (ni - 1)/sw1 + d2_init;
   putCmd("d2acqret = %f\n",roundoff(d2_,12.5e-9));
   putCmd("d2dwret = %f\n",roundoff(1.0/sw1,12.5e-9));

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

   putCmd("groupcopy('current','processed','acquisition')");

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwH90") + getval("tHX")+ 2.0*tHXhmqc + d2_ +
              4.0*pmHhxhmqc + 2.0*pwHhxhmqc;
   d.dutyoff = d1 + 4.0e-6;
   d.c1 = d.c1 + (!strcmp(dec.seq,"tppm"));
   d.c1 = d.c1 + ((!strcmp(dec.seq,"tppm")) && (dec.t.a > 0.0));
   d.t1 = getval("rd") + getval("ad") + at;
   d.c2 = d.c2 + (!strcmp(dec.seq,"spinal"));
   d.c2 = d.c2 + ((!strcmp(dec.seq,"spinal")) && (dec.s.a > 0.0));
   d.t2 = getval("rd") + getval("ad") + at;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables
 
   settable(phH90,4,table1);
   settable(phXhx,4,table2);
   settable(phHhx,4,table3);
   settable(ph1Hhxhmqc,4,table4);
   settable(ph2Hhxhmqc,4,table5);
   settable(ph3Hhxhmqc,4,table6);
   settable(ph4Hhxhmqc,4,table7);
   settable(ph5Hhxhmqc,4,table8);
   settable(phXhxhmqc,32,table9);
   settable(ph6Hhxhmqc,4,table10);
   settable(ph7Hhxhmqc,8,table11);
   settable(ph8Hhxhmqc,4,table12);
   settable(ph9Hhxhmqc,4,table13);
   settable(phRec,16,table14);

// Add STATES TPPI (States with FAD)

   tsadd(ph3Hhxhmqc,2*d2_index,4);
   tsadd(ph4Hhxhmqc,2*d2_index,4);
   tsadd(ph5Hhxhmqc,2*d2_index,4);
   tsadd(ph6Hhxhmqc,2*d2_index,4);
   tsadd(phRec,2*d2_index,4);

   if (phase1 == 2) {
      tsadd(ph3Hhxhmqc,1,4);
      tsadd(ph4Hhxhmqc,1,4);
      tsadd(ph5Hhxhmqc,1,4);
      tsadd(ph6Hhxhmqc,1,4);
   }

   setreceiver(phRec);

// Begin Sequence

   txphase(phXhx); decphase(phH90);
   obspwrf(getval("aXhx")); decpwrf(getval("aH90"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// H to X Cross Polarization

   decrgpulse(getval("pwH90"),phH90,0.0,0.0);
   decphase(phHhx);
    _cp_(hx,phHhx,phXhx);

// Begin hmqcHX with fh (FSLG) Between Pulses

   obspwrf(aXhxhmqc);
   _mpseqon(fh,ph1Hhxhmqc);             // First "tau" period for J evolution
   delay(tHXhmqc);
   _mpseqoff(fh);
   decpwrf(aHhxhmqc);
   decrgpulse(pmHhxhmqc, ph2Hhxhmqc, 0.0, 0.0);// Create HX double-quantum coherence
   decrgpulse(pwHhxhmqc, ph3Hhxhmqc, 0.0, 0.0);
   decrgpulse(pmHhxhmqc, ph4Hhxhmqc, 0.0, 0.0);
   _mpseqon(fh,ph5Hhxhmqc);              // Begin F1 evolution with FSLG
   delay(d22);
   rgpulse(pwXhxhmqc, phXhxhmqc, 0.0,0.0);
   delay(d22);
   _mpseqoff(fh);                        // End F1 evolution with FSLG
   decpwrf(aHhxhmqc);
   decrgpulse(pmHhxhmqc, ph6Hhxhmqc, 0.0, 0.0);// Refocus HX double quantum coherence
   decrgpulse(pwHhxhmqc, ph7Hhxhmqc, 0.0, 0.0);
   decrgpulse(pmHhxhmqc, ph8Hhxhmqc, 0.0, 0.0);
   _mpseqon(fh,ph9Hhxhmqc);              // Second "tau" period for J evolution
   delay(tHXhmqc);
   _mpseqoff(fh);      

// Begin Acquisition

   decphase(phHhx);
   _dseqon(dec);
   obsblank(); _blank34();
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
예제 #7
0
pulsesequence() {

// Define Variables and Objects and Get Parameter Values

   double pwX90 = getval("pwX90");
   double d22 = d2/2.0 - pwX90;
   if (d22 < 0.0) d22 = 0.0;

   MPSEQ fh = getfslg("fslgH",0,0.0,0.0,0,1);
   strncpy(fh.ch,"dec",3);
   putCmd("chHfslg='dec'\n");

   CP hx = getcp("HX",0.0,0.0,0,1);
   strncpy(hx.fr,"dec",3);
   strncpy(hx.to,"obs",3);
   putCmd("frHX='dec'\n");
   putCmd("toHX='obs'\n");

   DSEQ dec = getdseq("H");
   strncpy(dec.t.ch,"dec",3);
   putCmd("chHtppm='dec'\n"); 
   strncpy(dec.s.ch,"dec",3);
   putCmd("chHspinal='dec'\n");

// Set Constant-time Period for d2. 

   if (d2_index == 0) d2_init = getval("d2");
   double d2_ = (ni - 1)/sw1 + d2_init;
   putCmd("d2acqret = %f\n",roundoff(d2_,12.5e-9));
   putCmd("d2dwret = %f\n",roundoff(1.0/sw1,12.5e-9));

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

   putCmd("groupcopy('current','processed','acquisition')");

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = 3.0*getval("pwHtilt") + d2_ + getval("pwH90") + getval("tHX");
   d.dutyoff = d1 + 4.0e-6;
   d.c1 = d.c1 + (!strcmp(dec.seq,"tppm"));
   d.c1 = d.c1 + ((!strcmp(dec.seq,"tppm")) && (dec.t.a > 0.0));
   d.t1 = getval("rd") + getval("ad") + at;
   d.c2 = d.c2 + (!strcmp(dec.seq,"spinal"));
   d.c2 = d.c2 + ((!strcmp(dec.seq,"spinal")) && (dec.s.a > 0.0));
   d.t2 = getval("rd") + getval("ad") + at;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables

   settable(phHtilt,4,table1);
   settable(phHfslg,4,table2);
   settable(phHtilt2,4,table3);
   settable(phH90,4,table4);
   settable(phHtilt3,4,table5);
   settable(phXhx,4,table6);
   settable(phHhx,4,table7);
   settable(phRec,4,table8);

//Add STATES TPPI ("States with "FAD")

   tsadd(phRec,2*d2_index,4);     
   if (phase1 == 2) {
      tsadd(phHtilt3,2*d2_index+3,4);
      tsadd(phHhx,2*d2_index+3,4);
   }
   else {
      tsadd(phHtilt3,2*d2_index,4);
      tsadd(phHhx,2*d2_index,4);
   }
   setreceiver(phRec);

//  Begin Sequence

   txphase(phXhx); decphase(phHtilt);
   obspwrf(getval("aXhx")); decpwrf(getval("aH90"));
   obsunblank();decunblank();_unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// H Preparation with a Tilt Pulse

   decrgpulse(getval("pwHtilt"),phHtilt,0.0,0.0);

// FSLG spinlock on H and Reverse Tilt to Zed

   _mpseqon(fh,phHfslg);
   delay(d22);
   rgpulse(2.0*pwX90,zero,0.0,0.0);
   txphase(phXhx);
   delay(d22);
   _mpseqoff(fh);
   decpwrf(getval("aH90"));
   decrgpulse(getval("pwHtilt"),phHtilt2,0.0,0.0);

// H 90 and Ramped H to X Cross Polarization with LG Offset

   decrgpulse(getval("pwH90"),phH90,0.0,0.0);
   decrgpulse(getval("pwHtilt"),phHtilt3,0.0,0.0);
   decphase(phHhx);
   _cp_(hx,phHhx,phXhx);

// Begin Acquisition

   obsblank(); _blank34();
   _dseqon(dec);
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34(); 
}
예제 #8
0
pulsesequence() {

// Define Variables and Objects and Get Parameter Values

   CP hx = getcp("HX",0.0,0.0,0,1);
   strncpy(hx.fr,"dec",3);
   strncpy(hx.to,"obs",3);
   putCmd("frHX='dec'\n");
   putCmd("toHX='obs'\n");

   MPSEQ fh = getfslg("fslgH",0,0.0,0.0,0,1);
   strncpy(fh.ch,"dec",3);
   putCmd("chHfslg='dec'\n");

   MPSEQ fx = getfslg("fslgX",0,0.0,0.0,0,1);
   strncpy(fx.ch,"obs",3);
   putCmd("chXfslg='obs'\n");

   DSEQ dec = getdseq("H");
   strncpy(dec.t.ch,"dec",3);
   putCmd("chHtppm='dec'\n"); 
   strncpy(dec.s.ch,"dec",3);
   putCmd("chHspinal='dec'\n");

// Set Constant-time Period for d2. 

   if (d2_index == 0) d2_init = getval("d2");
   double d2_ = (ni - 1)/sw1 + d2_init;
   putCmd("d2acqret = %f\n",roundoff(d2_,12.5e-9));
   putCmd("d2dwret = %f\n",roundoff(1.0/sw1,12.5e-9));

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

   putCmd("groupcopy('current','processed','acquisition')");

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwH90") + getval("tHX") + d2_;
   d.dutyoff = d1 + 4.0e-6;
   d.c1 = d.c1 + (!strcmp(dec.seq,"tppm"));
   d.c1 = d.c1 + ((!strcmp(dec.seq,"tppm")) && (dec.t.a > 0.0));
   d.t1 = getval("rd") + getval("ad") + at;
   d.c2 = d.c2 + (!strcmp(dec.seq,"spinal"));
   d.c2 = d.c2 + ((!strcmp(dec.seq,"spinal")) && (dec.s.a > 0.0));
   d.t2 = getval("rd") + getval("ad") + at;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables

   settable(phH90,4,table1);
   settable(phXhx,4,table2);
   settable(phHhx,4,table3);
   settable(phHtilt,4,table4);
   settable(phHfslg,4,table5);
   settable(phXlock,4,table6);
   settable(phRec,4,table7);
   setreceiver(phRec);

//  Begin Sequence

   txphase(phXhx); decphase(phH90);
   obspwrf(getval("aXhx")); decpwrf(getval("aH90"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// H to X Cross Polarization

   decrgpulse(getval("pwH90"),phH90,0.0,0.0);
   decphase(phHhx);
   _cp_(hx,phHhx,phXhx);

// Tilt Pulse on H with Continued X Spinlock

   xmtron(); decon();
   decpwrf(getval("aH90")); obspwrf(getval("aXhx"));
   decrgpulse(getval("pwHtilt"),phHtilt,0.0,0.0);

// FSLG Spinlocks on X and H

   xmtron(); decon(); 
   _mpseqon(fh,phHfslg); _mpseqon(fx,phXlock);
   delay(d2);
   _mpseqoff(fh); _mpseqoff(fx);

// Begin Acquisition

   obsblank(); _blank34();
   _dseqon(dec);
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
예제 #9
0
pulsesequence() {

//Define Variables and Objects and Get Parameter Values

    double tHX3 = (getval("tHX"))/3.0;   //Define MOIST CP in the Sequence

    MPSEQ sd = getsammyd("smydH",0,0.0,0.0,0,1);
    strncpy(sd.ch,"dec",3);
    putCmd("chHsmyd='dec'\n");

    MPSEQ so = getsammyo("smyoX",0,0.0,0.0,0,1);
    strncpy(so.ch,"obs",3);
    putCmd("chXsmyo='obs'\n");

    DSEQ dec = getdseq("H");
    strncpy(dec.t.ch,"dec",3);
    putCmd("chHtppm='dec'\n");
    strncpy(dec.s.ch,"dec",3);
    putCmd("chHspinal='dec'\n");

    d2 = sd.nelem*sd.telem;

// Set Constant-time Period for d2.

    if (d2_index == 0) d2_init = getval("d2");
    double d2_ = (ni - 1)/sw1 + d2_init;
    putCmd("d2acqret = %f\n",roundoff(d2_,12.5e-9));
    putCmd("d2dwret = %f\n",roundoff(1.0/sw1,12.5e-9));

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

    putCmd("groupcopy('current','processed','acquisition')");

// Dutycycle Protection

    DUTY d = init_dutycycle();
    d.dutyon = getval("pwH90") + getval("pwHlock")+ getval("tHX") + d2_;
    d.dutyoff = d1 + 4.0e-6;
    d.c1 = d.c1 + (!strcmp(dec.seq,"tppm"));
    d.c1 = d.c1 + ((!strcmp(dec.seq,"tppm")) && (dec.t.a > 0.0));
    d.t1 = getval("rd") + getval("ad") + at;
    d.c2 = d.c2 + (!strcmp(dec.seq,"spinal"));
    d.c2 = d.c2 + ((!strcmp(dec.seq,"spinal")) && (dec.s.a > 0.0));
    d.t2 = getval("rd") + getval("ad") + at;
    d = update_dutycycle(d);
    abort_dutycycle(d,10.0);

// Set Phase Tables

    settable(phH90,4,table1);
    settable(phHlock,4,table2);
    settable(phHcomp,4,table3);
    settable(ph1Xhx,4,table4);
    settable(ph2Xhx,4,table5);
    settable(ph1Hhx,4,table6);
    settable(ph2Hhx,4,table7);
    settable(phHsmyd,4,table8);
    settable(phXsmyo,4,table9);
    settable(phHdec,4,table10);
    settable(phRec,4,table11);
    setreceiver(phRec);

// Begin Sequence

    txphase(ph1Xhx);
    decphase(phH90);
    obspwrf(getval("aXhx"));
    decpwrf(getval("aH90"));
    obsunblank();
    decunblank();
    _unblank34();
    delay(d1);
    sp1on();
    delay(2.0e-6);
    sp1off();
    delay(2.0e-6);

// H 90-degree Pulse

    decrgpulse(getval("pwH90"),phH90,0.0,0.0);

// Prelock with Compensation Pulse

    decunblank();
    decon();
    if (getval("onHlock") > 0) {
        decphase(phHlock);
        delay(getval("pwHlock"));
        decphase(phHcomp);
        decpwrf(getval("aHcomp"));
        delay(getval("pwHcomp"));
    }

// H to X MOIST Cross Polarization

    xmtron();
    decphase(ph1Hhx);
    decpwrf(getval("aHhx"));
    delay(tHX3);
    txphase(ph1Xhx);
    decphase(ph1Hhx);
    delay(tHX3);
    txphase(ph2Xhx);
    decphase(ph2Hhx);
    delay(tHX3);
    xmtroff();
    decoff();

// SAMMY Spinlocks on X and H

    _mpseqon(sd,phHsmyd);
    _mpseqon(so,phXsmyo);
    delay(d2);
    _mpseqoff(sd);
    _mpseqoff(so);
    decphase(phHdec);

// Begin Acquisition

    obsblank();
    _blank34();
    _dseqon(dec);
    _decdoffset(getval("rd"),getval("ofHdec"));
    startacq(getval("ad"));
    acquire(np, 1/sw);
    endacq();
    _dseqoff(dec);
    decoffset(dof);
    obsunblank();
    decunblank();
    _unblank34();
}
예제 #10
0
void pulsesequence() {

// Define Variables and Objects and Get Parameter Values
    
   double tHXhsqcinit = getval("tHXhsqc");    //parameters for hsqcHX  are implemented
   double pw1Hhxhsqc = getval("pw1Hhxhsqc");  //directly in the pulse sequence
   double pw2Hhxhsqc = getval("pw2Hhxhsqc");
   double pmHhxhsqc = getval("pmHhxhsqc");
   double pw1Xhxhsqc = getval("pw1Xhxhsqc");
   double pw2Xhxhsqc = getval("pw2Xhxhsqc");
   double aXhxhsqc = getval("aXhxhsqc");
   double aHhxhsqc = getval("aHhxhsqc");
   double d2init = getval("d2");
   d2init = d2init - pw2Xhxhsqc;
   if (d2init < 0.0) d2init = 0.0;
   double d21 = d2init/2.0;
   double d22 = d2init/2.0;
   
   double tau1 = tHXhsqcinit;
   double tau2 = tHXhsqcinit;
   double tau3 = tHXhsqcinit;
   double tau4 = tHXhsqcinit;

// Adjust First Composite 90 Simpulse

   double del1 = 0.0;
   int rev1 = 0;
   if ((pw1Xhxhsqc - pw1Hhxhsqc - 2.0*pmHhxhsqc)/2.0 > 0.0) { 
      del1 = (pw1Xhxhsqc - pw1Hhxhsqc - 2.0*pmHhxhsqc)/2.0;     
      rev1 = 0;
   }
   else if ((pw1Xhxhsqc - pw1Hhxhsqc) > 0.0) {
      del1 = (pw1Xhxhsqc - pw1Hhxhsqc)/2.0;
      rev1 = 1;
   }
   else {
      del1 = (pw1Hhxhsqc - pw1Xhxhsqc)/2.0;
      rev1 = 2;
   }
   del1 = (double) ((int) (del1/0.0125e-6 + 0.5));
   del1 = del1*0.0125e-6;
   if (del1 < 0.05e-6) del1 = 0.0;

   if (rev1 == 0)  {
      tau2 = tau2 - del1;
      if (tau2 < 0.0) tau2= 0.0;
      if (tau2 == 0.0) del1 = 0.0;
      d21 = d21 - del1;
      if (d21 < 0.0) d21 = 0.0;
      if (d21 == 0.0) del1 = 0.0;
   }

// Adjust Composite 180 Simpulse 

   double del2 = 0.0;
   int rev2 = 0;
   if ((pw2Xhxhsqc - pw2Hhxhsqc)/2.0 > 0.0) {
      del2 = (pw2Xhxhsqc - pw2Hhxhsqc )/2.0;
      rev2 = 0;
   }
   else {
      del2 = (pw2Hhxhsqc - pw2Xhxhsqc)/2.0;
      rev2 = 1;
   }
   del2 = (double) ((int) (del2/0.0125e-6 + 0.5));
   del2 = del2*0.0125e-6;
   if (del2 < 0.05e-6) del2 = 0.0;

   if (rev2 == 0)  {
      tau1 = tau1 - del2;
      tau2 = tau2 - del2;
      tau3 = tau3 - del2;
      tau4 = tau4 - del2;
      if (tau1 < 0.0) tau1 = 0.0;
      if (tau2 < 0.0) tau2 = 0.0;
      if (tau3 < 0.0) tau3 = 0.0;
      if (tau4 < 0.0) tau4 = 0.0;
      if (tau1 == 0.0) del2 = 0.0;
      if (tau2 == 0.0) del2 = 0.0;
      if (tau3 == 0.0) del2 = 0.0;
      if (tau4 == 0.0) del2 = 0.0;
   }

// Adjust Second 90 Simpulse

   double del3 = 0.0;
   int rev3 = 0;
   if ((pw1Xhxhsqc - pw1Hhxhsqc)/2.0 > 0.0) {
      del3 = (pw1Xhxhsqc - pw1Hhxhsqc )/2.0;
      rev3 = 0;
   }
   else {
      del3 = (pw1Hhxhsqc - pw1Xhxhsqc)/2.0;
      rev3 = 1;
   }

   del3 = (double) ((int) (del3/0.0125e-6 + 0.5));
   del3 = del3*0.0125e-6;
   if (del3 < 0.05e-6) del3 = 0.0;

   if (rev3 == 0)  {
      tau3 = tau3 - del3;
      if (tau3 < 0.0) tau3 = 0.0;
      if (tau3 == 0.0) del3 = 0.0;
      d22 = d22 - del3;
      if (d22 < 0.0) d22 = 0.0;
      if (d22 == 0.0) del3 = 0.0;
   }

   MPSEQ fh = getfslg("fslgH",0,0.0,0.0,0,1);
   strncpy(fh.ch,"dec",3);
   putCmd("chHfslg='dec'\n");
           
   CP hx = getcp("HX",0.0,0.0,0,1);
   strncpy(hx.fr,"dec",3);
   strncpy(hx.to,"obs",3);
   putCmd("frHX='dec'\n");
   putCmd("toHX='obs'\n");

   DSEQ dec = getdseq("H");
   strncpy(dec.t.ch,"dec",3);
   putCmd("chHtppm='dec'\n");
   strncpy(dec.s.ch,"dec",3);
   putCmd("chHspinal='dec'\n");

// Set Constant-time Period for d2. 

   if (d2_index == 0) d2_init = getval("d2");
   double d2_ = (ni - 1)/sw1 + d2_init;
   putCmd("d2acqret = %f\n",roundoff(d2_,12.5e-9));
   putCmd("d2dwret = %f\n",roundoff(1.0/sw1,12.5e-9));

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

   putCmd("groupcopy('current','processed','acquisition')");

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwH90") + getval("tHX") + 4.0*tHXhsqcinit + d2_ +
              4.0*pmHhxhsqc + pw1Hhxhsqc + pw2Hhxhsqc;
   d.dutyoff = d1 + 4.0e-6;
   d.c1 = d.c1 + (!strcmp(dec.seq,"tppm"));
   d.c1 = d.c1 + ((!strcmp(dec.seq,"tppm")) && (dec.t.a > 0.0));
   d.t1 = getval("rd") + getval("ad") + at;
   d.c2 = d.c2 + (!strcmp(dec.seq,"spinal"));
   d.c2 = d.c2 + ((!strcmp(dec.seq,"spinal")) && (dec.s.a > 0.0));
   d.t2 = getval("rd") + getval("ad") + at;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables

   settable(phH90,4,table1);
   settable(phXhx,4,table2);
   settable(phHhx,4,table3);
   settable(ph1Hhxhsqc,4,table4);
   settable(ph2Hhxhsqc,4,table5);
   settable(ph1Xhxhsqc,4,table6);
   settable(ph3Hhxhsqc,4,table7);
   settable(ph4Hhxhsqc,4,table8);
   settable(ph2Xhxhsqc,8,table9);
   settable(ph5Hhxhsqc,4,table10);
   settable(ph3Xhxhsqc,16,table11);
   settable(ph6Hhxhsqc,4,table12);
   settable(ph4Xhxhsqc,4,table13);
   settable(ph7Hhxhsqc,4,table14);
   settable(ph5Xhxhsqc,4,table15);
   settable(phRec,8,table16);

// Add STATES TPPI (States with FAD)

   tsadd(ph6Hhxhsqc,2*d2_index,4);
   tsadd(phRec,2*d2_index,4);

   if (phase1 == 2) {
      tsadd(ph6Hhxhsqc,3,4);
   }
   setreceiver(phRec);

// Begin Sequence

   txphase(phXhx); decphase(phH90);
   obspwrf(getval("aXhx")); decpwrf(getval("aH90"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// H to X Cross Polarization 

   decrgpulse(getval("pwH90"),phH90,0.0,0.0);
   decphase(phHhx);
    _cp_(hx,phHhx,phXhx);

// Begin hsqcHX with fh (FSLG) Between Pulses

   _mpseqon(fh,ph1Hhxhsqc);

// First "tau/2.0" Delay

   obspwrf(aXhxhsqc);
   txphase(ph1Xhxhsqc);
   delay(tau1);

// First Simultaneous HX 180 Pulse 
   
   if (rev2 == 0) {
      xmtron();
      if (del2 > 0.0) delay(del2);
      _mpseqoff(fh);
      decphase(ph2Hhxhsqc);
      decpwrf(aHhxhsqc);
      decon();
      delay(pw2Hhxhsqc);
      decoff();
      _mpseqon(fh,ph1Hhxhsqc);
      if (del2 > 0.0) delay(del2);
      xmtroff();
   }
   else {
      _mpseqoff(fh);
      decphase(ph2Hhxhsqc);
      decpwrf(aHhxhsqc);
      decon();
      if (del2 > 0.0) delay(del2);
      xmtron();
      delay(pw2Xhxhsqc);
      xmtroff();
      if (del2 > 0.0) delay(del2);
      decoff();
      _mpseqon(fh,ph1Hhxhsqc);
   }

// Second "tau/2" Delay

   txphase(ph2Xhxhsqc);
   delay(tau2);

// Simultaneous HX (Tilted 90) Composite Pulse

   if (rev1 == 0) {
      xmtron();
      if (del1 > 0.0) delay(del1);
      _mpseqoff(fh);
      decphase(ph3Hhxhsqc);
      decpwrf(aHhxhsqc);
      decon();
      delay(pmHhxhsqc);
      decphase(ph4Hhxhsqc);
      delay(pw1Hhxhsqc);
      decphase(ph5Hhxhsqc);
      delay(pmHhxhsqc);
      decoff();
      _mpseqon(fh,ph1Hhxhsqc);
      if (del1 > 0.0) delay(del1);
      xmtroff();
   }
   else if (rev1 == 1) {
      _mpseqoff(fh);
      decphase(ph3Hhxhsqc);
      decpwrf(aHhxhsqc);
      decon();
      delay(pmHhxhsqc - del1);
      xmtron();
      if (del1 > 0.0) delay(del1);
      decphase(ph4Hhxhsqc);
      delay(pw1Hhxhsqc);
      decphase(ph5Hhxhsqc);
      if (del1 > 0.0) delay(del1);
      xmtroff();
      delay(pmHhxhsqc - del1);
      decoff();
      _mpseqon(fh,ph1Hhxhsqc);
   }
   else {
      _mpseqoff(fh);
      decphase(ph3Hhxhsqc);
      decpwrf(aHhxhsqc);
      decon();
      delay(pmHhxhsqc);
      decphase(ph4Hhxhsqc);
      if (del1 > 0.0) delay(del1);
      xmtron();
      delay(pw1Xhxhsqc);
      xmtroff();
      if (del1 > 0.0) delay(del1);
      decphase(ph5Hhxhsqc);
      delay(pmHhxhsqc);
      decoff();
      _mpseqon(fh,ph1Hhxhsqc);
   }

//  F1 Delay with X Refocussing Pulse

     txphase(ph3Xhxhsqc);
     delay(d21);
     double flag = getval("flag");
     if (flag == 0) {
        rgpulse(pw2Xhxhsqc, ph3Xhxhsqc, 0.0,0.0);
     }
     else {
        delay(pw2Xhxhsqc);
     }

     obsunblank();
     txphase(ph4Xhxhsqc);
     delay(d22);

//  Second Simulaneous HX Pulse (90 Only)

   if (rev3 == 0) {
      xmtron();
      if (del3 > 0.0) delay(del3);
      _mpseqoff(fh);
      decphase(ph6Hhxhsqc);
      decpwrf(aHhxhsqc);
      decon();
      delay(pw1Hhxhsqc);
      decoff();
      _mpseqon(fh,ph1Hhxhsqc);
      if (del3 > 0.0) delay(del3);
      xmtroff();
   }
   else {
      _mpseqoff(fh);
      decphase(ph6Hhxhsqc);
      decpwrf(aHhxhsqc);
      decon();
      if (del3 > 0.0) delay(del3);
      xmtron();
      delay(pw1Xhxhsqc);
      xmtroff();
      if (del3 > 0.0) delay(del3);
      decoff();
      _mpseqon(fh,ph1Hhxhsqc);
   }

//  Third  "tau/2.0" Delay

   txphase(ph5Xhxhsqc);
   delay(tau3);

// Second Simultaneous HX 180 Pulse

   if (rev2 == 0) {
      xmtron();
      if (del2 > 0.0) delay(del2);
      _mpseqoff(fh);
      decphase(ph7Hhxhsqc);
      decpwrf(aHhxhsqc);
      decon();
      delay(pw2Hhxhsqc);
      decoff();
      _mpseqon(fh,ph1Hhxhsqc);
      if (del2 > 0.0) delay(del2);
      xmtroff();
   }
   else {
      _mpseqoff(fh);
      decphase(ph7Hhxhsqc);
      decpwrf(aHhxhsqc);
      decon();
      if (del2 > 0.0) delay(del2);
      xmtron();
      delay(pw2Xhxhsqc);
      xmtroff();
      if (del2 > 0.0) delay(del2);
      decoff();
      _mpseqon(fh,ph1Hhxhsqc);
   }

// Fourth "tau/2.0" Delay

   delay(tau4);
   _mpseqoff(fh);

// Begin Acquisition

   decphase(phHhx);
   _dseqon(dec);
   obsblank(); _blank34();
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}