pulsesequence() { double j1xh, dly3, gzlvlE, gtE, EDratio, pp, pplvl, dly4; int icosel, phase1 = (int)(getval("phase")+0.5); //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtE = syncGradTime("gtE","gzlvlE",0.5); gzlvlE = syncGradLvl("gtE","gzlvlE",0.5); /* Get new variables from parameter table */ j1xh = getval("j1xh"); pp = getval("pp"); gzlvlE = getval("gzlvlE"); gtE = getval("gtE"); EDratio = getval("EDratio"); pplvl = getval("pplvl"); icosel = -1; dly3 = 1.0 / (2.0 * j1xh); dly4 = 3.0/(4.0*j1xh); /* PHASE CYCLING CALCULATION */ settable(t2,4,ph2); settable(t8,4,ph8); settable(t7,2,ph7); assign(zero, v1); /* v1 = 0 */ getelem(t2,ct,v2); getelem(t7,ct,v7); add(v2,two,v3); sub(v7,one,oph); add(v7,one,v6); if ((phase1 == 2) || (phase1 == 5)) icosel = 1; /* mod2(id2,v12); dbl(v12,v12); */ initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v12); add(v1,v12,v1); add(oph,v12,oph); /* ACTUAL PULSE-SEQUENCE BEGINS */ status(A); obspower(tpwr); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); satpulse(satdly,zero,rof1,rof1); } else delay(d1); if (getflag("wet")) wet4(zero,one); decpower(pplvl); status(B); decpulse(pp, v1); if (d2/2.0 > 0.0) delay(d2/2.0 - (4*pp/PI)); else delay(d2/2.0); decpulse(pp, v2); delay(dly3); simpulse(2*pw, 2.0*pp, t8, v2, 2.0e-6, 2.0e-6); delay(dly3); decpulse(pp, v3); if (d2/2.0 > 0.0) delay(d2/2.0 - (2*pp/PI)); else delay(d2/2.0); delay(dly3/2.0); simpulse(2*pw, 2.0*pp, one, one, rof1, rof1); zgradpulse(2*gzlvlE*EDratio,gtE/2.0); delay(dly3/2.0 - gtE/2.0 - 2*GRADIENT_DELAY - (2*pp/PI) - rof1); simpulse(pw, pp, v7, one, rof1, rof1); delay(dly4/2.0 - (2*pp/PI) - 2*rof1); simpulse(2.0*pw, 2*pp, v6, one, rof1, rof2); decpower(dpwr); zgradpulse(icosel*gzlvlE,gtE); delay(dly4/2.0 - POWER_DELAY - gtE - 2*GRADIENT_DELAY); /* Observe period */ status(C); }
pulsesequence() { double slpwrT = getval("slpwrT"), slpwT = getval("slpwT"), mixT = getval("mixT"), gzlvl1 = getval("gzlvl1"), gt1 = getval("gt1"), gzlvl2 = getval("gzlvl2"), gt2 = getval("gt2"), gstab = getval("gstab"), selpwrA = getval("selpwrA"), selpwA = getval("selpwA"), gzlvlA = getval("gzlvlA"), gtA = getval("gtA"), selpwrB = getval("selpwrB"), selpwB = getval("selpwB"), gzlvlB = getval("gzlvlB"), gtB = getval("gtB"), selfrq = getval("selfrq"), zqfpw1 = getval("zqfpw1"), zqfpwr1 = getval("zqfpwr1"), zqfpw2 = getval("zqfpw2"), zqfpwr2 = getval("zqfpwr2"), gzlvlzq1 = getval("gzlvlzq1"), gzlvlzq2 = getval("gzlvlzq2"); char slpatT[MAXSTR], selshapeA[MAXSTR], selshapeB[MAXSTR], zqfpat1[MAXSTR], zqfpat2[MAXSTR]; //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtA = syncGradTime("gtA","gzlvlA",1.0); gzlvlA = syncGradLvl("gtA","gzlvlA",1.0); gtB = syncGradTime("gtB","gzlvlB",1.0); gzlvlB = syncGradLvl("gtB","gzlvlB",1.0); getstr("slpatT",slpatT); getstr("selshapeA",selshapeA); getstr("selshapeB",selshapeB); getstr("zqfpat1",zqfpat1); getstr("zqfpat2",zqfpat2); if (strcmp(slpatT,"mlev17c") && strcmp(slpatT,"dipsi2") && strcmp(slpatT,"dipsi3") && strcmp(slpatT,"mlev17") && strcmp(slpatT,"mlev16")) abort_message("SpinLock pattern %s not supported!.\n", slpatT); /* STEADY-STATE PHASECYCLING */ /* This section determines if the phase calculations trigger off of (SS - SSCTR) or off of CT */ ifzero(ssctr); assign(ct,v13); elsenz(ssctr); sub(ssval, ssctr, v13); /* v13 = 0,...,ss-1 */ endif(ssctr); mod4(v13,v1); /* v1 = 0 1 2 3 */ hlv(v13,v13); hlv(v13,v13); mod4(v13,v11); /* v11 = 0000 1111 2222 3333 */ dbl(v1,oph); add(v11,oph,oph); add(v11,oph,oph); /* oph = 2v1 + 2v11 */ /* CYCLOPS */ hlv(v13,v13); hlv(v13,v14); add(v1,v14,v1); add(v11,v14,v11); add(oph,v14,oph); assign(v14,v3); add(one,v3,v3); add(two,v3,v12); sub(v3,one,v2); add(v3,one,v4); add(v3,two,v5); /* BEGIN THE ACTUAL PULSE SEQUENCE */ status(A); obspower(tpwr); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); satpulse(satdly,v6,rof1,rof1); } else delay(d1); if (getflag("wet")) wet4(zero,one); status(B); rgpulse(pw, v14, rof1, rof1); if (selfrq != tof) obsoffset(selfrq); zgradpulse(gzlvlA,gtA); delay(gstab); obspower(selpwrA); shaped_pulse(selshapeA,selpwA,v1,rof1,rof1); obspower(tpwr); zgradpulse(gzlvlA,gtA); delay(gstab); if (selfrq != tof) delay(2*OFFSET_DELAY); zgradpulse(gzlvlB,gtB); delay(gstab); obspower(selpwrB); shaped_pulse(selshapeB,selpwB,v11,rof1,rof1); obspower(tpwr); zgradpulse(gzlvlB,gtB); delay(gstab); if (selfrq != tof) obsoffset(tof); rgpulse(pw, v14, rof1, rof1); if (getflag("Gzqfilt")) { obspower(zqfpwr1); rgradient('z',gzlvlzq1); delay(100.0e-6); shaped_pulse(zqfpat1,zqfpw1,v14,rof1,rof1); delay(100.0e-6); rgradient('z',0.0); delay(gstab); } obspower(slpwrT); zgradpulse(gzlvl1,gt1); delay(gstab); if (mixT > 0.0) { if (dps_flag) rgpulse(mixT,v3,0.0,0.0); else SpinLock(slpatT,mixT,slpwT,v2,v3,v4,v5, v9); } if (getflag("Gzqfilt")) { obspower(zqfpwr2); rgradient('z',gzlvlzq2); delay(100.0e-6); shaped_pulse(zqfpat2,zqfpw2,v14,rof1,rof1); delay(100.0e-6); rgradient('z',0.0); delay(gstab); } obspower(tpwr); zgradpulse(gzlvl2,gt2); delay(gstab); rgpulse(pw,v14,rof1,rof2); status(C); }
pulsesequence() { double slpwrT = getval("slpwrT"), slpwT = getval("slpwT"), mixT = getval("mixT"), trim = getval("trim"), tauz1 = getval("tauz1"), tauz2 = getval("tauz2"), tauz3 = getval("tauz3"), tauz4 = getval("tauz4"), selpwrA = getval("selpwrA"), selpwA = getval("selpwA"), gzlvlA = getval("gzlvlA"), gtA = getval("gtA"), selpwrB = getval("selpwrB"), selpwB = getval("selpwB"), gzlvlB = getval("gzlvlB"), gtB = getval("gtB"), gstab = getval("gstab"), selfrq = getval("selfrq"); char selshapeA[MAXSTR], selshapeB[MAXSTR], slpatT[MAXSTR], alt_grd[MAXSTR]; //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtA = syncGradTime("gtA","gzlvlA",1.0); gzlvlA = syncGradLvl("gtA","gzlvlA",1.0); gtB = syncGradTime("gtB","gzlvlB",1.0); gzlvlB = syncGradLvl("gtB","gzlvlB",1.0); getstr("slpatT",slpatT); getstr("selshapeA",selshapeA); getstr("selshapeB",selshapeB); getstr("alt_grd",alt_grd); /* alternate gradient sign on every 2nd transient */ if (strcmp(slpatT,"mlev17c") && strcmp(slpatT,"dipsi2") && strcmp(slpatT,"dipsi3") && strcmp(slpatT,"mlev17") && strcmp(slpatT,"mlev16")) abort_message("SpinLock pattern %s not supported!.\n", slpatT); assign(ct,v17); assign(v17,v6); if (getflag("zqfilt")) { hlv(v6,v6); hlv(v6,v6); } settable(t1,4,ph1); getelem(t1,v6,v1); settable(t3,8,ph3); getelem(t3,v6,v11); settable(t4,8,ph4); settable(t5,4,ph5); getelem(t5,v6,v5); settable(t2,4,ph2); getelem(t2,v6,v2); settable(t7,8,ph7); getelem(t7,v6,v7); settable(t8,4,ph8); getelem(t8,v6,v8); settable(t11,16,phs8); getelem(t11,v6,v3); /* 1st echo in ES */ settable(t12,16,phs9); getelem(t12,v6,v4); /* 2nd exho in ES */ if (getflag("zqfilt")) getelem(t4,v6,oph); else assign(v1,oph); add(oph,v5,oph); mod4(oph,oph); sub(v2,one,v21); add(v21,two,v23); mod4(ct,v10); if (alt_grd[0] == 'y') mod2(ct,v12); /* alternate gradient sign on every 2nd transient */ /* BEGIN THE ACTUAL PULSE SEQUENCE */ status(A); if (getflag("lkgate_flg")) lk_sample(); /* turn lock sampling on */ obspower(tpwr); delay(5.0e-5); if (getflag("sspul")) steadystate(); delay(d1); if (getflag("lkgate_flg")) lk_hold(); /* turn lock sampling off */ status(B); rgpulse(pw, v1, rof1, rof1); if (selfrq != tof) obsoffset(selfrq); ifzero(v12); zgradpulse(gzlvlA,gtA); elsenz(v12); zgradpulse(-gzlvlA,gtA); endif(v12); delay(gstab); obspower(selpwrA); shaped_pulse(selshapeA,selpwA,v1,rof1,rof1); obspower(tpwr); ifzero(v12); zgradpulse(gzlvlA,gtA); elsenz(v12); zgradpulse(-gzlvlA,gtA); endif(v12); delay(gstab); if (selfrq != tof) delay(2*OFFSET_DELAY); ifzero(v12); zgradpulse(gzlvlB,gtB); elsenz(v12); zgradpulse(-gzlvlB,gtB); endif(v12); delay(gstab); obspower(selpwrB); shaped_pulse(selshapeB,selpwB,v2,rof1,rof1); obspower(slpwrT); ifzero(v12); zgradpulse(gzlvlB,gtB); elsenz(v12); zgradpulse(-gzlvlB,gtB); endif(v12); delay(gstab); if (selfrq != tof) obsoffset(tof); if (mixT > 0.0) { rgpulse(trim,v11,0.0,0.0); if (dps_flag) rgpulse(mixT,v21,0.0,0.0); else SpinLock(slpatT,mixT,slpwT,v21); } if (getflag("zqfilt")) { obspower(tpwr); rgpulse(pw,v7,1.0e-6,rof1); ifzero(v10); delay(tauz1); endif(v10); decr(v10); ifzero(v10); delay(tauz2); endif(v10); decr(v10); ifzero(v10); delay(tauz3); endif(v10); decr(v10); ifzero(v10); delay(tauz4); endif(v10); rgpulse(pw,v8,rof1,2.0e-6); } ExcitationSculpting(v3,v4,v12); delay(rof2); status(C); }
pulsesequence() { double gstab = getval("gstab"), gt1 = getval("gt1"), gzlvl1 = getval("gzlvl1"), gt2 = getval("gt2"), gzlvl2 = getval("gzlvl2"), satpwr = getval("satpwr"), satdly = getval("satdly"), del = getval("del"), del2 = getval("del2"), dosyfrq = getval("sfrq"), gzlvlhs = getval("gzlvlhs"), hsgt = getval("hsgt"), Ddelta,dosytimecubed; char convcomp[MAXSTR],satmode[MAXSTR],alt_grd[MAXSTR],lkgate_flg[MAXSTR], sspul[MAXSTR]; getstr("convcomp",convcomp); getstr("satmode",satmode); getstr("alt_grd",alt_grd); getstr("lkgate_flg",lkgate_flg); getstr("sspul",sspul); //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gt1 = syncGradTime("gt1","gzlvl1",1.0); gzlvl1 = syncGradLvl("gt1","gzlvl1",1.0); gt2 = syncGradTime("gt2","gzlvl2",1.0); gzlvl2 = syncGradLvl("gt2","gzlvl2",1.0); /* CHECK CONDITIONS */ 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); Ddelta=gt1; /*the diffusion-encoding pulse width is gt1*/ if (convcomp[A]=='y') dosytimecubed=Ddelta*Ddelta*(del - (4.0*Ddelta/3.0)); else dosytimecubed=Ddelta*Ddelta*(del - (Ddelta/3.0)); putCmd("makedosyparams(%e,%e)\n",dosytimecubed,dosyfrq); mod2(ct,v10); /* gradients change sign at odd transients */ /* BEGIN ACTUAL SEQUENCE */ status(A); if (sspul[0]=='y') { zgradpulse(gzlvlhs,hsgt); rgpulse(pw,zero,rof1,rof1); zgradpulse(gzlvlhs,hsgt); } if (satmode[0] == 'y') { if (d1 - satdly > 0) delay(d1 - satdly); obspower(satpwr); rgpulse(satdly,zero,rof1,rof1); obspower(tpwr); } else delay(d1); if (getflag("wet")) wet4(zero,one); status(B); if (del>0.0) { if (convcomp[A]=='y') { if (lkgate_flg[0] == 'y') lk_hold(); /* turn lock sampling off */ if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-gzlvl2,2.0*gt2); elsenz(v10); zgradpulse(gzlvl2,2.0*gt2); endif(v10); } else zgradpulse(-gzlvl2,2.0*gt2); delay(gstab); rgpulse(pw, v1, rof1, rof1); delay(d2/2.0); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); if (satmode[1] == 'y') { obspower(satpwr); rgpulse(((del+del2)/4)-gt1-2.0*rof1,zero,rof1,rof1); obspower(tpwr); } else delay(((del+del2)/4)-gt1); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1); elsenz(v10); zgradpulse(gzlvl1,gt1); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1); elsenz(v10); zgradpulse(gzlvl1,gt1); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1); if (satmode[1] == 'y') { obspower(satpwr); rgpulse(((del-del2)/4)-gt1-2.0*rof1,zero,rof1,rof1); obspower(tpwr); } else delay(((del-del2)/4)-gt1); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl2,gt2); elsenz(v10); zgradpulse(-1.0*gzlvl2,gt2); endif(v10); } else zgradpulse(gzlvl2,gt2); delay(gstab); rgpulse(p1, v2, rof1, rof1); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl2,gt2); elsenz(v10); zgradpulse(-1.0*gzlvl2,gt2); endif(v10); } else zgradpulse(gzlvl2,gt2); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); if (satmode[1] == 'y') { obspower(satpwr); rgpulse(((del-del2)/4)-gt1-2.0*rof1,zero,rof1,rof1); obspower(tpwr); } else delay(((del-del2)/4)-gt1); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1); elsenz(v10); zgradpulse(gzlvl1,gt1); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1); elsenz(v10); zgradpulse(gzlvl1,gt1); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1); if (satmode[1] == 'y') { obspower(satpwr); rgpulse(((del+del2)/4)-gt1-2.0*rof1,zero,rof1,rof1); obspower(tpwr); } else delay(((del+del2)/4)-gt1); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); delay(gstab); delay(d2/2.0); if (lkgate_flg[0] == 'y') lk_sample(); /* turn lock sampling on */ } else { rgpulse(pw, v1, rof1, rof1); if (lkgate_flg[0] == 'y') lk_hold(); /* turn lock sampling off */ delay(d2/2.0); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); if (satmode[1] == 'y') { obspower(satpwr); rgpulse((del-p1-2.0*rof1-gt1)/2.0-2.0*rof1,zero,rof1,rof1); obspower(tpwr); } else delay((del-p1-2.0*rof1-gt1)/2.0); rgpulse(p1, v2, rof1, rof1); if (satmode[1] == 'y') { obspower(satpwr); rgpulse((del-p1-2.0*rof1-gt1)/2.0-2.0*rof1,zero,rof1,rof1); obspower(tpwr); } else delay((del-p1-2.0*rof1-gt1)/2.0); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); delay(gstab); delay(d2/2.0); if (lkgate_flg[0] == 'y') lk_sample(); /* turn lock sampling on */ } } else rgpulse(pw,oph,rof1,rof2); status(C); }
pulsesequence() { double gtE = getval("gtE"), gzlvlE=getval("gzlvlE"), selpwrPS = getval("selpwrPS"), selpwPS = getval("selpwPS"), gzlvlPS = getval("gzlvlPS"), droppts=getval("droppts"), gstab = getval("gstab"); int prgcycle=(int)(getval("prgcycle")+0.5); char selshapePS[MAXSTR]; //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtE = syncGradTime("gtE","gzlvlE",1.0); gzlvlE = syncGradLvl("gtE","gzlvlE",1.0); getstr("selshapePS",selshapePS); assign(ct,v17); assign(zero,v18); assign(zero,v19); if (getflag("prgflg") && (satmode[0] == 'y') && (prgcycle > 1.5)) { hlv(ct,v17); mod2(ct,v18); dbl(v18,v18); if (prgcycle > 2.5) { hlv(v17,v17); hlv(ct,v19); mod2(v19,v19); dbl(v19,v19); } } settable(t1,4,ph1); settable(t2,32,ph2); settable(t3,8,ph3); settable(t4,16,ph4); getelem(t1,v17,v1); getelem(t2,v17,v2); getelem(t3,v17,v3); getelem(t4,v17,v4); assign(v4,oph); assign(v1,v6); add(oph,v18,oph); add(oph,v19,oph); /* BEGIN THE ACTUAL PULSE SEQUENCE */ status(A); obspower(tpwr); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); if (getflag("slpsat")) { shaped_satpulse("relaxD",satdly,v6); if (getflag("prgflg")) shaped_purge(v1,v6,v18,v19); } else { satpulse(satdly,v6,rof1,rof1); if (getflag("prgflg")) purge(v1,v6,v18,v19); } } else delay(d1); if (getflag("wet")) wet4(zero,one); status(B); obspower(tpwr); rgpulse(pw, v1, rof1, rof2); delay(d2/2.0); delay((0.25/sw1) - gtE - gstab - 2*pw/PI - rof2 - 2*GRADIENT_DELAY); zgradpulse(gzlvlE,gtE); delay(gstab); rgpulse(2*pw,v2,rof1,rof1); delay(0.25/sw1); delay(gstab); zgradpulse(-1.0*gzlvlE,gtE); delay(gstab); obspower(selpwrPS); rgradient('z',gzlvlPS); shaped_pulse(selshapePS,selpwPS,v3,rof1,rof1); rgradient('z',0.0); obspower(tpwr); delay(gstab); zgradpulse(-2.0*gzlvlE,gtE); delay(gstab - droppts/sw); delay(d2/2.0); status(C); }
void pulsesequence() { double mixN = getval("mixN"), gzlvlC = getval("gzlvlC"), gtC = getval("gtC"), gstab = getval("gstab"), selpwrA = getval("selpwrA"), selpwA = getval("selpwA"), gzlvlA = getval("gzlvlA"), gtA = getval("gtA"), selpwrB = getval("selpwrB"), selpwB = getval("selpwB"), gzlvlB = getval("gzlvlB"), gtB = getval("gtB"), selfrq = getval("selfrq"), zqfpw3 = getval("zqfpw3"), zqfpwr3 = getval("zqfpwr3"), gzlvlzq3 = getval("gzlvlzq3"), mixNcorr, sweeppw = getval("sweeppw"), sweeppwr = getval("sweeppwr"); char sweepshp[MAXSTR], selshapeA[MAXSTR], selshapeB[MAXSTR], zqfpat3[MAXSTR]; //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtC = syncGradTime("gtC","gzlvlC",1.0); gzlvlC = syncGradLvl("gtC","gzlvlC",1.0); gtA = syncGradTime("gtA","gzlvlA",1.0); gzlvlA = syncGradLvl("gtA","gzlvlA",1.0); gtB = syncGradTime("gtB","gzlvlB",1.0); gzlvlB = syncGradLvl("gtB","gzlvlB",1.0); getstr("sweepshp",sweepshp); getstr("selshapeA",selshapeA); getstr("selshapeB",selshapeB); getstr("zqfpat3",zqfpat3); mixNcorr=0.0; if (getflag("Gzqfilt")) mixNcorr=getval("zqfpw3"); hlv(ct,v1); hlv(v1,v1); hlv(v1,v1); hlv(v1,v1); mod4(v1,v1); mod4(ct,v2); add(v1,v2,v2); hlv(ct,v3); hlv(v3,v3); mod4(v3,v3); add(v1,v3,v3); dbl(v3,v4); dbl(v2,oph); add(oph,v4,oph); add(oph,v1,oph); /* BEGIN THE ACTUAL PULSE SEQUENCE */ status(A); obspower(tpwr); delay(5.0e-5); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); satpulse(satdly,zero,rof1,rof1); } else delay(d1); if (getflag("wet")) wet4(zero,one); status(B); if (selfrq != tof) obsoffset(selfrq); rgpulse(pw, v1, rof1, rof1); if (selfrq != tof) obsoffset(selfrq); zgradpulse(gzlvlA,gtA); delay(gstab); obspower(selpwrA); shaped_pulse(selshapeA,selpwA,v2,rof1,rof1); obspower(tpwr); zgradpulse(gzlvlA,gtA); delay(gstab); if (selfrq != tof) delay(2*OFFSET_DELAY); zgradpulse(gzlvlB,gtB); delay(gstab); obspower(selpwrB); shaped_pulse(selshapeB,selpwB,v3,rof1,rof1); obspower(tpwr); zgradpulse(gzlvlB,gtB); delay(gstab); if (selfrq != tof) obsoffset(tof); rgpulse(pw,v1,rof1,rof1); obspower(sweeppwr); delay(0.31*mixN); zgradpulse(gzlvlC,gtC); delay(gstab); shaped_pulse(sweepshp,sweeppw,zero,rof1,rof1); delay(gstab); zgradpulse(-gzlvlC,gtC); delay(0.49*mixN); zgradpulse(-gzlvlC,2*gtC); delay(gstab); if (getflag("Gzqfilt")) { obspower(zqfpwr3); rgradient('z',gzlvlzq3); delay(100.0e-6); shaped_pulse(zqfpat3,zqfpw3,zero,rof1,rof1); delay(100.0e-6); rgradient('z',0.0); } else shaped_pulse(sweepshp,sweeppw,zero,rof1,rof1); delay(gstab); zgradpulse(gzlvlC,2*gtC); delay(0.2*mixN); obspower(tpwr); rgpulse(pw,v1,rof1,rof2); status(C); }
pulsesequence() { double del = getval("del"), gstab = getval("gstab"), gt1 = getval("gt1"), gzlvl1 = getval("gzlvl1"), gt2 = getval("gt2"), gzlvl2 = getval("gzlvl2"), satpwr = getval("satpwr"), satdly = getval("satdly"), prgtime = getval("prgtime"), prgpwr = getval("prgpwr"), gzlvlhs = getval("gzlvlhs"), hsgt = getval("hsgt"), d3 = getval("d3"), Dtau,Ddelta,dosytimecubed, dosyfrq; char delflag[MAXSTR],satmode[MAXSTR],prg_flg[MAXSTR],alt_grd[MAXSTR], sspul[MAXSTR],lkgate_flg[MAXSTR]; getstr("delflag",delflag); getstr("satmode",satmode); getstr("prg_flg",prg_flg); getstr("alt_grd",alt_grd); getstr("lkgate_flg",lkgate_flg); getstr("sspul",sspul); //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gt1 = syncGradTime("gt1","gzlvl1",0.5); gzlvl1 = syncGradLvl("gt1","gzlvl1",0.5); gt2 = syncGradTime("gt2","gzlvl2",1.0); gzlvl2 = syncGradLvl("gt2","gzlvl2",1.0); /* In pulse sequence, minimum del=4.0*pw+3*rof1+gt1+2.0*gstab */ if (del < (4*pw+3.0*rof1+gt1+2.0*gstab)) { abort_message("Dbppste error: 'del' is less than %g, too short!", (4.0*pw+3*rof1+gt1+2.0*gstab)); } Ddelta=gt1; Dtau=2.0*pw+rof1+gstab+gt1/2.0; dosyfrq = sfrq; dosytimecubed=Ddelta*Ddelta*(del-(Ddelta/3.0)-(Dtau/2.0)); putCmd("makedosyparams(%e,%e)\n",dosytimecubed,dosyfrq); /* phase cycling calculation */ mod2(ct,v1); dbl(v1,v1); hlv(ct,v2); mod2(v2,v3); dbl(v3,v3); hlv(v2,v2); mod2(v2,v4); add(v1,v4,v1); /* v1 */ hlv(v2,v2); add(v2,v3,v4); /* v4 */ hlv(v2,v2); mod2(v2,v3); dbl(v3,v5); hlv(v2,v2); mod2(v2,v3); dbl(v3,v3); /* v3 */ hlv(v2,v2); mod2(v2,v6); add(v5,v6,v5); /* v5 */ hlv(v2,v2); mod2(v2,v2); dbl(v2,v2); /* v2 */ assign(v1,oph); dbl(v2,v6); sub(oph,v6,oph); add(v3,oph,oph); sub(oph,v4,oph); dbl(v5,v6); add(v6,oph,oph); mod4(oph,oph); /*receiver phase*/ add(v1,v3,v7); add(v4,v7,v7); add(two,v7,v8); mod2(ct,v10); /* gradients change sign at odd transients */ if (ni > 1.0) { abort_message("Dbppste is a 2D, not a 3D dosy sequence: please set ni to 0 or 1"); } /* equilibrium period */ status(A); if (sspul[0]=='y') { zgradpulse(gzlvlhs,hsgt); rgpulse(pw,zero,rof1,rof1); zgradpulse(gzlvlhs,hsgt); } if (satmode[0] == 'y') { if (d1 - satdly > 0) delay(d1 - satdly); obspower(satpwr); txphase(zero); rgpulse(satdly,zero,rof1,rof1); obspower(tpwr); } else delay(d1); status(B); /* first part of bppdel sequence */ if (delflag[0]=='y') { if (gt1>0 && gzlvl1>0) { rgpulse(pw, v1, rof1, 0.0); /* first 90, v1 */ if (lkgate_flg[0] == 'y') lk_hold(); /* turn lock sampling off */ if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1/2.0); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1/2.0); endif(v10); } else zgradpulse(gzlvl1,gt1/2.0); delay(gstab); rgpulse(pw*2.0, v2, rof1, 0.0); /* first 180, v2 */ if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1/2.0); elsenz(v10); zgradpulse(gzlvl1,gt1/2.0); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1/2.0); delay(gstab); rgpulse(pw, v3, rof1, 0.0); /* second 90, v3 */ if (satmode[1] == 'y') { obspower(satpwr); rgpulse(del-4.0*pw-3.0*rof1-gt1-2.0*gstab,zero,rof1,rof1); obspower(tpwr); } else { delay(del-4.0*pw-3.0*rof1-gt1-2.0*gstab);/*diffusion delay */ } rgpulse(pw, v4, rof1, 0.0); /* third 90, v4 */ if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1/2.0); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1/2.0); endif(v10); } else zgradpulse(gzlvl1,gt1/2.0); delay(gstab); rgpulse(pw*2.0, v5, rof1, rof1); /* second 180, v5 */ if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1/2.0); elsenz(v10); zgradpulse(gzlvl1,gt1/2.0); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1/2.0); delay(gstab); if (prg_flg[0] == 'y') { add(one,v7,v9); obspower(prgpwr); rgpulse(prgtime, v9, rof1, rof1); obspower(tpwr); } } zgradpulse(gzlvl2,gt2); delay(gstab); rgpulse(pw*0.231,v7,rof1,rof1); delay(d3); rgpulse(pw*0.692,v7,rof1,rof1); delay(d3); rgpulse(pw*1.462,v7,rof1,rof1); delay(d3); rgpulse(pw*1.462,v8,rof1,rof1); delay(d3); rgpulse(pw*0.692,v8,rof1,rof1); delay(d3); rgpulse(pw*0.231,v8,rof1,rof1); zgradpulse(gzlvl2,gt2); delay(gstab); if (lkgate_flg[0] == 'y') lk_sample(); /* turn lock on */ } else rgpulse(pw,oph,rof1,rof2); /* --- observe period --- */ status(C); }
pulsesequence() { double gstab = getval("gstab"), gt1 = getval("gt1"), gzlvl1 = getval("gzlvl1"), gt2 = getval("gt2"), gzlvl2 = getval("gzlvl2"), del=getval("del"), del2=getval("del2"), dosyfrq=getval("sfrq"), phase = getval("phase"), satpwr = getval("satpwr"), satdly = getval("satdly"), gzlvlhs = getval("gzlvlhs"), hsgt = getval("hsgt"), Ddelta,dosytimecubed,icosel,delcor1,delcor2,delcor3; char convcomp[MAXSTR],satmode[MAXSTR],alt_grd[MAXSTR],lkgate_flg[MAXSTR], sspul[MAXSTR]; getstr("convcomp",convcomp); getstr("satmode",satmode); getstr("alt_grd",alt_grd); getstr("lkgate_flg",lkgate_flg); getstr("sspul",sspul); //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gt1 = syncGradTime("gt1","gzlvl1",1.0); gzlvl1 = syncGradLvl("gt1","gzlvl1",1.0); gt2 = syncGradTime("gt2","gzlvl2",1.0); gzlvl2 = syncGradLvl("gt2","gzlvl2",1.0); /* phase cycling calculation */ icosel=1; /* Default to N-type experiment */ if (phase == 2.0) { icosel=-1; mod4(ct,v1); hlv(ct,v2); hlv(v2,v2); mod4(v2,v2); if (ix==1) fprintf(stdout,"P-type COSY\n"); } else { mod4(ct,v1); hlv(ct,v2); hlv(v2,v2); mod4(v2,v2); dbl(v2,v3); sub(v3,v1,oph); mod4(oph,oph); if (ix==1) fprintf(stdout,"N-type COSY\n"); } mod2(ct,v10); /* gradients change sign at odd transients */ Ddelta=gt1;/*the diffusion-encoding pulse width is gt1*/ if (convcomp[A]=='y') dosytimecubed=Ddelta*Ddelta*(del - (4.0*Ddelta/3.0)); else dosytimecubed=Ddelta*Ddelta*(del - (Ddelta/3.0)); if (phase==2.0) putCmd("makedosyparams(%e,%e) dosy3Dproc='ptype'\n",dosytimecubed,dosyfrq); else putCmd("makedosyparams(%e,%e) dosy3Dproc='ntype'\n",dosytimecubed,dosyfrq); delcor1=(del+del2)/4.0-gt1; delcor2=(del-del2)/4.0-gt1; if ((del < 4.0*gt1)&&(convcomp[0] == 'y')) { abort_message("Dcosyidosy: increase diffusion delay at least to %f seconds", (gt1*4.0)); } if ((delcor2 < 0.0)&&(convcomp[0] == 'y')) { abort_message("Dcosyidosy: decrease del2 to less than %f to fit into the diffusion delay", (del-gt1*4.0)); } delcor3=(del-gt1-2*rof1-pw)/2; if ((delcor3 < 0.0)&&(convcomp[0] == 'n')) { abort_message("Dcosyidosy: increase the diffusion delay at least to %f second", (gt1*2+rof1+pw)); } /* BEGIN ACTUAL PULSE SEQUENCE */ status(A); if (sspul[0]=='y') { zgradpulse(gzlvlhs,hsgt); rgpulse(pw,zero,rof1,rof1); zgradpulse(gzlvlhs,hsgt); } if (satmode[0] == 'y') { if (d1 - satdly > 0) delay(d1 - satdly); obspower(satpwr); rgpulse(satdly,zero,rof1,rof1); obspower(tpwr); } else { delay(d1); } if (getflag("wet")) wet4(zero,one); status(B); if (convcomp[A]=='y') { if (lkgate_flg[0] == 'y') lk_hold(); /* turn lock sampling off */ if (icosel > 0) { if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-gzlvl2,2*gt2); elsenz(v10); zgradpulse(gzlvl2,2*gt2); endif(v10); } else zgradpulse(-gzlvl2,2*gt2); delay(gstab); } rgpulse(pw,v1,rof1,rof1); delay(d2+gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); if (satmode[1] == 'y') { obspower(satpwr); rgpulse(delcor1,zero,rof1,rof1); obspower(tpwr); } else delay(delcor1); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-gzlvl1,gt1); elsenz(v10); zgradpulse(gzlvl1,gt1); endif(v10); } else zgradpulse(-gzlvl1,gt1); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-gzlvl1,gt1); elsenz(v10); zgradpulse(gzlvl1,gt1); endif(v10); } else zgradpulse(-gzlvl1,gt1); if (satmode[1] == 'y') { obspower(satpwr); rgpulse(delcor2,zero,rof1,rof1); obspower(tpwr); } else delay(delcor2); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl2,gt2); elsenz(v10); zgradpulse(-gzlvl2,gt2); endif(v10); } else zgradpulse(gzlvl2,gt2); delay(gstab); rgpulse(pw,v2,rof1,rof2); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(icosel*gzlvl2,gt2); elsenz(v10); zgradpulse(-1.0*icosel*gzlvl2,gt2); endif(v10); } else zgradpulse(icosel*gzlvl2,gt2); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); if (satmode[1] == 'y') { obspower(satpwr); rgpulse(delcor2,zero,rof1,rof1); obspower(tpwr); } else delay(delcor2); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-gzlvl1,gt1); elsenz(v10); zgradpulse(gzlvl1,gt1); endif(v10); } else zgradpulse(-gzlvl1,gt1); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-gzlvl1,gt1); elsenz(v10); zgradpulse(gzlvl1,gt1); endif(v10); } else zgradpulse(-gzlvl1,gt1); if (satmode[1] == 'y') { obspower(satpwr); rgpulse(delcor1,zero,rof1,rof1); obspower(tpwr); } else delay(delcor1); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); delay(gstab); if (lkgate_flg[0] == 'y') lk_sample(); /* turn lock on */ } else { if (lkgate_flg[0] == 'y') lk_hold(); /* turn lock off */ if (icosel > 0) { if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-gzlvl1,2.0*gt1); elsenz(v10); zgradpulse(gzlvl1,2.0*gt1); endif(v10); } else zgradpulse(-gzlvl1,2.0*gt1); delay(gstab); } rgpulse(pw,v1,rof1,rof1); delay(d2); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); if (satmode[1] == 'y') { obspower(satpwr); rgpulse(delcor3,zero,rof1,rof1); obspower(tpwr); } else delay(delcor3); rgpulse(pw,v2,rof1,rof2); if (satmode[1] == 'y') { obspower(satpwr); rgpulse(delcor3,zero,rof1,rof1); obspower(tpwr); } else delay(delcor3); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(icosel*gzlvl1,gt1); elsenz(v10); zgradpulse(-icosel*gzlvl1,gt1); endif(v10); } else zgradpulse(icosel*gzlvl1,gt1); delay(gstab); if (lkgate_flg[0] == 'y') lk_sample(); /* turn lock on */ } status(C); }
pulsesequence() { double j1min = getval("j1min"), j1max = getval("j1max"), pwxlvlS6 = getval("pwxlvlS6"), pwxS6 = getval("pwxS6"), gzlvl0 = getval("gzlvl0"), gt0 = getval("gt0"), gzlvlE = getval("gzlvlE"), gtE = getval("gtE"), EDratio = getval("EDratio"), gstab = getval("gstab"), grad1, grad2, bird, tauX, tau, tautau, t1max, tauA, tauB, tau1, tau2, taumb; int ijscaleU, ijscaleD, icosel, t1_counter, phase1 = (int)(getval("phase")+0.5); char accord[MAXSTR]; //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gt0 = syncGradTime("gt0","gzlvl0",1.0); gzlvl0 = syncGradLvl("gt0","gzlvl0",1.0); gtE = syncGradTime("gtE","gzlvlE",1.0); gzlvlE = syncGradLvl("gtE","gzlvlE",1.0); grad1 = gzlvlE; grad2 = -1.0*gzlvlE*(EDratio-1)/(EDratio+1); tauX = 1/(2*(getval("jnmax"))); tauA = 1/(2*(j1min + 0.146*(j1max - j1min))); tauB = 1/(2*(j1max - 0.146*(j1max - j1min))); bird = (tauA+tauB)/2; ijscaleD = (int)(getval("jscaleD") + 0.5); ijscaleU = (int)(getval("jscaleU") + 0.5); if (ijscaleU > 0) ijscaleD = 0; icosel = 1; getstr("accord",accord); t1max = ((getval("ni")-1)/getval("sw1")) + 0.0005; tautau = ((ijscaleU - 1)*d2); taumb = 1/(2*(getval("jnmin"))); if (ix == 1) d2_init = d2; t1_counter = (int) ( (d2-d2_init)*(getval("sw1")) + 0.5); if (accord[0] == 'y') { if ((taumb - tauX) < t1max/2) taumb = tauX + t1max/2; tau = ((taumb - tauX)*t1_counter/ni); } else { taumb = 1/(2*(getval("jnxh"))); if (ijscaleU > 0) tau = 0.0; else tau = t1max/2; } tau1 = ijscaleD * d2; tau2 = (ijscaleD*t1max) - tau1; settable(t1,1,ph1); settable(t3,2,ph3); settable(t4,1,ph4); settable(t5,4,ph5); settable(t6,4,ph6); getelem(t3,ct,v3); getelem(t6,ct,oph); /* mod2(id2,v10); dbl(v10,v10); */ initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v10); add(v3,v10,v3); add(oph,v10,oph); if ((phase1 == 2) || (phase1 == 5)) { icosel = -1; grad1 = gzlvlE*(EDratio-1)/(EDratio+1); grad2 = -1.0*gzlvlE; } status(A); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); satpulse(satdly,zero,rof1,rof1); } else delay(d1); if (getflag("wet")) wet4(zero,one); decpower(pwxlvl); status(B); rgpulse(pw,t1,rof1,rof2); /* Start of J filter */ if (getflag("jfilter")) { zgradpulse(gzlvl0/2,gt0); delay(tauA - gt0); decrgpulse(pwx, zero, rof1, rof1); zgradpulse(-gzlvl0/3,gt0); delay(tauB - gt0); decrgpulse(pwx, zero, rof1, rof1); zgradpulse(-gzlvl0/6,gt0); delay(gstab); } /* End of J filter */ /* Start of STARR */ /* rev-BIRD in the middle of tau2 - 180 for C13-H and 360 for C12-H */ /* - decouple long-range CH */ /* evolution and let HH evolution continue except for */ /* 2-bond correlations */ if (ijscaleD > 0) { delay(tau2/2); zgradpulse(gzlvl0*1.5,gt0); delay(gstab); rgpulse(pw,zero,rof1,rof1); delay(bird); decpower(pwxlvlS6); decrgpulse(158.0*pwxS6/90,zero,rof1,2.0e-6); decrgpulse(171.2*pwxS6/90,two,2.0e-6,2.0e-6); decrgpulse(342.8*pwxS6/90,zero,2.0e-6,2.0e-6); decrgpulse(145.5*pwxS6/90,two,2.0e-6,2.0e-6); decrgpulse(81.2*pwxS6/90,zero,2.0e-6,2.0e-6); decrgpulse(85.3*pwxS6/90,two,2.0e-6,rof1); rgpulse(2*pw,zero,rof1,rof1); decpower(pwxlvl); delay(985*pwxS6/90); delay(bird); rgpulse(pw,zero,rof1,rof2); zgradpulse(-gzlvl0*1.5,gt0); delay(gstab); delay(tau2/2); } /* Simple C 180 in the middle of tau1 - decouple */ /* CH evolution and let HH evolution continue */ /* AND Start of CT-VD */ if (!((accord[0] == 'n') && (ijscaleU == 1))) { delay(tau1/2 + tau/2 + tautau/4); zgradpulse(gzlvl0,gt0); delay(gstab); decpower(pwxlvlS6); decrgpulse(158.0*pwxS6/90,zero,rof1,2.0e-6); decrgpulse(171.2*pwxS6/90,two,2.0e-6,2.0e-6); decrgpulse(342.8*pwxS6/90,zero,2.0e-6,2.0e-6); decrgpulse(145.5*pwxS6/90,two,2.0e-6,2.0e-6); decrgpulse(81.2*pwxS6/90,zero,2.0e-6,2.0e-6); decrgpulse(85.3*pwxS6/90,two,2.0e-6,rof1); decpower(pwxlvl); zgradpulse(-gzlvl0,gt0); delay(gstab); delay(tau1/2 + tau/2 + tautau/4); } /* End of STARR */ if (accord[0] == 'y') delay(taumb - tau); else delay(taumb); /* End of CT-VD */ decrgpulse(pwx,v3,rof1,rof1); delay(d2/2.0); rgpulse(2*pw,t4,rof1,rof1); delay(d2/2.0); decpower(pwxlvlS6); decrgpulse(158.0*pwxS6/90,zero,rof1,2.0e-6); decrgpulse(171.2*pwxS6/90,two,2.0e-6,2.0e-6); decrgpulse(342.8*pwxS6/90,zero,2.0e-6,2.0e-6); decrgpulse(145.5*pwxS6/90,two,2.0e-6,2.0e-6); decrgpulse(81.2*pwxS6/90,zero,2.0e-6,2.0e-6); decrgpulse(85.3*pwxS6/90,two,2.0e-6,rof1); delay(2*pw + 2*POWER_DELAY + 4*rof1 + (4*pwx/3.1416)); zgradpulse(icosel*grad1,gtE); delay(gstab); decrgpulse(158.0*pwxS6/90,zero,rof1,2.0e-6); decrgpulse(171.2*pwxS6/90,two,2.0e-6,2.0e-6); decrgpulse(342.8*pwxS6/90,zero,2.0e-6,2.0e-6); decrgpulse(145.5*pwxS6/90,two,2.0e-6,2.0e-6); decrgpulse(81.2*pwxS6/90,zero,2.0e-6,2.0e-6); decrgpulse(85.3*pwxS6/90,two,2.0e-6,rof1); zgradpulse(icosel*grad2,gtE); decpower(pwxlvl); delay(gstab); decrgpulse(pwx,t5,rof1,rof1); decpower(dpwr); delay(t1max/2 + tautau/2); status(C); }
pulsesequence() { char f1180[MAXSTR],sspul[MAXSTR],edit[MAXSTR],satmode[MAXSTR], alt_grd[MAXSTR],lkgate_flg[MAXSTR],arraystring[MAXSTR]; int phase,icosel,t1_counter,satmove,xhn; double tauxh, /* 2nd refocus delay (1/4J(XH)) */ tauxh2, /* 1st refocus delay to be optimized for HX,H2X,H3X */ j1xh=getval("j1xh"), /* coupling for XH */ tau1, /* t1/2 */ gt1 = getval("gt1"), gstab = getval("gstab"), gzlvlE = getval("gzlvlE"), gtE = getval("gtE"), EDratio = getval("EDratio"), gzlvl1 = getval("gzlvl1"), gzlvlhs = getval("gzlvlhs"), hsgt = getval("hsgt"), del = getval("del"), satpwr = getval("satpwr"), satfrq = getval("satfrq"), satdly = getval("satdly"), Dtau, Ddelta, dosytimecubed, dosyfrq, d2corr; //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gt1 = syncGradTime("gt1","gzlvl1",0.5); gzlvl1 = syncGradLvl("gt1","gzlvl1",0.5); gtE = syncGradTime("gtE","gzlvlE",0.5); gzlvlE = syncGradLvl("gtE","gzlvlE",0.5); /* LOAD VARIABLES */ sw1 = getval("sw1"); pwx = getval("pwx"); /* PW90 for Channel 2 */ pwxlvl = getval("pwxlvl"); phase = (int) (getval("phase") + 0.5); xhn = (int) (getval("xhn") + 0.5); getstr("satmode",satmode); getstr("f1180",f1180); getstr("sspul",sspul); getstr("edit",edit); getstr("alt_grd",alt_grd); getstr("lkgate_flg",lkgate_flg); getstr("array",arraystring); /* INITIALIZE VARIABLES */ satmove = ( fabs(tof - satfrq) >= 0.1 ); if (j1xh == 0.0) j1xh = 140.0; tauxh = 1.0/(4.0*j1xh); tauxh2=tauxh/2.0; if (xhn == 1) tauxh2=tauxh; if (xhn == 2) tauxh2=tauxh/2.0; if (xhn == 3) tauxh2=tauxh/3.0; if (strcmp(arraystring,"gzlvl1,phase")!=0) fprintf(stdout,"Warning: array should be 'gzlvl1,phase' for this experiment"); Ddelta=gt1; Dtau=2.0*pw+rof1+gstab+gt1/2.0; dosyfrq = getval("sfrq"); dosytimecubed=Ddelta*Ddelta*(del-(Ddelta/3.0)-(Dtau/2.0)); putCmd("makedosyparams(%e,%e)\n",dosytimecubed,dosyfrq); if (ni>1) putCmd("dosy3Dproc=\'y\'\n"); else putCmd("dosy3Dproc=\'n\'\n"); if (rof1>2.0e-6) rof1=2.0e-6; /* In pulse sequence, minimum del=4.0*pw+3*rof1+gt1+2.0*gstab */ if((del-(4*pw+3.0*rof1+2.0*tauxh)) < 0.0) {abort_message("Warning: 'del' is too short!"); } /* check validity of parameter range */ if(hsgt > 3.0e-3 || gt1/2 > tauxh-0.0002 || gtE > 3.0e-3 ) { abort_message("gti must be less than 3 ms or 1/4J "); } /* SET PHASES */ sub(ct,ssctr,v12); /* Steady-state phase cycling */ settable(t1,16, phi1); getelem(t1,v12,v1); settable(t2, 2, phi2); getelem(t2,v12,v2); settable(t3, 8, phi3); getelem(t3,v12,v3); settable(t4, 1, phi4); getelem(t4,v12,v4); settable(t5, 4, rec); getelem(t5,v12,oph); /* Phase incrementation for hypercomplex data */ if ( phase == 2 ) /* Hypercomplex in t1 */ { add(v4, two, v4); icosel = 1; /* and reverse the sign of the gradient */ } else icosel = -1; /* calculate modification 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) { add(v2, two, v2); add(oph, two, oph); } /* 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) ); tau1 = tau1/2.0; /* BEGIN ACTUAL PULSE SEQUENCE */ mod2(ct,v10); /* diffusion gradients change sign on every odd scan*/ status(A); decpower(pwxlvl); /* Set decoupler1 power to pwxlvl */ /* Presaturation Period */ if (sspul[A]=='y') { zgradpulse(gzlvlhs,hsgt); rgpulse(pw,zero,rof1,rof1); zgradpulse(gzlvlhs,hsgt); } if(satmode[A] == 'y') { obspower(satpwr); if (satmove) obsoffset(satfrq); if (d1-satdly > 0.0) delay(d1-satdly); rgpulse(satdly,zero,rof1,rof1); /* Presaturation using transmitter */ obspower(tpwr); /* Set power for hard pulses */ if (satmove) obsoffset(tof); } else delay(d1); if (getflag("wet")) wet4(zero,one); status(B); txphase(zero); decphase(zero); /* First section of the Bppste sequence */ rgpulse(pw, zero, rof1, 0.0); /* first 90 */ if (lkgate_flg[0] == 'y') lk_hold(); /* turn lock sampling off */ if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1/2.0); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1/2.0); endif(v10); } else zgradpulse(gzlvl1,gt1/2.0); delay(tauxh-gt1/2.0); rgpulse(pw*2.0, zero, rof1, 0.0); /* first 180 */ if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1/2.0); elsenz(v10); zgradpulse(gzlvl1,gt1/2.0); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1/2.0); delay(tauxh-gt1/2.0); rgpulse(pw, v1, rof1, 0.0); /* second 90 */ /* Diffusion delay */ if (satmode[1] == 'y') { obspower(satpwr); if (satfrq != tof) obsoffset(satfrq); rgpulse(del-4.0*pw-3.0*rof1-2.0*tauxh,zero,rof1,rof1); if (satfrq != tof) obsoffset(tof); obspower(tpwr); } else delay(del-4.0*pw-3.0*rof1-2.0*tauxh); /*diffusion delay */ /* Second half of Bppste */ rgpulse(pw, v1, rof1, 0.0); /* third 90 */ if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1/2.0); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1/2.0); endif(v10); } else zgradpulse(gzlvl1,gt1/2.0); txphase(zero); decphase(zero); delay(tauxh-gt1/2.0); simpulse(pw*2.0, 2*pwx, zero, zero, rof1, rof1); /* second 180 */ if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1/2.0); elsenz(v10); zgradpulse(gzlvl1,gt1/2.0); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1/2.0); txphase(one); decphase(v2); delay(tauxh-gt1/2.0); rgpulse(pw,one,0.0,0.0); zgradpulse(gzlvlhs,hsgt); /* homospoil gradient for zz/state selection */ delay(gstab); decrgpulse(pwx,v2,0.0,0.0); txphase(zero); decphase(v3); d2corr=pw+2.0*pwx/3.1416; if (tau1 > d2corr) delay(tau1-d2corr); /* delay=t1/2 */ else delay(tau1); /* just to dps the evolution period */ rgpulse(2*pw,zero,0.0,0.0); txphase(zero); if (tau1 > pw) delay(tau1-pw); else delay(tau1); /* just to dps the evolution period */ if (edit[A] == 'y') { delay(2.0*tauxh - gtE - gstab - 2.0*GRADIENT_DELAY); zgradpulse(icosel*gzlvlE,gtE); delay(gstab); simpulse(2.0*pw,2.0*pwx,zero,v3,0.0,0.0); delay(2.0*tauxh - 2.0*GRADIENT_DELAY-2.0*pwx/3.1416); } else { zgradpulse(icosel*gzlvlE,gtE); delay(gstab ); decrgpulse(2*pwx,v3,0.0,0.0); delay(gtE+gstab-2.0*pwx/3.1416); } decphase(v4); simpulse(pw,pwx,zero,v4,0.0,0.0); /* X read pulse */ txphase(zero); decphase(zero); delay(tauxh2 ); /* delay=1/4J (XH) */ simpulse(2*pw,2*pwx,zero,zero,0.0,0.0); txphase(one); decphase(one); delay(tauxh2 ); /* delay=1/4J (XH) */ simpulse(pw,pwx,one,one,0.0,0.0); decphase(zero); txphase(zero); delay(tauxh); /* delay=1/4J (XH) */ simpulse(2*pw,2*pwx,zero,zero,0.0,0.0); delay(tauxh ); /* delay=1/4J(XH) */ rgpulse(pw,zero,0.0,0.0); decpower(dpwr); delay(gtE/2.0 + gstab + 2.0*GRADIENT_DELAY - POWER_DELAY); rgpulse(2*pw,zero,0.0,rof2); zgradpulse(2.0*gzlvlE/EDratio,gtE/2.0); delay(gstab); if (lkgate_flg[0] == 'y') lk_sample(); /* turn lock sampling on */ status(C); }
pulsesequence() { double Ddelta,dosytimecubed,CORR,del2check,del2max, gzlvl3 = getval("gzlvl3"), gt3 = getval("gt3"), gzlvl1 = getval("gzlvl1"), gt1 = getval("gt1"), gzlvl2 = getval("gzlvl2"), gt2 = getval("gt2"), gstab = getval("gstab"), del = getval("del"), del2 = getval("del2"), dosyfrq = getval("sfrq"), prgtime = getval("prgtime"), prgpwr = getval("prgpwr"), gzlvlhs = getval("gzlvlhs"), hsgt = getval("hsgt"), satdly = getval("satdly"), satpwr = getval("satpwr"), satfrq = getval("satfrq"); char delflag[MAXSTR],prg_flg[MAXSTR],satmode[MAXSTR],lkgate_flg[MAXSTR], triax_flg[MAXSTR],sspul[MAXSTR],alt_grd[MAXSTR]; nt = getval("nt"); getstr("delflag",delflag); getstr("prg_flg",prg_flg); getstr("triax_flg",triax_flg); getstr("satmode",satmode); getstr("lkgate_flg",lkgate_flg); getstr("sspul",sspul); getstr("alt_grd",alt_grd); //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gt1 = syncGradTime("gt1","gzlvl1",1.0); gzlvl1 = syncGradLvl("gt1","gzlvl1",1.0); CORR=3.0*gt1+gt3+4.0*gstab+2.0*pw+3*rof1; if (ni > 1.0) abort_message("This is a 2D, not a 3D dosy sequence: please set ni to 0 or 1"); if((del-2.0*CORR-gt2-rof1)< 0.0) abort_message("The minimum value of del is %.6f seconds", 2*CORR+gt2+rof1); del2check=del/2.0-CORR-fabs(del2)-rof1; del2max=del/2.0-CORR-rof1; if (del2check< 0.0) abort_message("del2 in absolute value cannot exceed %.6f seconds", del2max); Ddelta=gt1; dosytimecubed=Ddelta*Ddelta*(del - 2.0*(Ddelta/3.0)); putCmd("makedosyparams(%e,%e)\n",dosytimecubed,dosyfrq); /* phase cycling calculation */ if (delflag[0]=='y') { settable(t1,8,ph1); settable(t2,4,ph2); settable(t3,16,ph3); settable(t4,32,ph4); settable(t5,64,ph5); settable(t6,2,ph6); settable(t7,64,ph7); sub(ct,ssctr,v10); getelem(t1,v10,v1); getelem(t2,v10,v2); getelem(t3,v10,v3); getelem(t4,v10,v4); getelem(t5,v10,v5); getelem(t6,v10,v6); getelem(t7,v10,oph); } else { add(oph,one,v1); } mod2(ct,v11); /* gradients change sign at odd transients */ /* equilibrium period */ status(A); obspower(tpwr); if (sspul[0]=='y') { zgradpulse(gzlvlhs,hsgt); rgpulse(pw,zero,rof1,rof1); zgradpulse(gzlvlhs,hsgt); } if (satmode[0] == 'y') { if (d1>satdly) delay(d1-satdly); obspower(satpwr); if (satfrq != tof) obsoffset(satfrq); rgpulse(satdly,zero,rof1,rof1); if (satfrq != tof) obsoffset(tof); obspower(tpwr); } else delay(d1); if (getflag("wet")) wet4(zero,one); status(B); /* first part of bppdel sequence */ if(delflag[0] == 'y') { if (lkgate_flg[0] == 'y') lk_hold(); /* turn lock sampling off */ if (triax_flg[0] == 'y') /* homospoil comp. grad */ { rgradient('x',gzlvl2); /* along x if available */ delay(gt2); rgradient('x',0.0); } else { if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(gzlvl2,gt2); /*spoiler comp. gradient*/ elsenz(v11); zgradpulse(-1.0*gzlvl2,gt2); /*spoiler comp. gradient*/ endif(v11); } else zgradpulse(gzlvl2,gt2); /*spoiler comp. gradient*/ } delay(gstab); rgpulse(pw, v1, rof1, rof1); /* first 90 */ if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(gzlvl1,gt1); elsenz(v11); zgradpulse(-1.0*gzlvl1,gt1); endif(v11); } else zgradpulse(gzlvl1,gt1); delay(gstab); rgpulse(pw, v2, rof1, rof1); /* second 90, v1 */ if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(-1.0*gzlvl1,gt1); elsenz(v11); zgradpulse(1.0*gzlvl1,gt1); endif(v11); } else zgradpulse(-1.0*gzlvl1,gt1); delay(gstab); if (triax_flg[0] == 'y') /* homospoil grad */ { rgradient('x',-1.0*gzlvl2); /* along x if available */ delay(gt2); rgradient('x',0.0); } else { if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(-1.0*gzlvl2,gt2); /*spoiler comp. gradient*/ elsenz(v11); zgradpulse(1.0*gzlvl2,gt2); /*spoiler comp. gradient*/ endif(v11); } else zgradpulse(-1.0*gzlvl2,gt2); /*spoiler comp. gradient*/ } if (satmode[1] == 'y') { obspower(satpwr); if (satfrq != tof) obsoffset(satfrq); rgpulse(del/2.0+del2-CORR-gt3-3*rof1,zero,rof1,rof1); if (satfrq != tof) obsoffset(tof); obspower(tpwr); } else delay(del/2.0+del2-CORR-gt3); if (triax_flg[0] == 'y') /* homospoil comp. grad */ { rgradient('y',gzlvl3); /* along y if available */ delay(gt3); rgradient('y',0.0); } else { if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(1.0*gzlvl3,gt3); /*spoiler comp. gradient*/ elsenz(v11); zgradpulse(-1.0*gzlvl3,gt3); /*spoiler comp. gradient*/ endif(v11); } else zgradpulse(1.0*gzlvl3,gt3); /*spoiler comp. gradient*/ } delay(gstab); if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(-1.0*gzlvl1,gt1); elsenz(v11); zgradpulse(1.0*gzlvl1,gt1); endif(v11); } else zgradpulse(-1.0*gzlvl1,gt1); delay(gstab); rgpulse(pw, v3, rof1, rof1); /* third 90 */ if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(gzlvl1,gt1); elsenz(v11); zgradpulse(-1.0*gzlvl1,gt1); endif(v11); } else zgradpulse(gzlvl1,gt1); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(gzlvl1,gt1); elsenz(v11); zgradpulse(-1.0*gzlvl1,gt1); endif(v11); } else zgradpulse(gzlvl1,gt1); delay(gstab); rgpulse(pw, v4, rof1, rof1); /* fourth 90 */ if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(-1.0*gzlvl1,gt1); elsenz(v11); zgradpulse(1.0*gzlvl1,gt1); endif(v11); } else zgradpulse(-1.0*gzlvl1,gt1); delay(gstab); if (triax_flg[0] == 'y') /* homospoil grad */ { rgradient('y',-1.0*gzlvl3); /* along y if available */ delay(gt3); rgradient('y',0.0); } else { if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(-1.0*gzlvl3,gt3); /*spoiler comp. gradient*/ elsenz(v11); zgradpulse(1.0*gzlvl3,gt3); /*spoiler comp. gradient*/ endif(v11); } else zgradpulse(-1.0*gzlvl3,gt3); /*spoiler comp. gradient*/ } if (satmode[1] == 'y') { obspower(satpwr); if (satfrq != tof) obsoffset(satfrq); rgpulse(del/2.0-CORR-del2-2*rof1,zero,rof1,rof1); if (satfrq != tof) obsoffset(tof); obspower(tpwr); } else delay(del/2.0-CORR-del2); if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(-1.0*gzlvl1,gt1); elsenz(v11); zgradpulse(1.0*gzlvl1,gt1); endif(v11); } else zgradpulse(-1.0*gzlvl1,gt1); delay(gstab); if (prg_flg[0] == 'y') { rgpulse(pw, v5, rof1, rof1); } /* fifth 90 */ else { rgpulse(pw, v5, rof1, 0.0); } /* fifth */ if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(gzlvl1,gt1); elsenz(v11); zgradpulse(-1.0*gzlvl1,gt1); endif(v11); } else zgradpulse(gzlvl1,gt1); delay(gstab-2.0*pw/3.14); if (prg_flg[0] == 'y') { obspower(prgpwr); rgpulse(prgtime, v6, rof1, 0.0); } if (lkgate_flg[0] == 'y') lk_sample(); /* turn lock sampling on */ } else rgpulse(pw, v1, rof1, rof2); /* first 90, v1 */ /* --- observe period --- */ status(C); }
pulsesequence() { double j1min = getval("j1min"), j1max = getval("j1max"), pwxlvlS6 = getval("pwxlvlS6"), pwxS6 = getval("pwxS6"), gzlvl0 = getval("gzlvl0"), gt0 = getval("gt0"), gzlvlE = getval("gzlvlE"), gtE = getval("gtE"), EDratio = getval("EDratio"), gstab = getval("gstab"), grad1, grad2, tauA, tauB, taumb; int icosel, phase1 = (int)(getval("phase")+0.5); //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtE = syncGradTime("gtE","gzlvlE",1.0); gzlvlE = syncGradLvl("gtE","gzlvlE",1.0); grad1 = gzlvlE; grad2 = -1.0*gzlvlE*(EDratio-1)/(EDratio+1); tauA = 1/(2*(j1min + 0.146*(j1max - j1min))); tauB = 1/(2*(j1max - 0.146*(j1max - j1min))); taumb = 1/(2*(getval("jnxh"))); icosel = 1; settable(t1,1,ph1); settable(t2,1,ph2); settable(t3,2,ph3); settable(t4,1,ph4); settable(t5,4,ph5); settable(t6,4,ph6); getelem(t3,ct,v3); getelem(t6,ct,oph); /* mod2(id2,v10); dbl(v10,v10); */ initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v10); add(v3,v10,v3); add(oph,v10,oph); if ((phase1 == 2) || (phase1 == 5)) { icosel = -1; grad1 = gzlvlE*(EDratio-1)/(EDratio+1); grad2 = -1.0*gzlvlE; } status(A); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); satpulse(satdly,zero,rof1,rof1); } else delay(d1); if (getflag("wet")) wet4(zero,one); decpower(pwxlvl); status(B); rgpulse(pw,t1,rof1,rof2); /* Start of J filter */ if (getflag("jfilter")) { zgradpulse(gzlvl0/2,gt0); delay(tauA - gt0); decrgpulse(pwx, zero, rof1, rof1); zgradpulse(-gzlvl0/3,gt0); delay(tauB - gt0); decrgpulse(pwx, zero, rof1, rof1); zgradpulse(-gzlvl0/6,gt0); delay(gstab); } /* End of J filter */ delay(taumb); decrgpulse(pwx,v3,rof1,rof1); delay(d2/2.0); rgpulse(2*pw,t4,rof1,rof1); delay(d2/2.0); decpower(pwxlvlS6); decrgpulse(158.0*pwxS6/90,zero,rof1,2.0e-6); decrgpulse(171.2*pwxS6/90,two,2.0e-6,2.0e-6); decrgpulse(342.8*pwxS6/90,zero,2.0e-6,2.0e-6); decrgpulse(145.5*pwxS6/90,two,2.0e-6,2.0e-6); decrgpulse(81.2*pwxS6/90,zero,2.0e-6,2.0e-6); decrgpulse(85.3*pwxS6/90,two,2.0e-6,rof1); delay(2*pw + 2*POWER_DELAY + 4*rof1 + (4*pwx/3.1416)); zgradpulse(icosel*grad1,gtE); delay(gstab); decrgpulse(158.0*pwxS6/90,zero,rof1,2.0e-6); decrgpulse(171.2*pwxS6/90,two,2.0e-6,2.0e-6); decrgpulse(342.8*pwxS6/90,zero,2.0e-6,2.0e-6); decrgpulse(145.5*pwxS6/90,two,2.0e-6,2.0e-6); decrgpulse(81.2*pwxS6/90,zero,2.0e-6,2.0e-6); decrgpulse(85.3*pwxS6/90,two,2.0e-6,rof1); zgradpulse(icosel*grad2,gtE); decpower(pwxlvl); delay(gstab); decrgpulse(pwx,t5,rof1,rof2); decpower(dpwr); status(C); }
pulsesequence() { double j1min = getval("j1min"), j1max = getval("j1max"), pwxlvl180 = getval("pwxlvl180"), pwx180 = getval("pwx180"), Ipw1, Ipw2, Ipwr1, Ipwr2, imphase = getval("imphase"), gzlvl0 = getval("gzlvl0"), gt0 = getval("gt0"), gzlvlE = getval("gzlvlE"), gtE = getval("gtE"), EDratio = getval("EDratio"), gstab = getval("gstab"), grad1, grad2, tau, tauA, tauB, taumb; char pwx180ad[MAXSTR], Ishp1[MAXSTR], Ishp2[MAXSTR]; int iimphase, icosel, phase1 = (int)(getval("phase")+0.5); //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtE = syncGradTime("gtE","gzlvlE",1.0); gzlvlE = syncGradLvl("gtE","gzlvlE",1.0); getstr("pwx180ad", pwx180ad); grad1 = gzlvlE; grad2 = -1.0*gzlvlE*(EDratio-1)/(EDratio+1); Ipw1 = pwx180; Ipw2 = pwx180; Ipwr1 = pwxlvl180; Ipwr2 = pwxlvl180; getstr("pwx180ad", Ishp1); getstr("pwx180ad", Ishp2); tauA = 1/(2*(j1min + 0.146*(j1max - j1min))); tauB = 1/(2*(j1max - 0.146*(j1max - j1min))); taumb = 1 / (2 * (getval("jnxh"))); tau = 1 / (j1min+j1max); icosel = 1; iimphase = (int) (imphase + 0.5); if (iimphase == 1) { Ipw1 = getval("imppw1"); Ipw2 = getval("imppw1"); Ipwr1 = getval("imppwr1"); Ipwr2 = getval("imppwr1"); getstr("impshp1", Ishp1); getstr("impshp1", Ishp2); } if (iimphase == 2) { Ipw1 = getval("imppw1"); Ipw2 = getval("imppw2"); Ipwr1 = getval("imppwr1"); Ipwr2 = getval("imppwr2"); getstr("impshp1", Ishp1); getstr("impshp2", Ishp2); } if (iimphase == 3) { Ipw1 = getval("imppw1"); Ipw2 = getval("imppw3"); Ipwr1 = getval("imppwr1"); Ipwr2 = getval("imppwr3"); getstr("impshp1", Ishp1); getstr("impshp3", Ishp2); } if (iimphase == 4) { Ipw1 = getval("imppw1"); Ipw2 = getval("imppw4"); Ipwr1 = getval("imppwr1"); Ipwr2 = getval("imppwr4"); getstr("impshp1", Ishp1); getstr("impshp4", Ishp2); } settable(t1, 1, ph1); settable(t2, 1, ph2); settable(t3, 2, ph3); settable(t4, 1, ph4); settable(t5, 4, ph5); settable(t6, 4, ph6); getelem(t3, ct, v3); getelem(t6, ct, oph); /* mod2(id2, v10); dbl(v10,v10); */ initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v10); add(v3, v10, v3); add(oph, v10, oph); if ((phase1 == 2) || (phase1 == 5)) { icosel = -1; grad1 = gzlvlE*(EDratio-1)/(EDratio+1); grad2 = -1.0*gzlvlE; } status(A); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); satpulse(satdly,zero,rof1,rof1); } else delay(d1); if (getflag("wet")) wet4(zero,one); decpower(pwxlvl); status(B); rgpulse(pw, t1, rof1, rof2); /* Start of J filter */ if (getflag("jfilter")) { zgradpulse(gzlvl0/2,gt0); delay(tauA - gt0); decrgpulse(pwx, zero, rof1, rof1); zgradpulse(-gzlvl0/3,gt0); delay(tauB - gt0); decrgpulse(pwx, zero, rof1, rof1); zgradpulse(-gzlvl0/6,gt0); delay(gstab); } /* End of J filter */ delay(taumb - rof1 - pwx - 2 * GRADIENT_DELAY - gt0); decrgpulse(pwx, v3, rof1, rof1); delay(d2 / 2.0); rgpulse(2 * pw, t4, rof1, rof1); delay(d2 / 2.0); decpower(Ipwr1); decshaped_pulse(Ishp1, Ipw1, zero, rof1, rof1); delay(2 * pw + POWER_DELAY + 4 * rof1 + (4 * pwx / 3.1416)); zgradpulse(icosel * grad1, gtE); delay(gstab); decpower(Ipwr2); decshaped_pulse(Ishp2, Ipw2, zero, rof1, rof1); zgradpulse(icosel * grad2, gtE); decpower(pwxlvl); delay(gstab); decrgpulse(pwx, t5, rof1, rof2); decpower(dpwr); status(C); }
pulsesequence() { double delcor,initdel,gzlvl4,gt4,Dtau,Ddelta,dosytimecubed,dosyfrq, kappa = getval("kappa"), gzlvl1 = getval("gzlvl1"), gzlvl3 = getval("gzlvl3"), gzlvl_max = getval("gzlvl_max"), gt1 = getval("gt1"), gt3 = getval("gt3"), del = getval("del"), gstab = getval("gstab"), satpwr = getval("satpwr"), satdly = getval("satdly"), satfrq = getval("satfrq"), gzlvlhs = getval("gzlvlhs"), hsgt = getval("hsgt"), startflip = getval("startflip"); char delflag[MAXSTR], sspul[MAXSTR], satmode[MAXSTR],alt_grd[MAXSTR],lkgate_flg[MAXSTR],oneshot45_flg[MAXSTR]; gt4 = 2.0*gt1; getstr("delflag",delflag); getstr("alt_grd",alt_grd); getstr("oneshot45_flg",oneshot45_flg); getstr("satmode",satmode); getstr("lkgate_flg",lkgate_flg); getstr("sspul",sspul); //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gt1 = syncGradTime("gt1","gzlvl1",0.5); gzlvl1 = syncGradLvl("gt1","gzlvl1",0.5); /* Decrement gzlvl4 as gzlvl1 is incremented, to ensure constant energy dissipation in the gradient coil Current through the gradient coil is proportional to gzlvl */ gzlvl4 = sqrt(2.0*gt1*(1+3.0*kappa*kappa)/gt4) * sqrt(gzlvl_max*gzlvl_max/((1+kappa)*(1+kappa))-gzlvl1*gzlvl1); /* In pulse sequence, del>4.0*pw+3*rof1+2.0*gt1+5.0*gstab+gt3 */ if ((del-(4*pw+3.0*rof1+2.0*gt1+5.0*gstab+gt3)) < 0.0) { del=(4*pw+3.0*rof1+2.0*gt1+5.0*gstab+gt3); text_message("Warning: del too short; reset to minimum value"); } if ((d1 - (gt3+gstab) -2.0*(gt4/2.0+gstab)) < 0.0) { d1 = (gt3+gstab) -2.0*(gt4/2.0+gstab); text_message("Warning: d1 too short; reset to minimum value"); } if ((gzlvl1*(1+kappa)) > gzlvl_max) { abort_message("Max. grad. amplitude exceeded: reduce either gzlvl1 or kappa"); } if (ni > 1.0) { abort_message("This is a 2D, not a 3D dosy sequence: please set ni to 0 or 1"); } if (delflag[0]=='y') { initdel=(gt3+gstab) -2.0*(gt4/2.0+gstab); } else { initdel=0; } Ddelta=gt1; Dtau=2.0*pw+gstab+rof1; dosyfrq = sfrq; dosytimecubed = Ddelta*Ddelta*(del+(Ddelta/6.0) * (kappa*kappa-2.0) + (Dtau/2.0)*(kappa*kappa-1.0)); putCmd("makedosyparams(%e,%e)\n",dosytimecubed,dosyfrq); /* phase cycling calculation */ if(delflag[0]=='y') { mod2(ct,v1); dbl(v1,v1); hlv(ct,v2); mod2(v2,v3); dbl(v3,v3); hlv(v2,v2); mod2(v2,v4); add(v1,v4,v1); /* v1 */ hlv(v2,v2); add(v2,v3,v4); /* v4 */ hlv(v2,v2); mod2(v2,v3); dbl(v3,v5); hlv(v2,v2); mod2(v2,v3); dbl(v3,v3); /* v3 */ hlv(v2,v2); mod2(v2,v6); add(v5,v6,v5); /* v5 */ hlv(v2,v2); mod2(v2,v2); dbl(v2,v2); /* v2 */ assign(v1,oph); dbl(v2,v6); sub(oph,v6,oph); add(v3,oph,oph); sub(oph,v4,oph); dbl(v5,v6); add(v6,oph,oph); mod4(oph,oph); /* receiver phase */ mod2(ct,v6); dbl(v6,v6); /* 02 */ hlv(ct,v8); hlv(v8,v8); dbl(v8,v8); mod4(v8,v8); /* 00002222 */ add(oph,v8,v8); add(v8,v6,v6); add(v6,one,v6); /*Optional 45-degree pulse before acquisition- used when oneshot45_flg='y'*/ } mod2(ct,v7); /* gradients change sign with every scan */ status(A); if(delflag[0]=='y') { zgradpulse(-1.0*gzlvl4,gt4/2.0); /* 1st dummy heating pulse */ delay(gstab); zgradpulse(gzlvl4,gt4/2.0); /* 2nd dummy heating pulse */ delay(gstab); } if (sspul[0]=='y') { zgradpulse(gzlvlhs,hsgt); rgpulse(pw,zero,rof1,rof1); zgradpulse(gzlvlhs,hsgt); } if (satmode[0] == 'y') { if (d1 - satdly > 0) delay(d1 - satdly); else delay(0.02); obspower(satpwr); if (satfrq != tof) obsoffset(satfrq); rgpulse(satdly,zero,rof1,rof1); if (satfrq != tof) obsoffset(tof); obspower(tpwr); delay(1.0e-5); } else { delay(d1-initdel); } if (getflag("wet")) wet4(zero,one); if (delflag[0]=='y') { if (lkgate_flg[0] == 'y') lk_hold(); /* turn lock sampling off */ if (alt_grd[0] == 'y') { ifzero(v7); zgradpulse(-1.0*gzlvl3,gt3); /* Spoiler gradient balancing pulse */ elsenz(v7); zgradpulse(1.0*gzlvl3,gt3); endif(v7); } else zgradpulse(-1.0*gzlvl3,gt3); delay(gstab); } status(B); /* first part of sequence */ if (delflag[0]=='y') { if (gt1>0 && gzlvl1>0) { rgpulse(startflip*pw/90.0, v1, rof1, 0.0); /* first 90, v1 */ if (alt_grd[0] == 'y') {ifzero(v7); zgradpulse(gzlvl1*(1.0-kappa),gt1/2.0); /*1st main gradient pulse*/ elsenz(v7); zgradpulse(-1.0*gzlvl1*(1.0-kappa),gt1/2.0); endif(v7); } else zgradpulse(gzlvl1*(1.0-kappa),gt1/2.0); delay(gstab); rgpulse(pw*2.0, v2, rof1, 0.0); /* first 180, v2 */ if (alt_grd[0] == 'y') {ifzero(v7); zgradpulse(-1.0*gzlvl1*(1.0+kappa),gt1/2.0); /*2nd main grad. pulse*/ elsenz(v7); zgradpulse(1.0*gzlvl1*(1.0+kappa),gt1/2.0); endif(v7); } else zgradpulse(-1.0*gzlvl1*(1.0+kappa),gt1/2.0); delay(gstab); rgpulse(pw, v3, rof1, 0.0); /* second 90, v3 */ if (alt_grd[0] == 'y') {ifzero(v7); zgradpulse(gzlvl1*2.0*kappa,gt1/2.0); /* Lock refocussing pulse*/ elsenz(v7); zgradpulse(-1.0*gzlvl1*2.0*kappa,gt1/2.0); endif(v7); } else zgradpulse(gzlvl1*2.0*kappa,gt1/2.0); delay(gstab); if (alt_grd[0] == 'y') {ifzero(v7); zgradpulse(gzlvl3,gt3); /* Spoiler gradient balancing pulse */ elsenz(v7); zgradpulse(-1.0*gzlvl3,gt3); endif(v7); } else zgradpulse(gzlvl3,gt3); delay(gstab); delcor = del-4.0*pw-3.0*rof1-2.0*gt1-5.0*gstab-gt3; if (satmode[1] == 'y') { obspower(satpwr); if (satfrq != tof) obsoffset(satfrq); rgpulse(delcor,zero,rof1,rof1); if (satfrq != tof) obsoffset(tof); obspower(tpwr); } else delay(del-4.0*pw-3.0*rof1-2.0*gt1-5.0*gstab-gt3); /* diffusion delay */ if (alt_grd[0] == 'y') {ifzero(v7); zgradpulse(2.0*kappa*gzlvl1,gt1/2.0); /*Lock refocussing pulse*/ elsenz(v7); zgradpulse(-2.0*kappa*gzlvl1,gt1/2.0); endif(v7); } else zgradpulse(2.0*kappa*gzlvl1,gt1/2.0); delay(gstab); rgpulse(pw, v4, rof1, 0.0); /* third 90, v4 */ if (alt_grd[0] == 'y') {ifzero(v7); zgradpulse(gzlvl1*(1.0-kappa),gt1/2.0); /*3rd main gradient pulse*/ elsenz(v7); zgradpulse(-1.0*gzlvl1*(1.0-kappa),gt1/2.0); endif(v7); } else zgradpulse(gzlvl1*(1.0-kappa),gt1/2.0); delay(gstab); rgpulse(pw*2.0, v5, rof1, rof1); /* second 180, v5 */ if (alt_grd[0] == 'y') {ifzero(v7); zgradpulse(-1.0*(1.0+kappa)*gzlvl1,gt1/2.0); /*4th main grad. pulse*/ elsenz(v7); zgradpulse(1.0*(1.0+kappa)*gzlvl1,gt1/2.0); endif(v7); } else zgradpulse(-1.0*(1.0+kappa)*gzlvl1,gt1/2.0); if (oneshot45_flg[0] == 'y') { delay(gstab); rgpulse(0.5*pw,v6,rof1,rof2); /* 45-degree pulse, orthogonal to the last 90 */ } else delay(gstab+2*pw/PI); } if (lkgate_flg[0] == 'y') lk_sample(); /* turn lock sampling on */ } else rgpulse(pw,oph,rof1,rof2); status(C); }
void pulsesequence() { double selpwrA = getval("selpwrA"), selpwA = getval("selpwA"), gzlvlA = getval("gzlvlA"), gtA = getval("gtA"), selpwrB = getval("selpwrB"), selpwB = getval("selpwB"), gzlvlB = getval("gzlvlB"), gtB = getval("gtB"), gzlvlE = getval("gzlvlE"), gtE = getval("gtE"), EDratio = getval("EDratio"), gstab = getval("gstab"), pwx180 = getval("pwx180"), pwxlvl180 = getval("pwxlvl180"), hsglvl = getval("hsglvl"), hsgt = getval("hsgt"), tau, evolcorr, jdly, bird; int icosel, ijscale, prgcycle = (int)(getval("prgcycle")+0.5), phase1=(int)(getval("phase")+0.5); char selshapeA[MAXSTR], selshapeB[MAXSTR], pwx180ad[MAXSTR], pwx180adR[MAXSTR]; //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtE = syncGradTime("gtE","gzlvlE",0.5); gzlvlE = syncGradLvl("gtE","gzlvlE",0.5); gtA = syncGradTime("gtA","gzlvlA",1.0); gzlvlA = syncGradLvl("gtA","gzlvlA",1.0); gtB = syncGradTime("gtB","gzlvlB",1.0); gzlvlB = syncGradLvl("gtB","gzlvlB",1.0); getstr("selshapeA",selshapeA); getstr("selshapeB",selshapeB); getstr("pwx180ad", pwx180ad); getstr("pwx180adR", pwx180adR); evolcorr=(4*pwx/PI)+2*pw+8.0e-6; bird = 1 / (4*(getval("j1xh"))); tau = 1/(4*(getval("jnxh"))); ijscale=(int)(getval("jscale") + 0.5); jdly=(d2*ijscale); icosel = 1; assign(ct,v17); assign(zero,v18); assign(zero,v19); if (getflag("prgflg") && (satmode[0] == 'y') && (prgcycle > 1.5)) { hlv(ct,v17); mod2(ct,v18); dbl(v18,v18); if (prgcycle > 2.5) { hlv(v17,v17); hlv(ct,v19); mod2(v19,v19); dbl(v19,v19); } } settable(t1,4,ph1); settable(t2,2,ph2); settable(t4,8,ph4); settable(t5,8,ph5); getelem(t1,v17,v1); getelem(t2,v17,v2); getelem(t4,v17,v4); getelem(t5,v17,oph); add(oph,v18,oph); add(oph,v19,oph); if ((phase1 == 2) || (phase1 == 5)) icosel = -1; initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v14); /* mod2(id2, v14); dbl(v14,v14); */ add(v2, v14, v2); add(oph, v14, oph); status(A); obspower(tpwr); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); if (getflag("slpsat")) { shaped_satpulse("relaxD",satdly,zero); if (getflag("prgflg")) shaped_purge(v1,zero,v18,v19); } else { satpulse(satdly,zero,rof1,rof1); if (getflag("prgflg")) purge(v1,zero,v18,v19); } } else delay(d1); if (getflag("wet")) wet4(zero,one); decpower(pwxlvl); status(B); if (getflag("nullflg")) { rgpulse(0.5 * pw, zero, rof1, rof1); delay(2 * bird); decpower(pwxlvl180); decshaped_pulse(pwx180ad, pwx180, zero, rof1, rof1); rgpulse(2.0 * pw, zero, rof1, rof1); delay(2 * bird + 2 * POWER_DELAY); decshaped_pulse(pwx180adR, pwx180, zero, rof1, rof1); decpower(pwxlvl); rgpulse(1.5 * pw, zero, rof1, rof1); zgradpulse(hsglvl, hsgt); delay(1e-3); } if (getflag("cpmgflg")) { rgpulse(pw, v1, rof1, 0.0); cpmg(v1, v15); } else rgpulse(pw, v1, rof1, rof1); delay(tau/2 - gtA - gstab); delay(jdly/4); zgradpulse(gzlvlA,gtA); delay(gstab); obspower(selpwrA); decpower(pwxlvl180); decshaped_pulse(pwx180ad, pwx180, zero, rof1, rof1); shaped_pulse(selshapeA,selpwA,zero,rof1,rof1); zgradpulse(gzlvlA,gtA); delay(gstab); delay(tau/2 - gtA - gstab); delay(jdly/2); delay(tau/2 - gtB - gstab); zgradpulse(gzlvlB,gtB); delay(gstab); obspower(selpwrB); decshaped_pulse(pwx180adR, pwx180, zero, rof1, rof1); shaped_pulse(selshapeB,selpwB,two,rof1,rof1); obspower(tpwr); zgradpulse(gzlvlB,gtB); delay(gstab); decpower(pwxlvl); delay(jdly/4); delay(tau/2 - gtB - gstab); rgpulse(pw, one, rof1, rof1); zgradpulse(hsglvl, 2 * hsgt); delay(1e-3); decrgpulse(pwx, v2, rof1, 2.0e-6); delay(d2/2); rgpulse(2 * pw, zero, 2.0e-6, 2.0e-6); delay(d2/2); delay(gtE + gstab + 2*GRADIENT_DELAY - POWER_DELAY); decpower(pwxlvl180); decshaped_pulse(pwx180ad, pwx180, zero, rof1, rof1); zgradpulse(gzlvlE, gtE); delay(gstab + POWER_DELAY + evolcorr); decshaped_pulse(pwx180ad, pwx180, zero, rof1, rof1); decpower(pwxlvl); decrgpulse(pwx, v4, 2.0e-6, rof1); zgradpulse(-0.6 * hsglvl, 1.2 * hsgt); delay(1e-3); rgpulse(pw, zero, rof1, rof1); zgradpulse(icosel * 2.0*gzlvlE/EDratio, gtE/2.0); delay(gstab); delay(tau - gtA - 2*gstab - gtE/2); zgradpulse(gzlvlA,gtA); delay(gstab); obspower(selpwrA); decpower(pwxlvl180); decshaped_pulse(pwx180ad, pwx180, zero, rof1, rof1); shaped_pulse(selshapeA,selpwA,zero,rof1,rof1); zgradpulse(gzlvlA,gtA); delay(gstab); delay(tau - gtA - gstab); decshaped_pulse(pwx180adR, pwx180, zero, rof1, rof1); decpower(dpwr); zgradpulse(gzlvlB,gtB); delay(gstab); obspower(selpwrB); shaped_pulse(selshapeB,selpwB,two,rof1,rof2); obspower(tpwr); zgradpulse(gzlvlB,gtB); delay(gstab); status(C); }
pulsesequence() { double jtau,dosytimecubed,Ddelta,taumb,delcor,delcor2, j1xh = getval("j1xh"), jnxh = getval("jnxh"), pwx = getval("pwx"), pwxlvl = getval("pwxlvl"), gzlvl1 = getval("gzlvl1"), gt1 = getval("gt1"), gzlvlE = getval("gzlvlE"), gtE = getval("gtE"), EDratio = getval("EDratio"), gzlvl3 = getval("gzlvl3"), gt3 = getval("gt3"), del = getval("del"), gstab = getval("gstab"), gzlvlhs = getval("gzlvlhs"), hsgt = getval("hsgt"), satdly = getval("satdly"), satpwr = getval("satpwr"), satfrq = getval("satfrq"), dosyfrq = sfrq; char sspul[MAXSTR],lkgate_flg[MAXSTR], mbond[MAXSTR],c180[MAXSTR],alt_grd[MAXSTR]; //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gt1 = syncGradTime("gt1","gzlvl1",1.0); gzlvl1 = syncGradLvl("gt1","gzlvl1",1.0); gtE = syncGradTime("gtE","gzlvlE",1.0); gzlvlE = syncGradLvl("gtE","gzlvlE",1.0); getstr("mbond", mbond); getstr("c180", c180); getstr("sspul",sspul); getstr("satmode",satmode); getstr("alt_grd",alt_grd); getstr("lkgate_flg",lkgate_flg); if (j1xh>0) jtau=1/(2.0*j1xh); else jtau=1/(2.0*140.0); if (jnxh>0) taumb=1/(2.0*jnxh); else taumb=1/(2.0*8.0); Ddelta=gt1; /*the diffusion-encoding pulse width is gt1*/ dosytimecubed=Ddelta*Ddelta*(del - (Ddelta/3.0)); putCmd("makedosyparams(%e,%e)\n",dosytimecubed,dosyfrq); if (jtau < (gt3+gstab)) { text_error("j1xh must be less than 1/(2*(gt3)+gstab)\n"); psg_abort(1); } /* Phase cycle */ /* The phase cycle favours the following coherence pathway : |90H| (-1 H;0 C) |90H| (0 H;0 C) |180C;90H| (+1 H;0 C) |90C| (+1 H;+1 C) |180H| (-1 H;+1 C) |90C| (-1 H;0 C) */ mod2(ct,v1); dbl(v1,v1); assign(v1,v5); /* 0 2, first carbon 90 */ hlv(ct,v3); hlv(v3,v8); mod2(v3,v2); mod2(v8,v8); dbl(v2,v2); add(v2,v8,v2); /* 0 0 2 2 1 1 3 3, 2nd proton 90 */ hlv(v3,v6); hlv(v6,v6); mod2(v6,v6); dbl(v6,v6); /* (0)8 (2)8, proton 180 */ assign(zero,v1); assign(zero,v3); assign(one,v9); add(v1,v9,v9); mod4(v9,v9); assign(zero,v7); assign(zero,v4); assign(zero,v8); assign(v5,oph); sub(oph,v2,oph); dbl(v6,v11); add(oph,v11,oph); sub(oph,v7,oph); mod4(oph,oph); initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v14); add(v14, v5, v5); add(v14, oph, oph); mod2(ct,v10); /* gradients change sign at odd transients */ status(A); obspower(tpwr); if (sspul[0]=='y') { zgradpulse(gzlvlhs,hsgt); rgpulse(pw,zero,rof1,rof1); zgradpulse(gzlvlhs,hsgt); } if (satmode[0] == 'y') { if (d1>satdly) delay(d1-satdly); obspower(satpwr); if (satfrq != tof) obsoffset(satfrq); rgpulse(satdly,zero,rof1,rof1); if (satfrq != tof) obsoffset(tof); obspower(tpwr); } else delay(d1); if (getflag("wet")) wet4(zero,one); status(B); decpower(pwxlvl); rgpulse(pw,v1,rof1,0.0); /* 1st H 90 */ if (lkgate_flg[0] == 'y') lk_hold(); /* turn lock sampling off */ if (alt_grd[0] == 'y') /* defoc. diff. gradient */ { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); delay(jtau/2.0-gt1-pw-rof1); rgpulse(pw,v2,rof1,0.0); /* 2nd H 90 */ if (alt_grd[0] == 'y') /* 1st compensating gradient */ { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1); elsenz(v10); zgradpulse(gzlvl1,gt1); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1); delay(gstab); delcor=del-pw-2.0*rof1-4.0*pwx-4.0e-6-3.0*(gt1+gstab); delcor2=del-pw-2.0*rof1-2.0*pwx-3.0*(gt1+gstab); if (c180[0] == 'y') if (satmode[1] == 'y') { obspower(satpwr); if (satfrq != tof) obsoffset(satfrq); rgpulse(delcor,zero,rof1,rof1); if (satfrq != tof) obsoffset(tof); obspower(tpwr); } else delay(delcor); else if (satmode[1] == 'y') { obspower(satpwr); if (satfrq != tof) obsoffset(satfrq); rgpulse(delcor2,zero,rof1,rof1); if (satfrq != tof) obsoffset(tof); obspower(tpwr); } else delay(delcor2); if (alt_grd[0] == 'y') /* 2nd compensating gradient */ { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1); elsenz(v10); zgradpulse(gzlvl1,gt1); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1); delay(gstab); /* 3rd 1H 90 + 13C 180 */ if (c180[0] == 'y') { decrgpulse(pwx,v4,rof1,0.0); simpulse(pw, 2.0 * pwx, v3, v9, 2.0e-6, 0.0); /* Composite 180 C pulse */ decrgpulse(pwx,v4,2.0e-6,0.0); } else simpulse(pw, 2.0 * pwx, v3, v4, rof1, 0.0); if (alt_grd[0] == 'y') /* refoc. diff. gradient */ { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); if (c180[0] == 'y') delay(jtau/2.0-gt1-(2*pwx+rof1)); else delay(jtau/2.0-gt1-(pwx+rof1)); if (mbond[0] == 'y') /* one-bond J(CH)-filter */ { decrgpulse(pwx, v8, rof1, 0.0); delay(taumb - jtau - rof1 - pwx); } decrgpulse(pwx, v5,rof1,rof1); /* C 90 */ delay(d2/2); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvlE,gtE); elsenz(v10); zgradpulse(-1.0*gzlvlE,gtE); endif(v10); } else zgradpulse(gzlvlE,gtE); delay(gstab); rgpulse(pw*2.0, v6,rof1,rof1); /* H 180 */ if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvlE,gtE); elsenz(v10); zgradpulse(-1.0*gzlvlE,gtE); endif(v10); } else zgradpulse(gzlvlE,gtE); delay(gstab); delay(d2/2); decrgpulse(pwx, v7,rof1,rof2); /* C 90 */ if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(2.0*gzlvlE/EDratio,gtE); elsenz(v10); zgradpulse(-1.0*2.0*gzlvlE/EDratio,gtE); endif(v10); } else zgradpulse(2.0*gzlvlE/EDratio,gtE); decpower(dpwr); if (mbond[0]=='n') delay(jtau-gtE); else delay(gstab); if (lkgate_flg[0] == 'y') lk_sample(); /* turn lock on sampling */ status(C); }
pulsesequence() { double Dtau,Ddelta,dosytimecubed,dosyfrq,CORR,del2check,del2max, gzlvl1 = getval("gzlvl1"), gt1 = getval("gt1"), gzlvl2 = getval("gzlvl2"), gt2 = getval("gt2"), gzlvl3 = getval("gzlvl3"), gt3 = getval("gt3"), del = getval("del"), del2 = getval("del2"), gstab = getval("gstab"), gzlvlhs = getval("gzlvlhs"), hsgt = getval("hsgt"), kappa = getval("kappa"), gzlvlmax = getval("gzlvlmax"), satdly = getval("satdly"), satpwr = getval("satpwr"), satfrq = getval("satfrq"); char delflag[MAXSTR],sspul[MAXSTR],satmode[MAXSTR], triax_flg[MAXSTR],alt_grd[MAXSTR],lkgate_flg[MAXSTR]; nt = getval("nt"); getstr("delflag",delflag); getstr("sspul",sspul); getstr("triax_flg",triax_flg); getstr("satmode",satmode); getstr("alt_grd",alt_grd); getstr("lkgate_flg",lkgate_flg); //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gt1 = syncGradTime("gt1","gzlvl1",0.5); gzlvl1 = syncGradLvl("gt1","gzlvl1",0.5); CORR=1.5*gt1+3*gstab+3.0*pw+5*rof1; if (ni > 1.0) abort_message("This is a 2D, not a 3D dosy sequence: please set ni to 0 or 1"); /* check the shortest executable delay in the sequence */ if ((del-2.0*CORR-gt2-gt3)< 0.0) abort_message("The minimum value of del is %.6f seconds", 2*CORR+gt2+gt3); del2check = del/2.0-CORR-fabs(del2)-gt3; del2max = del/2.0-CORR-gt3; if (del2check< 0.0) abort_message("del2 in absolute value cannot exceed %.6f seconds",del2max); if (gzlvl1*(1+kappa)>gzlvlmax) abort_message("Warning: 'gzlvl1*(1+kappa)>gzlvlmax"); Ddelta = gt1; Dtau = 2.0*pw+2.0*rof1+gstab+gt1/2.0; dosyfrq = getval("sfrq"); dosytimecubed = Ddelta*Ddelta*(del-2.0*(Ddelta/3.0)-2.0*(Dtau/2.0)); putCmd("makedosyparams(%e,%e)\n",dosytimecubed,dosyfrq); /* phase cycling calculation */ settable(t1, 8, phi1); settable(t2, 8, phi2); settable(t3, 1, phi3); settable(t4, 4, phi4); settable(t5,16, phi5); settable(t6, 1, phi6); settable(t7, 1, phi7); settable(t8,32, phi8); settable(t9, 1, phi9); settable(t10, 1, phi10); settable(t11, 16, rec); sub(ct,ssctr,v12); getelem(t1,v12,v1); getelem(t2,v12,v2); getelem(t3,v12,v3); getelem(t4,v12,v4); getelem(t5,v12,v5); getelem(t6,v12,v6); getelem(t7,v12,v7); getelem(t8,v12,v8); getelem(t9,v12,v9); getelem(t10,v12,v10); getelem(t11,v12,oph); mod2(ct,v11); /* gradients change sign at odd transients */ /* equilibrium period */ status(A); if (sspul[0]=='y') { zgradpulse(gzlvlhs,hsgt); rgpulse(pw,zero,rof1,rof1); zgradpulse(gzlvlhs,hsgt); } if (satmode[0] == 'y') { if (d1>satdly) delay(d1-satdly); obspower(satpwr); if (satfrq != tof) obsoffset(satfrq); rgpulse(satdly,zero,rof1,rof1); if (satfrq != tof) obsoffset(tof); obspower(tpwr); } else delay(d1); if (getflag("wet")) wet4(zero,one); status(B); /* first part of bppste sequence */ if(delflag[0]=='y') { if(gt1>0 && gzlvl1!=0) { if (lkgate_flg[0] == 'y') lk_hold(); /* turn lock sampling off */ if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(2*kappa*gzlvl1,gt1/2.0); /* comp. gradient */ elsenz(v11); zgradpulse(-2.0*kappa*gzlvl1,gt1/2.0); /* comp. gradient */ endif(v11); } else zgradpulse(2*kappa*gzlvl1,gt1/2.0); /* comp. gradient */ delay(gstab); if (triax_flg[0] == 'y') /* homospoil grad */ { rgradient('x',-1.0*gzlvl2); /* along x if available */ delay(gt2); rgradient('x',0.0); } else { if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(-1.0*gzlvl2,gt2); /*spoiler comp. gradient*/ elsenz(v11); zgradpulse(1.0*gzlvl2,gt2); /*spoiler comp. gradient*/ endif(v11); } else zgradpulse(-1.0*gzlvl2,gt2); /*spoiler comp. gradient*/ } rgpulse(pw, v1, rof1, rof1); /* first 90, v1 */ if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse((1-kappa)*gzlvl1,gt1/2.0); elsenz(v11); zgradpulse(-1.0*(1-kappa)*gzlvl1,gt1/2.0); endif(v11); } else zgradpulse((1-kappa)*gzlvl1,gt1/2.0); delay(gstab); rgpulse(pw*2, v2, rof1, rof1); /* first 180, v2 */ if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(-1.0*(1+kappa)*gzlvl1,gt1/2.0); elsenz(v11); zgradpulse((1+kappa)*gzlvl1,gt1/2.0); endif(v11); } else zgradpulse(-1.0*(1+kappa)*gzlvl1,gt1/2.0); delay(gstab); rgpulse(pw, v3, rof1, rof1); /* second 90, v3 */ if (triax_flg[0] == 'y') /* homospoil grad */ { rgradient('x',gzlvl2); /* along x if available */ delay(gt2); rgradient('x',0.0); } else { if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(gzlvl2,gt2); /*spoiler gradient*/ elsenz(v11); zgradpulse(-1.0*gzlvl2,gt2); /*spoiler gradient*/ endif(v11); } else zgradpulse(gzlvl2,gt2); /*spoiler gradient*/ } delay(gstab); if (satmode[1] == 'y') { obspower(satpwr); if (satfrq != tof) obsoffset(satfrq); rgpulse(del/2.0-CORR+del2-gt2-gstab-2*rof1,zero,rof1,rof1); if (satfrq != tof) obsoffset(tof); obspower(tpwr); } else delay(del/2.0-CORR+del2-gt2-gstab); if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(2.0*kappa*gzlvl1,gt1/2.0); elsenz(v11); zgradpulse(-2.0*kappa*gzlvl1,gt1/2.0); endif(v11); } else zgradpulse(2.0*kappa*gzlvl1,gt1/2.0); delay(gstab); rgpulse(pw, v4, rof1, rof1); /* third 90, v4 */ if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse((1-kappa)*gzlvl1,gt1/2.0); elsenz(v11); zgradpulse(-1.0*(1-kappa)*gzlvl1,gt1/2.0); endif(v11); } else zgradpulse((1-kappa)*gzlvl1,gt1/2.0); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse((1-kappa)*gzlvl1,gt1/2.0); elsenz(v11); zgradpulse(-1.0*(1-kappa)*gzlvl1,gt1/2.0); endif(v11); } else zgradpulse((1-kappa)*gzlvl1,gt1/2.0); delay(gstab); rgpulse(2*pw,v5,rof1,rof1); if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(-1.0*(1+kappa)*gzlvl1,gt1/2.0); elsenz(v11); zgradpulse((1+kappa)*gzlvl1,gt1/2.0); endif(v11); } else zgradpulse(-1.0*(1+kappa)*gzlvl1,gt1/2.0); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(-1.0*(1+kappa)*gzlvl1,gt1/2.0); elsenz(v11); zgradpulse((1+kappa)*gzlvl1,gt1/2.0); endif(v11); } else zgradpulse(-1.0*(1+kappa)*gzlvl1,gt1/2.0); delay(gstab); rgpulse(pw,v6,rof1,rof1); if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(2.0*kappa*gzlvl1,gt1/2.0); elsenz(v11); zgradpulse(-2.0*kappa*gzlvl1,gt1/2.0); endif(v11); } else zgradpulse(2.0*kappa*gzlvl1,gt1/2.0); if (satmode[1] == 'y') { obspower(satpwr); if (satfrq != tof) obsoffset(satfrq); rgpulse(del/2.0-CORR-del2-gt3-2*rof1,zero,rof1,rof1); if (satfrq != tof) obsoffset(tof); obspower(tpwr); } else delay(del/2.0-CORR-del2-gt3); if (triax_flg[0] == 'y') /* homospoil grad */ { rgradient('y',gzlvl3); /* along y if available */ delay(gt3); rgradient('y',0.0); } else { if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(gzlvl3,gt3); /* 2nd spoiler gradient */ elsenz(v11); zgradpulse(-1.0*gzlvl3,gt3); /* 2nd spoiler gradient */ endif(v11); } else zgradpulse(gzlvl3,gt3); /* 2nd spoiler gradient */ } delay(gstab); rgpulse(pw,v7,rof1,rof1); if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse((1-kappa)*gzlvl1,gt1/2.0); elsenz(v11); zgradpulse(-1.0*(1-kappa)*gzlvl1,gt1/2.0); endif(v11); } else zgradpulse((1-kappa)*gzlvl1,gt1/2.0); delay(gstab); rgpulse(pw*2, v8, rof1, rof1); /* second 180, v8 */ if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(-1.0*(1+kappa)*gzlvl1,gt1/2.0); elsenz(v11); zgradpulse((1+kappa)*gzlvl1,gt1/2.0); endif(v11); } else zgradpulse(-1.0*(1+kappa)*gzlvl1,gt1/2.0); delay(gstab); rgpulse(pw,v9,rof1,rof1); /* z- filter */ if (triax_flg[0] == 'y') /* homospoil grad */ { rgradient('y',-1.0*gzlvl3); /* along y if available */ delay(gt3); rgradient('y',0.0); } else { if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(-1.0*gzlvl3,gt3); /* 2nd spoiler comp. gradient */ elsenz(v11); zgradpulse(gzlvl3,gt3); /* 2nd spoiler comp. gradient */ endif(v11); } else zgradpulse(-1.0*gzlvl3,gt3); /* 2nd spoiler comp. gradient */ } delay(gstab); if (alt_grd[0] == 'y') { ifzero(v11); zgradpulse(2.0*kappa*gzlvl1,gt1/2.0); elsenz(v11); zgradpulse(-2.0*kappa*gzlvl1,gt1/2.0); endif(v11); } else zgradpulse(2.0*kappa*gzlvl1,gt1/2.0); delay(gstab); rgpulse(pw,v10,rof1,rof2); if (lkgate_flg[0] == 'y') lk_sample(); /* turn lock sampling on */ } } else rgpulse(pw, oph,rof1,rof2); /* --- observe period --- */ status(C); }
void pulsesequence() { double j1min = getval("j1min"), j1max = getval("j1max"), pwx180 = getval("pwx180"), pwxlvl180 = getval("pwxlvl180"), pwx180r = getval("pwx180r"), pwxlvl180r = getval("pwxlvl180r"), mult = getval("mult"), gzlvl0 = getval("gzlvl0"), gt0 = getval("gt0"), gzlvlE = getval("gzlvlE"), gtE = getval("gtE"), EDratio = getval("EDratio"), gstab = getval("gstab"), tauA, tauB, tau, taumb, taug, grad1, grad2, grad3, grad4; char pwx180ad[MAXSTR], pwx180ref[MAXSTR]; int icosel, prgcycle = (int)(getval("prgcycle")+0.5), phase1 = (int)(getval("phase")+0.5); //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtE = syncGradTime("gtE","gzlvlE",1.0); gzlvlE = syncGradLvl("gtE","gzlvlE",1.0); getstr("pwx180ad", pwx180ad); getstr("pwx180ref", pwx180ref); tauA = 1/(2*(j1min + 0.146*(j1max - j1min))); tauB = 1/(2*(j1max - 0.146*(j1max - j1min))); tau = 1/(j1max + j1min); taumb = 1 / (2 * (getval("jnxh"))); taug = tau + getval("tauC"); icosel = 1; assign(ct,v17); assign(zero,v18); assign(zero,v19); if (getflag("prgflg") && (satmode[0] == 'y') && (prgcycle > 1.5)) { hlv(ct,v17); mod2(ct,v18); dbl(v18,v18); if (prgcycle > 2.5) { hlv(v17,v17); hlv(ct,v19); mod2(v19,v19); dbl(v19,v19); } } settable(t1, 4, ph1); settable(t2, 8, ph2); settable(t3, 16, ph3); settable(t4, 2, ph4); getelem(t1, v17, v1); getelem(t2, v17, v2); getelem(t3, v17, v3); getelem(t4, v17, oph); add(oph,v18,oph); add(oph,v19,oph); assign(zero,v6); /* mod2(id2, v14); dbl(v14,v14); */ initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v14); add(v2, v14, v2); add(oph, v14, oph); if ((phase1 == 2) || (phase1 == 5)) { icosel = -1; } grad2 = gzlvlE; grad3 = -1.5*gzlvlE; grad1 = -1.0*grad2*(EDratio + icosel)/EDratio; grad4 = -1.0*grad3*(EDratio - icosel)/EDratio; if (mult > 0.5) { grad4 = -1.0*grad3*(EDratio + icosel)/EDratio; } status(A); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); if (getflag("slpsat")) { shaped_satpulse("relaxD",satdly,zero); if (getflag("prgflg")) shaped_purge(v6,zero,v18,v19); } else { satpulse(satdly,zero,rof1,rof1); if (getflag("prgflg")) purge(v6,zero,v18,v19); } } else delay(d1); if (getflag("wet")) wet4(zero,one); obspower(tpwr); decpower(pwxlvl); status(B); if (getflag("cpmgflg")) { rgpulse(pw, v6, rof1, 0.0); cpmg(v6, v15); } else rgpulse(pw, v6, rof1, rof2); /* Start of J filter */ if (getflag("jfilter")) { zgradpulse(gzlvl0,gt0); delay(tauA - gt0); decrgpulse(pwx, zero, rof1, rof1); zgradpulse(-gzlvl0*2/3,gt0); delay(tauB - gt0); decrgpulse(pwx, zero, rof1, rof1); zgradpulse(-gzlvl0/3,gt0); } /* End of J filter */ delay(taumb); zgradpulse(grad1,gtE); delay(gstab); decrgpulse(pwx, v2, rof1, rof1); if (mult > 0.5) { decpower(pwxlvl180r); zgradpulse(grad2,gtE); delay(taug-gtE-2*GRADIENT_DELAY); decshaped_pulse(pwx180ref, pwx180r, zero, rof1, rof1); delay(d2/2); rgpulse(2*pw,v3,rof1,rof1); delay(d2/2); delay(taug-(gtE+gstab+2*GRADIENT_DELAY)+(4*pwx/PI+2*rof1+2*POWER_DELAY-2*pw-2*rof1)); zgradpulse(grad3,gtE); delay(gstab); decshaped_pulse(pwx180ref, pwx180r, zero, rof1, rof1); } else { decpower(pwxlvl180); zgradpulse(grad2,gtE); delay(taug/2+(pwx180r-pwx180)/2- gtE - 2*GRADIENT_DELAY); decshaped_pulse(pwx180ad, pwx180, zero, rof1, rof1); delay(taug/2+(pwx180r-pwx180)/2.0); delay(d2/2); rgpulse(2*pw,v3,rof1,rof1); delay(d2/2); delay(taug/2+(pwx180r-pwx180)/2.0+(4*pwx/PI+2*rof1+2*POWER_DELAY-2*pw-2*rof1)); decshaped_pulse(pwx180ad, pwx180, zero, rof1, rof1); delay(taug/2+(pwx180r-pwx180)/2-gtE-gstab-2*GRADIENT_DELAY); zgradpulse(grad3,gtE); delay(gstab); } decpower(pwxlvl); decrgpulse(pwx, v1, rof1, rof2); decpower(dpwr); zgradpulse(grad4,gtE); delay(gstab); status(C); }
pulsesequence() { double mixN = getval("mixN"), gzlvlC = getval("gzlvlC"), gtC = getval("gtC"), gstab = getval("gstab"), selpwrA = getval("selpwrA"), selpwA = getval("selpwA"), gzlvlA = getval("gzlvlA"), gtA = getval("gtA"), selpwrB = getval("selpwrB"), selpwB = getval("selpwB"), gzlvlB = getval("gzlvlB"), gtB = getval("gtB"), selfrq = getval("selfrq"), zqfpw3 = getval("zqfpw3"), zqfpwr3 = getval("zqfpwr3"), gzlvlzq3 = getval("gzlvlzq3"), mixNcorr, sweeppw = getval("sweeppw"), sweeppwr = getval("sweeppwr"); char sweepshp[MAXSTR], selshapeA[MAXSTR], selshapeB[MAXSTR], zqfpat3[MAXSTR]; int prgcycle=(int)(getval("prgcycle")+0.5); //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtC = syncGradTime("gtC","gzlvlC",1.0); gzlvlC = syncGradLvl("gtC","gzlvlC",1.0); gtA = syncGradTime("gtA","gzlvlA",1.0); gzlvlA = syncGradLvl("gtA","gzlvlA",1.0); gtB = syncGradTime("gtB","gzlvlB",1.0); gzlvlB = syncGradLvl("gtB","gzlvlB",1.0); getstr("sweepshp",sweepshp); getstr("selshapeA",selshapeA); getstr("selshapeB",selshapeB); getstr("zqfpat3",zqfpat3); mixNcorr=0.0; if (getflag("Gzqfilt")) mixNcorr=getval("zqfpw3"); assign(ct,v17); assign(zero,v18); assign(zero,v19); if (getflag("prgflg") && (satmode[0] == 'y') && (prgcycle > 1.5)) { hlv(ct,v17); mod2(ct,v18); dbl(v18,v18); if (prgcycle > 2.5) { hlv(v17,v17); hlv(ct,v19); mod2(v19,v19); dbl(v19,v19); } } assign(zero,v16); if (getflag("STEP")) { mod2(v17,v16); hlv(v17,v17); } hlv(v17,v1); hlv(v1,v1); hlv(v1,v1); hlv(v1,v1); mod4(v1,v1); mod4(v17,v2); add(v1,v2,v2); hlv(v17,v3); hlv(v3,v3); mod4(v3,v3); add(v1,v3,v3); dbl(v3,v4); dbl(v2,oph); add(oph,v4,oph); add(oph,v1,oph); if (!getflag("NOE")) assign(v1,oph); /* if prgflg='n' the next two steps are non-events */ add(oph,v18,oph); add(oph,v19,oph); /* if STEP='n', the next two steps are non-events */ add(oph,v16,oph); add(oph,v16,oph); add(v1,v16,v16); /*v16 is the phase of first echo pulse in steptrain */ /* example: v1=0,0,2,2 v16=0,1,2,3 oph=0,2,2,0 - if STEP='y'*/ /* v1=0,2 v16=0 oph=0,2 - if STEP='n' */ if (getflag("prgflg") && (satmode[0] == 'y')) assign(v1,v6); /* BEGIN THE ACTUAL PULSE SEQUENCE */ status(A); obspower(tpwr); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); if (getflag("slpsat")) { shaped_satpulse("relaxD",satdly,v6); if (getflag("prgflg")) shaped_purge(v1,v6,v18,v19); } else { satpulse(satdly,v6,rof1,rof1); if (getflag("prgflg")) purge(v1,v6,v18,v19); } } else delay(d1); if (getflag("wet")) wet4(zero,one); status(B); rgpulse(pw,v1,rof1,rof2); if (getflag("STEP")) steptrain(v1,v16); if (getflag("NOE")) { if (selfrq != tof) obsoffset(selfrq); zgradpulse(gzlvlA,gtA); delay(gstab); obspower(selpwrA); shaped_pulse(selshapeA,selpwA,v2,rof1,rof1); obspower(tpwr); zgradpulse(gzlvlA,gtA); delay(gstab); if (selfrq != tof) delay(2*OFFSET_DELAY); zgradpulse(gzlvlB,gtB); delay(gstab); obspower(selpwrB); shaped_pulse(selshapeB,selpwB,v3,rof1,rof1); obspower(tpwr); zgradpulse(gzlvlB,gtB); delay(gstab); if (selfrq != tof) obsoffset(tof); rgpulse(pw,v1,rof1,rof1); obspower(sweeppwr); delay(0.31*mixN); zgradpulse(gzlvlC,gtC); delay(gstab); shaped_pulse(sweepshp,sweeppw,zero,rof1,rof1); delay(gstab); zgradpulse(-gzlvlC,gtC); delay(0.49*mixN); zgradpulse(-gzlvlC,2*gtC); delay(gstab); if (getflag("Gzqfilt")) { obspower(zqfpwr3); rgradient('z',gzlvlzq3); delay(100.0e-6); shaped_pulse(zqfpat3,zqfpw3,zero,rof1,rof1); delay(100.0e-6); rgradient('z',0.0); } else shaped_pulse(sweepshp,sweeppw,zero,rof1,rof1); delay(gstab); zgradpulse(gzlvlC,2*gtC); delay(0.2*mixN); obspower(tpwr); rgpulse(pw,v1,rof1,rof2); } status(C); }
void pulsesequence() { double hsglvl = getval("hsglvl"), hsgt = getval("hsgt"), tau, evolcorr, pwx180 = getval("pwx180"), pwxlvl180 = getval("pwxlvl180"), selpwxA = getval("selpwxA"), selpwxlvlA = getval("selpwxlvlA"), gzlvlA = getval("gzlvlA"), gtA = getval("gtA"), selpwxB = getval("selpwxB"), selpwxlvlB = getval("selpwxlvlB"), gzlvlB = getval("gzlvlB"), gtB = getval("gtB"), gstab = getval("gstab"), impress = getval("impress"), null = getval("null"); int phase1 = (int)(getval("phase")+0.5), prgcycle = (int)(getval("prgcycle")+0.5), iimphase = (int)(getval("imphase")+0.5); char pwx180ad[MAXSTR], selpwxshpA[MAXSTR], selpwxshpB[MAXSTR], pwx180adR[MAXSTR]; //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtA = syncGradTime("gtA","gzlvlA",1.0); gzlvlA = syncGradLvl("gtA","gzlvlA",1.0); gtB = syncGradTime("gtB","gzlvlB",1.0); gzlvlB = syncGradLvl("gtB","gzlvlB",1.0); getstr("pwx180ad", pwx180ad); getstr("pwx180adR", pwx180adR); getstr("selpwxshpA", selpwxshpA); getstr("selpwxshpB", selpwxshpB); evolcorr=(4*pwx/PI)+2*pw+8.0e-6; tau = 1/(4*(getval("j1xh"))); if (impress > 0.5) { selpwxA = getval("imppw1"); selpwxlvlA = getval("imppwr1"); getstr("impshp1", selpwxshpA); if (iimphase == 1) { selpwxB = getval("imppw1"); selpwxlvlB = getval("imppwr1"); getstr("impshp1",selpwxshpB); } if (iimphase == 2) { selpwxB = getval("imppw2"); selpwxlvlB = getval("imppwr2"); getstr("impshp2",selpwxshpB); } if (iimphase == 3) { selpwxB = getval("imppw3"); selpwxlvlB = getval("imppwr3"); getstr("impshp3",selpwxshpB); } if (iimphase == 4) { selpwxB = getval("imppw4"); selpwxlvlB = getval("imppwr4"); getstr("impshp4",selpwxshpB); } } assign(ct,v17); assign(zero,v18); assign(zero,v19); if (getflag("prgflg") && (satmode[0] == 'y') && (prgcycle > 1.5)) { hlv(ct,v17); mod2(ct,v18); dbl(v18,v18); if (prgcycle > 2.5) { hlv(v17,v17); hlv(ct,v19); mod2(v19,v19); dbl(v19,v19); } } settable(t1, 4, ph1); settable(t2, 2, ph2); settable(t3, 8, ph3); settable(t4, 16, ph4); settable(t5, 16, ph5); getelem(t1, v17, v1); getelem(t3, v17, v3); getelem(t4, v17, v4); getelem(t2, v17, v2); getelem(t5, v17, oph); assign(zero,v6); add(oph,v18,oph); add(oph,v19,oph); if (phase1 == 2) incr(v2); /* mod2(id2,v14); dbl(v14, v14); */ initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v14); if (impress > 0.5) { if (getflag("fadflg")) { add(v2, v14, v2); add(oph, v14, oph); } } else { add(v2, v14, v2); add(oph, v14, oph); } status(A); obspower(tpwr); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); if (getflag("slpsat")) { shaped_satpulse("relaxD",satdly,zero); if (getflag("prgflg")) shaped_purge(v6,zero,v18,v19); } else { satpulse(satdly,zero,rof1,rof1); if (getflag("prgflg")) purge(v6,zero,v18,v19); } } else delay(d1); if (getflag("wet")) wet4(zero,one); decpower(pwxlvl); status(B); if ((getflag("PFGflg")) && (getflag("nullflg"))) { rgpulse(0.5 * pw, zero, rof1, rof1); delay(2 * tau); decpower(pwxlvl180); decshaped_pulse(pwx180ad, pwx180, zero, rof1, rof1); rgpulse(2.0 * pw, zero, rof1, rof1); delay(2 * tau + 2 * POWER_DELAY); decshaped_pulse(pwx180adR, pwx180, zero, rof1, rof1); decpower(pwxlvl); rgpulse(1.5 * pw, two, rof1, rof1); zgradpulse(hsglvl, hsgt); delay(1e-3); } else if (null != 0.0) { rgpulse(pw, zero, rof1, rof1); delay(2 * tau); decpower(pwxlvl180); decshaped_pulse(pwx180ad, pwx180, zero, rof1, rof1); rgpulse(2.0 * pw, zero, rof1, rof1); delay(2 * tau + 2 * POWER_DELAY); decshaped_pulse(pwx180adR, pwx180, zero, rof1, rof1); decpower(pwxlvl); rgpulse(pw, two, rof1, rof1); if (satmode[1] == 'y') { if (getflag("slpsat")) shaped_satpulse("BIRDnull",null,zero); else satpulse(null,zero,rof1,rof1); } else delay(null); } if (getflag("cpmgflg")) { rgpulse(pw, v6, rof1, 0.0); cpmg(v6, v15); } else rgpulse(pw, v6, rof1, rof1); delay(tau); decpower(pwxlvl180); decshaped_pulse(pwx180ad, pwx180, zero, rof1, rof1); rgpulse(2.0 * pw, zero, rof1, rof1); delay(tau + 2 * POWER_DELAY); decshaped_pulse(pwx180adR, pwx180, zero, rof1, rof1); decpower(pwxlvl); rgpulse(pw, t1, rof1, rof1); if (getflag("PFGflg")) { zgradpulse(hsglvl, 2 * hsgt); delay(1e-3); } decrgpulse(pwx, v2, rof1, 2.0e-6); delay(d2 / 2); rgpulse(2 * pw, zero, 2.0e-6, 2.0e-6); delay(d2 / 2); zgradpulse(gzlvlA,gtA); delay(gstab); decpower(selpwxlvlA); decshaped_pulse(selpwxshpA, selpwxA, zero, rof1, rof1); decpower(pwxlvl); zgradpulse(gzlvlA,gtA); delay(gstab + evolcorr); zgradpulse(gzlvlB,gtB); delay(gstab); decpower(selpwxlvlB); decshaped_pulse(selpwxshpB, selpwxB, zero, rof1, rof1); decpower(pwxlvl); zgradpulse(gzlvlB,gtB); delay(gstab); decrgpulse(pwx, t4, 2.0e-6, rof1); if (getflag("PFGflg")) { zgradpulse(0.6 * hsglvl, 1.2 * hsgt); delay(1e-3); } rgpulse(pw, t3, rof1, rof1); decpower(pwxlvl180); decshaped_pulse(pwx180adR, pwx180, zero, rof1, rof1); decpower(dpwr); delay(tau - (2 * pw / PI) - 2*rof1); rgpulse(2 * pw, zero, rof1, rof2); decpower(pwxlvl180); decshaped_pulse(pwx180ad, pwx180, zero, rof1, rof1); decpower(dpwr); delay(tau - POWER_DELAY); status(C); }
pulsesequence() { double gzlvlE = getval("gzlvlE"), gtE = getval("gtE"), EDratio = getval("EDratio"), gstab = getval("gstab"), mult = getval("mult"), hsglvl = getval("hsglvl"), hsgt = getval("hsgt"), tau, evolcorr, taug; int icosel, phase1 = (int)(getval("phase")+0.5), ZZgsign; //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtE = syncGradTime("gtE","gzlvlE",0.5); gzlvlE = syncGradLvl("gtE","gzlvlE",0.5); tau = 1/(4*(getval("j1xh"))); evolcorr = 2*pw+4.0e-6; if (mult > 0.5) taug = 2*tau; else taug = gtE + gstab + 2*GRADIENT_DELAY; ZZgsign=-1; if (mult == 2) ZZgsign=1; icosel = 1; settable(t1,4,ph1); settable(t2,2,ph2); settable(t3,8,ph3); settable(t4,16,ph4); settable(t5,16,ph5); getelem(t2,ct,v2); getelem(t5,ct,oph); /* mod2(id2,v14); dbl(v14,v14); */ initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v14); if ((phase1 == 2) || (phase1 == 5)) icosel = -1; add(v2,v14,v2); add(oph,v14,oph); status(A); obspower(tpwr); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); satpulse(satdly,zero,rof1,rof1); } else delay(d1); if (getflag("wet")) wet4(zero,one); decpower(pwxlvl); status(B); if (getflag("nullflg")) { rgpulse(0.5*pw,zero,rof1,rof1); delay(2*tau); simpulse(2.0*pw,2.0*pwx,zero,zero,rof1,rof1); delay(2*tau); rgpulse(1.5*pw,two,rof1,rof1); zgradpulse(hsglvl,hsgt); delay(1e-3); } rgpulse(pw,zero,rof1,rof1); delay(tau); simpulse(2*pw,2*pwx,zero,zero,rof1,rof1); delay(tau); rgpulse(pw,t1,rof1,rof1); zgradpulse(hsglvl,2*hsgt); delay(1e-3); decrgpulse(pwx,v2,rof1,2.0e-6); delay(d2/2); rgpulse(2*pw,zero,2.0e-6,2.0e-6); delay(d2/2); zgradpulse(gzlvlE,gtE); delay(taug - gtE - 2*GRADIENT_DELAY); simpulse(mult*pw,2*pwx,zero,zero,rof1,rof1); delay(taug + evolcorr); decrgpulse(pwx,t4,2.0e-6,rof1); zgradpulse(ZZgsign*0.6*hsglvl,1.2*hsgt); delay(1e-3); rgpulse(pw,t3,rof1,rof1); delay(tau - (2*pw/PI) - 2*rof1); simpulse(2*pw,2*pwx,zero,zero,rof1, rof2); decpower(dpwr); zgradpulse(icosel*2.0*gzlvlE/EDratio,gtE/2.0); delay(tau - gtE/2.0 - 2*GRADIENT_DELAY - POWER_DELAY); status(C); }
pulsesequence() { double j1min = getval("j1min"), j1max = getval("j1max"), pwxlvl180 = getval("pwxlvl180"), pwx180 = getval("pwx180"), gzlvl0 = getval("gzlvl0"), gt0 = getval("gt0"), gzlvlE = getval("gzlvlE"), gtE = getval("gtE"), EDratio = getval("EDratio"), gstab = getval("gstab"), grad1, grad2, tau, tauA, tauB, taumb; char pwx180ad[MAXSTR]; int icosel, prgcycle = (int)(getval("prgcycle")+0.5), phase1 = (int)(getval("phase")+0.5); //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtE = syncGradTime("gtE","gzlvlE",1.0); gzlvlE = syncGradLvl("gtE","gzlvlE",1.0); getstr("pwx180ad", pwx180ad); grad1 = gzlvlE; grad2 = -1.0*gzlvlE*(EDratio-1)/(EDratio+1); tauA = 1/(2*(j1min + 0.146*(j1max - j1min))); tauB = 1/(2*(j1max - 0.146*(j1max - j1min))); taumb = 1 / (2 * (getval("jnxh"))); tau = 1 / (j1min+j1max); icosel = 1; assign(ct,v17); assign(zero,v18); assign(zero,v19); if (getflag("prgflg") && (satmode[0] == 'y') && (prgcycle > 1.5)) { hlv(ct,v17); mod2(ct,v18); dbl(v18,v18); if (prgcycle > 2.5) { hlv(v17,v17); hlv(ct,v19); mod2(v19,v19); dbl(v19,v19); } } settable(t1, 1, ph1); settable(t2, 1, ph2); settable(t3, 2, ph3); settable(t4, 1, ph4); settable(t5, 4, ph5); settable(t6, 4, ph6); getelem(t1, v17,v1); getelem(t2, v17,v2); getelem(t3, v17, v3); getelem(t4, v17, v4); getelem(t5, v17, v5); getelem(t6, v17, oph); add(oph,v18,oph); add(oph,v19,oph); /* mod2(id2, v10); dbl(v10,v10); */ initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v10); add(v3, v10, v3); add(oph, v10, oph); if ((phase1 == 2) || (phase1 == 5)) { icosel = -1; grad1 = gzlvlE*(EDratio-1)/(EDratio+1); grad2 = -1.0*gzlvlE; } status(A); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); if (getflag("slpsat")) { shaped_satpulse("relaxD",satdly,zero); if (getflag("prgflg")) shaped_purge(v1,zero,v18,v19); } else { satpulse(satdly,zero,rof1,rof1); if (getflag("prgflg")) purge(v1,zero,v18,v19); } } else delay(d1); if (getflag("wet")) wet4(zero,one); decpower(pwxlvl); status(B); rgpulse(pw, v1, rof1, rof2); /* Start of J filter */ if (getflag("jfilter")) { zgradpulse(gzlvl0/2,gt0); delay(tauA - gt0); decrgpulse(pwx, zero, rof1, rof1); zgradpulse(-gzlvl0/3,gt0); delay(tauB - gt0); decrgpulse(pwx, zero, rof1, rof1); zgradpulse(-gzlvl0/6,gt0); delay(gstab); } /* End of J filter */ delay(taumb); decrgpulse(pwx, v3, rof1, rof1); delay(d2 / 2.0); rgpulse(2 * pw, v4, rof1, rof1); delay(d2 / 2.0); decpower(pwxlvl180); decshaped_pulse(pwx180ad, pwx180, zero, rof1, rof1); delay(2 * pw + 2*POWER_DELAY + 4 * rof1 + (4 * pwx / 3.1416)); zgradpulse(icosel * grad1, gtE); delay(gstab); decshaped_pulse(pwx180ad, pwx180, zero, rof1, rof1); zgradpulse(icosel * grad2, gtE); decpower(pwxlvl); delay(gstab); decrgpulse(pwx, v5, rof1, rof2); decpower(dpwr); status(C); }
void pulsesequence() { double gzlvl1 = getval("gzlvl1"), gt1 = getval("gt1"), gzlvlE = getval("gzlvlE"), gtE = getval("gtE"), EDratio = getval("EDratio"), gzlvl_max = getval("gzlvl_max"), del = getval("del"), dosyfrq=getval("sfrq"), gstab = getval("gstab"), gzlvlhs = getval("gzlvlhs"), hsgt = getval("hsgt"), gtau,tauc,gt4,gzlvl4,Ddelta,dosytimecubed; char convcomp[MAXSTR],sspul[MAXSTR],lkgate_flg[MAXSTR],satmode[MAXSTR], alt_grd[MAXSTR],arraystring[MAXSTR]; int iphase, icosel; //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gt1 = syncGradTime("gt1","gzlvl1",1.0); gzlvl1 = syncGradLvl("gt1","gzlvl1",1.0); gtE = syncGradTime("gtE","gzlvlE",1.0); gzlvlE = syncGradLvl("gtE","gzlvlE",1.0); getstr("sspul",sspul); getstr("convcomp",convcomp); getstr("satmode",satmode); getstr("lkgate_flg",lkgate_flg); getstr("alt_grd",alt_grd); getstr("array",arraystring); iphase = (int)(getval("phase")+0.5); icosel = 1; tau = 1/(2*(getval("jnxh"))); gtau = 2*gstab + GRADIENT_DELAY; tauc = gtau+gtE-gstab; if (strcmp(arraystring,"gzlvl1,phase")!=0) fprintf(stdout,"Warning: array should be 'gzlvl1,phase' for this experiment"); Ddelta=gt1; /* the diffusion-encoding pulse width is gt1 */ if (convcomp[0] == 'y') dosytimecubed=2.0*Ddelta*Ddelta*(del-2.0*(Ddelta/3.0)); else dosytimecubed=2.0*Ddelta*Ddelta*(del-(Ddelta/3.0)); putCmd("makedosyparams(%e,%e)\n",dosytimecubed,dosyfrq); if (ni>1) putCmd("dosy3Dproc=\'y\'\n"); else putCmd("dosy3Dproc=\'n\'"); if (tau < (gtE+gstab)) { abort_message("0.5/jnxh must be greater than gtE+gstab"); } if (tau < (1.0*(gt1+gstab)+del)) { abort_message("0.5/jnxh must be greater than del+gt1+gstab"); } settable(t1,2,ph1); settable(t2,4,ph2); settable(t3,4,ph3); assign(zero,v4); getelem(t1,ct,v1); getelem(t3,ct,oph); if (iphase == 2) icosel = -1; initval(2.0*(double)((int)(d2*getval("sw1")+0.5)%2),v11); add(v1,v11,v1); add(v4,v11,v4); add(oph,v11,oph); mod2(ct,v10); /* gradients change sign at odd transients */ status(A); decpower(pwxlvl); if (sspul[0] == 'y') { zgradpulse(gzlvlhs,hsgt); rgpulse(pw,zero,rof1,rof1); zgradpulse(gzlvlhs,hsgt); } if (lkgate_flg[0]=='y') lk_sample(); /* turn lock sampling on */ if (convcomp[0]=='y') gt4=gt1*2.0; else gt4=gt1; gzlvl4=sqrt(gzlvl_max*gzlvl_max-gzlvl1*gzlvl1); if (satmode[0] == 'y') { if (d1 - satdly > 0) delay(d1 - satdly); obspower(satpwr); rgpulse(satdly,zero,rof1,rof1); obspower(tpwr); } else { delay(d1); } if (getflag("wet")) wet4(zero,one); if (lkgate_flg[0]=='y') lk_hold(); /* turn lock sampling off */ status(B); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl4,gt4); elsenz(v10); zgradpulse(-1.0*gzlvl4,gt4); endif(v10); } else zgradpulse(gzlvl4,gt4); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-1.0*gzlvl4,gt4); elsenz(v10); zgradpulse(gzlvl4,gt4); endif(v10); } else zgradpulse(-1.0*gzlvl4,gt4); delay(gstab); rgpulse(pw,zero,rof1,1.0e-6); if (convcomp[0]=='y') { delay((tau - 1.0e-6 - (2*pw/PI)-del-2.333*gt1-2.0*gstab)/2.0); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1); elsenz(v10); zgradpulse(gzlvl1,gt1); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1); if (satmode[1] == 'y') { obspower(satpwr); rgpulse(del/2.0-5.0*gt1/6.0-2.0*rof1,zero,rof1,rof1); } else delay(del/2.0-5.0*gt1/6.0); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); if (satmode[1] == 'y') { rgpulse(del/2.0-5.0*gt1/6.0-2.0*rof1,zero,rof1,rof1); obspower(tpwr); } else delay(del/2.0-5.0*gt1/6.0); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1); elsenz(v10); zgradpulse(gzlvl1,gt1); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1); delay((tau - 1.0e-6 - (2*pw/PI)-del-2.333*gt1)/2.0); } else { delay((tau - 1.0e-6 - (2*pw/PI)-del-gt1-gstab)/2.0); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); if (satmode[1] == 'y') { obspower(satpwr); rgpulse(del-gt1-2.0*rof1,zero,rof1,rof1); obspower(tpwr); } else delay(del-gt1); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); delay(gstab); delay((tau - 1.0e-6 - (2*pw/PI)-del-gt1-gstab)/2.0); } decrgpulse(pwx,v1,1.0e-6,1.0e-6); delay(gtE+gtau); decrgpulse(2*pwx,v4,1.0e-6,1.0e-6); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvlE,gtE); elsenz(v10); zgradpulse(-1.0*gzlvlE,gtE); endif(v10); } else zgradpulse(gzlvlE,gtE); delay(gstab); if (d2/2 > pw) delay(d2/2 - pw); else delay(d2/2); rgpulse(2.0*pw,zero,1.0e-6,1.0e-6); if (d2/2 > pw) delay(d2/2 - pw); else delay(d2/2); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvlE,gtE); elsenz(v10); zgradpulse(-1.0*gzlvlE,gtE); endif(v10); } else zgradpulse(gzlvlE,gtE); delay(gstab); decrgpulse(2*pwx,zero,1.0e-6,1.0e-6); delay(gtE+gtau); decrgpulse(pwx,t2,1.0e-6,1.0e-6); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(icosel*2.0*gzlvlE/EDratio,gtE); elsenz(v10); zgradpulse(-1.0*icosel*2.0*gzlvlE/EDratio,gtE); endif(v10); } else zgradpulse(icosel*2.0*gzlvlE/EDratio,gtE); if (convcomp[0]=='y') { delay((tau-tauc - 1.0e-6 - (2*pw/PI)-del-2.333*gt1-2.0*gstab)/2.0); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1); elsenz(v10); zgradpulse(gzlvl1,gt1); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1); if (satmode[1] == 'y') { obspower(satpwr); rgpulse(del/2.0-5.0*gt1/6.0-2.0*rof1,zero,rof1,rof1); } else delay(del/2.0-5.0*gt1/6.0); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); delay(gstab); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); if (satmode[1] == 'y') { rgpulse(del/2.0-5.0*gt1/6.0-2.0*rof1,zero,rof1,rof1); obspower(tpwr); } else delay(del/2.0-5.0*gt1/6.0); zgradpulse(-gzlvl1,gt1); delay((tau-tauc - 1.0e-6 - (2*pw/PI)-del-2.333*gt1)/2.0); if (lkgate_flg[0]=='y') lk_sample(); } else { delay((tau-tauc - 1.0e-6 - (2*pw/PI)-del-gt1-gstab)/2.0); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1); elsenz(v10); zgradpulse(gzlvl1,gt1); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1); if (satmode[1] == 'y') { obspower(satpwr); rgpulse(del-gt1-2.0*rof1,zero,rof1,rof1); obspower(tpwr); } else delay(del-gt1); if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1); endif(v10); } else zgradpulse(gzlvl1,gt1); delay(gstab); delay((tau-tauc - 1.0e-6 - (2*pw/PI)-del-gt1-gstab)/2.0); if (lkgate_flg[0]=='y') lk_sample(); } decpower(dpwr); delay(rof2 - POWER_DELAY); status(C); }
void pulsesequence() { double Dtau,Ddelta,dosytimecubed,dosyfrq,delcor, del = getval("del"), gstab = getval("gstab"), gt1 = getval("gt1"), gzlvl1 = getval("gzlvl1"), gzlvlhs = getval("gzlvlhs"), hsgt = getval("hsgt"), satpwr = getval("satpwr"), satdly = getval("satdly"), satfrq = getval("satfrq"); char delflag[MAXSTR],sspul[MAXSTR], alt_grd[MAXSTR],satmode[MAXSTR],lkgate_flg[MAXSTR]; getstr("delflag",delflag); getstr("satmode",satmode); getstr("alt_grd",alt_grd); getstr("lkgate_flg",lkgate_flg); getstr("sspul",sspul); //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gt1 = syncGradTime("gt1","gzlvl1",0.5); gzlvl1 = syncGradLvl("gt1","gzlvl1",0.5); /* In pulse sequence, minimum del=4.0*pw+3*rof1+gt1+2.0*gstab */ if (del < (4*pw+3.0*rof1+gt1+2.0*gstab)) { abort_message("Dbppste error: 'del' is less than %g, too short!", (4.0*pw+3*rof1+gt1+2.0*gstab)); } Ddelta=gt1; Dtau=2.0*pw+rof1+gstab+gt1/2.0; dosyfrq = sfrq; dosytimecubed=Ddelta*Ddelta*(del-(Ddelta/3.0)-(Dtau/2.0)); putCmd("makedosyparams(%e,%e)\n",dosytimecubed,dosyfrq); /* Check for the validity of the number of transients selected ! if ( (nt != 4) && ((int)nt%16 != 0) ) { abort_message("Dbppste error: nt must be 4, 16, 64 or n*16 (n: integer)!"); } */ /* phase cycling calculation */ mod2(ct,v1); dbl(v1,v1); hlv(ct,v2); mod2(v2,v3); dbl(v3,v3); hlv(v2,v2); mod2(v2,v4); add(v1,v4,v1); /* v1 */ hlv(v2,v2); add(v2,v3,v4); /* v4 */ hlv(v2,v2); mod2(v2,v3); dbl(v3,v5); hlv(v2,v2); mod2(v2,v3); dbl(v3,v3); /* v3 */ hlv(v2,v2); mod2(v2,v6); add(v5,v6,v5); /* v5 */ hlv(v2,v2); mod2(v2,v2); dbl(v2,v2); /* v2 */ assign(v1,oph); dbl(v2,v6); sub(oph,v6,oph); add(v3,oph,oph); sub(oph,v4,oph); dbl(v5,v6); add(v6,oph,oph); mod4(oph,oph); /*receiver phase*/ add(two,oph,oph); mod2(ct,v10); /* gradients change sign at odd transients */ if (ni > 1.0) { abort_message("Dbppste is a 2D, not a 3D dosy sequence: please set ni to 0 or 1"); } /* equilibrium period */ status(A); if (sspul[0]=='y') { zgradpulse(gzlvlhs,hsgt); rgpulse(pw,zero,rof1,rof1); zgradpulse(gzlvlhs,hsgt); } if (satmode[0] == 'y') { if (d1 - satdly > 0) delay(d1 - satdly); obspower(satpwr); if (satfrq != tof) obsoffset(satfrq); rgpulse(satdly,zero,rof1,rof1); if (satfrq != tof) obsoffset(tof); obspower(tpwr); delay(1.0e-5); } else { delay(d1); } if (getflag("wet")) wet4(zero,one); status(B); /* first part of bppdel sequence */ if (delflag[0]=='y') { if (gt1>0 && gzlvl1>0) { rgpulse(pw, v1, rof1, 0.0); /* first 90, v1 */ if (lkgate_flg[0] == 'y') lk_hold(); /* turn lock sampling off */ if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1/2.0); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1/2.0); endif(v10); } else zgradpulse(gzlvl1,gt1/2.0); delay(gstab); rgpulse(pw*2.0, v2, rof1, 0.0); /* first 180, v2 */ if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1/2.0); elsenz(v10); zgradpulse(gzlvl1,gt1/2.0); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1/2.0); delay(gstab); rgpulse(pw, v3, rof1, 0.0); /* second 90, v3 */ delcor = del-4.0*pw-3.0*rof1-gt1-2.0*gstab; if (satmode[1] == 'y') { obspower(satpwr); if (satfrq != tof) obsoffset(satfrq); rgpulse(delcor,zero,rof1,rof1); if (satfrq != tof) obsoffset(tof); obspower(tpwr); } else delay(delcor); /*diffusion delay */ rgpulse(pw, v4, rof1, 0.0); /* third 90, v4 */ if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(gzlvl1,gt1/2.0); elsenz(v10); zgradpulse(-1.0*gzlvl1,gt1/2.0); endif(v10); } else zgradpulse(gzlvl1,gt1/2.0); delay(gstab); rgpulse(pw*2.0, v5, rof1, rof1); /* second 180, v5 */ if (alt_grd[0] == 'y') { ifzero(v10); zgradpulse(-1.0*gzlvl1,gt1/2.0); elsenz(v10); zgradpulse(gzlvl1,gt1/2.0); endif(v10); } else zgradpulse(-1.0*gzlvl1,gt1/2.0); delay(gstab+2*pw/PI); if (lkgate_flg[0] == 'y') lk_sample(); /* turn lock sampling on */ } } else rgpulse(pw,oph,rof1,rof2); /* --- observe period --- */ status(C); }
pulsesequence() { double gzlvlE = getval("gzlvlE"), gtE = getval("gtE"), EDratio = getval("EDratio"), gstab = getval("gstab"), mult = getval("mult"), pwx180 = getval("pwx180"), pwxlvl180 = getval("pwxlvl180"), pwx180r = getval("pwx180r"), pwxlvl180r = getval("pwxlvl180r"), tpwr180 = getval("tpwr180"), pw180 = getval("pw180"), hsglvl = getval("hsglvl"), hsgt = getval("hsgt"), gzlvl5 = getval("gzlvl5"), tau, taug; int icosel, phase1 = (int)(getval("phase")+0.5), prgcycle = (int)(getval("prgcycle")+0.5), ZZgsign; char pwx180ad[MAXSTR], pwx180ref[MAXSTR], bipflg[MAXSTR], pw180ad[MAXSTR]; //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtE = syncGradTime("gtE","gzlvlE",0.5); gzlvlE = syncGradLvl("gtE","gzlvlE",0.5); getstr("pwx180ad", pwx180ad); getstr("pwx180ref", pwx180ref); getstr("pw180ad", pw180ad); getstr("bipflg",bipflg); if (bipflg[0] == 'y') { tpwr180=getval("tnbippwr"); pw180=getval("tnbippw"); getstr("tnbipshp",pw180ad); } if (bipflg[1] == 'y') { pwxlvl180=getval("dnbippwr"); pwx180=getval("dnbippw"); getstr("dnbipshp",pwx180ad); } tau = 1 / (4*(getval("j1xh"))); if (mult > 0.5) taug = 2*tau + getval("tauC"); else taug = gtE + gstab + 2 * GRADIENT_DELAY; ZZgsign=-1; if (mult == 2) ZZgsign=1; icosel = 1; assign(ct,v17); assign(zero,v18); assign(zero,v19); if (getflag("prgflg") && (satmode[0] == 'y') && (prgcycle > 1.5)) { hlv(ct,v17); mod2(ct,v18); dbl(v18,v18); if (prgcycle > 2.5) { hlv(v17,v17); hlv(ct,v19); mod2(v19,v19); dbl(v19,v19); } } settable(t1, 4, ph1); settable(t2, 2, ph2); settable(t3, 8, ph3); settable(t4, 16, ph4); settable(t5, 16, ph5); getelem(t1, v17, v1); getelem(t3, v17, v3); getelem(t4, v17, v4); getelem(t2, v17, v2); getelem(t5, v17, oph); assign(zero,v6); add(oph,v18,oph); add(oph,v19,oph); if ((phase1 == 2) || (phase1 == 5)) icosel = -1; initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v14); /* mod2(id2, v14); dbl(v14,v14); */ add(v2, v14, v2); add(oph, v14, oph); status(A); obspower(tpwr); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); if (getflag("slpsat")) { shaped_satpulse("relaxD",satdly,zero); if (getflag("prgflg")) shaped_purge(v6,zero,v18,v19); } else { satpulse(satdly,zero,rof1,rof1); if (getflag("prgflg")) purge(v6,zero,v18,v19); } } else delay(d1); if (getflag("wet")) wet4(zero,one); obspower(tpwr); decpower(pwxlvl180); status(B); if (getflag("nullflg")) { rgpulse(0.5 * pw, zero, rof1, rof1); obspower(tpwr180); delay(tau); simshaped_pulse(pw180ad,pwx180ad,pw180,pwx180,zero,zero,rof1,rof1); delay(tau+POWER_DELAY+rof1); delay(tau+POWER_DELAY+rof1); simshaped_pulse(pw180ad,pwx180ad,pw180,pwx180,zero,zero,rof1,rof1); obspower(tpwr); delay(tau); rgpulse(0.5 * pw, zero, rof1, rof1); zgradpulse(hsglvl, hsgt); delay(1e-3); } rgpulse(pw, v6, rof1, rof1); obspower(tpwr180); shaped_pulse(pw180ad,pw180,zero,rof1,rof1); delay(tau+2.0*POWER_DELAY+2.0*rof1); simshaped_pulse(pw180ad,pwx180ad,pw180,pwx180,zero,zero,rof1,rof1); delay(tau); obspower(tpwr); rgpulse(pw, v1, rof1, rof1); zgradpulse(hsglvl, 2 * hsgt); decpower(pwxlvl); obspower(tpwr180); delay(1e-3); decrgpulse(pwx, v2, rof1, 2.0e-6); delay(d2 / 2); shaped_pulse(pw180ad,pw180,zero,rof1,rof1); delay(d2 / 2); delay(taug - POWER_DELAY); decpower(pwxlvl180r); decshaped_pulse(pwx180ref, pwx180r, zero, rof1, rof1); if(mult < 1.5) { obspower(tpwr); if (mult <0.5) delay(2*rof1); else rgpulse(mult*pw,zero,rof1,rof1); } else shaped_pulse(pw180ad,pw180,zero,rof1,rof1); if(mult < 1.5) delay(4*pwx/PI + 4.0e-6 + taug - gtE - gstab - 2 * GRADIENT_DELAY + WFG_START_DELAY + pw180 + WFG_STOP_DELAY - mult*pw); else delay(4*pwx/PI + 4.0e-6 + POWER_DELAY + taug - gtE - gstab - 2 * GRADIENT_DELAY); zgradpulse(gzlvlE, gtE); delay(gstab); decshaped_pulse(pwx180ref, pwx180r, zero, rof1, rof1); decpower(pwxlvl); decrgpulse(pwx, v4, 2.0e-6, rof1); obspower(tpwr); decpower(pwxlvl180); zgradpulse(ZZgsign*0.6 * hsglvl, 1.2 * hsgt); delay(1e-3); rgpulse(pw, v3, rof1, rof1); obspower(tpwr180); shaped_pulse(pw180ad,pw180,zero,rof1,rof1); zgradpulse(gzlvl5,gtE/2.0); delay(tau-gtE/2.0+2.0*POWER_DELAY); simshaped_pulse(pw180ad,pwx180ad,pw180,pwx180,zero,zero,rof1,rof2); zgradpulse(gzlvl5+icosel * 2.0*gzlvlE/EDratio, gtE/2.0); delay(tau-gtE/2.0); decpower(dpwr); status(C); }
pulsesequence() { double gzlvlE = getval("gzlvlE"), gtE = getval("gtE"), EDratio = getval("EDratio"), gstab = getval("gstab"), hsglvl = getval("hsglvl"), hsgt = getval("hsgt"), slpwT = getval("slpwT"), slpwrT = getval("slpwrT"), trim = getval("trim"), mixT = getval("mixT"), mult = getval("mult"), tau, gtau; int icosel, phase1 = (int)(getval("phase")+0.5); char slpatT[MAXSTR]; //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtE = syncGradTime("gtE","gzlvlE",0.5); gzlvlE = syncGradLvl("gtE","gzlvlE",0.5); getstr("slpatT",slpatT); if (strcmp(slpatT,"mlev17c") && strcmp(slpatT,"dipsi2") && strcmp(slpatT,"dipsi3") && strcmp(slpatT,"mlev17") && strcmp(slpatT,"mlev16")) abort_message("SpinLock pattern %s not supported!.\n", slpatT); tau = 1/(4*(getval("j1xh"))); gtau = 2*gstab + 2*GRADIENT_DELAY; icosel = 1; settable(t1,2,ph1); settable(t2,4,ph2); settable(t3,4,ph3); assign(zero,v6); getelem(t1,ct,v1); getelem(t3,ct,oph); assign(two,v3); sub(v3,one,v2); add(v3,one,v4); add(v3,two,v5); /* mod2(id2,v14); dbl(v14,v14); */ initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v14); if ((phase1 == 2) || (phase1 == 5)) icosel = -1; add(v1,v14,v1); add(v6,v14,v6); add(oph,v14,oph); status(A); obspower(tpwr); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); satpulse(satdly,zero,rof1,rof1); } else delay(d1); if (getflag("wet")) wet4(zero,one); decpower(pwxlvl); status(B); if (getflag("nullflg")) { rgpulse(0.5*pw,zero,rof1,rof1); delay(2*tau); simpulse(2.0*pw,2.0*pwx,zero,zero,rof1,rof1); delay(2*tau); rgpulse(1.5*pw,two,rof1,rof1); zgradpulse(hsglvl,hsgt); delay(1e-3); } rgpulse(pw,zero,rof1,rof1); delay(2*tau - 2*rof1 - (2*pw/PI)); decrgpulse(pwx,v1,rof1,1.0e-6); delay(gtE/2.0+gtau - (2*pwx/PI) - pwx - 1.0e-6 - rof1); decrgpulse(2*pwx,v6,rof1,1.0e-6); delay(gstab - pwx - 1.0e-6); zgradpulse(gzlvlE,gtE/2.0); delay(gstab - rof1 - pw); delay(d2/2); rgpulse(2.0*pw,zero,rof1,rof1); delay(d2/2); delay(gstab - rof1 - pw); zgradpulse(gzlvlE,gtE/2.0); delay(gstab - pwx - rof1); decrgpulse(2*pwx,zero,rof1,1.0e-6); delay(gtE/2.0+gtau - (2*pwx/PI) - pwx - 1.0e-6 - rof1); decrgpulse(pwx,t2,rof1,rof1); delay(2*tau - rof1 - POWER_DELAY); obspower(slpwrT); if (mixT > 0.0) { rgpulse(trim,v5,0.0,0.0); if (dps_flag) rgpulse(mixT,v3,0.0,0.0); else SpinLock(slpatT,mixT,slpwT,v2,v3,v4,v5,v9); } obspower(tpwr); if (mult > 0.5) delay(2*tau - rof1); else delay(gtE/2 + gstab + 2*GRADIENT_DELAY - rof1); simpulse(2*pw,mult*pwx,one,zero,rof1,rof2); decpower(dpwr); zgradpulse(icosel*2*gzlvlE/EDratio,gtE/2.0); if (mult > 0.5) delay(2*tau - gtE/2 - 2*GRADIENT_DELAY); else delay(gstab); status(C); }
pulsesequence() { double slpwrT = getval("slpwrT"), slpwT = getval("slpwT"), mixT = getval("mixT"), trim = getval("trim"), tauz1 = getval("tauz1"), tauz2 = getval("tauz2"), tauz3 = getval("tauz3"), tauz4 = getval("tauz4"), selpwrA = getval("selpwrA"), selpwA = getval("selpwA"), gzlvlA = getval("gzlvlA"), gtA = getval("gtA"), selpwrB = getval("selpwrB"), selpwB = getval("selpwB"), gzlvlB = getval("gzlvlB"), gtB = getval("gtB"), gstab = getval("gstab"), selfrq = getval("selfrq"); char selshapeA[MAXSTR], selshapeB[MAXSTR], slpatT[MAXSTR]; //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtA = syncGradTime("gtA","gzlvlA",1.0); gzlvlA = syncGradLvl("gtA","gzlvlA",1.0); gtB = syncGradTime("gtB","gzlvlB",1.0); gzlvlB = syncGradLvl("gtB","gzlvlB",1.0); getstr("slpatT",slpatT); getstr("selshapeA",selshapeA); getstr("selshapeB",selshapeB); if (strcmp(slpatT,"mlev17c") && strcmp(slpatT,"dipsi2") && strcmp(slpatT,"dipsi3") && strcmp(slpatT,"mlev17") && strcmp(slpatT,"mlev16")) abort_message("SpinLock pattern %s not supported!.\n", slpatT); assign(ct,v6); if (getflag("zqfilt")) { hlv(v6,v6); hlv(v6,v6); } settable(t1,4,ph1); getelem(t1,v6,v1); settable(t3,8,ph3); getelem(t3,v6,v11); settable(t4,8,ph4); settable(t2,4,ph2); getelem(t2,v6,v2); settable(t7,8,ph7); getelem(t7,v6,v7); settable(t8,4,ph8); getelem(t8,v6,v8); if (getflag("zqfilt")) getelem(t4,v6,oph); else assign(v1,oph); sub(v2,one,v3); add(v2,two,v4); add(v3,two,v5); mod4(ct,v10); /* BEGIN THE ACTUAL PULSE SEQUENCE */ status(A); obspower(tpwr); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); satpulse(satdly,v6,rof1,rof1); } else delay(d1); if (getflag("wet")) wet4(zero,one); status(B); rgpulse(pw, v1, rof1, rof1); if (selfrq != tof) obsoffset(selfrq); zgradpulse(gzlvlA,gtA); delay(gstab); obspower(selpwrA); shaped_pulse(selshapeA,selpwA,v1,rof1,rof1); obspower(tpwr); zgradpulse(gzlvlA,gtA); delay(gstab); if (selfrq != tof) delay(2*OFFSET_DELAY); zgradpulse(gzlvlB,gtB); delay(gstab); obspower(selpwrB); shaped_pulse(selshapeB,selpwB,v2,rof1,rof1); obspower(slpwrT); zgradpulse(gzlvlB,gtB); delay(gstab); if (selfrq != tof) obsoffset(tof); if (mixT > 0.0) { rgpulse(trim,v11,0.0,0.0); if (dps_flag) rgpulse(mixT,v3,0.0,0.0); else SpinLock(slpatT,mixT,slpwT,v2,v3,v4,v5, v9); } if (getflag("zqfilt")) { obspower(tpwr); rgpulse(pw,v7,1.0e-6,rof1); ifzero(v10); delay(tauz1); endif(v10); decr(v10); ifzero(v10); delay(tauz2); endif(v10); decr(v10); ifzero(v10); delay(tauz3); endif(v10); decr(v10); ifzero(v10); delay(tauz4); endif(v10); rgpulse(pw,v8,rof1,rof2); } else delay(rof2); status(C); }
void pulsesequence() { double gt1 = getval("gt1"), gzlvl1=getval("gzlvl1"), gt2 = getval("gt2"), gzlvl2=getval("gzlvl2"), gt3 = getval("gt3"), gzlvl3=getval("gzlvl3"), gt4 = getval("gt4"), gzlvl4=getval("gzlvl4"), selpwrPS = getval("selpwrPS"), selpwPS = getval("selpwPS"), gzlvlPS = getval("gzlvlPS"), slpwrT = getval("slpwrT"), slpwT = getval("slpwT"), mixT = getval("mixT"), zqfpw1 = getval("zqfpw1"), zqfpwr1 = getval("zqfpwr1"), zqfpw2 = getval("zqfpw2"), zqfpwr2 = getval("zqfpwr2"), gzlvlzq1 = getval("gzlvlzq1"), gzlvlzq2 = getval("gzlvlzq2"), gstab = getval("gstab"); int prgcycle=(int)(getval("prgcycle")+0.5), phase1 = (int)(getval("phase")+0.5); char selshapePS[MAXSTR], slpatT[MAXSTR], zqfpat1[MAXSTR], zqfpat2[MAXSTR]; /* LOAD AND INITIALIZE VARIABLES */ getstr("slpatT",slpatT); getstr("zqfpat1",zqfpat1); getstr("zqfpat2",zqfpat2); if (strcmp(slpatT,"mlev17c") && strcmp(slpatT,"dipsi2") && strcmp(slpatT,"dipsi3") && strcmp(slpatT,"mlev17") && strcmp(slpatT,"mlev16")) abort_message("SpinLock pattern %s not supported!.\n", slpatT); //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gt1 = syncGradTime("gt1","gzlvl1",1.0); gzlvl1 = syncGradLvl("gt1","gzlvl1",1.0); gt2 = syncGradTime("gt2","gzlvl2",1.0); gzlvl2 = syncGradLvl("gt2","gzlvl2",1.0); getstr("selshapePS",selshapePS); assign(ct,v17); initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v14); settable(t1,2,ph1); settable(t2,1,ph2); settable(t3,8,ph3); settable(t4,1,ph4); settable(t5,1,ph5); settable(t6,1,ph6); settable(t7,1,ph7); settable(t8,1,ph8); settable(t9,8,ph9); getelem(t1,v17,v1); getelem(t2,v17,v2); getelem(t3,v17,v3); getelem(t4,v17,v4); getelem(t5,v17,v5); getelem(t6,v17,v6); getelem(t7,v17,v7); getelem(t8,v17,v8); getelem(t9,v17,v9); assign(v9,oph); if (phase1 == 2) {incr(v1); } add(v1, v14, v1); add(oph,v14,oph); /* BEGIN THE ACTUAL PULSE SEQUENCE */ status(A); obspower(tpwr); delay(5.0e-5); if (getflag("sspul")) steadystate(); delay(d1); status(B); obspower(tpwr); rgpulse(pw, v1, rof1, rof1); delay(d2/2.0); zgradpulse(gzlvl1,gt1); delay(gstab); rgpulse(2*pw,v2,rof1,rof1); zgradpulse(gzlvl1,gt1); delay(gstab); zgradpulse(gzlvl2,gt2); delay(2.0*gstab); obspower(selpwrPS); rgradient('z',gzlvlPS); shaped_pulse(selshapePS,selpwPS,v3,rof1,rof1); rgradient('z',0.0); delay(gstab); obspower(tpwr); zgradpulse(gzlvl2,gt2); delay(gstab); if (d2>0) delay(d2/2.0-2.0*pw/PI-2.0*rof1); rgpulse(pw,v5,rof1,rof1); if (mixT > 0.0) { if (getflag("Gzqfilt")) { obspower(zqfpwr1); rgradient('z',gzlvlzq1); delay(100.0e-6); shaped_pulse(zqfpat1,zqfpw1,zero,rof1,rof1); delay(100.0e-6); rgradient('z',0.0); delay(100e-6); } obspower(slpwrT); zgradpulse(gzlvl3,gt3); delay(gt3); if (dps_flag) rgpulse(mixT,v4,0.0,0.0); else SpinLock(slpatT,mixT,slpwT,v4); if (getflag("Gzqfilt")) { obspower(zqfpwr2); rgradient('z',gzlvlzq2); delay(100.0e-6); shaped_pulse(zqfpat2,zqfpw2,zero,rof1,rof1); delay(100.0e-6); rgradient('z',0.0); delay(100e-6); } obspower(tpwr); zgradpulse(gzlvl4,gt4); delay(gt4); } rgpulse(pw,v8,rof1,rof2); status(C); }
pulsesequence() { double slpwrR = getval("slpwrR"), slpwR = getval("slpwR"), mixR = getval("mixR"), selpwrA = getval("selpwrA"), selpwA = getval("selpwA"), gzlvlA = getval("gzlvlA"), gtA = getval("gtA"), selpwrB = getval("selpwrB"), selpwB = getval("selpwB"), gzlvlB = getval("gzlvlB"), gtB = getval("gtB"), gstab = getval("gstab"), selfrq = getval("selfrq"), gzlvl1 = getval("gzlvl1"), gt1 = getval("gt1"), gzlvl2 = getval("gzlvl2"), gt2 = getval("gt2"), zqfpw1 = getval("zqfpw1"), zqfpwr1 = getval("zqfpwr1"), gzlvlzq1 = getval("gzlvlzq1"), phincr1 = getval("phincr1"); char selshapeA[MAXSTR],selshapeB[MAXSTR], slpatR[MAXSTR], zqfpat1[MAXSTR], alt_grd[MAXSTR]; //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtA = syncGradTime("gtA","gzlvlA",1.0); gzlvlA = syncGradLvl("gtA","gzlvlA",1.0); gtB = syncGradTime("gtB","gzlvlB",1.0); gzlvlB = syncGradLvl("gtB","gzlvlB",1.0); getstr("slpatR",slpatR); getstr("selshapeA",selshapeA); getstr("selshapeB",selshapeB); getstr("zqfpat1",zqfpat1); getstr("alt_grd",alt_grd); if (strcmp(slpatR,"cw") && strcmp(slpatR,"troesy") && strcmp(slpatR,"dante")) abort_message("SpinLock pattern %s not supported!.\n", slpatR); /* STEADY-STATE PHASECYCLING */ /* This section determines if the phase calculations trigger off of (SS - SSCTR) or off of CT */ assign(ct,v17); ifzero(ssctr); assign(v17,v13); elsenz(ssctr); /* purge option does not adjust v13 during steady state */ sub(ssval, ssctr, v13); endif(ssctr); /* Beginning phase cycling */ dbl(v13,v1); /* v1 = 0 2 */ hlv(v13,v13); dbl(v13,v20); /* v20 = 00 22 */ hlv(v13,v13); dbl(v13,v6); /* v6 = 0000 2222 */ hlv(v13,v13); dbl(v13,v7); /* v7 = 00000000 22222222 */ assign(v1,oph); if (getflag("Gzqfilt")) add(v7,oph,oph); /* CYCLOPS */ assign(v13,v14); /* v14 = 8x0 8x1 8x2 8x3 */ if (getflag("Gzqfilt")) hlv(v13,v14); /* v14 = 16x0 16x1 16x2 16x3 */ add(v1,v14,v1); add(v20,v14,v20); add(v6,v14,v6); add(v7,v14,v7); add(oph,v14,oph); /* add(oph,v18,oph); add(oph,v19,oph); */ assign(zero,v9); mod2(ct,v2); /* 01 01 */ hlv(ct,v11); hlv(v11,v11); mod2(v11,v11); dbl(v11,v11); /* 0000 2222 */ add(v11,v2,v11); mod4(v11,v11); /* 0101 2323 first echo in Excitation Sculpting */ hlv(ct,v4); mod2(v4,v4); /* 0011 */ hlv(ct,v12); hlv(v12,v12); hlv(v12,v12); dbl(v12,v12); add(v12,v4,v12); mod4(v12,v12); /* 0011 0011 2233 2233 second echo in Excitation Sculpting */ dbl(v2,v2); /* 0202 */ dbl(v4,v4); /* 0022 */ add(v2,v4,v4); /* 0220 correct oph for Excitation Sculpting */ add(oph,v4,oph); mod4(oph,oph); if (!strcmp(slpatR,"troesy")) assign(v20,v21); else add(v20,one,v21); if (alt_grd[0] == 'y') mod2(ct,v8); /* alternate gradient sign on even scans */ /* The following is for flipback pulse */ if (phincr1 < 0.0) phincr1=360+phincr1; initval(phincr1,v5); /* BEGIN THE ACTUAL PULSE SEQUENCE */ status(A); if (getflag("lkgate_flg")) lk_sample(); /* turn lock sampling on */ obspower(tpwr); delay(5.0e-5); if (getflag("sspul")) steadystate(); delay(d1); if (getflag("lkgate_flg")) lk_hold(); /* turn lock sampling off */ status(B); rgpulse(pw, v1, rof1, rof1); if (selfrq != tof) obsoffset(selfrq); ifzero(v8); zgradpulse(gzlvlA,gtA); elsenz(v8); zgradpulse(-gzlvlA,gtA); endif(v8); delay(gstab); obspower(selpwrA); shaped_pulse(selshapeA,selpwA,v14,rof1,rof1); obspower(tpwr); ifzero(v8); zgradpulse(gzlvlA,gtA); elsenz(v8); zgradpulse(-gzlvlA,gtA); endif(v8); delay(gstab); if (selfrq != tof) delay(2*OFFSET_DELAY); ifzero(v8); zgradpulse(gzlvlB,gtB); elsenz(v8); zgradpulse(-gzlvlB,gtB); endif(v8); delay(gstab); obspower(selpwrB); shaped_pulse(selshapeB,selpwB,v6,rof1,rof1); obspower(slpwrR); ifzero(v8); zgradpulse(gzlvlB,gtB); elsenz(v8); zgradpulse(-gzlvlB,gtB); endif(v8); delay(gstab); if (selfrq != tof) obsoffset(tof); if (mixR > 0.0) { if (dps_flag) rgpulse(mixR,v21,0.0,0.0); else SpinLock(slpatR,mixR,slpwR,v21); } if (getflag("Gzqfilt")) { obspower(tpwr); rgpulse(pw,v7,rof1,rof1); ifzero(v8); zgradpulse(gzlvl1,gt1); elsenz(v8); zgradpulse(-gzlvl1,gt1); endif(v8); delay(gstab); obspower(zqfpwr1); ifzero(v8); rgradient('z',gzlvlzq1); elsenz(v8); rgradient('z',-gzlvlzq1); endif(v8); delay(100.0e-6); shaped_pulse(zqfpat1,zqfpw1,zero,rof1,rof1); delay(100.0e-6); rgradient('z',0.0); delay(gstab); ifzero(v8); zgradpulse(-gzlvl2,gt2); elsenz(v8); zgradpulse(gzlvl2,gt2); endif(v8); obspower(tpwr); delay(gstab); if (getflag("flipback")) FlipBack(v14,v5); rgpulse(pw,v14,rof1,2.0e-6); } ExcitationSculpting(v11,v12,v8); delay(rof2); status(C); }
pulsesequence() { double j1min = getval("j1min"), j1max = getval("j1max"), gzlvlE = getval("gzlvlE"), gtE = getval("gtE"), pwx180 = getval("pwx180"), pwxlvl180 = getval("pwxlvl180"), EDratio = getval("EDratio"), gstab = getval("gstab"), hsglvl = getval("hsglvl"), hsgt = getval("hsgt"), dmfct = getval("dmfct"), dpwrct = getval("dpwrct"), tau, tau1, tau3, bigT = getval("BigT"); char pwx180ad[MAXSTR], dmct[MAXSTR], pwx180adR[MAXSTR]; int icosel, MAXni, prgcycle = (int)(getval("prgcycle")+0.5), phase1 = (int)(getval("phase")+0.5); //synchronize gradients to srate for probetype='nano' // Preserve gradient "area" gtE = syncGradTime("gtE","gzlvlE",1.0); gzlvlE = syncGradLvl("gtE","gzlvlE",1.0); getstr("pwx180ad",pwx180ad); getstr("pwx180adR",pwx180adR); getstr("dmct",dmct); tau1 = 1/(2*(j1min + 0.07*(j1max - j1min))); tau3 = 1/(2*(j1max - 0.07*(j1max - j1min))); tau = 1 / (j1min+j1max); /* Make sure ni does not exceed what is allowed by BigT */ MAXni = (((bigT/2 - 1/(j1min+j1max) - 2*gtE - 2*gstab - pwx180)*2*sw1) - 2); if ((ni > MAXni) && (ix==1)) { ni = MAXni; putCmd("setvalue('ni',%.0f)\n",ni); putCmd("setvalue('ni',%.0f,'processed')\n",ni); fprintf(stdout, "ni set to maximum value of %0.f.\n",ni); } icosel = 1; assign(ct,v17); assign(zero,v18); assign(zero,v19); if (getflag("prgflg") && (satmode[0] == 'y') && (prgcycle > 1.5)) { hlv(ct,v17); mod2(ct,v18); dbl(v18,v18); if (prgcycle > 2.5) { hlv(v17,v17); hlv(ct,v19); mod2(v19,v19); dbl(v19,v19); } } settable(t1, 4, ph1); settable(t2, 8, ph2); settable(t3, 16, ph3); settable(t6, 2, ph6); getelem(t1, v17, v1); getelem(t2, v17, v2); getelem(t6, v17, oph); getelem(t3, v17, v3); assign(zero,v6); add(oph,one,v5); assign(zero,v4); add(oph,v18,oph); add(oph,v19,oph); /* mod2(id2, v10); dbl(v10,v10); */ initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v10); add(v2, v10, v2); add(v4, v10, v4); add(oph, v10, oph); if ((phase1 == 2) || (phase1 == 5)) icosel = -1; status(A); delay(5.0e-5); if (getflag("sspul")) steadystate(); if (satmode[0] == 'y') { if ((d1-satdly) > 0.02) delay(d1-satdly); else delay(0.02); if (getflag("slpsat")) { shaped_satpulse("relaxD",satdly,zero); if (getflag("prgflg")) shaped_purge(v6,zero,v18,v19); } else { satpulse(satdly,zero,rof1,rof1); if (getflag("prgflg")) purge(v6,zero,v18,v19); } } else delay(d1); if (getflag("wet")) wet4(zero,one); obspower(tpwr); decpower(pwxlvl); if (getflag("nullflg")) { rgpulse(0.5 * pw, zero, rof1, rof1); delay(tau); decpower(pwxlvl180); decshaped_pulse(pwx180ad, pwx180, zero, rof1, rof1); rgpulse(2.0 * pw, zero, rof1, rof1); delay(tau + 2 * POWER_DELAY); decshaped_pulse(pwx180adR, pwx180, zero, rof1, rof1); decpower(pwxlvl); rgpulse(1.5 * pw, two, rof1, rof1); zgradpulse(hsglvl, hsgt); delay(1e-3); } status(B); rgpulse(pw, v6, rof1, rof1); if (getflag("dmct")) { decpower(dpwrct); decprgon("garp1",1/dmfct,1.0); /* setstatus(DECch, TRUE, 'g', FALSE, dmfct); */ decunblank(); decon(); } delay(bigT/2 - d2/2 - tau - 2*gtE - 2*gstab - pwx180 ); rgpulse(2*pw,zero,rof1,rof1); delay(bigT/2 - d2/2 - tau - 2*gtE - 2*gstab - pwx180 ); if (getflag("dmct")) { decoff(); decblank(); decprgoff(); /* setstatus(DECch, FALSE, 'c', FALSE, dmf); */ decpower(pwxlvl); } delay(4*pw/PI+2*rof1); delay(tau); decrgpulse(pwx,v2,rof1,rof1); decpower(pwxlvl180); delay(gtE+2*GRADIENT_DELAY+gstab+pw-2*pwx/PI-POWER_DELAY); decshaped_pulse(pwx180ad,pwx180,v4,rof1,rof1); delay(d2/2); zgradpulse(icosel*gzlvlE,gtE); delay(gstab); rgpulse(2*pw,zero,rof1,rof1); zgradpulse(icosel*gzlvlE,gtE); delay(gstab); delay(d2/2); decshaped_pulse(pwx180ad,pwx180,v3,rof1,rof1); delay(gtE+2*GRADIENT_DELAY+gstab+pw-2*pwx/PI-POWER_DELAY); decpower(pwxlvl); decrgpulse(pwx,v1,rof1,rof1); delay(tau); simpulse(pw,pwx,one,zero,rof1,rof1); zgradpulse(6*gzlvlE/(10*EDratio),gtE); delay(tau3 - gtE - 2*GRADIENT_DELAY); decrgpulse(pwx,zero,rof1,rof1); zgradpulse(14*gzlvlE/(10*EDratio),gtE); delay(tau - gtE - 2*GRADIENT_DELAY); simpulse(2*pw,pwx,zero,zero,rof1,rof1); zgradpulse(40*gzlvlE/(10*EDratio),gtE); delay(tau1 - gtE - 2*GRADIENT_DELAY - POWER_DELAY); decpower(dpwr); status(C); delay(tau+tau3+3*pwx+6*rof1-tau1+WFG_START_DELAY); }