Esempio n. 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();
}
Esempio n. 2
0
// clone : creates a clone of this string and returns pointer to it
autostring* autostring::clone( void )
{
    autostring *p       = (autostring *) getmem ( sizeof(autostring) );

    p->getmem = this->getmem;
    p->freemem = this->freemem;

    // set up the chunksize, allocates it, 
    p->__chunksize = pow2above( (len()+1)*sizeof(gwchar_t) );
    if ( p->__chunksize < AUTOSTRING_BASE_LENGTH_BYTES )
        p->__chunksize = AUTOSTRING_BASE_LENGTH_BYTES;
    p->__str = (gwchar_t *) p->getmem( p->__chunksize );

    p->__modified         = this->__modified;
    p->__timesModified    = this->__timesModified;

    // sets strlen and copies string data
    p->setNoMod( getcp() );
    
    return p;
}
Esempio n. 3
0
pulsesequence() {

// Define Variables and Objects and Get Parameter Values

   double aXecho = getval("aXecho"); 
   double t1Xechoinit = getval("t1Xecho");
   double pwXecho = getval("pwXecho"); 
   double t2Xechoinit = getval("t2Xecho");
   double t1Xecho  = t1Xechoinit - pwXecho/2.0;
   if (t1Xecho < 0.0) t1Xecho = 0.0;
   double t2Xecho  = t2Xechoinit - pwXecho/2.0 - getval("rd");
   if (t2Xecho < 0.0) t2Xecho = 0.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");

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

   putCmd("groupcopy('current','processed','acquisition')");
// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwH90") + getval("tHX") + pwXecho;
   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(phXecho,16,table4);
   settable(phRec,8,table5);
   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);
   sp1on();
    _cp_(hx,phHhx,phXhx);
   sp1off();

// Begin Decoupling

   _dseqon(dec);

// X Hahn Echo

   txphase(phXecho);
   obspwrf(aXecho);
   delay(t1Xecho);
   rgpulse(pwXecho,phXecho,0.0,0.0);
   delay(t2Xecho);

// Begin Acquisition

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

   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 xdec = getdseq("X");
   strncpy(xdec.t.ch,"obs",3);    // These four statements assure 
   strncpy(xdec.s.ch,"obs",3);    // that the X decoupling will
   putCmd("chXtppm='obs'\n");     // be on X for either TPPM or 
   putCmd("chXspinal='obs'\n");   // SPINAL. 

// 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("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.c3 = d.c3 + (!strcmp(xdec.seq,"tppm"));
   d.c3 = d.c3 + ((!strcmp(xdec.seq,"tppm")) && (xdec.t.a > 0.0));
   d.t3 = d2_;
   d.c4 = d.c4 + (!strcmp(xdec.seq,"spinal"));
   d.c4 = d.c4 + ((!strcmp(xdec.seq,"spinal")) && (xdec.s.a > 0.0));
   d.t4 = d2_;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0); 

// Set Phase Tables

   settable(phH90,16,table1);
   settable(phHmix1,16,table2);
   settable(phHmix2,4,table3);
   settable(phHtilt,4,table4);
   settable(phXhx,4,table5);
   settable(phHhx,4,table6);
   settable(phRec,4,table7);

   if (phase1 == 2) tsadd(phH90,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 Preparation and tilt

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

// Delay for 1H Wideline T2

   _dseqon(xdec);
   delay(d2);
   _dseqoff(xdec); 

// Mix period for Spin Diffison

   decrgpulse(getval("pwH90"),phHmix1,0.0,0.0);
   delay(getval("tHmix"));
   decrgpulse(getval("pwH90"),phHmix2,0.0,0.0);

// Tilt Pulse and Ramped H to X Cross Polarization with LG Offset

   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();
}
Esempio n. 5
0
void 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 = gettoss5("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") + 5.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 = toss.rtau - 5.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 = toss.rtau - 5.0*toss.pw + getval("rd") + getval("ad") + at;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables

   settable(phH90,22,table1);
   settable(phfXhx,11,table2);
   settable(phXhx,44,table3);
   settable(phHhx,4,table4);
   settable(phHdec,4,table5);
   settable(phXtoss,44,table6);
   settable(phRec,44,table7);
   setreceiver(phRec);

   obsstepsize(360.0/(PSD*8192));

// Begin Sequence

   xmtrphase(phfXhx); 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 - Shifted by -6COG11

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

// TOSS5 Sideband Suppression with included
// (-6,-5,-6,-5,-6)COG11 Cycle

   _dseqon(dec);
   _toss5(toss, phXtoss);

