void pulsesequence() { char pwpat[MAXSTR],p1pat[MAXSTR]; /* equilibrium period */ getstr("pwpat",pwpat); if (pwpat[0] == '\0') { abort_message("no pwpat? ABORT"); } getstr("p1pat",p1pat); if (p1pat[0] == '\0') { abort_message("no p1pat? ABORT"); } status(A); obspower(zero); decpower(tpwr); hsdelay(d1); rcvroff(); status(B); if (is_y(rfwg[1])) decshaped_pulse(p1pat,p1,zero,rof1,rof2); else apshaped_decpulse(p1pat,p1,zero,t1,t2,rof1,rof2); hsdelay(d2); status(C); if (is_y(rfwg[1])) decshaped_pulse(pwpat,pw,oph,rof1,rof2); else apshaped_decpulse(pwpat,pw,oph,t1,t2,rof1,rof2); }
void pulsesequence() { double tro; char gread,gphase,gslice; char grdname[MAXSTR]; gread = 'z'; if (getorientation(&gread,&gphase,&gslice,"orient") < 0) abort_message("illegal value in orient parameter"); gro = getval("gro"); tro = getval("tro"); getstr("gname",grdname); /* equilibrium period */ status(A); hsdelay(d1); /* --- tau delay --- */ status(B); pulse(p1, zero); hsdelay(d2); /* --- observe period --- */ status(C); pulse(pw,oph); delay(0.0001); shapedgradient(grdname,tro,gro,gread,1,1); hsdelay(d2); startacq(alfa); acquire(np,1.0/sw); endacq(); }
pulsesequence() { /* equilibrium period */ status(A); hsdelay(d1); /* --- tau delay --- */ status(B); pulse(p1, zero); hsdelay(d2); /* --- observe period --- */ status(C); pulse(pw,oph); }
pulsesequence() { char lkflg[MAXSTR]; getstr("lkflg",lkflg); status(A); dec3blank(); if (lkflg[A]=='y') lk_sample(); hsdelay(d1); status(B); pulse(p1, zero); hsdelay(d2); status(C); pulse(pw,oph); if (lkflg[A]=='y') lk_hold(); dec3unblank(); }
void pulsesequence() { /* DECLARE & READ IN NEW PARAMETERS */ char compshape[MAXSTR]; getstr("compshape",compshape); /* Composit pulse shape */ loadtable("lc1d"); /* Phase table */ /* PULSE SEQUENCE */ status(A); hsdelay(d1); status(B); if (getflag("wet")) wet4(t1,t2); status(C); if (getflag("composit")) { if (rfwg[OBSch-1] == 'y') shaped_pulse(compshape,4.0*pw+0.8e-6,t3,rof1,rof2); else composite_pulse(pw,t3,rof1,rof2,v1); } else rgpulse(pw,t3,rof1,rof2); setreceiver(t4); }
pulsesequence() { double pp; pp = getval("pp"); /* calculate phases */ mod2(ct,v1); /* 0101 */ dbl(v1,v1); /* 0202 */ hlv(ct,v2); /* 0011 2233 */ mod2(v2,v2); /* 0011 0011 */ add(v1,v2,v1); /* 0213 0213*/ assign(v1,oph); status(A); hsdelay(d1); status(B); pulse(pw, v1); delay(d2); if (declvlonoff) declvlon(); /* sets power to pplvl */ else decpower(pplvl); simpulse(p1, pp, v1, v1, rof1, rof1); if (declvlonoff) declvloff(); else decpower(dpwr); delay(d2); status(C); }
void pulsesequence() { double jc13,jtau; jc13 = getval("jc13"); jtau = 1.0 / (2.0 * jc13); mod4(ct, v1); /* v1 = 0 1 2 3 */ dbl(v1, v10); /* v10 = 0 2 0 2 */ hlv(ct, v2); hlv(v2, v2); mod4(v2, v2); /* v2 = 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 */ add(v2, v1, v1); assign(v2, oph); add(v10, oph, oph); status(A); hsdelay(d1); if (getflag("wet")) wet4(zero,one); status(C); rgpulse(pw, v2, rof1, rof2); jtau -= pw + rof2; delay(jtau - rof1); simpulse(2*pw, pwx, v1, zero, rof1, rof2); delay(jtau); status(C); }
void pulsesequence() { /* equilibrium period */ status(A); hsdelay(d1); /* tau delay */ status(B); if (newdecamp) { decpower(tpwr); decrgpulse(p1, zero, rof1, rof2); decpower(dpwr); } else { declvlon(); decrgpulse(p1, zero, rof1, rof2); declvloff(); } hsdelay(d2); /* observe period */ status(C); settable(t1,4,phasecycle); if (newdecamp) { decpower(tpwr); decrgpulse(pw, t1, rof1, rof2); decpower(dpwr); } else { declvlon(); decrgpulse(pw, t1, rof1, rof2); declvloff(); } setreceiver(t1); }
pulsesequence() { dpwr = getval("dpwr"); if (dpwr > 46) /* Do not fry the probe */ { abort_message("Decoupling power too large (max is 46) - acquisition aborted."); } /* equilibrium period */ status(A); decpwrf(4095.0); hsdelay(d1); /* --- tau delay --- */ status(B); pulse(p1, zero); hsdelay(d2); /* --- observe period --- */ status(C); pulse(pw,oph); }
void pulsesequence() { int rxgate; double pp, pplvl; pp = getval("pp"); pplvl = getval("pplvl"); rxgate = (rof1 == 0.0); if (rxgate) rof1 = 1.0e-6; /* phase switching time */ if (newdecamp) { if (rxgate) rof1 = 40.0e-6; } status(A); hsdelay(d1); status(B); settable(t1,4,phasecycle); pulse(pw, t1); delay(d2); if (newdecamp) { pplvl = getval("pplvl"); decpower(pplvl); /* sets DEC atten = pplvl */ } else { declvlon(); /* sets dhp = 255 level */ } simpulse(p1, pp, t1, t1, rof1, rof1); if (newdecamp) { decpower(dpwr); /* sets DEC atten = dpwr */ } else { declvloff(); } delay(d2); status(C); setreceiver(t1); }
pulsesequence() { initval(nt,v1); sub(v1,ct,v2); sub(v2,one,v2); /* equilibrium period */ status(A); ifzero(ssctr); aux1on(); endif(ssctr); hsdelay(d1); /* --- tau delay --- */ status(B); pulse(p1, zero); hsdelay(d2); /* --- observe period --- */ status(C); ifzero(v2); aux12off(); endif(v2); pulse(pw,oph); }
void pulsesequence() { char compshape[MAXSTR], sspul[MAXSTR], wet[MAXSTR], composit[MAXSTR]; getstr("compshape",compshape); getstr("composit",composit); getstr("sspul",sspul); getstr("wet",wet); settable(t1,4,phs1); settable(t2,8,phs2); getelem(t1,ct,oph); getelem(t2,ct,v2); assign(oph,v1); /* equilibrium period */ status(A); delay(5.0e-5); if (sspul[0] == 'y') steadystate(); delay(d1); if (wet[0] == 'y') wet4(zero,one); status(B); pulse(p1,zero); hsdelay(d2); if (composit[0] == 'y') { if (rfwg[OBSch-1] == 'y') shaped_pulse(compshape,4.0*pw+0.8e-6,v1,rof1,rof2); else comp90pulse(pw,v1,rof1,rof2); } else rgpulse(pw,v1,rof1,rof2); status(C); }
void pulsesequence() { /* CHECK CONDITIONS */ if (rof1 < 9.9e-6) fprintf(stdout, "Warning: ROF1 is less than 10 us.\n"); if (p1 == 0.0) p1 = 2*pw; /* STEADY-STATE PHASECYCLING */ /* This section determines if the phase calculations trigger off of (SS - SSCTR) or off of CT */ ifzero(ssctr); dbl(ct, v1); hlv(ct, v3); elsenz(ssctr); sub(ssval, ssctr, v7); /* v7 = 0,...,ss-1 */ dbl(v7, v1); hlv(v7, v3); endif(ssctr); /* PHASECYCLE CALCULATION */ hlv(v3, v2); mod2(v3, v3); add(v3, v1, v1); assign(v1, oph); dbl(v2, v4); add(v4, oph, oph); add(v2, v3, v2); /* BEGIN ACTUAL SEQUENCE */ status(A); hsdelay(d1); status(B); rgpulse(pw, v1, rof1, rof1); delay(d2/2); rgpulse(p1, v2, rof1, 2*rof1 + pw/2); delay(d2/2); status(C); }
pulsesequence() { double j1xh, d3, tpwr180 = getval("tpwr180"), pw180 = getval("pw180"), tau; char pw180ad[MAXSTR]; j1xh = getval("j1xh"); d3 = getval("d3"); getstr("pw180ad",pw180ad); tau = 1/j1xh; /* CALCULATE PHASE CYCLE */ hlv(oph, v1); dbl(v1, v1); incr(v1); /* v1=1133 */ mod2(oph, v2); dbl(v2, v2); incr(v2); /* v2=1313 */ add(v1, oph, v1); sub(v1, one, v3); add(v2, oph, v2); sub(v2, one, v4); /* ACTUAL PULSE SEQUENCE */ status(A); hsdelay(d1); obspower(tpwr); status(B); rgpulse(pw, oph, rof1, rof1); delay(tau - rof1); obspower(tpwr180); shaped_pulse(pw180ad,pw180,v1,rof1,rof1); status(C); delay(tau + d3 - rof1+2*POWER_DELAY); shaped_pulse(pw180ad,pw180,v2,rof1,rof2); obspower(tpwr); delay(d3); }
void pulsesequence() { double pwClvl,gzlvl1,gt1; gzlvl1=getval("gzlvl1"); gt1=getval("gt1"); pwClvl=getval("pwClvl"); add(oph,one,v1); /* equilibrium period */ status(A); obspower(pwClvl); hsdelay(d1); /* --- tau delay --- */ status(B); rgpulse(pw, oph,rof1,0.0); txphase(zero); zgradpulse(gzlvl1,gt1); delay(d2-gt1); rgpulse(p1,v1,0.0,0.0); zgradpulse(gzlvl1,gt1); delay(d2-gt1); status(C); }
pulsesequence() { double pwx1; double pwx2; double pwx3; double jtau; char jname[MAXSTR]; char jval[MAXSTR]; pwx1 = getval("pwx1"); pwx2 = getval("pwx2"); pwx3 = getval("pwx3"); getstr("jname",jname); strcpy(jval,"j"); strcat(jval,jname); jtau = 1.0 / (2.0 * getval(jval) ); mod4(ct, v1); /* v1 = 0 1 2 3 */ dbl(v1, v10); /* v10 = 0 2 0 2 */ hlv(ct, v2); hlv(v2, v2); mod4(v2, v2); /* v2 = 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 */ add(v2, v1, v1); assign(v2, oph); add(v10, oph, oph); status(A); hsdelay(d1); status(B); rgpulse(pw, v2, rof1, rof2); jtau -= pw + rof2; delay(jtau - rof1); sim4pulse(0.0, pwx1, pwx2, pwx3, v1, zero, zero, zero, rof1, rof2); status(C); }
pulsesequence() { double freq,fstart,fend; double attn,attnd,attnd2,attnd3,attnd4,tattn;/* 5 channels supported */ double tunesw,tuneswd,tuneswd2,tuneswd3,tuneswd4,tsw; double gain,gaind,gaind2,gaind3,gaind4,tgain; int chan; double offset_sec; int np2; int nfv,index; nfv = (int) getval("nf"); np2 = np / 2; status(A); /* getRealSetDefault reduces logic - not in Inova */ getRealSetDefault(CURRENT,"tunesw",&tunesw,10000000.0); getRealSetDefault(CURRENT,"tuneswd",&tuneswd,tunesw); getRealSetDefault(CURRENT,"tuneswd2",&tuneswd2,tunesw); getRealSetDefault(CURRENT,"tuneswd3",&tuneswd3,tunesw); getRealSetDefault(CURRENT,"tuneswd4",&tuneswd4,tunesw); getRealSetDefault(CURRENT,"tupwr",&attn,10.0); getRealSetDefault(CURRENT,"tupwrd",&attnd,10.0); getRealSetDefault(CURRENT,"tupwrd2",&attnd2,10.0); getRealSetDefault(CURRENT,"tupwrd3",&attnd3,10.0); getRealSetDefault(CURRENT,"tupwrd4",&attnd4,10.0); getRealSetDefault(CURRENT,"gain",&gain,10.0); getRealSetDefault(CURRENT,"gaind",&gaind,gain); getRealSetDefault(CURRENT,"gaind2",&gaind2,gain); getRealSetDefault(CURRENT,"gaind3",&gaind3,gain); getRealSetDefault(CURRENT,"gaind4",&gaind4,gain); offset_sec = (0.5 / sw); setacqmode(WACQ|NZ); for (index = 0; index < nf; index++) { switch(index) { case 0: chan = OBSch; freq = sfrq; tattn = attn; tgain = gain; tsw = tunesw; break; case 1: chan = DECch; freq = dfrq; tattn = attnd; tgain = gaind; tsw = tuneswd; break; case 2: chan = DEC2ch; freq = dfrq2; tattn = attnd2; tgain = gaind2; tsw = tuneswd2; break; case 3: chan = DEC3ch; freq = dfrq3; tattn = attnd3; tgain = gaind3; tsw = tuneswd3; break; case 4: chan = DEC4ch; freq = dfrq4; tattn = attnd4; tgain = gaind4; tsw = tuneswd4; break; default: exit(-1); } fstart = freq - (tsw/2) * 1e-6; fend = freq + (tsw/2) * 1.0e-6; //printf("channel = %d frequency = %f\n",chan,freq); //printf("channel = %d frequency span = %f\n",chan, tsw); //printf("start=%f stop = %f\n",fstart,fend); //printf("gain = %f power = %f\n",tgain,tattn); hsdelay(d1); set4Tune(chan,tgain); assign(zero,oph); genPower(tattn,chan); delay(0.001); startacq(alfa); SweepNOffsetAcquire(fstart, fend, np2, chan, offset_sec); endacq(); delay(0.001); } }
void pulsesequence() { char sspul[MAXSTR]; /* LOAD VARIABLES AND CHECK CONDITIONS */ getstr("sspul", sspul); if (satpwr > 40) { printf("satpwr too large - acquisition aborted./n"); psg_abort(1); } if ((rof1 < 9.9e-6) && (ix== 1)) fprintf(stdout,"Warning: ROF1 is less than 10 us\n"); /* STEADY-STATE PHASECYCLING */ /* This section determines if the phase calculations trigger off of (SS - SSCTR) or off of CT */ ifzero(ssctr); hlv(ct, v4); mod4(ct, v3); elsenz(ssctr); sub(ssval, ssctr, v12); /* v12 = 0,...,ss-1 */ hlv(v12, v4); mod4(v12, v3); endif(ssctr); /* CALCULATE PHASECYCLE */ /* The phasecycle first performs a 4-step cycle on the third pulse in order to select for DQC. Second, the 2-step QIS cycle is added in. Third, a 2-step cycle for axial peak suppression is performed on the second pulse. Fourth, a 2-step cycle for axial peak suppression is performed on the first pulse. If P-type peaks only are being selected, the 2-step cycle for P-type peak selection is performed on the first pulse immediately after the 4-step cycle on the third pulse. */ hlv(v4, v4); if (phase1 == 0) { assign(v4, v6); hlv(v4, v4); mod2(v6, v6); /* v6 = P-type peak selection in w1 */ } hlv(v4, v2); mod4(v4, v4); /* v4 = quadrature image suppression */ hlv(v2, v1); mod2(v1, v1); dbl(v1, v1); mod2(v2, v2); dbl(v2, v2); dbl(v3, v5); add(v3, v5, v5); add(v1, v5, v5); add(v2, v5, v5); add(v4, v5, v5); add(v4, v1, v1); add(v4, v2, v2); add(v4, v3, v3); if (phase1 == 0) { add(v6, v1, v1); add(v6, v5, v5); } if (phase1 == 2) incr(v1); if (phase1 == 3) add(id2, v1, v1); /* adds TPPI increment to the phase of the * first pulse */ assign(v5, oph); /* FOR HYPERCOMPLEX, USE REDFIED TRICK TO MOVE AXIALS TO EDGE */ if ((phase1==2)||(phase1==1)) { initval(2.0*(double)(d2_index%2),v9); /* moves axials */ add(v1,v9,v1); add(oph,v9,oph); } /* BEGIN ACTUAL PULSE SEQUENCE CODE */ status(A); if (sspul[0] == 'y') { rgpulse(200*pw, one, 10.0e-6, 0.0e-6); rgpulse(200*pw, zero, 0.0e-6, 1.0e-6); } hsdelay(d1); if (satmode[A] == 'y') { obspower(satpwr); rgpulse(satdly,zero,rof1,rof2); obspower(tpwr); } status(B); rgpulse(pw, v1, rof1, 1.0e-6); if (satmode[B] == 'y') { obspower(satpwr); if (d2>100.0e-6) rgpulse(d2-(2*POWER_DELAY)-1.0e-6-rof1-(4*pw)/3.14159,zero,0.0,0.0); obspower(tpwr); } else if (d2>0.0) { delay(d2 - rof1 - 1.0e-6 -(4*pw)/3.1416); } rgpulse(pw, v2, rof1, 0.0); rgpulse(pw, v3, 1.0e-6, rof2); status(C); }
pulsesequence() { double tunesw; double freq; double attn,fstart,fend; int chan; double offset_sec; int np2; tunesw = getval("tunesw"); if (tunesw < 0.0) tunesw = 1.0e7; np2 = np / 2; status(A); if (find("tchan") == -1) { chan = 1; } else { chan = (int) getval("tchan"); if ((chan < 1) || (chan > 5)) abort_message("tchan (%d) must be between 1 and 5\n", chan); } switch (chan) { case 1: freq = sfrq; break; case 2: freq = dfrq; break; case 3: freq = dfrq2; break; case 4: freq = dfrq3; break; case 5: freq = dfrq4; break; default: freq = sfrq; break; } if (find("tupwr") == -1) { /* Optional parameter "tupwr" sets tune pwr */ attn = 10.0; } else { attn = getval("tupwr"); } if (attn > 10.0) attn = 10.0; fstart = freq - (tunesw/2) * 1e-6; fend = freq + (tunesw/2) * 1.0e-6; hsdelay(d1); set4Tune(chan,getval("gain")); assign(zero,oph); genPower(attn,chan); delay(0.0001); offset_sec = (0.5 / sw); SweepNOffsetAcquire(fstart, fend, np2, chan, offset_sec); }
pulsesequence() { int i, relay; double tau; /* GET NEW PARAMETERS */ relay = (int) (getval("relay") + 0.5); tau = getval("tau"); /* CHECK CONDITIONS */ if (p1 == 0.0) p1 = pw; /* CALCULATE PHASES */ sub(ct, ssctr, v11); /* v11 = ct-ss */ initval(256.0, v12); add(v11, v12, v11); /* v11 = ct-ss+256 */ hlv(v11, v1); /* v1 = cyclops = 00112233 */ for (i = 0; i < relay + 1; i++) hlv(v1, v1); /* cyclops = 2**(relay+2) 0's, 1's, 2's, 3's */ mod4(v11, v2); /* v2 = 0123 0123... */ dbl(v2, oph); /* oph = 0202 0202 */ add(v2, v1, v2); /* v2 = 0123 0123 + cyclops */ add(oph, v1, oph); /* oph = 0202 0202 + cyclops */ hlv(v11, v3); /* v3 = 0011 2233 4455 ... */ /* PULSE SEQUENCE */ status(A); if (rof1 == 0.0) { rof1 = 1.0e-6; /* phase switching time */ rcvroff(); } hsdelay(d1); /* preparation period */ status(B); rgpulse(pw, v1, rof1, rof1); delay(d2); /* evolution period */ status(A); if (relay == 0) delay(tau); /* for delayed cosy */ rgpulse(p1, v2, rof1, rof1); /* start of mixing period */ if (relay == 0) delay(tau); /* for delayed cosy */ for (i = 0; i < relay; i++) /* relay coherence */ { hlv(v3, v3); /* v3=2**(relay+1) 0's, 1's, 2's, 3's */ dbl(v3, v4); /* v4=2**(relay+1) 0's, 2's, 0's, 2's */ add(v2, v4, v5); /* v5=v4+v2 (including cyclops) */ delay(tau/2); rgpulse(2.0*pw, v2, rof1, rof1); delay(tau/2); rgpulse(pw, v5, rof1, rof1); } status(C); delay(rof2); rcvron(); }
pulsesequence() { double pp; /* LOAD VARIABLES */ pp = getval("pp"); /* CHECK CONDITIONS */ if (dm[B] == 'y') { (void) printf("DM must be set to 'n' for the second status.\n"); psg_abort(1); } if (dm[C] == 'n') { if (dmm[B] != 'c') { (void) printf("DMM must be set to 'c' for the second status\n"); (void) printf("if a non-gated experiment is performed.\n"); psg_abort(1); } } if (pp == 0.0) { if (dm[C] == 'n') { (void) printf("PP must be non-zero for a non-gated experiment.\n"); psg_abort(1); } } if ((rof1 < 9.9e-6) && (ix == 1)) (void) printf("Warning: ROF1 is less than 10 us.\n"); if (p1 == 0.0) p1 = 2*pw; /* STEADY-STATE PHASECYCLING /* This section determines if the phase calculations trigger off of (SS - SSCTR) or off of CT */ ifzero(ssctr); dbl(ct, v1); hlv(ct, v3); elsenz(ssctr); sub(ssval, ssctr, v7); /* v7 = 0,...,ss-1 */ dbl(v7, v1); hlv(v7, v3); endif(ssctr); /* PHASECYCLE CALCULATION */ hlv(v3, v2); mod2(v3, v3); add(v3, v1, v1); assign(v1, oph); dbl(v2, v9); add(v9, oph, oph); add(v2, v3, v2); /* BEGIN ACTUAL SEQUENCE */ status(A); hsdelay(d1); status(B); rgpulse(pw, v1, rof1, rof1); delay(d2/2); if (dm[C] == 'y') { rgpulse(p1/2, v2, rof1, 0.0); status(C); rgpulse(p1/2, v2, 0.0, 2*rof1 + pw/2); delay(d2/2); } else { if (declvlonoff) declvlon(); else decpower(pplvl); decrgpulse(pp, zero, rof1, 0.0); simpulse(p1, 2*pp, v2, one, 1.0e-6, 0.0); decrgpulse(pp, zero, 1.0e-6, 2*rof1 + pw/2); if (declvlonoff) declvloff(); else decpower(dpwr); delay(d2/2); } status(D); }
pulsesequence() { /* DECLARE VARIABLES */ char scuba[MAXSTR], mess_flg[MAXSTR], imino[MAXSTR], amino[MAXSTR], jumpret[MAXSTR], C13refoc[MAXSTR]; int phase, t1_counter; double hscuba, /* length of 1/2 SCUBA delay */ taunh, /* 1/4J(NH) */ tofps, /* water frequency */ tpwrmess, /* power level for Messerlie purge */ dly_pg, /* Messerlie purge delay */ pwClvl, /* power level for 13C hard pulse */ pwNlvl, /* power level for 15N hard pulse */ pwC, /* pulse width for 13C hard pulse */ pwN, /* pulse width for 15N hard pulse */ JNH, /* coupling for NH */ diff, /* freq diff H2O & exit center */ dof2a, /* offset for imino/amino */ tau1, /* t1/2 */ grecov, /* gradient recovery time */ gzlvl0, /* level of grad. for purge */ gzlvl1, /* level of grad. for 1/2J */ gt1, /* grad. duration for 1/2J */ gzlvlr; /* level of RDt1-gradient (0.5G) */ /* LOAD VARIABLES */ JNH = getval("JNH"); diff = getval("diff"); pwC = getval("pwC"); pwN = getval("pwN"); tofps = getval("tofps"); tpwrmess= getval("tpwrmess"); dly_pg = getval("dly_pg"); pwClvl = getval("pwClvl"); pwNlvl = getval("pwNlvl"); hscuba = getval("hscuba"); phase = (int)(getval("phase") + 0.5); sw1 = getval("sw1"); at = getval("at"); grecov = getval("grecov"); gt1 = getval("gt1"); gzlvl0 = getval("gzlvl0"); gzlvl1 = getval("gzlvl1"); gzlvlr = getval("gzlvlr"); getstr("scuba",scuba); getstr("mess_flg",mess_flg); getstr("imino",imino); getstr("amino",amino); getstr("jumpret",jumpret); getstr("C13refoc",C13refoc); /* CHECK VALIDITY OF PARAMETER RANGE */ if (dm[A] == 'y' || dm[B] == 'y') { printf(" dm must be 'nny' or 'nnn' "); psg_abort(1); } if ((dm[C] == 'y' || dm2[C] == 'y') && at > 0.21) { printf(" check at time! Don't fry probe \n"); psg_abort(1); } if (dm2[A] == 'y' || dm2[B] == 'y') { printf(" dm2 must be 'nny' or 'nnn' "); psg_abort(1); } if ( ((imino[A]=='y') && (amino[A]=='y')) ) { printf(" Choose ONE of imino='y' OR amino='y' "); psg_abort(1); } if ((satmode[A] == 'y') && (jumpret[A] == 'y')) { printf(" Choose EITHER presat (satmode='y') OR Jump-Return (jumpret='y') \n"); psg_abort(1); } if (satpwr > 12) { printf(" satpwr must be less than 13 \n"); psg_abort(1); } if (tpwrmess > 55) { printf(" tpwrmess must be less than 55 \n"); psg_abort(1); } if (dly_pg > 0.010) { printf(" dly_pg must be less than 10msec \n"); psg_abort(1); } if (dpwr > 50) { printf(" dpwr must be less than 49 \n"); psg_abort(1); } if (dpwr2 > 50) { printf(" dpwr2 must be less than 46 \n"); psg_abort(1); } if (gt1 > 5.0e-3) { printf(" gti must be less than 5msec \n"); psg_abort(1); } if (gzlvl0 > 32768 || gzlvl1 > 32768 || gzlvl0 < -32768 || gzlvl1 < -32768) { printf(" gzlvli must be -32768 to 32768 (30G/cm) \n"); psg_abort(1); } if (gzlvlr > 500 || gzlvlr < -500) { printf(" RDt1-gzlvlr must be -500 to 500 (0.5G/cm) \n"); psg_abort(1); } /* LOAD PHASE PARAMETERS */ settable(t1, 8, phi1); settable(t2, 2, phi2); settable(t3, 8, phi3); settable(t4, 1, phi4); settable(t5, 8, rec); /* INITIALIZE VARIABLES */ taunh = ((JNH != 0.0) ? 1/(4*(JNH)) : 2.78e-3); dof2a = dof2; /* IMINO-region setting of dof2 */ if (imino[A] == 'y') dof2a = dof2 - 45*dfrq2; /* AMINO-region setting of dof2 */ else if (amino[A] == 'y') dof2a = dof2 - 115*dfrq2; /* Phase incrementation for hyper complex data in t1 */ if (phase == 2) tsadd(t2, 1, 4); /* Calculate modification to phase based on current t1 values: States - TPPI acquisition */ if( ix == 1) d2_init = d2; t1_counter = (int) ((d2 - d2_init)*sw1 + 0.5); if (t1_counter %2) { tsadd(t2, 2, 4); tsadd(t5, 2, 4); } /* Set up so that you get (90, -180) phase correction in F1 */ tau1 = d2; tau1 = tau1 -(4.0/PI)*pwN; tau1 = tau1 / 2.0; /* BEGIN ACTUAL PULSE SEQUENCE */ status(A); obspower(satpwr); /* Set power for presaturation */ decpower(pwClvl); /* Set DEC1 power to pwClvl */ dec2power(pwNlvl); /* Set DEC2 power to pwNlvl */ obsoffset(tof); decoffset(dof); dec2offset(dof2a); if (mess_flg[A] == 'y') /* Option for Messerlie purge */ { obsoffset(tofps); obspower(tpwrmess); txphase(zero); xmtron(); delay(dly_pg); xmtroff(); txphase(one); xmtron(); delay(dly_pg/1.62); xmtroff(); obsoffset(tof); obspower(satpwr); } if (satmode[A] == 'y') /* Presaturation Period */ { txphase(zero); xmtron(); /* presaturation using transmitter */ delay(d1); xmtroff(); obspower(tpwr); /* set power for hard pulse */ if (scuba[A] == 'y') /* SCUBA pulse */ { hsdelay(hscuba); rgpulse(pw, zero, rof1, 0.0); rgpulse(2*pw, one, rof1, 0.0); rgpulse(pw, zero, rof1, 0.0); delay(hscuba); } } else { obspower(tpwr); delay(d1); } dec2rgpulse(pwN,zero, 0.0, 0.0); /* destroy N15 magnetization */ zgradpulse(gzlvl0, 0.5e-3); delay(1.0e-4); dec2rgpulse(pwN, one, 0.0, 0.0); zgradpulse(0.7*gzlvl0, 0.5e-3); decphase(t2); delay(grecov); status(B); if (jumpret[A] == 'y') { rgpulse(pw, zero, rof1, rof1); /* jump-return pulse */ delay(0.25 / diff - 2.0*rof1); rgpulse(pw, two, rof1, rof1); } else rgpulse(pw, zero, rof1, rof1); zgradpulse(gzlvl1,gt1); delay(taunh - gt1 - 2.0*GRADIENT_DELAY ); /* delay = 1.0/2J(NH) */ delay(taunh); dec2rgpulse(pwN, t2, 0.0, 0.0); dec2phase(t4); if (jumpret[A] == 'y') { tau1 = tau1-(pw+rof1+0.25/diff) ; if (tau1 < 0.0) tau1 = 0.0; if (tau1 > 0.001) { zgradpulse(gzlvlr,(0.4*tau1-2.0*GRADIENT_DELAY)); /* delay = t1/2 */ delay(0.1*tau1); zgradpulse(-gzlvlr,(0.4*tau1-2.0*GRADIENT_DELAY)); delay(0.1*tau1); } else delay(tau1); /* delay = t1/2 */ rgpulse(pw, t1, rof1, rof1); if (C13refoc[A] == 'y') { delay((0.25 / diff) - pwC -rof1 ); decrgpulse(2*pwC, zero, 0.0, 0.0); delay((0.25 / diff) - pwC -rof1) ; } else { delay(0.25 / diff); delay(0.25 / diff); } rgpulse(pw, t3, rof1, rof1); txphase(zero); if (tau1 > 0.001) { zgradpulse(gzlvlr,(0.4*tau1-2.0*GRADIENT_DELAY)); /* delay = t1/2 */ delay(0.1*tau1); zgradpulse(-gzlvlr,(0.4*tau1-2.0*GRADIENT_DELAY)); delay(0.1*tau1); } else delay(tau1); /* delay = t1/2 */ } else { if (C13refoc[A] == 'y') tau1 = tau1-(pwC+rof1) ; else tau1 = tau1-(pw+rof1) ; if (tau1 < 0.0) tau1 = 0.0; if (tau1 > 0.001) { zgradpulse(gzlvlr,(0.4*tau1-2.0*GRADIENT_DELAY)); /* delay = t1/2 */ delay(0.1*tau1); zgradpulse(-gzlvlr,(0.4*tau1-2.0*GRADIENT_DELAY)); delay(0.1*tau1); } else delay(tau1); /* delay = t1/2 */ if (C13refoc[A] == 'y') simpulse(2*pw, 2*pwC, t1, zero, rof1, rof1); else rgpulse(2*pw, t1, rof1, rof1); txphase(zero); if (tau1 > (4.0*GRADIENT_DELAY + 0.64*pw + rof1)) { if (tau1 > 0.001) { zgradpulse(gzlvlr,(0.4*tau1-2.0*GRADIENT_DELAY)); /* delay = t1/2 */ delay(0.1*tau1); zgradpulse(-gzlvlr,(0.4*tau1-2.0*GRADIENT_DELAY)); delay(0.1*tau1); } else delay(tau1); } else delay(tau1); /* delay = t1/2 */ } dec2rgpulse(pwN, t4, 0.0, 0.0); zgradpulse(gzlvl1,gt1); decpower(dpwr); /* low power for decoupling */ dec2power(dpwr2); delay(taunh - gt1 - 2.0*GRADIENT_DELAY-2.0*POWER_DELAY); /* delay = 1/2J(NH) */ delay(taunh); status(C); setreceiver(t5); }
pulsesequence() { char normal[MAXSTR], focus[MAXSTR]; double spp, spplvl, pp, mult, j, d3; double gt, gzlvl; /* GATHER AND INTIALIZE */ getstr("focus", focus); getstr("normal", normal); spp = getval("spp"); spplvl = getval("spplvl"); pp = getval("pp"); mult = getval("mult"); j = getval("j"); gt = getval("gt"); gzlvl = getval("gzlvl"); /* calculate phases */ mod2(ct,v1); /* v1 = 01010101 */ dbl(v1,v1); /* v1 = 0 2 */ hlv(ct,v2); mod2(v2,v2); /* v2 = 0 0 1 1 */ add(v1,v2,oph); /* oph = 0 2 1 3 */ /* if mult is zero, then do normal s2pul sequence */ if (mult == 0.0) { status(A); hsdelay(d1); pulse(p1, zero); status(B); delay(d2); status(C); pulse(pw,oph); } else /* this is the INEPT part of the sequence */ { if (j != 0.0) { /* calculation of delays */ d3 = 1.0 / (2.0 * j); if (mult < 2.5) { d2 = 1.0 / (2.0 * j); } else if (mult < 3.5) { d2 = 3.0 / (4.0 * j); } else { d2 = 1.0 / (3.0 * j); } } else d3 = getval("d3"); /* do equilibration delay */ if ((dm[A] == 'y') || (dm[B] == 'y')) { (void) printf("Decoupler must be set as dm=nny or n\n"); psg_abort(1); } if (declvlonoff) declvlon(); /* use pplvl for pulse */ else decpower(pplvl); dec_pw_ovr(FALSE); status(A); delay(d1); /* excitation transfer */ status(B); decrgpulse(pp, v1, rof1, rof1); decpower(spplvl); dec_pw_ovr(TRUE); delay(d3/2 - 2.0*(gt + spp + 1.0e-4)); /*nominal 1/(4j) corrected for H1 & gradient pulses */ zgradpulse(gzlvl,gt); delay(1.0e-4); simpulse(2*pw, 2*spp, zero, zero, rof1, rof1); delay(1.0e-4); zgradpulse(gzlvl,2.0*gt); delay(1.0e-4); simpulse(2.0*pw, 2.0*spp, zero, two, rof1, rof1); zgradpulse(gzlvl,gt); delay(1.0e-4); decpower(pplvl); dec_pw_ovr(FALSE); delay(d3/2 - 2.0*(gt + spp + 1.0e-4)); simpulse(pw, pp, v2, one, 0.0, 0.0); /* make decision on refocussing */ if ((focus[A] == 'y') || (dm[C] == 'y')) { decpower(spplvl); dec_pw_ovr(TRUE); delay(d2/2 - rof1 -spp); /* refocussing delay varied for 2d */ simpulse(2*pw, 2*spp, v2, zero, rof1, rof1); delay(d2/2 - rof1 - spp); } else if (normal[A] == 'y') { decrgpulse(pp, v1, 1.0e-6, 0.0); } if (declvlonoff) declvloff(); else decpower(dpwr); status(C); } }
pulsesequence() { /*DEFINE LOCAL VARIABLES */ double mix,control,sattime,spacing; int pattern,times,jj; char intsub[MAXSTR],cycle[MAXSTR],sspul[MAXSTR]; /* LOAD AND INITIALIZE VARIABLES */ getstr("intsub",intsub); getstr("cycle",cycle); getstr("sspul",sspul); control = getval("control"); sattime = getval("sattime"); spacing = getval("spacing"); pattern = (int)getval("pattern"); mix = getval("mix"); if (pattern == 0) pattern = 1; if (tau == 0.0) tau = 0.1; times = (int)(sattime/(pattern*tau)); /* CHECK CONDITIONS */ if (!newtrans) { fprintf(stdout,"REQUIRED: direct syn. RF and linear amplifiers.\n"); psg_abort(1); } /* CALCULATE PHASES */ if (intsub[0] == 'y') hlv(ct,v1); else assign(ct,v1); assign(v1,oph); if (intsub[0] == 'y') { mod2(ct,v14); /* trigger for the alteration of the saturation freq */ ifzero(v14); add(oph,two,oph); endif(v14); } /* BEGIN ACTUAL PULSE SEQUENCE CODE */ status(A); if (sspul[A] == 'y') { pulse(200*pw,zero); pulse(200*pw,one); } hsdelay(d1); obspower(satpwr); delay(0.2e-6); /*reduce xmtr leakage */ status(B); /* selective pulse or decoupler saturation */ /* no cycling or interleaved subtraction (make control an array)*/ if ((intsub[0] == 'n') && (cycle[0] == 'n')) { obsoffset(satfrq); rgpulse(sattime,zero,rof1,rof2); } /* interleaved subtraction without cycling */ if ((intsub[0] == 'y') && (cycle[0] == 'n')) { ifzero(v14); obsoffset(control); rgpulse(sattime,zero,rof1,rof2); elsenz(v14); obsoffset(satfrq); rgpulse(sattime,zero,rof1,rof2); endif(v14); } /* no interleaved subtraction but cycling is used (make cycle array)*/ if ((cycle[0] == 'y') && (intsub[0] == 'n')) { for (jj = 0; jj < times; jj++) { double startfrq; int i; startfrq = satfrq - (pattern/2)*spacing; if ((pattern %2) == 0) startfrq = startfrq + spacing/2.0; for (i = 0; i < pattern; i++) { obsoffset(startfrq); rgpulse(tau,zero,rof1,rof2); startfrq = startfrq + spacing; } } } /* interleaved subtraction with cycling (no array needed for one value of satfrq. Link array satfrq with pattern and spacing for multiple noe difference spectra within one experiment. For example set array = '(satfrq,pattern,spacing)') */ if ((cycle[0] == 'y') && (intsub[0] == 'y')) { ifzero(v14); for (jj = 0; jj < times; jj++) { double startfrq; int i; startfrq = control - (pattern/2)*spacing; if ((pattern %2) == 0) startfrq = startfrq + spacing/2.0; for (i = 0; i < pattern; i++) { obsoffset(startfrq); rgpulse(tau,zero,rof1,rof2); startfrq = startfrq + spacing; } } elsenz(v14); for (jj = 0; jj < times; jj++) { double startfrq; int i; startfrq = satfrq - (pattern/2)*spacing; if ((pattern %2) == 0) startfrq = startfrq + spacing/2.0; for (i = 0; i < pattern; i++) { obsoffset(startfrq); rgpulse(tau,zero,rof1,rof2); startfrq = startfrq + spacing; } } endif(v14); } /* restore power levels as controlled by tpwr */ obsoffset(tof); obspower(tpwr); status(C); /* NOE mixing time */ hsdelay(mix); status(D); /* sampling pulse */ rgpulse(pw,v1,rof1,rof2); }
void pulsesequence() { double p1lvl, trim, mix, window, cycles; char sspul[MAXSTR]; /* LOAD AND INITIALIZE VARIABLES */ mix = getval("mix"); trim = getval("trim"); p1lvl = getval("p1lvl"); window=getval("window"); getstr("sspul", sspul); /* CHECK CONDITIONS */ if ((phase1 != 3) && (arrayelements > 2)) { fprintf(stdout, "PHASE=3 is required if MIX is arrayed!\n"); psg_abort(1); } if (satdly > 9.999) { fprintf(stdout, "Presaturation period is too long.\n"); psg_abort(1); } if (!newtransamp) { fprintf(stdout, "TOCSY requires linear amplifiers on transmitter.\n"); fprintf(stdout, "Use DECTOCSY with the appropriate re-cabling,\n"); psg_abort(1); } if ((p1 == 0.0) && (ix == 1)) fprintf(stdout, "Warning: P1 has a zero value.\n"); if ((rof1 < 9.9e-6) && (ix == 1)) fprintf(stdout,"Warning: ROF1 is less than 10 us\n"); if (satpwr > 40) { printf("satpwr too large - acquisition aborted./n"); psg_abort(1); } /* STEADY-STATE PHASECYCLING */ /* This section determines if the phase calculations trigger off of (SS - SSCTR) or off of CT */ ifzero(ssctr); hlv(ct, v13); mod2(ct, v1); hlv(ct, v2); elsenz(ssctr); sub(ssval, ssctr, v12); /* v12 = 0,...,ss-1 */ hlv(v12, v13); mod2(v12, v1); hlv(v12, v2); endif(ssctr); /* CALCULATE PHASES */ /* A 2-step cycle is performed on the first pulse (90 degrees) to suppress axial peaks in the first instance. Second, the 2-step F2 quadrature image suppression subcycle is added to all pulse phases and receiver phase. Finally, a 2-step cycle is performed on the spin-lock pulses. */ mod2(v13, v13); dbl(v1, v1); incr(v1); hlv(v2, v2); mod2(v2, v2); dbl(v2, v2); incr(v2); add(v13, v2, v2); sub(v2, one, v3); add(two, v2, v4); add(two, v3, v5); add(v1, v13, v1); assign(v1, oph); if (phase1 == 2) incr(v1); if (phase1 == 3) add(v1, id2, v1); /*HYPERCOMPLEX MODE USES REDFIELD TRICK TO MOVE AXIAL PEAKS TO EDGE*/ if ((phase1==1)||(phase1==2)) { initval(2.0*(double)(d2_index%2),v6); add(v1,v6,v1); add(oph,v6,oph); } /* CALCULATE AND INITIALIZE LOOP COUNTER */ if (pw > 0.0) { cycles = (mix - trim) / (64.66*pw+32*window); cycles = 2.0*(double) (int) (cycles/2.0); } else { cycles = 0.0; } initval(cycles, v9); /* V9 is the MIX loop count */ /* BEGIN ACTUAL PULSE SEQUENCE CODE */ status(A); obspower(p1lvl); if (sspul[0] == 'y') { rgpulse(1000*1e-6, zero, rof1, 0.0e-6); rgpulse(1000*1e-6, one, 0.0e-6, rof1); } hsdelay(d1); if (satmode[A] == 'y') { obspower(satpwr); rgpulse(satdly,zero,rof1,rof2); obspower(p1lvl);} status(B); rgpulse(p1, v1, rof1, 1.0e-6); if (satmode[B] =='y') { if (d2 > 0.0) { obspower(satpwr); rgpulse(d2 - (2*POWER_DELAY) - 1.0e-6 - (2*p1/3.1416),zero,0.0,0.0); } } else { if (d2 > 0.0) delay(d2 - POWER_DELAY - 1.0e-6 - (2*p1/3.1416)); } rcvroff(); obsunblank(); obspower(tpwr); txphase(v3); xmtron(); delay(trim); if (cycles > 1.0) { starthardloop(v9); mleva(window); mleva(window); mlevb(window); mlevb(window); mlevb(window); mleva(window); mleva(window); mlevb(window); mlevb(window); mlevb(window); mleva(window); mleva(window); mleva(window); mlevb(window); mlevb(window); mleva(window); rgpulse(.66*pw,v3,rof1,rof2); endhardloop(); } txphase(v13); xmtroff(); /* detection */ delay(rof2); rcvron(); obsblank(); status(C); }
void pulsesequence() { double tunesw; /* Sweep width (Hz) */ double freq; /* Center freq (MHz) */ double fstart; /* Sweep start freq (MHz) */ double fend; /* Sweep end freq (MHz) */ int nfreqs; /* Number of frequencies */ int np2; /* Number of data points (np/2) */ int chan; /* RF xmit channel */ double attn; /* RF power */ double acqOffset; /* 0.0: sample at start of freq step */ /* 0.5: sample at middle of freq step */ /* 1.0: sample at end of freq step */ double offset_sec; int trig; /* If true, put scope trig on user line 1 */ char strbuf[MAXSTR]; /* Set RF channel and center frequency */ if (find("tchan") == -1) { chan = 1; } else { chan = (int) getval("tchan"); if (chan < 1) { chan = 1; } else if (chan > 5) { chan = 5; } } /* Set sweep limits */ freq = sfrq; tunesw = getval("tunesw"); if (tunesw < 0.0) { tunesw = 10e6; } fstart = freq - (tunesw/2) * 1e-6; fend = freq + (tunesw/2) * 1.0e-6; /* Set number of frequency steps */ nfreqs = np2 = (int)getval("np") / 2; /* Default one point per frequency */ if (find("tunfreqs") != -1) { nfreqs = (int)getval("tunfreqs"); if (np2 % nfreqs != 0) { printf("Warning: np/2 (%d) not divisible by tunfreqs (%d)\n", np2, nfreqs); } } /* Set acquisition timing */ acqOffset = 0.5; /* Default to middle of freq step */ if (find("tuacqoffset") != -1) { acqOffset = getval("tuacqoffset"); } /* Set RF power */ if (find("tupwr") == -1) { /* Optional parameter "tupwr" sets tune pwr */ attn = 10.0; } else { attn = getval("tupwr"); if (attn > 20.0) { attn = 20.0; } } /* Whether we want a scope trigger (is tutrig='y') */ trig = 0; if (find("tutrig") != -1) { getstr("tutrig", strbuf); if (*strbuf == 'y') { trig = 1; } } /* The pulse sequence */ status(A); hsdelay(d1); set4Tune(chan,getval("gain")); assign(zero,oph); genPower(attn,chan); delay(0.0001); /*printf("f0=%f, f1=%f, nfreqs=%d, center=%f, span=%f, step=%f\n", fstart, fend, nfreqs, (fend + fstart) / 2, (fend - fstart), (fend - fstart) / (nfreqs - 1)); */ /*DBG*/ if (trig) { sp1on(); } offset_sec = (acqOffset / sw) * np2 / nfreqs; SweepNOffsetAcquire(fstart, fend, nfreqs, chan, offset_sec); if (trig) { sp1off(); } }
pulsesequence() { char hmult[MAXSTR], chonly[MAXSTR], oddeven[MAXSTR]; double j1xh, pp, pplvl, dly3, dly4, phase; int iphase; /* Get new variables from parameter table */ pp = getval("pp"); j1xh = getval("j1xh"); getstr("hmult", hmult); getstr("chonly",chonly); getstr("oddeven",oddeven); phase = getval("phase"); iphase = (int)(phase + 0.5); pplvl = getval("pplvl"); /* Calculate delays */ dly3 = 1.0 / (2.0 * j1xh); if (chonly[0] == 'y') dly4 = dly3; else { if (iphase == 0) dly4 = 1.0/(3.0*j1xh); else { if (oddeven[0] == 'y') dly4 = 3.0/(4.0*j1xh); else dly4 = 1.0/(3.0*j1xh); } } /* PHASE CYCLING CALCULATION */ settable(t2,4,phs2); settable(t8,4,phs8); settable(t7,2,phs7); settable(t4,1,phs4); assign(zero, v1); /* v1 = 0 */ if (iphase == 2) incr(v1); /* hypercomplex phase increment */ if (iphase == 0) hlv(ct,v5); else assign(ct,v5); getelem(t2,v5,v2); getelem(t8,v5,v8); add(v8,one,v9); add(v2,two,v3); getelem(t7,v5,v7); getelem(t4,v5,v4); add(v4,one,v4); mod2(ct,v13); if (iphase == 0) add(v4,v13,v4); add(v4,v7,oph); add(v7,one,v6); initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v12); add(v1,v12,v1); add(oph,v12,oph); add(oph,two,oph); /* ACTUAL PULSE-SEQUENCE BEGINS */ status(A); if (dm[0] == 'y') { fprintf(stdout, "decoupler must be set as dm=nny\n"); psg_abort(1); } decpower(pplvl); hsdelay(d1); status(B); rcvroff(); delay(2.0e-5); decpulse(pp, v1); if (hmult[0] == 'y') { if (d2 > 0.0) delay(d2/2.0 - (2*pp/PI) - 2.33*pw - rof1); else delay(d2/2.0); rgpulse(pw, v8, rof1, 0.0); rgpulse(2.67*pw, v9, 0.0, 0.0); rgpulse(pw, v8, 0.0, rof1); if (d2 > 0.0) delay(d2/2.0 - 2.33*pw - rof1); else delay(d2/2.0); } else { if (d2 > 0.0) delay(d2/2.0 - (4*pp/PI)); else delay(d2/2.0); decpulse(pp, v2); delay(dly3 - rof1 - pw - 1.5 * pp); rgpulse(pw, v8, rof1, 0.0); simpulse(2.67*pw, 2.0*pp, v9, v2, 0.0, 0.0); rgpulse(pw, v8, 0.0, rof1); delay(dly3 - rof1 - pw - 1.5*pp); decpulse(pp, v3); if (d2 > 0.0) delay(d2/2.0 - (2*pp/PI)); else delay(d2/2.0); } if (iphase == 0) delay(dly3 - rof1); else { delay(dly3/2.0 - rof1 - 2.0*pp); /* composite C & H 180's */ simpulse(pw, pp, zero, zero, rof1, 0.0); simpulse(2.67*pw, 2.0*pp, one, one, 0.0, 0.0); simpulse(pw, pp, zero, zero, 0.0, rof1); delay(dly3/2.0 - 2.0*rof1 - 2*pp - (2*pp/3.1416)); } simpulse(pw, pp, v7, v4, rof1, rof2); delay(dly4/2.0 - 2.33*pp -(2*pp/PI) - rof2 - rof1); if (iphase != 0) { simpulse(pw, pp, v7, zero, rof1, 0.0); simpulse(2.0*pw, 2.67*pp, v6, one, 0.0, 0.0); simpulse(pw, pp, v7, zero, 0.0, rof2); } rcvron(); decpower(dpwr); delay(dly4/2.0 - POWER_DELAY - 2.33*pp); /* Observe period */ status(C); }
void pulsesequence() { double base, corr, presat, qlvl; char sspul[MAXSTR]; /* LOAD VARIABLES AND CHECK CONDITIONS */ presat = getval("presat"); qlvl = getval("qlvl"); getstr("sspul", sspul); base = 180.0 / qlvl; initval(2.0 * qlvl, v5); if ((rof1 < 9.9e-6) && (ix == 1)) fprintf(stdout,"Warning: ROF1 is less than 10 us\n"); /* STEADY-STATE PHASECYCLING */ /* This section determines if the phase calculations trigger off of (SS - SSCTR) or off of CT */ ifzero(ssctr); modn(ct, v5, v10); divn(ct, v5, v12); mod2(ct, v9); elsenz(ssctr); sub(ssval, ssctr, v14); /* v14 = 0,...,ss-1 */ modn(v14, v5, v10); divn(v14, v5, v12); mod2(v14, v9); endif(ssctr); /* CALCULATE PHASECYCLE */ /* The phasecycle first performs a (2*Q)-step cycle on the third pulse in order to select for MQC. The phasecycle is then adjusted so that the receiver goes +- in an alternating fashion. Second, the 2-step QIS cycle is added in. Third, a 2-step cycle for axial peak suppression is performed on the first pulse. */ assign(v12, v1); mod2(v12, v12); /* v12=quad. image suppression */ hlv(v1, v1); mod2(v1, v1); dbl(v1, v1); add(v1, v12, v4); add(v12, v1, v1); assign(v12, v2); assign(v12, v3); dbl(v9, v9); add(v9, v4, v4); assign(v4, oph); if (phase1 == 2) incr(v1); if (phase1 == 3) /* TPPI */ add(id2, v1, v1); /* FAD added for phase=1 or phase=2 */ if ((phase1 == 1) || (phase1 == 2)) { initval(2.0*(double)(d2_index%2),v13); add(v1,v13,v1); add(oph,v13,oph); } /* BEGIN ACTUAL PULSE SEQUENCE CODE */ if (newtrans) obsstepsize(base); status(A); if (sspul[0] == 'y') { hsdelay(hst + 0.001); rgpulse(pw, v1, 1.0e-6, 1.0e-6); hsdelay(hst + 0.001); } if ((d1 - presat) <= hst) { rcvroff(); decon(); hsdelay(presat); decoff(); delay(1.0e-6); rcvron(); } else { hsdelay(d1 - presat); decon(); rcvroff(); delay(presat); decoff(); delay(1.0e-6); rcvron(); } status(B); if (newtrans) xmtrphase(v10); /* hardware digital phaseshift */ rgpulse(pw, v1, rof1, 1.0e-6); corr = 1.0e-6 + rof1 + 4.0*pw/3.1416; if (d2 > corr) delay(d2-corr); rgpulse(pw, v2, rof1, 0.0); if (newtrans) { xmtrphase(zero); /* resets relative phase to absolute phase */ } else { phaseshift(-base, v10, OBSch); /* software small-angle phaseshift */ } rgpulse(pw, v3, 1.0e-6, rof2); status(C); }
pulsesequence() { /* DECLARE VARIABLES */ char fscuba[MAXSTR],f1180[MAXSTR],fsat[MAXSTR],mess_flg[MAXSTR], shp_flg[MAXSTR],shp_sl[MAXSTR]; int phase, t1_counter; double hscuba, /* length of 1/2 scuba delay */ tauxh, /* 1 / 4J(XH) */ pwN, /* PW90 for X-nuc on channel 3 */ tsatpwr, /* low power level for presat */ pwNlvl, /* power level for X hard pulses */ jxh, /* coupling for XH */ tau1, /* t1/2 */ sw1, tpwrmess, /* power level for Messerlie purge */ dly_pg1, /* duration of first part of purge */ tpwrsl, pw_sl, d1_wait, gzlvl1, gt1, gzlvl2, gt2; /* LOAD VARIABLES */ jxh = getval("jxh"); pwN = getval("pwN"); tsatpwr = getval("tsatpwr"); pwNlvl = getval("pwNlvl"); hscuba = getval("hscuba"); phase = (int) (getval("phase") + 0.5); sw1 = getval("sw1"); tpwrmess = getval("tpwrmess"); dly_pg1 = getval("dly_pg1"); d1_wait = getval("d1_wait"); tpwrsl = getval("tpwrsl"); pw_sl = getval("pw_sl"); gzlvl1 = getval("gzlvl1"); gt1 = getval("gt1"); gzlvl2 = getval("gzlvl2"); gt2 = getval("gt2"); getstr("fscuba",fscuba); getstr("fsat",fsat); getstr("f1180",f1180); getstr("shp_flg",shp_flg); getstr("mess_flg",mess_flg); getstr("shp_sl",shp_sl); /* check validity of parameter range */ if((dm2[A] == 'y' || dm2[B] == 'y')) { printf("incorrect Dec2 decoupler flags! "); psg_abort(1); } if((dm[A] == 'y' || dm[B] == 'y' || dm[C] == 'y' )) { printf("incorrect Dec decoupler flags! "); psg_abort(1); } if( tsatpwr > 8 ) { printf("tsatpwr too large !!! "); psg_abort(1); } if( dpwr > 10 ) { printf("don't fry the probe, dpwr too large! "); psg_abort(1); } if( dpwr2 > 50 ) { printf("don't fry the probe, dpwr2 too large! "); psg_abort(1); } if( pwNlvl > 63 ) { printf("don't fry the probe, pwNlvl too large! "); psg_abort(1); } if(tpwrmess > 55) { printf("dont fry the probe, tpwrmess too large < 55"); psg_abort(1); } if(dly_pg1 > 0.010) { printf("dont fry the probe, dly_pg1 is too long < 10 ms"); psg_abort(1); } if(gt1 > 15.0e-3 || gt2 > 15.0e-3) { printf("gti is too long\n"); psg_abort(1); } if(tpwrsl > 25) { printf("tpwrsl is too high\n"); psg_abort(1); } /* LOAD VARIABLES */ settable(t1, 1, phi1); settable(t2, 2, phi2); settable(t3, 8, phi3); settable(t4, 16, phi4); settable(t5, 16, rec); /* INITIALIZE VARIABLES */ tauxh = ((jxh != 0.0) ? 1/(2*(jxh)) : 3.57e-3); /* Phase incrementation for hypercomplex data */ if ( phase == 2 ) /* Hypercomplex in t1 */ { tsadd(t2, 1, 4); } /* calculate modifications to phases based on current t1 values to achieve States-TPPI acquisition */ if(ix==1) d2_init = d2; t1_counter = (int) ( (d2-d2_init)*sw1 + 0.5); if(t1_counter %2) { tsadd(t2,2,4); tsadd(t5,2,4); } /* set up so that get (-90,180) phase corrects in F1 if f1180 flag is y */ tau1 = d2; if(f1180[A] == 'y') tau1 += ( 1.0/(2.0*sw1) - 2.0*pw - 4.0/PI*pwN ); else tau1 = tau1 - 2.0*pw - 4.0/PI*pwN; if(tau1 < 0.2e-6) tau1 = 0.4e-6; tau1 = tau1/2.0; /* BEGIN ACTUAL PULSE SEQUENCE */ status(A); obspower(tsatpwr); /* Set power for presaturation */ decpower(dpwr); /* Set decoupler1 power to dpwr */ dec2power(pwNlvl); /* Set decoupler2 power to pwNlvl */ /* Presaturation Period */ if (mess_flg[A] == 'y') { obspower(tpwrmess); rgpulse(dly_pg1,zero,2.0e-6,2.0e-6); rgpulse(dly_pg1/1.62,one,2.0e-6,2.0e-6); obspower(tsatpwr); } if(fsat[0] == 'y') { txphase(zero); if(d1_wait == 0.0) rgpulse(d1,zero,2.0e-6,2.0e-6); /* presaturation */ else { delay(d1_wait); rgpulse(d1,zero,2.0e-6,2.0e-6); } obspower(tpwr); /* Set power for hard pulses */ if (fscuba[0] == 'y') /* Scuba pulse sequence */ { hsdelay(hscuba); rgpulse(pw,zero,1.0e-6,0.0); /* 90x180y90x */ rgpulse(2*pw,one,1.0e-6,0.0); rgpulse(pw,zero,1.0e-6,0.0); txphase(zero); delay(hscuba); } } else { obspower(tpwr); /* Set power for hard pulses */ delay(d1); } status(B); obspower(tpwr); rcvroff(); delay(20.0e-6); if (shp_flg[A] == 'y') { /* shaped pulse */ obspower(tpwrsl); shaped_pulse(shp_sl,pw_sl,two,2.0e-6,0.0); delay(2.0e-6); obspower(tpwr); /* shaped pulse */ delay(2.0e-6); zgradpulse(gzlvl1,gt1); delay(1000.0e-6); } rgpulse(pw,t1,1.0e-6,0.0); /* proton excit. pulse, */ /* shaped pulse */ obspower(tpwrsl); shaped_pulse(shp_sl,pw_sl,two,2.0e-6,0.0); delay(2.0e-6); obspower(tpwr); /* shaped pulse */ txphase(t3); dec2phase(t2); delay(2.0e-6); zgradpulse(gzlvl2,gt2); delay(2.0e-6); delay(tauxh - gt2 - 4.0e-6 - pw_sl); /* delay=1/2J(XH) */ dec2rgpulse(pwN,t2,0.0,0.0); dec2phase(t4); delay(tau1); /* delay=t2/2 */ rgpulse(2*pw,t3,0.0,0.0); delay(tau1); /* delay=t2/2 */ dec2rgpulse(pwN,t4,0.0,0.0); /* shaped pulse */ obspower(tpwrsl); shaped_pulse(shp_sl,pw_sl,one,2.0e-6,0.0); delay(2.0e-6); obspower(tpwr); /* shaped pulse */ dec2power(dpwr2); /* lower decoupler power for decoupling on decouper channel 2 */ delay(2.0e-6); zgradpulse(gzlvl2,gt2); delay(tauxh - POWER_DELAY - gt2 - 4.0e-6 - 2.0e-6 - pw_sl); rgpulse(pw,one,2.0e-6,0.0); /* acquire data */ status(C); setreceiver(t5); }
void pulsesequence() { double gzlvl1, gzlvl2, gzlvl3; double gt1, gt2, gt3; double grise, gstab; double mix, phase; int icosel; /* GATHER AND INITALIZE VARIABLES */ gzlvl1 = getval("gzlvl1"); gt1 = getval("gt1"); gzlvl2 = getval("gzlvl2"); gt2 = getval("gt2"); gzlvl3 = getval("gzlvl3"); gt3 = getval("gt3"); grise = getval("grise"); gstab = getval("gstab"); mix = getval("mix"); phase = getval("phase"); if (phase == 1.0) icosel = 1; if (phase == 2.0) icosel = -1; /* CALCULATE PHASES */ /* ct = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */ mod2(ct,v1); /*v1 = 0 1 0 1 0 1 0 1 */ dbl(v1,v1); /* = 0 2 0 2 0 2 0 2 */ hlv(ct,v2); /*v2 = 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 */ hlv(ct,v2); /* = 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 */ dbl(v2,v2); /* = 0 0 0 0 2 2 2 2 4 4 4 4 6 6 6 6 */ add(ct,v2,v4); /*v4 = 0 1 2 3 6 7 8 9 12 13 14 15 18 19 20 21 */ hlv(v2,v2); /*v2 = 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 */ hlv(v2,v2); /* = 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 */ mod2(v2,v2); /* = 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 */ dbl(v2,v2); /* = 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 */ hlv(ct,v3); /*v3 = 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 */ mod4(v3,v3); /* = 0 0 1 1 2 2 3 3 0 0 1 1 2 2 3 3 */ mod4(v4,v4); /* = 0 1 2 3 2 3 0 1 0 1 2 3 2 3 0 1 */ mod2(ct,v5); /*v5 = 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 */ add(ct,v5,v5); /* = 0 1 3 4 4 5 7 8 8 9 11 12 12 13 15 16 */ mod4(v5,v5); /* = 0 1 3 0 0 1 3 0 0 1 3 0 0 1 3 0 */ add(v5,v4,v4); /*v4 = 0 2 5 3 2 4 3 1 0 2 5 3 2 4 3 1 */ mod4(v4,v4); /* = 0 2 1 3 2 0 3 1 0 2 1 3 2 0 3 1 */ /* CHECK CONDITIONS */ if ((rof1 < 9.9e-6) && (ix == 1)) printf("Warning: ROF1 is less than 10 us\n"); /* BEGIN PULSE SEQUENCE */ status(A); delay(d1); status(B); rgpulse(pw, v1, rof1, 1.0e-6); delay(gt1 + grise + grise + 24.4e-6 - 1.0e-6 - rof1); rgpulse(pw*2.0, v1, rof1, 1.0e-6); if (d2 > 0.0) delay(d2 - 1.0e-6 - rof1 - (4.0*pw/3.14159)); zgradpulse(gzlvl1,gt1+grise); delay(grise); rgpulse(pw, v2, rof1, 1.0e-6); status(C); zgradpulse(gzlvl2,gt2+grise); delay(grise); hsdelay(mix-gt2); status(D); rgpulse(pw, v3, rof1, rof2); delay(gt3 + grise + grise + gstab + 24.4e-6 - rof2 - rof1); rgpulse(pw*2.0, v3, rof1, rof2); zgradpulse(gzlvl3*icosel,gt3+grise); delay(grise); delay(gstab); assign(v4,oph); }