Example #1
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();
}
Example #2
0
pulsesequence() {

// =========================================================
// Define Variables and Objects and Get Parameter Values
// =========================================================
   
// --------------------------------
// Acquisition Decoupling
// -------------------------------

   char Hseq[MAXSTR];
   getstr("Hseq",Hseq);
   DSEQ dec = getdseq("H");
   strncpy(dec.t.ch,"dec",3);
   putCmd("chHtppm='dec'\n"); 
   strncpy(dec.s.ch,"dec",3);
   putCmd("chHspinal='dec'\n"); 

// ---------------------------------------------
// Determine taur, One Rotor Cycle and Set tHrr.
// ---------------------------------------------

   double srate = getval("srate");
   double taur = 0.0;
   if (srate >= 500.0)
      taur = roundoff((1.0/srate), 0.125e-6);
   else {
      abort_message("ABORT: Spin Rate (srate) must be greater than 500\n");
   }
   double tHrr = getval("nHrr")*taur;
   double tHrrret= 2.0*tHrr;
   putCmd("tHrrret = %f\n",tHrrret*1.0e6);

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

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

//------------------------------
// Dutycycle Protection
//------------------------------
   
   DUTY d = init_dutycycle();
   d.dutyon = getval("pwX90");
   d.dutyoff = d1 + 4.0e-6;
   if (getval("aHrr") > 0.0)
     d.dutyon += 2.0*tHrr;
   d.c1 = d.c1 + (!strcmp(Hseq,"tppm"));
   d.c1 = d.c1 + ((!strcmp(Hseq,"tppm")) && (dec.t.a > 0.0));
   d.t1 = getval("rd") + getval("ad") + at;
   d.c2 = d.c2 + (!strcmp(Hseq,"spinal"));
   d.c2 = d.c2 + ((!strcmp(Hseq,"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(phX90,4,tblX90);
   settable(phHrr,4,tblHrr);
   settable(ph1Hrr,4,tblHrr2);
   settable(phRec,4,tblRec);
   setreceiver(phRec);

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

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

//----------------------------   
// X Direct Polarization 
//----------------------------
   
   rgpulse(getval("pwX90"),phX90,0.0,0.0);
   obsunblank();

// -----------------------------
// Begin Rotary Resonance
// -----------------------------

   if(getval("aHrr") > 0.0) {
      obspwrf(getval("aHrr"));
      txphase(phHrr);
      xmtron();
      delay(tHrr);
      txphase(ph1Hrr);
      delay(tHrr);
      xmtroff();
   }

//===========================
// Begin Acquisition 
//===========================
   
   _dseqon(dec);
   obsblank(); _blank34();
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
Example #3
0
pulsesequence() {

// Define Variables and Objects and Get Parameter Values

   double aXxyxy8 = getval("aXxyxy8");
   double aYxyxy8 = getval("aYxyxy8");
   double pwXxyxy8 = getval("pwXxyxy8");
   double pwYxyxy8 = getval("pwYxyxy8");
   double nXYxy8 = getval("nXYxy8");
   int counter = nXYxy8;
   initval(nXYxy8,v8);
   double fXYxy8 = getval("fXYxy8");
   double onYxyxy8 = getval("onYxyxy8");
   double srate = getval("srate");

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

   DSEQ mix = getdseq("Hmix");
   strncpy(mix.t.ch,"dec",3);
   putCmd("chHmixtppm='dec'\n");
   strncpy(dec.s.ch,"dec",3);
   putCmd("chHmixspinal='dec'\n");

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

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

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwX90") + nXYxy8*(pwXxyxy8 + pwYxyxy8);
   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.c3 = d.c3 + (!strcmp(mix.seq,"tppm"));
   d.c3 = d.c3 + ((!strcmp(mix.seq,"tppm")) && (mix.t.a > 0.0));
   d.t3 = nXYxy8*(1.0/srate - pwXxyxy8 - pwYxyxy8);
   d.c4 = d.c4 + (!strcmp(mix.seq,"spinal"));
   d.c4 = d.c4 + ((!strcmp(mix.seq,"spinal")) && (mix.s.a > 0.0));
   d.t4 = nXYxy8*(1.0/srate - pwXxyxy8 - pwYxyxy8);
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables

   settable(phX90,4,table1);
   settable(phXYxy8,8,table2);
   settable(phXxyxy8,4,table3);
   settable(phYxyxy8,4,table4);
   settable(phRec,4,table5);
   settable(ph1Rec,4,table6);
   settable(ph2Rec,4,table7);
   settable(ph3Rec,4,table8);
   int tix = counter%8;

   if ((tix == 1) || (tix == 7)) ttadd(phRec,ph1Rec,4);
   if ((tix == 2) || (tix == 6)) ttadd(phRec,ph2Rec,4);
   if ((tix == 3) || (tix == 5)) ttadd(phRec,ph3Rec,4);
   setreceiver(phRec);

// Begin Sequence

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

// X Direct Polarization

   rgpulse(getval("pwX90"),phX90,0.0,0.0);

// xy8XY Period

   if (counter > 0) {
      _dseqon(mix);
      delay(pwXxyxy8/2.0);
      obspwrf(aXxyxy8); dec2pwrf(aYxyxy8);
      sub(v1,v1,v1);
      if (counter >= 1) {
         loop(v8,v9);
	    getelem(phXYxy8,v1,v4);
	    incr(v1);
	    getelem(phXxyxy8,ct,v2);
	    getelem(phYxyxy8,ct,v3);
	    add(v4,v2,v2);
	    add(v4,v3,v3);
	    txphase(v2); dec2phase(v3);
	    delay((1.0 - fXYxy8)/srate - pwYxyxy8/2.0 - pwXxyxy8/2.0);
	    if (onYxyxy8 == 2)
               dec2rgpulse(pwYxyxy8,v3,0.0,0.0);
            else
               delay(pwYxyxy8);
	    delay(fXYxy8/srate - pwYxyxy8/2.0 - pwXxyxy8/2.0);
	    rgpulse(pwXxyxy8,v2,0.0,0.0);
	 endloop(v9);
	 delay(1.0/srate - pwXxyxy8/2.0);
      }
      _dseqoff(mix);
   }

// Begin Acquisition

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

// Set the Maximum Dynamic Table Number

   settablenumber(10);
   setvvarnumber(30);
  
// Define Variables and Objects and Get Parameter Values

   WMPA swwhh4 = getswwhh4("swwhh4X");
   strncpy(swwhh4.ch,"obs",3); 
   putCmd("chXswwhh4='obs'\n");

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

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

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwXprep") + 4.0*swwhh4.cycles*swwhh4.pw;
   d.dutyoff = d1 + 4.0e-6 + 5.0e-6 + swwhh4.r1 + swwhh4.r2 +
               at - 4.0*swwhh4.cycles*swwhh4.pw;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables

   settable(phXprep,4,table3);
   settable(phXswwhh4,4,table4);
   settable(phRec,4,table5);
   setreceiver(phRec);

// Set the Small-Angle Prep Phase

   double obsstep = 360.0/(PSD*8192);
   obsstepsize(obsstep);
   int phfXprep = initphase(getval("phXprep"), obsstep);
   int phXzero = initphase(0.0, obsstep);

// Set the Realtime pwXprep adXprep

   settable(pw90Xprep,4,table1);
   settable(pw55Xprep,4,table2);
   int phase90 = (int) (getval("pwXprep")/0.0125e-6);
   int phase55 = (int) (getval("pwXprep")*54.7/(90.0*0.0125e-6));
   tsmult(pw90Xprep,phase90,0);
   tsmult(pw55Xprep,phase55,0);
   getelem(pw90Xprep,ct,v1);
   getelem(pw55Xprep,ct,v2);
   add(v1,v2,pwXprep);
   sub(v1,v2,adXprep);

// Begin Sequence

   xmtrphase(phfXprep); txphase(phXprep);
   obspwrf(getval("aXprep"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// Incremented Preparation Pulse

   startacq(5.0e-6);
   rcvroff();
   delay(swwhh4.r1);
   vdelay(NSEC,adXprep);  // Keep Total Time Constant
   xmtron();
   vdelay(NSEC,pwXprep);
   xmtroff();
   xmtrphase(phXzero);
   delay(swwhh4.r2);

// Apply Semi-windowless WHH4 Cycles

   decblank(); _blank34();
   _swwhh4(swwhh4, phXswwhh4);
   endacq();
   obsunblank(); decunblank(); _unblank34();
}
Example #5
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 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");

   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* getval("pwX90") + c7.t + c7ref.t;
   d.dutyoff = d1 + 4.0e-6 + 2.0*getval("tZF");
   d.c1 = d.c1 + (!strcmp(dec.seq,"tppm"));
   d.c1 = d.c1 + ((!strcmp(dec.seq,"tppm")) && (dec.t.a > 0.0));
   d.t1 = d2_ +  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 = d2_ +  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(phXmix1,4,table4);
   settable(phXmix2,4,table5);
   settable(phRec,4,table6);

// Add STATES-TPPI (STATES + "FAD")

   double obsstep = 360.0/(PSD*8192);
   if (phase1 == 2)
      initval((45.0/obsstep),v1);
   else
      initval(0.0,v1);

   initval((d2*c7.of[0]*360.0/obsstep),v2);
   obsstepsize(obsstep);
   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);
   obspwrf(getval("aX90"));

// Mixing with C7 Recoupling-Period One

   rgpulse(getval("pwX90"),phXmix1,0.0,0.0);
   obspwrf(getval("aXc7"));
   decoff();
   xmtrphase(v1); txphase(phXmix1);
   delay(getval("tZF"));
   decpwrf(getval("aHmix"));
   decunblank();
   decon();
   _mpseq(c7, phXmix1);
   decoff();

// F1 Indirect Period For X

   xmtrphase(v2); txphase(phXmix2);
   _dseqon(dec);
   delay(d2);
   _dseqoff(dec);

// Mixing with C7 Recoupling-Period Two

   decpwrf(getval("aHmix"));
   decunblank();
   decon();
   _mpseq(c7ref, phXmix2);
   decoff();
   obspwrf(getval("aX90"));
   xmtrphase(zero); txphase(phXmix2);
   delay(getval("tZF"));
   rgpulse(getval("pwX90"),phXmix2,0.0,0.0);

// Begin Acquisition

   _dseqon(dec);
   obsblank(); _blank34();
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
Example #6
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();
}
Example #7
0
pulsesequence() {

// Set the Maximum Dynamic Table Number

   settablenumber(10);
   setvvarnumber(30);
  
// 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");

   WMPA toss = gettoss4("tossX");
   strncpy(toss.ch,"obs",3);
   putCmd("chXtoss='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");

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

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

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwH90") + getval("tHX") + 4.0*toss.pw;
   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 = 2.142*toss.rtau - 4.0*toss.pw + 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 = 2.142*toss.rtau - 4.0*toss.pw + 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(phHdec,4,table4);
   settable(phXtoss,4,table5);
   settable(phRec,4,table6);
   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);
   decphase(phHdec);

// TOSS4 Sideband Suppression
   
   _dseqon(dec);
   _toss4(toss, phXtoss);

// Begin Acquisition

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

// Define Variables and Objects and Get Parameter Values
   
   double tXzfselinit = getval("tXzfsel"); // Adjust the Z-filter Delay for the
   double tXzfsel = tXzfselinit - 2.0e-6;  // attenuator switch time.
   
   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("pw1Xmqmas") + getval("pw2Xmqmas") + getval("pwXzfsel");
   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 = d2_ + tXzfselinit + 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 = d2_ + tXzfselinit + getval("rd") + getval("ad") + at;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables

   settable(ph1Xmqmas,14,table1);
   settable(phfXmqmas,7,table2);
   settable(ph2Xmqmas,14,table3);
   settable(phXzfsel,56,table4);
   settable(phRec,56,table5);

   if (phase1 == 2) {
      tsadd(ph1Xmqmas,1,4);
      tsadd(phRec,2,4);
   }
   setreceiver(phRec);

   double obsstep = 360.0/(PSD*8192);
   obsstepsize(obsstep);

// Begin Sequence

   xmtrphase(phfXmqmas); txphase(ph1Xmqmas); decphase(zero);
   obspower(getval("tpwr"));
   obspwrf(getval("aXmqmas"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1); 
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// H Decoupler on Before MQMAS

   _dseqon(dec);

// Two-Pulse MQMAS

   rgpulse(getval("pw1Xmqmas"),ph1Xmqmas,0.0,0.0);
   xmtrphase(zero); txphase(ph2Xmqmas);
   delay(d2);
   rgpulse(getval("pw2Xmqmas"),ph2Xmqmas,0.0,0.0);

// Selective Z-filter Pulse

   txphase(phXzfsel);
   obsblank();
   obspower(getval("dbXzfsel"));
   obspwrf(getval("aXzfsel"));
   delay(2.0e-6);
   obsunblank();
   delay(tXzfsel);
   rgpulse(getval("pwXzfsel"),phXzfsel,0.0,0.0);

// Begin Acquisition

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

// Set the Maximum Dynamic Table Number

    settablenumber(10);
    setvvarnumber(30);

// Define Variables and Objects and Get Parameter Values

    WMPA xmx = getxmx("xmxX");
    strncpy(xmx.ch,"obs",3);
    putCmd("chXxmx='obs'\n");

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

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

// Dutycycle Protection

    DUTY d = init_dutycycle();
    d.dutyon = getval("pwXprep") + 2.0*xmx.cycles*xmx.pw;
    d.dutyoff = d1 + 4.0e-6 + 5.0e-6 + xmx.r1 + xmx.r2 +
                at - 2.0*xmx.cycles*xmx.pw;
    d = update_dutycycle(d);
    abort_dutycycle(d,10.0);

// Set Phase Tables

    settable(phXprep,4,table1);
    settable(phXxmx,4,table2);
    settable(phRec,4,table3);
    setreceiver(phRec);

// Set the Small-Angle Prep Phase

    double obsstep = 360.0/(PSD*8192);
    obsstepsize(obsstep);
    int phfXprep = initphase(getval("phXprep"), obsstep);
    int phXzero = initphase(0.0, obsstep);
// Begin Sequence

    xmtrphase(phfXprep);
    txphase(phXprep);
    obspwrf(getval("aXprep"));
    obsunblank();
    decunblank();
    _unblank34();
    delay(d1);
    sp1on();
    delay(2.0e-6);
    sp1off();
    delay(2.0e-6);

// Preparation Pulse with Initial Point

    startacq(5.0e-6);
    rcvroff();
    delay(xmx.r1);
    rgpulse(getval("pwXprep"), phXprep, 0.0, 0.0);
    xmtrphase(phXzero);

// Apply Semi-windowless WHH4 Cycles

    decblank();
    _blank34();
    _xmx(xmx, phXxmx);
    endacq();
    obsunblank();
    decunblank();
    _unblank34();
}
Example #10
0
void pulsesequence() {

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

   settablenumber(10);
   setvvarnumber(30);

// Define Variables and Objects and Get Parameter Values

   double aXprep = getval("aXprep");
   double pwXprep = getval("pwXprep");
   double phvXprep = getval("phXprep");

   WMPSEQ wpmlg = getwpmlgxmx1("wpmlgX");
   strncpy(wpmlg.wvsh.mpseq.ch,"obs",3); 
   putCmd("chXwpmlg='obs'\n");

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

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

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwXprep") + wpmlg.cycles*wpmlg.wvsh.mpseq.t;
   d.dutyoff = d1 + 4.0e-6 + 5.0e-6 + wpmlg.r1 + wpmlg.r2 +
               at - wpmlg.cycles*wpmlg.wvsh.mpseq.t;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables

   settable(phXprep,4,table1);
   settable(phXwpmlg,4,table2);
   settable(phRec,4,table3);
   setreceiver(phRec);

// Set the Small-Angle Step

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

// Begin Sequence

   xmtrphase(phfXprep); txphase(phXprep);
   obspwrf(aXprep);
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// Standard 90-degree prepX pulse for PMLGxmx"

   startacq(5.0e-6);
   rcvroff();
   delay(wpmlg.r1);
   rgpulse(pwXprep, phXprep, 0.0, 0.0);
   xmtrphase(phXzero);
   delay(wpmlg.r2);

// Apply WPMLG Cycles

   decblank(); _blank34();
   _wpmlg1(wpmlg, phXwpmlg);
   endacq();
   obsunblank(); decunblank(); _unblank34();
}
Example #11
0
pulsesequence() {

// Define Variables and Objects and Get Parameter Values

   double pw1Xstmas = getval("pw1Xstmas");  
   double pw2Xstmas = getval("pw2Xstmas");  

   double tXechselinit = getval("tXechsel");
   double tXechsel = tXechselinit - 3.0e-6; 
   if (tXechsel < 0.0) tXechsel = 0.0; 

   double d2init = getval("d2");
   double d2 = d2init - pw1Xstmas/2.0 - pw2Xstmas/2.0;
   if (d2 < 0.0) d2 = 0.0;

   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("pw1Xstmas") + getval("pw2Xstmas") + getval("pwXechsel");
   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 = d2_ + tXechsel + 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 = d2_ + tXechsel + getval("rd") + getval("ad") + at;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables

   settable(ph1Xstmas,4,table1);
   settable(ph2Xstmas,8,table2);
   settable(ph2fXstmas,8,table3);
   settable(phXechsel,32,table4);
   settable(phRec,16,table5);

   if (phase1 == 2) {
      tsadd(ph1Xstmas,1,4);
   }
   setreceiver(phRec);
   obsstepsize(45.0);

// Begin Sequence

   txphase(ph1Xstmas); decphase(zero);
   obspower(getval("tpwr"));
   obspwrf(getval("aXstmas"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// H Decoupler on Before STMAS

   _dseqon(dec);

// Two-Pulse STMAS

   rgpulse(getval("pw1Xstmas"),ph1Xstmas,0.0,0.0);
   xmtrphase(ph2fXstmas);
   txphase(ph2Xstmas);
   delay(d2);
   rgpulse(getval("pw2Xstmas"),ph2Xstmas,0.0,0.0);
   xmtrphase(zero);

// Selective Echo Pulse

   txphase(phXechsel);
   obsblank();
   obspower(getval("dbXechsel"));
   obspwrf(getval("aXechsel"));
   delay(3.0e-6);
   obsunblank();
   delay(tXechsel);
   rgpulse(getval("pwXechsel"),phXechsel,0.0,0.0);

// Begin Acquisition

   obsblank(); _blank34();
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
Example #12
0
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();
}
Example #13
0
pulsesequence() {

// Define Variables and Objects and Get Parameter Values

   CP hy = getcp("HY",0.0,0.0,0,1);
   strncpy(hy.fr,"dec",3);
   strncpy(hy.to,"dec2",4);
   putCmd("frHY='dec'\n");
   putCmd("toHY='dec2'\n");

   PBOXPULSE shca = getpboxpulse("shcaX",0,1);
   strncpy(shca.ch,"obs",3);
   putCmd("chXshca ='obs'\n");

   PBOXPULSE sh = getpboxpulse("shY",0,1);
   strncpy(sh.ch,"dec2",4);
   putCmd("chYsh ='dec2'\n");

   PBOXPULSE shco = getpboxpulse("shcoX",0,1);
   strncpy(shco.ch,"obs",3);
   putCmd("chXshco ='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");

   DSEQ mix = getdseq("Hmix");
   strncpy(mix.t.ch,"dec",3);
   putCmd("chHmixtppm='dec'\n");
   strncpy(mix.s.ch,"dec",3);
   putCmd("chHmixspinal='dec'\n");

   double pwsim = getval("pwX90"); 
   if (getval("pwY90") > getval("pwX90")) pwsim = getval("pwY90"); 
   pwsim = pwsim/2.0;

   double shcalen = (shca.pw + 2.0*shca.t2)/2.0;
   double shlen = (sh.pw + 2.0*sh.t2)/2.0;
   double shsim = shcalen;
   double simpw = shca.pw;
   double simt1 = shca.t1;
   double simt2 = shca.t2;
   if (shlen > shcalen) { 
      shsim = shlen; 
      simpw = sh.pw;
      simt1 = sh.t1;
      simt2 = sh.t2;
   }
   double shcolen = (shco.pw + 2.0*shco.t2)/2.0;
   double d22 = d2/2.0;

// 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("tHY") + 2.0* simpw + shco.pw;
   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 = d2_ + 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 = d2_ + getval("rd") + getval("ad") + at;
   d.c3 = d.c3 + (!strcmp(mix.seq,"tppm"));
   d.c3 = d.c3 + ((!strcmp(mix.seq,"tppm")) && (mix.t.a > 0.0));
   d.t3 = 2.0*getval("taua") + 2.0*getval("taub") - 2.0*shsim - shcolen +
          2.0*simt1 + 2.0*simt2 - pwsim - 2.0*shsim;
   d.c4 = d.c4 + (!strcmp(mix.seq,"spinal"));
   d.c4 = d.c4 + ((!strcmp(mix.seq,"spinal")) && (mix.s.a > 0.0));
   d.t4 = 2.0*getval("taua") + 2.0*getval("taub") - 2.0*shsim - shcolen +
          2.0*simt1 + 2.0*simt2 - pwsim - 2.0*shsim;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Up 2D
   
   int errval = (int) ((getval("taua") - shsim)*2.0*sw1);
   if ((getval("taua") - ni/(2.0*sw1) - shsim) < 0.0) { 
     text_error("Error:ni is too large. Make ni equal to %d or less.\n",errval); 
     psg_abort(1);
   }

// Set Phase Tables

   settable(phH90,4,table1);
   settable(phHhy,4,table2);
   settable(phYhy,4,table3);
   settable(ph1Xshca,4,table4);
   settable(ph1Ysh,4,table5);
   settable(phXshco,4,table6);
   settable(phX90,4,table7);
   settable(phY90,4,table8);
   settable(ph2Xshca,4,table9);
   settable(ph2Ysh,4,table10);
   settable(phRec,4,table11);
   setreceiver(phRec);

// States Acquisition

   if (phase1 == 2)       
      tsadd(phYhy,1,4);

// Begin Sequence

   txphase(ph1Xshca); decphase(phH90); dec2phase(phYhy);
   obspwrf(getval("aXshca")); decpwrf(getval("aH90")); dec2pwrf(getval("aYhy"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// H to Y Cross Polarization

   decrgpulse(getval("pwH90"),phH90,0.0,0.0);
   decphase(phHhy);
   _cp_(hy,phHhy,phYhy);
   decphase(zero);

// Begin F1 INEPT

   _dseqon(mix);
   dec2phase(ph1Ysh); 
   dec2pwrf(getval("aYsh"));
   delay(getval("taua") - d22 - shsim);
   _pboxsimpulse(shca,sh,ph1Xshca,ph1Ysh);
   obsblank();
   obspower(getval("tpwr")); dec2power(getval("dpwr2"));
   delay(3.0e-6);
   obsunblank();
   if (d22 < (shcolen + pwsim))  {
      txphase(phX90); dec2phase(phY90);   
      obspwrf(getval("aX90")); dec2pwrf(getval("aY90"));
      delay(getval("taua") + d22 - shsim - pwsim - 3.0e-6);
   } 
   else
   {
      txphase(phXshco);
      obspwrf(getval("aXshco"));
      delay(getval("taua") - shsim - shcolen - 3.0e-6); 
      _pboxpulse(shco,phXshco);
      obsblank();
      obspower(getval("tpwr"));
      delay(3.0e-6);
      obsunblank();
      txphase(phX90); dec2phase(phY90);
      obspwrf(getval("aX90")); dec2pwrf(getval("aY90"));
      delay(d22 - shcolen - pwsim - 3.0e-6);
   }
   sim3pulse(getval("pwX90"),0.0,getval("pwY90"),phX90,zero,phY90,0.0,0.0);
   obsunblank(); dec2unblank(); 
   txphase(ph2Xshca); dec2phase(ph2Ysh);
   delay(getval("taub") - pwsim - shsim);
   _pboxsimpulse(shca,sh,ph2Xshca,ph2Ysh);
   obsblank();
   obspower(getval("tpwr")); dec2power(getval("dpwr2"));
   delay(3.0e-6);
   obsunblank();
   delay(getval("taub") - shsim - 3.0e-6);
   _dseqoff(mix);

// Begin Acquisition

   _dseqon(dec);
   obsblank(); _blank34();
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
Example #14
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 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");

// 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(phHsmyd,4,table4);
   settable(phXsmyo,4,table5);
   settable(phRec,4,table6);
   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);

// SAMMY Spinlocks on X and H

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

// Begin Acquisition

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