// Begin Acquisition with Quadrature Phase

   obsblank(); _blank34();
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
Esempio n. 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();
}
Esempio n. 7
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");
    
   CP yx = getcp("YX",0.0,0.0,0,1);
   strncpy(yx.fr,"dec2",4);
   strncpy(yx.to,"obs",3);
   putCmd("frYX='dec2'\n");
   putCmd("toYX='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));

// Set Constant-time Period for d3. 

   if (d3_index == 0) d3_init = getval("d3");
   double d3_ = (ni - 1)/sw1 + d3_init;
   putCmd("d3acqret = %f\n",roundoff(d3_,12.5e-9));
   putCmd("d3dwret = %f\n",roundoff(1.0/sw2,12.5e-9));

// Set Mixing Period to N Rotor Cycles

   double taur,mix,srate;
   mix =  getval("tXmix");
   srate =  getval("srate");
   taur = 0.0;
   if (srate >= 500.0)
      taur = roundoff((1.0/srate), 0.125e-6);
   else {
      printf("ABORT: Spin Rate (srate) must be greater than 500\n");
      psg_abort(1);
   }
   mix = roundoff(mix,taur);
   mix = mix - getval("pwX90"); 
   if (mix < 0.0) mix = 0.0; 

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

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

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwY90") + getval("pwH90") + getval("tHY") + getval("tYX") 
              + 2.0*getval("pwX90") + mix; 
   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 +  d3 + 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 +  d3 + getval("rd") + getval("ad") + at;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0); 

// Create Phasetables

   settable(phH90,4,table1);
   settable(phHhy,4,table2);
   settable(phY90,4,table3);
   settable(phYhy,4,table4);
   settable(phHyx,4,table5);
   settable(phYyx,4,table6);
   settable(phXyx,8,table7);
   settable(phXmix1,8,table8);
   settable(phXmix2,8,table9);
   settable(phRec,8,table10);

   if (phase2 == 2)
      tsadd(phXyx,1,4);

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

