void pulsesequence() { char c1d[MAXSTR]; /* option to record only 1D C13 spectrum */ int ncyc; double tau1 = 0.002, /* t1 delay */ post_del = 0.0, pwClvl = getval("pwClvl"), /* coarse power for C13 pulse */ pwC = getval("pwC"), /* C13 90 degree pulse length at pwClvl */ compC = getval("compC"), compH = getval("compH"), mixpwr = getval("mixpwr"), jCH = getval("jCH"), gt0 = getval("gt0"), gt1 = getval("gt1"), gt2 = getval("gt2"), gzlvl0 = getval("gzlvl0"), gzlvl1 = getval("gzlvl1"), gzlvl2 = getval("gzlvl2"), grec = getval("grec"), phase = getval("phase"); getstr("c1d",c1d); ncyc=1; if(jCH > 0.0) tau1 = 0.25/jCH; dbl(ct, v1); /* v1 = 0 */ mod4(v1,oph); hlv(ct,v2); add(v2,v1,v2); if (phase > 1.5) incr(v1); /* hypercomplex phase increment */ initval(2.0*(double)((int)(d2*getval("sw1")+0.5)%2),v10); add(v1,v10,v1); add(oph,v10,oph); mod4(v1,v1); mod4(v2,v2); mod4(oph,oph); assign(zero,v3); if(FIRST_FID) { HHmix = pbox_mix("HHmix", "DIPSI2", mixpwr, pw*compH, tpwr); if(c1d[A] == 'n') { opx("CHdec"); setwave("WURST2 30k/1.2m"); pbox_par("steps","600"); cpx(pwC*compC, pwClvl); CHdec = getDsh("CHdec"); } } ncyc = (int) (at/HHmix.pw) + 1; post_del = ncyc*HHmix.pw - at; /* BEGIN PULSE SEQUENCE */ status(A); zgradpulse(gzlvl0, gt0); rgpulse(pw, zero, 0.0, 0.0); /* destroy H-1 magnetization*/ zgradpulse(gzlvl0, gt0); delay(1.0e-4); obspower(tpwr); txphase(v1); decphase(zero); dec2phase(zero); presat(); obspower(tpwr); delay(1.0e-5); status(B); if(c1d[A] == 'y') { rgpulse(pw,v1,0.0,0.0); /* 1H pulse excitation */ delay(d2); rgpulse(pw,two,0.0,0.0); /* 1H pulse excitation */ assign(oph,v3); } else { decunblank(); pbox_decon(&CHdec); rgpulse(pw,v1,0.0,0.0); /* 1H pulse excitation */ txphase(zero); delay(d2); pbox_decoff(); decblank(); decpower(pwClvl); decpwrf(4095.0); delay(tau1 - POWER_DELAY); simpulse(2.0*pw, 2.0*pwC, zero, zero, 0.0, 0.0); txphase(one); decphase(one); dec2phase(one); delay(tau1); simpulse(pw, pwC, one, one, 0.0, 0.0); txphase(zero); decphase(zero); dec2phase(zero); delay(tau1); simpulse(2.0*pw, 2.0*pwC, zero, zero, 0.0, 0.0); delay(tau1); simpulse(0.0, pwC, zero, zero, 0.0, 0.0); } zgradpulse(gzlvl1, gt1); delay(grec); simpulse(0.0, pwC, zero, v3, 0.0, rof2); txphase(v2); obsunblank(); pbox_xmtron(&HHmix); status(C); setactivercvrs("ny"); startacq(alfa); acquire(np,1.0/sw); endacq(); delay(post_del); pbox_xmtroff(); obsblank(); zgradpulse(gzlvl2, gt2); obspower(tpwr); delay(grec); rgpulse(pw,zero,0.0,rof2); /* 1H pulse excitation */ status(D); setactivercvrs("yn"); startacq(alfa); acquire(np,1.0/sw); endacq(); }
pulsesequence() { char mixpat[MAXSTR], pshape[MAXSTR], httype[MAXSTR], sspul[MAXSTR]; double rg1 = 2.0e-6, mix = getval("mix"), /* mixing time */ mixpwr = getval("mixpwr"), /* mixing pwr */ compH = getval("compH"), gt0 = getval("gt0"), /* gradient pulse in sspul */ gt2 = getval("gt2"), /* gradient pulse preceding mixing */ gzlvl0 = getval("gzlvl0"), /* gradient level for gt0 */ gzlvl2 = getval("gzlvl2"), /* gradient level for gt2 */ gstab = getval("gstab"); /* delay for gradient recovery */ shape hdx; void setphases(); getstr("sspul", sspul); getstr("pshape", pshape); getstr("httype", httype); getstr("mixpat", mixpat); setlimit("mixpwr", mixpwr, 48.0); (void) setphases(); if (httype[0] == 'i') assign(zero,v2); /* MAKE PBOX SHAPES */ if (FIRST_FID) hhmix = pbox_mix("HHmix", mixpat, mixpwr, pw*compH, tpwr); /* HADAMARD stuff */ if(httype[0] == 'e') /* excitation */ hdx = pboxHT_F1e(pshape, pw*compH, tpwr); else if(httype[0] == 'r') /* refocusing */ hdx = pboxHT_F1r(pshape, pw*compH, tpwr); else if(httype[0] == 'd') /* DPFGSE */ { hdx = pboxHT_F1r(pshape, pw*compH, tpwr); if (FIRST_FID) ref180 = hdx; } else /* httype[0] == 'i' */ /* inversion */ hdx = pboxHT_F1i(pshape, pw*compH, tpwr); if (getval("htcal1") > 0.5) /* Optional fine power calibration */ hdx.pwr += getval("htpwr1"); /* THE PULSE PROGRAMM STARTS HERE */ status(A); delay(5.0e-5); zgradpulse(gzlvl0,gt0); if (sspul[A] == 'y') { rgpulse(pw,zero,rof1,rof1); zgradpulse(gzlvl0,gt0); } pre_sat(); if (getflag("wet")) wet4(zero,one); delay(1.0e-5); obspower(tpwr); delay(1.0e-5); status(B); if (httype[0] == 'i') /* longitudinal encoding */ { ifzero(v1); delay(2.0*(pw+rg1)); zgradpulse(gzlvl2,gt2); delay(gstab); elsenz(v1); rgpulse(2.0*pw,v3,rg1,rg1); zgradpulse(gzlvl2,gt2); delay(gstab); endif(v1); pbox_pulse(&hdx, zero, rg1, rg1); zgradpulse(gzlvl2,gt2); delay(gstab); } else /* transverse encoding */ { if (httype[0] == 'e') pbox_pulse(&hdx, oph, rg1, rg1); else { rgpulse(pw,oph,rg1,rg1); if (httype[0] == 'd') /* DPFGSE */ { zgradpulse(2.0*gzlvl2,gt2); delay(gstab); pbox_pulse(&ref180, oph, rg1, rg1); zgradpulse(2.0*gzlvl2,gt2); delay(gstab); } zgradpulse(gzlvl2,gt2); delay(gstab); pbox_pulse(&hdx, v2, rg1, rof2); zgradpulse(gzlvl2,gt2); delay(gstab - POWER_DELAY); } } if (mix) pbox_spinlock(&hhmix, mix, v2); if (httype[0] == 'i') { zgradpulse(0.87*gzlvl2,gt2); delay(gstab); obspower(tpwr); txphase(v3); rgpulse(pw,v3,rg1,rof2); } status(C); }
pulsesequence() { char rcvrsflag[MAXSTR], mrmode[MAXSTR]; double compH, Hdpwr, pw90, pwx = getval("pwx"), pwxlvl = getval("pwxlvl"); getstr("rcvrs",rcvrsflag); getstr("mrmode",mrmode); Hdpwr = 0.0; compH = 1.0; /* initialize the parameters */ if (strcmp(rcvrsflag,"yy")) printf("rcvrs parameter should be set to 'yy'\n"); /* check decoupling modes */ if ((dm[A] == 'y') || (dm[B] == 'y') || (dm[C] == 'y') || (dm[D] == 'y') || (h**o[0] == 'y')) { printf("dm should be set to 'nnnn' and h**o should set to 'n'"); psg_abort(1); } if(mrmode[A] == 'd') /* make the decoupling waveform */ { Hdpwr = getval("Hdpwr"); compH = getval("compH"); pw90 = getval("pw90"); if(FIRST_FID) H1dec = pbox_mix("pansyW16", "WALTZ16", Hdpwr, pw90*compH, tpwr); } else if(mrmode[A] != 's') mrmode[A] = 'p'; /* default is 'p' */ status(A); delay(1.0e-4); decpower(pwxlvl); obspower(tpwr); delay(d1); status(B); if(mrmode[A] != 'p') /* sequential acquisition */ { rgpulse(pw, oph, rof1, rof2); setactivercvrs("yn"); startacq(alfa); acquire(np,1.0/sw); endacq(); delay(1.0e-6); if(mrmode[A] == 'd') { obsunblank(); pbox_xmtron(&H1dec); } delay(d2); decrgpulse(pwx, oph, rof1, rof2); status(C); setactivercvrs("ny"); startacq(alfa); acquire(np,1.0/sw); endacq(); if(mrmode[A] == 'd') { pbox_xmtroff(); obsblank(); } } else { delay(d2); simpulse(pw, pwx, oph, oph, rof1, rof2); status(C); } }