// Begin Sequence

   setreceiver(phRec);
   txphase(phXyx); decphase(phH90); dec2phase(phY90);
   obspwrf(getval("aXyx")); decpwrf(getval("aH90")); dec2pwrf(getval("aY90"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// H to Y Cross Polarization with a Y Prepulse

   dec2rgpulse(getval("pwY90"),phY90,0.0,0.0);
   dec2phase(phYhy);
   dec2pwrf(getval("aYyx"));
   decrgpulse(getval("pwH90"),phH90,0.0,0.0);
   decphase(phHhy);
   _cp_(hy,phHhy,phYhy);

// F1 Indirect Period For Y

    _dseqon(dec);
    delay(d2);
    _dseqoff(dec);

// Y to X Cross Polarization

   decphase(phHyx); dec2phase(phYyx);
   decpwrf(getval("aHyx"));
   decunblank(); decon();
   _cp_(yx,phYyx,phXyx);
   decphase(phHhy);
   decoff();

// F2 Indirect Period for X

    txphase(phXmix1);
    obspwrf(getval("aX90"));
   _dseqon(dec);
   delay(d3);
   _dseqoff(dec);

// RAD(DARR) Mixing For X

   decpwrf(getval("aHmix"));
   decunblank(); decon();
   rgpulse(getval("pwX90"),phXmix1,0.0,0.0);
   txphase(phXmix2);
   obsunblank();
   delay(mix);
   rgpulse(getval("pwX90"),phXmix2,0.0,0.0);
   decoff();

// Begin Acquisition

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

   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("pw1Hhytrap") + getval("pw2Hhytrap") + getval("tHX"); 
   d.dutyoff = d1 + 4.0e-6 + getval("t1HYtrap") + getval("t2HYtrap");
   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(ph1Hhytrap,4,table1);
   settable(phYhytrap,4,table2);
   settable(ph2Hhytrap,4,table3);
   settable(phXhx,4,table4);
   settable(phHhx,4,table5);
   settable(phRec,4,table6);
   setreceiver(phRec);

// Begin Sequence

   txphase(phXhx); decphase(ph1Hhytrap); dec2phase(phYhytrap);
   obspwrf(getval("aXhx")); decpwrf(getval("aHhytrap")); dec2pwrf(getval("aYhytrap"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// TRAPDOR on H with Y Modulation

   decrgpulse(getval("pw1Hhytrap"),ph1Hhytrap,0.0,0.0);
   decphase(ph2Hhytrap);
   decunblank();
   dec2on();
   delay(getval("t1HYtrap"));
   dec2off();
   decrgpulse(getval("pw2Hhytrap"),ph2Hhytrap,0.0,0.0);
   decphase(phHhx);
   decunblank();
   decphase(phHhx);
   decpwrf(getval("aHhx"));
   delay(getval("t2HYtrap"));

// H to X Cross Polarization

    _cp_(hx,phHhx,phXhx);

// Begin Acquisition

   _dseqon(dec);
   obsblank(); _blank34();
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
Esempio n. 9
0
void 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");

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

   PBOXPULSE shco = getpboxpulse("shcoX",0,1);
   strncpy(shco.ch,"obs",3);
   putCmd("chXshco ='obs'\n");

   PBOXPULSE shcaco = combine_PBOXPULSE(shca,shco,0,1); 

   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 shcacolen = (shcaco.pw + 2.0*shcaco.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("tHX") + 2.0*shcaco.pw + 
              4.0*getval("pwX90");
   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("tZF") - getval("pwX90") + 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("tZF") - getval("pwX90") + 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*shcaco.t1 + 
          2.0*shcaco.t2 - 4.0*shcacolen - 2.5*getval("pwX90") - 6.0e-6;
   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*shcaco.t1 + 
          2.0*shcaco.t2 - 4.0*shcacolen - 2.5*getval("pwX90") - 6.0e-6;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Up 2D
   
   int errval = (int) ((getval("taua") - shcacolen)*2.0*sw1);
   if ((getval("taua") - ni/(2.0*sw1) - shcacolen) < 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(phXhx,4,table2);
   settable(phHhx,4,table3);
   settable(ph1Xshcaco,4,table4);
   settable(ph1X90,4,table5);
   settable(ph2X90,4,table6);
   settable(ph2Xshcaco,4,table7);
   settable(ph3X90,4,table8);
   settable(ph4X90,4,table9);
   settable(phRec,4,table10);
   setreceiver(phRec);

// States Acquisition

   if (phase1 == 2)       
      tsadd(phXhx,3,4);

// 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(zero);

// Begin F1 Refocused INEPT

   _dseqon(mix); 
   txphase(ph1Xshcaco); 
   obspwrf(shcaco.a);
   delay(getval("taua") - d22 - shcacolen);
   _pboxpulse(shcaco,ph1Xshcaco); 
   obsblank();
   obspower(getval("tpwr"));
   delay(3.0e-6);
   obsunblank();
   obsunblank(); 
   txphase(ph1X90); 
   obspwrf(getval("aX90"));
   delay(getval("taua") + d22 - shcacolen - getval("pwX90") - 3.0e-6);
   rgpulse(getval("pwX90"),ph1X90,0.0,0.0); 
   rgpulse(getval("pwX90"),ph2X90,0.0,0.0);
   txphase(ph2Xshcaco); 
   obspwrf(shcaco.a);
   obsunblank();
   delay(getval("taub") - shcacolen - getval("pwX90"));
   _pboxpulse(shcaco,ph2Xshcaco);
   obsblank();
   obspower(getval("tpwr"));
   delay(3.0e-6);
   obsunblank();
   txphase(ph3X90); 
   obspwrf(getval("aX90"));
   obsunblank(); 
   delay(getval("taub") - shcacolen - getval("pwX90")/2.0 - 3.0e-6);
   rgpulse(getval("pwX90"),ph3X90,0.0,0.0); 
   txphase(ph4X90);
   obsunblank();
   _dseqoff(mix);
   _dseqon(dec); 
   delay(getval("tZF") - getval("pwX90"));
   rgpulse(getval("pwX90"),ph4X90,0.0,0.0);
   
// Begin Acquisition

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

//Define Variables and Objects and Get Parameter Values

   double aYxy8 = getval("aYxy8");  // Define the xy8XY object in the Sequence
   double pwYxy8 = getval("pwYxy8");
   double nYxy8 = getval("nYxy8");
   int cycles = (int) nYxy8/2.0;
   nYxy8 = 2.0*cycles;              // Define total cycles in pairs
   int counter = (int) (nYxy8 - 1.0);
   initval((nYxy8 - 1.0),v8);
   double onYxy8 = getval("onYxy8");
   double srate = getval("srate");

   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");

   DSEQ mix = getdseq("Hmix");
   strncpy(mix.t.ch,"dec",3);
   putCmd("chHmixtppm='mix'\n"); 
   strncpy(mix.s.ch,"dec",3);
   putCmd("chHmixspinal='mix'\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*nYxy8*pwYxy8 + getval("pwX180");
   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 = 2.0*nYxy8*(1.0/srate - 2.0*pwYxy8) + 1.0/srate - getval("pwX180");
   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*nYxy8*(1.0/srate - 2.0*pwYxy8) + 1.0/srate - getval("pwX180");
   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(ph1Yxy8,8,table4);
   settable(ph2Yxy8,4,table5);
   settable(phX180,4,table6);
   settable(phRec,4,table7);

   if (counter < 0) tsadd(phRec,2,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);

// xy8Y Period One

  obspwrf(getval("aX180"));
  txphase(phX180);
  if (counter >= 0) {
      _dseqon(mix);
      delay(pwYxy8/2.0);
      dec2pwrf(aYxy8);
      sub(v1,v1,v1);                           
      if (counter >= 1) {
         if (counter > 1) loop(v8,v9);
	    getelem(ph1Yxy8,v1,v4);
	    incr(v1);
	    getelem(ph2Yxy8,ct,v2);
	    add(v4,v2,v2);
	    dec2phase(v2);
	    delay(0.5/srate - pwYxy8);
	    if (onYxy8 == 2)
               dec2rgpulse(pwYxy8,v2,0.0,0.0);
            else
               delay(pwYxy8);
	 if (counter > 1) endloop(v9);
      }

// X Refocussing Pulse

      delay(0.5/srate - pwYxy8/2.0 - getval("pwX180")/2.0);
      rgpulse(getval("pwX180"),phX180,0.0,0.0);
      delay(0.5/srate - pwYxy8/2.0 - getval("pwX180")/2.0);

// xy8Y Period Two

      dec2pwrf(aYxy8);
      if (counter >= 1) {
         if (counter > 1) loop(v8,v9);

	    if (onYxy8 == 2) 
               dec2rgpulse(pwYxy8,v2,0.0,0.0);
            else
               delay(pwYxy8);
            getelem(ph1Yxy8,v1,v4);
	    incr(v1);
	    getelem(ph2Yxy8,ct,v2);
	    add(v4,v2,v2);
	    dec2phase(v2);
	    delay(0.5/srate - pwYxy8);
	 if (counter > 1) endloop(v9);
      }
      delay(pwYxy8/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();
}
Esempio n. 13
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();
}
Esempio n. 14
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();
}
Esempio n. 15
0
void 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");
    
   CP yx = getcp("YX",0.0,0.0,0,1);
   strncpy(yx.fr,"dec2",4);
   strncpy(yx.to,"obs",3);
   putCmd("frYX='dec2'\n");
   putCmd("toYX='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("pwY90") + getval("pwH90") + getval("tHY") + getval("tYX")
              + 2.0*getval("pwX90");
   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);

// Create Phasetables

   settable(phH90,4,table1);
   settable(phHhy,4,table2);
   settable(phY90,4,table3);
   settable(phYhy,4,table4);
   settable(phHyx,4,table5);
   settable(phYyx,4,table6);
   settable(phXyx,8,table7);
   settable(phRec,8,table8);

// Begin Sequence

   setreceiver(phRec);
   txphase(phXyx); decphase(phH90); dec2phase(phY90);
   obspwrf(getval("aXyx")); decpwrf(getval("aH90")); dec2pwrf(getval("aY90"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// H to Y Cross Polarization with a Y Prepulse

   dec2rgpulse(getval("pwY90"),phY90,0.0,0.0);
   dec2phase(phYhy);
   dec2pwrf(getval("aYyx"));
   decrgpulse(getval("pwH90"),phH90,0.0,0.0);
   decphase(phHhy);
   _cp_(hy,phHhy,phYhy);

// Y to X Cross Polarization

   decphase(phHyx); dec2phase(phYyx);
   decpwrf(getval("aHyx"));
   decunblank(); decon();
   _cp_(yx,phYyx,phXyx);
   decphase(phHhy);
   dec2blank();
   decoff();

// Begin Acquisition

   _dseqon(dec);
   obsblank(); _blank34();
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
Esempio n. 16
0
void 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 spc5 = getspc5("spc5X",0,0.0,0.0,0,1);
   MPSEQ spc5ref = getspc5("spc5X",spc5.iSuper,spc5.phAccum,spc5.phInt,1,1); 
   strncpy(spc5.ch,"obs",3);
   putCmd("chXspc5='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") + getval("pwX90") +
              spc5.t + spc5ref.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);

// Create Phasetables

   settable(phH90,4,table1);
   settable(phHhx,4,table2);
   settable(phXhx,4,table3);
   settable(phXmix1,4,table4);
   settable(phXmix2,4,table5);
   settable(phRec,4,table6);
   setreceiver(phRec);

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

// 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);

// F2 Indirect Period for X

   obspwrf(getval("aX90"));
   _dseqon(dec);
   delay(d2);
   _dseqoff(dec);

// Mixing with SPC5 Recoupling

   rgpulse(getval("pwX90"),phXmix1,0.0,0.0);
   obspwrf(getval("aXspc5"));
   xmtrphase(v1); txphase(phXmix1);
   delay(getval("tZF"));
   decpwrf(getval("aHmix"));
   decon();
   _mpseq(spc5, phXmix1);
   xmtrphase(v2); txphase(phXmix2);
   _mpseq(spc5ref, 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();
}
Esempio n. 17
0
treal Trohr::WKap(){
	return masse()*getcp();
}
Esempio n. 18
0
void 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 cpmg = getcpmg("cpmgX");
   strncpy(cpmg.ch,"obs",3);
   putCmd("chXcpmg='obs'\n");

   double aXecho = getval("aXecho");  // define the echoX group in the sequence
   double t1Xechoinit = getval("t1Xecho");
   double pwXecho = getval("pwXecho");
   double t2Xechoinit = getval("t2Xecho");
   double t1Xecho  = t1Xechoinit - pwXecho/2.0 - getval("pwX90")/2.0;
   if (t1Xecho < 0.0) t1Xecho = 0.0;
   double t2Xecho  = t2Xechoinit - pwXecho/2.0 - cpmg.r1 - cpmg.t2 - getval("ad");
   if (t2Xecho < 0.0) t2Xecho = 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");

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

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

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwH90") + getval("tHX") + pwXecho + (cpmg.cycles - 1)*cpmg.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 = t1Xecho + t2Xecho + getval("rd") + getval("ad") + 
          at - (cpmg.cycles - 1)*cpmg.pw;
   d.c2 = d.c2 + (!strcmp(dec.seq,"spinal"));
   d.c2 = d.c2 + ((!strcmp(dec.seq,"spinal")) && (dec.s.a > 0.0));
   d.t2 = t1Xecho + t2Xecho + getval("rd") + getval("ad") + 
          at - (cpmg.cycles - 1)*cpmg.pw;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);


// Set Phase Tables

   settable(phH90,64,table1);
   settable(phXhx,64,table2);
   settable(phHhx,64,table3);
   settable(phXecho,64,table4);
   settable(phXcpmg,64,table5);
   settable(phRec,64,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);

// H Decoupling On

   decphase(zero);
   _dseqon(dec);

// X Hahn Echo

   txphase(phXecho);
   obspwrf(aXecho);
   delay(t1Xecho);
   rgpulse(pwXecho,phXecho,0.0,0.0);
   delay(t2Xecho);

// Apply CPMG Cycles

   obsblank(); _blank34();
   delay(cpmg.r1);
   startacq(getval("ad"));
   _cpmg(cpmg,phXcpmg);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
Esempio n. 19
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();
}
Esempio n. 20
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");

   GP inept = getinept("ineptYX");
   strncpy(inept.ch1,"dec2",4);
   strncpy(inept.ch2,"obs",3);
   putCmd("ch1YXinept='dec2'\n");
   putCmd("ch2YXinept='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");

// Dutycycle Protection

   double simpw1 = inept.pw1;
   if (inept.pw2 > inept.pw1) simpw1 = inept.pw2;

   double simpw2 = inept.pw3;
   if (inept.pw4 > inept.pw3) simpw2 = inept.pw4;

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwH90") + getval("tHY") + 2.0*simpw1 + 2.0*simpw2;
   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 = inept.t1 + inept.t2 + inept.t3 + inept.t4 + 
          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 = inept.t1 + inept.t2 + inept.t3 + inept.t4 + 
          getval("rd") + getval("ad") + at;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables

   settable(phH90,16,table1);
   settable(phHhy,4,table2);
   settable(phYhy,4,table3);
   settable(ph1Yyxinept,4,table4);
   settable(ph1Xyxinept,4,table5);
   settable(ph2Yyxinept,4,table6);
   settable(ph2Xyxinept,16,table7);
   settable(ph3Yyxinept,8,table8);
   settable(ph3Xyxinept,4,table9);
   settable(phRec,8,table10);
   setreceiver(phRec);

// Begin Sequence

   txphase(ph1Xyxinept); decphase(phH90); dec2phase(phYhy);
   obspwrf(getval("aXyxinept")); 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);

// INEPT Transfer from Y to X

   _dseqon(mix);
   _ineptref(inept,ph1Yyxinept,ph1Xyxinept,ph2Yyxinept,ph2Xyxinept,ph3Yyxinept,ph3Xyxinept);
   _dseqoff(mix);

// Begin Acquisition

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