本文整理汇总了C++中endacq函数的典型用法代码示例。如果您正苦于以下问题:C++ endacq函数的具体用法?C++ endacq怎么用?C++ endacq使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了endacq函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: pulsesequence
pulsesequence()
{
double pwx;
char rcvrsflag[MAXSTR];
pwx = getval("pwx");
getstr("rcvrs",rcvrsflag);
/* check decoupling modes */
if ( (dm[C] == 'y') || (dm[D] == 'y') || (homo[0] == 'y') )
{
printf("dm[C], dm[D] should be set to 'n' and/or homo should set to 'n'");
psg_abort(1);
}
if (strcmp(rcvrsflag,"yy"))
printf("rcvrs parameter should be set to 'yy'\n");
settable(t1,4,ph1);
getelem(t1,ct,v1);
assign(v1,oph);
settable(t2,4,ph2);
status(A);
obspower(tpwr);
decpower(dpwr);
delay(d1);
status(B);
delay(d2);
rgpulse(pw, t2, rof1, rof2);
status(C);
setactivercvrs("yn");
startacq(alfa);
acquire(np,1.0/sw);
endacq();
status(B);
delay(d2);
decrgpulse(pwx, t2, rof1, rof2);
status(D);
setactivercvrs("ny");
startacq(alfa);
acquire(np,1.0/sw);
endacq();
}
开发者ID:timburrow,项目名称:ovj3,代码行数:52,代码来源:mrseq.c
示例2: pulsesequence
pulsesequence() {
// Define Variables and Objects and Get Parameter Values
MPSEQ dec = getblew("blewH",0,0.0,0.0,0,1);
strncpy(dec.ch,"dec",3);
putCmd("chHblew='dec'\n");
CP hx = getcp("HX",0.0,0.0,0,1);
strncpy(hx.fr,"dec",3);
strncpy(hx.to,"obs",3);
putCmd("frHX='dec'\n");
putCmd("toHX='obs'\n");
//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------
putCmd("groupcopy('current','processed','acquisition')");
// Dutycycle Protection
DUTY d = init_dutycycle();
d.dutyon = getval("pwH90") + getval("tHX") + getval("rd") + getval("ad") + at;
d.dutyoff = d1 + 4.0e-6;
d = update_dutycycle(d);
abort_dutycycle(d,10.0);
// Set Phase Tables
settable(phH90,4,table1);
settable(phXhx,4,table2);
settable(phHhx,4,table3);
settable(phRec,4,table4);
setreceiver(phRec);
// Begin Sequence
txphase(phXhx); decphase(phH90);
obspwrf(getval("aXhx")); decpwrf(getval("aH90"));
obsunblank(); decunblank(); _unblank34();
delay(d1);
sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);
// H to X Cross Polarization
decrgpulse(getval("pwH90"),phH90,0.0,0.0);
decphase(phHhx);
_cp_(hx,phHhx,phXhx);
// Begin Acquisition
_mpseqon(dec, phHhx);
obsblank(); _blank34();
delay(getval("rd"));
startacq(getval("ad"));
acquire(np, 1/sw);
endacq();
_mpseqoff(dec);
obsunblank(); decunblank(); _unblank34();
}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:60,代码来源:tancpxblew.c
示例3: pulsesequence
void pulsesequence()
{
double tro;
char gread,gphase,gslice;
char grdname[MAXSTR];
gread = 'z';
if (getorientation(&gread,&gphase,&gslice,"orient") < 0)
abort_message("illegal value in orient parameter");
gro = getval("gro");
tro = getval("tro");
getstr("gname",grdname);
/* equilibrium period */
status(A);
hsdelay(d1);
/* --- tau delay --- */
status(B);
pulse(p1, zero);
hsdelay(d2);
/* --- observe period --- */
status(C);
pulse(pw,oph);
delay(0.0001);
shapedgradient(grdname,tro,gro,gread,1,1);
hsdelay(d2);
startacq(alfa);
acquire(np,1.0/sw);
endacq();
}
开发者ID:timburrow,项目名称:ovj3,代码行数:32,代码来源:gsh2pul.c
示例4: pulsesequence
pulsesequence()
{
double pd, seqtime;
initparms_sis(); /* initialize standard imaging parameters */
seqtime = at+pw+rof1+rof2;
pd = tr - seqtime; /* predelay based on tr */
if (pd <= 0.0) {
abort_message("%s: Requested tr too short. Min tr = %f ms",seqfil,seqtime*1e3);
}
status(A);
delay(pd);
xgate(ticks);
/* --- observe period --- */
obspower(tpwr);
shapedpulse(pwpat,pw,oph,rof1,rof2);
startacq(alfa);
acquire(np,1.0/sw);
endacq();
}
开发者ID:OpenVnmrJ,项目名称:OpenVnmrJ,代码行数:26,代码来源:spuls.c
示例5: pulsesequence
void pulsesequence() {
// Define Variables and Objects and Get Parameter Values
DSEQ dec = getdseq("H");
strncpy(dec.t.ch,"dec",3);
putCmd("chHtppm='dec'\n");
strncpy(dec.s.ch,"dec",3);
putCmd("chHspinal='dec'\n");
//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------
putCmd("groupcopy('current','processed','acquisition')");
// Dutycycle Protection
DUTY d = init_dutycycle();
d.dutyon = getval("pwX90");
d.dutyoff = d1 + 4.0e-6;
d.c1 = d.c1 + (!strcmp(dec.seq,"tppm"));
d.c1 = d.c1 + ((!strcmp(dec.seq,"tppm")) && (dec.t.a > 0.0));
d.t1 = getval("rd") + getval("ad") + at;
d.c2 = d.c2 + (!strcmp(dec.seq,"spinal"));
d.c2 = d.c2 + ((!strcmp(dec.seq,"spinal")) && (dec.s.a > 0.0));
d.t2 = getval("rd") + getval("ad") + at;
d = update_dutycycle(d);
abort_dutycycle(d,10.0);
// Set Phase Tables
settable(phX90,4,table1);
settable(phRec,4,table2);
setreceiver(phRec);
// Begin Sequence
txphase(phX90); decphase(zero);
obspwrf(getval("aX90"));
obsunblank(); decunblank(); _unblank34();
delay(d1);
sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);
// X Direct Polarization
rgpulse(getval("pwX90"),phX90,0.0,0.0);
// Begin Acquisition
_dseqon(dec);
obsblank(); _blank34();
delay(getval("rd"));
startacq(getval("ad"));
acquire(np, 1/sw);
endacq();
_dseqoff(dec);
obsunblank(); decunblank(); _unblank34();
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:58,代码来源:onepul.c
示例6: pulsesequence
void pulsesequence()
{
double pd, seqtime;
double n,r,bigtau;
double restol, resto_local;
init_mri();
restol=getval("restol"); //local frequency offset
roff=getval("roff"); //receiver offset
init_rf(&p1_rf,p1pat,p1,flip1,rof1,rof2); /* hard pulse */
calc_rf(&p1_rf,"tpwr1","tpwr1f");
init_rf(&p2_rf,p2pat,p2,flip2,rof1,rof2); /* hard pulse */
calc_rf(&p2_rf,"tpwr2","tpwr2f");
/* calculate 'big tau' values */
bigtau = getval("bigtau");
n = bigtau/(2.0*d2);
n = (double)((int)((n/2.0) + 0.5)) * 2.0;
initval(n,v3);
seqtime = at+p1+rof1+rof2;
seqtime += 2*d2+p2+rof1+rof2; /* cpmg pulse and delay */
pd = tr - seqtime; /* predelay based on tr */
if (pd <= 0.0) {
abort_message("%s: Requested tr too short. Min tr = %f ms",seqfil,seqtime*1e3);
}
resto_local=resto-restol;
status(A);
delay(pd);
xgate(ticks);
/* calculate exact delay and phases */
r = d2-p2/2.0-rof2; /* correct delay for pulse width */
mod2(oph,v2); /* 0,1,0,1 */
incr(v2); /* 1,2,1,2 = y,y,-y,-y */
obsoffset(resto_local);
obspower(p1_rf.powerCoarse);
obspwrf(p1_rf.powerFine);
rgpulse(p1,oph,rof1,rof2); /* 90deg */
obspower(p2_rf.powerCoarse);
obspwrf(p2_rf.powerFine);
starthardloop(v3);
delay(r);
rgpulse(p2,v2,rof1,rof2); /* 180deg pulse */
delay(r);
endhardloop();
startacq(alfa);
acquire(np,1.0/sw);
endacq();
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:57,代码来源:cpmg.c
示例7: pulsesequence
pulsesequence()
{
double pd, seqtime;
double minte,ted1,ted2;
double restol, resto_local;
int vph180 = v2; /* Phase of 180 pulse */
init_mri(); /****needed ****/
restol=getval("restol"); //local frequency offset
roff=getval("roff"); //receiver offset
init_rf(&p1_rf,p1pat,p1,flip1,rof1,rof2); /* hard pulse */
calc_rf(&p1_rf,"tpwr1","tpwr1f");
init_rf(&p2_rf,p2pat,p2,flip2,rof1,rof2); /* hard pulse */
calc_rf(&p2_rf,"tpwr2","tpwr2f");
seqtime = at+(p1/2.0)+rof1+d2;
pd = tr - seqtime; /* predelay based on tr */
if (pd <= 0.0) {
abort_message("%s: Requested tr too short. Min tr = %f ms",seqfil,seqtime*1e3);
}
minte = p1/2.0 + p2 + 2*rof2 + rof1;
if(d2 > 0) {
if(d2 < minte+4e-6)
abort_message("%s: TE too short. Min te = %f ms",seqfil,minte*1e3);
}
ted1 = d2/2 - p1/2 - p2/2 + rof2 + rof1;
ted2 = d2/2 - p2/2 + rof2;
resto_local=resto-restol;
status(A);
xgate(ticks);
delay(pd);
/* --- observe period --- */
obsoffset(resto_local);
obspower(p1_rf.powerCoarse);
obspwrf(p1_rf.powerFine);
shapedpulse(p1pat,p1,oph,rof1,rof2);
/* if d2=0 no 180 pulse applied */
if (d2 > 0) {
obspower(p2_rf.powerCoarse);
obspwrf(p2_rf.powerFine);
settable(t2,2,ph180); /* initialize phase tables and variables */
getelem(t2,ct,v6); /* 180 deg pulse phase alternates +/- 90 off the rcvr */
add(oph,v6,vph180); /* oph=zero */
delay(ted1);
shapedpulse(p2pat,p2,vph180,rof1,rof2);
delay(ted2);
}
startacq(alfa);
acquire(np,1.0/sw);
endacq();
}
开发者ID:OpenVnmrJ,项目名称:OpenVnmrJ,代码行数:56,代码来源:t2puls.c
示例8: pulsesequence
pulsesequence()
{
double sign,currentlimit,RMScurrentlimit,dutycycle;
int calcpower;
/* Initialize paramaters **********************************/
init_mri();
calcpower=(int)getval("calcpower");
dutycycle=getval("dutycycle");
currentlimit=getval("currentlimit");
RMScurrentlimit=getval("RMScurrentlimit");
if (gspoil>0.0) sign = 1.0;
else sign = -1.0;
init_rf(&p1_rf,p1pat,p1,flip1,rof1,rof2);
if (calcpower) calc_rf(&p1_rf,"tpwr1","tpwr1f");
if (tspoil>0.0) {
gspoil = sqrt(dutycycle/100.0)*gmax*RMScurrentlimit/currentlimit;
init_generic(&spoil_grad,"spoil",gspoil,tspoil);
spoil_grad.rollOut=FALSE;
calc_generic(&spoil_grad,WRITE,"gspoil","tspoil");
}
xgate(ticks);
rotate();
status(A);
mod4(ct,oph);
delay(d1);
/* TTL scope trigger **********************************/
sp1on(); delay(4e-6); sp1off();
if (calcpower) {
obspower(p1_rf.powerCoarse);
obspwrf(p1_rf.powerFine);
}
else obspower(tpwr1);
delay(4e-6);
if (tspoil>0.0) {
obl_shapedgradient(spoil_grad.name,spoil_grad.duration,0,0,spoil_grad.amp*sign,WAIT);
delay(d2);
}
shapedpulse(p1pat,p1,ct,rof1,rof2);
startacq(alfa);
acquire(np,1.0/sw);
endacq();
}
开发者ID:OpenVnmrJ,项目名称:OpenVnmrJ,代码行数:55,代码来源:ecc2.c
示例9: pulsesequence
pulsesequence() {
// Define Variables and Objects and Get Parameter Values
initval(getval("periods"),v2);
//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------
putCmd("groupcopy('current','processed','acquisition')");
// Set Phase Tables
settable(phX90,4,table1);
settable(phRec,4,table2);
setreceiver(phRec);
// Begin Sequence
txphase(phX90); decphase(zero);
obspwrf(getval("aX90"));
obsunblank(); decunblank(); _unblank34();
delay(d1);
xgate(1.0);
sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);
// Apply a Rotorsync Delay
rgpulse(getval("pwX90"),phX90,0.0,0.0);
rotorsync(v2);
rgpulse(getval("pwX90"),phX90,0.0,0.0);
xgate(getval("xperiods"));
rgpulse(getval("pwX90"),phX90,0.0,0.0);
delay(10.0e-6);
// X Direct Polarization
rgpulse(getval("pwX90"),phX90,0.0,0.0);
// Begin Acquisition
obsblank(); _blank34();
delay(getval("rd"));
startacq(getval("ad"));
acquire(np, 1/sw);
endacq();
obsunblank(); decunblank(); _unblank34();
}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:50,代码来源:rotorsynctest.c
示例10: pulsesequence
pulsesequence() {
// Define Variables and Objects and Get Parameter Values
double pw1Xstmas = getval("pw1Xstmas");
double pw2Xstmas = getval("pw2Xstmas");
double tXzfselinit = getval("tXzfsel");
double tXzfsel = tXzfselinit - 3.0e-6;
if (tXzfsel < 0.0) tXzfsel = 0.0;
double d2init = getval("d2");
double d2 = d2init - pw1Xstmas/2.0 - pw2Xstmas/2.0;
if (d2 < 0.0) d2 = 0.0;
DSEQ dec = getdseq("H");
strncpy(dec.t.ch,"dec",3);
putCmd("chHtppm='dec'\n");
strncpy(dec.s.ch,"dec",3);
putCmd("chHspinal='dec'\n");
// Set Constant-time Period for d2.
if (d2_index == 0) d2_init = getval("d2");
double d2_ = (ni - 1)/sw1 + d2_init;
putCmd("d2acqret = %f\n",roundoff(d2_,12.5e-9));
putCmd("d2dwret = %f\n",roundoff(1.0/sw1,12.5e-9));
//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------
putCmd("groupcopy('current','processed','acquisition')");
// Dutycycle Protection
DUTY d = init_dutycycle();
d.dutyon = getval("pw1Xstmas") + getval("pw2Xstmas") + getval("pwXzfsel");
d.dutyoff = d1 + 4.0e-6;
d.c1 = d.c1 + (!strcmp(dec.seq,"tppm"));
d.c1 = d.c1 + ((!strcmp(dec.seq,"tppm")) && (dec.t.a > 0.0));
d.t1 = d2_ + tXzfsel + getval("rd") + getval("ad") + at;
d.c2 = d.c2 + (!strcmp(dec.seq,"spinal"));
d.c2 = d.c2 + ((!strcmp(dec.seq,"spinal")) && (dec.s.a > 0.0));
d.t2 = d2_ + tXzfsel + getval("rd") + getval("ad") + at;
d = update_dutycycle(d);
abort_dutycycle(d,10.0);
// Set Phase Tables
settable(ph1Xstmas,4,table1);
settable(ph2Xstmas,4,table2);
settable(phXzfsel,8,table3);
settable(phRec,8,table4);
if (phase1 == 2) {
tsadd(ph1Xstmas,1,4);
}
setreceiver(phRec);
// Begin Sequence
txphase(ph1Xstmas); decphase(zero);
obspower(getval("tpwr"));
obspwrf(getval("aXstmas"));
obsunblank(); decunblank(); _unblank34();
delay(d1);
sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);
// H Decoupler on Before STMAS
_dseqon(dec);
// Two-Pulse STMAS
rgpulse(getval("pw1Xstmas"),ph1Xstmas,0.0,0.0);
txphase(ph2Xstmas);
delay(d2);
rgpulse(getval("pw2Xstmas"),ph2Xstmas,0.0,0.0);
// Z-filter Pulse
txphase(phXzfsel);
obsblank();
obspower(getval("dbXzfsel"));
obspwrf(getval("aXzfsel"));
delay(3.0e-6);
obsunblank();
delay(tXzfsel);
rgpulse(getval("pwXzfsel"),phXzfsel,0.0,0.0);
// Begin Acquisition
obsblank(); _blank34();
delay(getval("rd"));
startacq(getval("ad"));
acquire(np, 1/sw);
endacq();
_dseqoff(dec);
obsunblank(); decunblank(); _unblank34();
}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:100,代码来源:stmaszf2d.c
示例11: pulsesequence
//.........这里部分代码省略.........
// Copy Current Parameters to Processed
//-------------------------------------
putCmd("groupcopy('current','processed','acquisition')");
// Dutycycle Protection
DUTY d = init_dutycycle();
d.dutyon = getval("pw1Xmqmas") + nXfam2*(pw1Xfam2 + pw2Xfam2 + pw3Xfam2 +pw4Xfam2) +
getval("pwXechsel");
d.dutyoff = d1 + 4.0e-6;
d.c1 = d.c1 + (!strcmp(dec.seq,"tppm"));
d.c1 = d.c1 + ((!strcmp(dec.seq,"tppm")) && (dec.t.a > 0.0));
d.t1 = d2_ + tXechselinit + getval("rd") + getval("ad") + at;
d.c2 = d.c2 + (!strcmp(dec.seq,"spinal"));
d.c2 = d.c2 + ((!strcmp(dec.seq,"spinal")) && (dec.s.a > 0.0));
d.t2 = d2_ + tXechselinit + getval("rd") + getval("ad") + at;
d = update_dutycycle(d);
abort_dutycycle(d,10.0);
// Set Phase Tables
if (phase1 == 0) {
settable(phf1Xmqmas,12,table1);
settable(ph1Xfam2,6,table2);
settable(ph2Xfam2,6,table3);
settable(phfXechsel,96,table4);
settable(phRec,48,table5);
}
else {
settable(phf1Xmqmas,6,table6);
settable(ph1Xfam2,6,table7);
settable(ph2Xfam2,6,table8);
settable(phfXechsel,48,table9);
settable(phRec,24,table10);
if (phase1 == 2) {
tsadd(phf1Xmqmas,30,360);
}
}
setreceiver(phRec);
obsstepsize(1.0);
// Begin Sequence
xmtrphase(phf1Xmqmas); decphase(zero);
obspower(getval("tpwr"));
obspwrf(getval("aXmqmas"));
obsunblank(); decunblank(); _unblank34();
delay(d1);
sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);
// H Decoupler on Before MQMAS
_dseqon(dec);
// Two-Pulse MQMAS with DFS Conversion
rgpulse(getval("pw1Xmqmas"),zero,0.0,0.0);
xmtrphase(zero); txphase(ph1Xfam2);
obspwrf(aXfam2);
delay(d20);
// X FAM2 Pulse
loop(v4,v5);
xmtron();
delay(pw1Xfam2);
xmtroff();
txphase(ph2Xfam2);
delay(pw2Xfam2);
xmtron();
delay(pw3Xfam2);
xmtroff();
txphase(ph2Xfam2);
delay(pw4Xfam2);
endloop(v5);
// Tau Delay and Second Selective Echo Pulse
xmtrphase(phfXechsel);
obsblank();
obspower(getval("dbXechsel"));
obspwrf(getval("aXechsel"));
delay(3.0e-6);
obsunblank();
delay(d21 + tXechsel);
rgpulse(getval("pwXechsel"),zero,0.0,0.0);
delay(d22);
// Begin Acquisition
obsblank(); _blank34();
delay(getval("rd"));
startacq(getval("ad"));
acquire(np, 1/sw);
endacq();
_dseqoff(dec);
obsunblank(); decunblank(); _unblank34();
}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:101,代码来源:mqmas3qfam2spltse2d.c
示例12: pulsesequence
//.........这里部分代码省略.........
endif(vseg_ctr);
setacqvar(vacquire); // Turn on acquire when vacquire is zero
if (ticks) {
xgate(ticks);
grad_advance(gpropdelay);
delay(4e-6);
}
if(ir[0] == 'y') { /* IR for all slices prior to data acquisition */
obspower(ir_rf.powerCoarse);
obspwrf(ir_rf.powerFine);
delay(4e-6);
msloop(seqcon[1],ns,vms_slices,vms_ctr);
obl_shapedgradient(ssi_grad.name,ssi_grad.duration,0,0,ssi_grad.amp,NOWAIT);
delay(ssi_grad.rfDelayFront);
shapedpulselist(shapelistIR,ssi_grad.rfDuration,oph,rof1,rof2,seqcon[1],vms_ctr);
delay(ssi_grad.rfDelayBack);
delay(iti_delay);
endmsloop(seqcon[1],vms_ctr);
delay(ti_delay);
}
msloop(seqcon[1],ns,vms_slices,vms_ctr);
/* Prepulse options ***********************************/
if (sat[0] == 'y') satbands();
if (fsat[0] == 'y') fatsat();
if (mt[0] == 'y') mtc();
/* 90 degree pulse ************************************/
rotate();
obspower(p1_rf.powerCoarse);
obspwrf(p1_rf.powerFine);
delay(4e-6);
obl_shapedgradient(ss_grad.name,ss_grad.duration,0,0,ss_grad.amp,NOWAIT);
delay(ss_grad.rfDelayFront);
shapedpulselist(shapelist90,ss_grad.rfDuration,oph,rof1,rof2,seqcon[1],vms_ctr);
delay(ss_grad.rfDelayBack);
/* Read dephase and Slice refocus *********************/
obl_shapedgradient(ssr_grad.name,ssr_grad.duration,ror_grad.amp,0.0,-ssr_grad.amp,WAIT);
/* First half-TE delay ********************************/
obspower(p2_rf.powerCoarse);
obspwrf(p2_rf.powerFine);
delay(te1_delay);
peloop(seqcon[2],etl,vetl,vetl_ctr);
mult(vseg_ctr,vetl,vpe_ctr);
add(vpe_ctr,vetl_ctr,vpe_ctr);
getelem(t1,vpe_ctr,vpe_mult);
/* 180 degree pulse *******************************/
/* Note, ss2_grad.amp is max gradient for butterfly shape; flat top = _.ssamp */
obl_shapedgradient(ss2_grad.name,ss2_grad.duration,0,0,ss2_grad.amp,NOWAIT);
delay(ss2_grad.rfDelayFront);
shapedpulselist(shapelist180,ss2_grad.rfDuration,vphase180,rof1,rof2,seqcon[1],vms_ctr);
delay(ss2_grad.rfDelayBack);
/* Phase-encode gradient ******************************/
pe_shapedgradient(pe_grad.name,pe_grad.duration,0,0,0,-pe_grad.increment,vpe_mult,WAIT);
/* Second half-TE period ******************************/
delay(te2_delay);
/* Readout gradient ************************************/
obl_shapedgradient(ro_grad.name,ro_grad.duration,ro_grad.amp,0,0,NOWAIT);
delay(ro_grad.atDelayFront);
/* Acquire data ****************************************/
startacq(alfa);
acquire(np,1.0/sw);
endacq();
delay(ro_grad.atDelayBack);
/* Rewinding phase-encode gradient ********************/
/* Phase encode, refocus, and dephase gradient ******************/
pe_shapedgradient(pe_grad.name,pe_grad.duration,0,0,0,pe_grad.increment,vpe_mult,WAIT);
/* Second half-TE delay *******************************/
delay(te3_delay);
endpeloop(seqcon[2],vetl_ctr);
/* Relaxation delay ***********************************/
if (!trtype)
delay(tr_delay);
endmsloop(seqcon[1],vms_ctr);
if (trtype)
delay(ns*tr_delay);
endloop(vseg_ctr);
/* Inter-image delay **********************************/
sub(ntrt,ct,vtrimage);
decr(vtrimage);
ifzero(vtrimage);
delay(trimage);
endif(vtrimage);
}
开发者ID:timburrow,项目名称:ovj3,代码行数:101,代码来源:flair.c
示例13: pulsesequence
pulsesequence()
{
/* Internal variable declarations *********************/
char txphase[MAXSTR];
char rxphase[MAXSTR];
char blankmode[MAXSTR]={0};
double postDelay;
double rfDuration;
double acqt;
int i,ret=-1;
static int phs1[4] = {0,2,1,3}; /* from T1meas.c */
/*************************************************/
/* Initialize paramter **************************/
i = 0;
postDelay = 0.5;
acqt = 0.0;
getstr("rxphase",rxphase);
getstr("txphase",txphase);
ret = P_getstring(GLOBAL,"blankmode",blankmode,1,MAXSTR);
//getparm("blankmode","string",GLOBAL,blankmode,MAXSTR);
postDelay = tr - at;
//printf("blankmode=%s\n",blankmode);
/*************************************************/
/* check phase setting ***************************/
if ( (txphase[0] =='n') && (rxphase[0] =='n') )
{
abort_message("ERROR - Select at least one phase [Tx or Rx]\n");
}
/**************************************************/
/* check pulse width *****************************/
rfDuration = shapelistpw(p1pat, p1); /* assign exitation pulse duration */
acqt = rfDuration + rof1 - alfa;
if (FP_GT(acqt, at))
{
abort_message("Pulse duration too long. max [%.3f] ms\n",(at-rof1+alfa)*1000.0);
}
if(ret==0 && blankmode[0]=='u')
obsunblank();
delay(postDelay);
settable(t1,4,phs1); /*from T1meas.c */
getelem(t1,ct,v11); /*from T1meas.c */
setreceiver(t1);
/*==============================================*/
/* START LOOPBACK PULSE SEQUENCE */
/*==============================================*/
status(A);
obsoffset(resto);
/* TTL trigger to scope sequence ****************************/
sp1on();
/* Relaxation delay ***********************************/
xgate(ticks);
/* RF pulse *******************************************/
obspower(tpwr);
obspwrf(tpwrf);
ShapedXmtNAcquire(p1pat, rfDuration, v11, rof1, OBSch);
endacq();
sp1off();
if(ret==0 && blankmode[0]=='u')
obsunblank();
}
开发者ID:timburrow,项目名称:ovj3,代码行数:70,代码来源:fidelity.c
示例14: pulsesequence
//.........这里部分代码省略.........
pss0 = getval("pss0");
getstr("slice_select",slice_select); /* slice select flag
[y] = ON, [n] = OFF */
/*******************************************************/
/* Slice Select gradient area */
/*******************************************************/
t_rampslice = grate * agss;
gssint = (agss*p1/2.0) + (agss*t_rampslice/2.0);
gssrint=gssint;
/*******************************************************
* Calculate slice refocussing gradient *
*******************************************************/
t_plateau_sr = (gssint / gssr) - trise;
if (t_plateau_sr <= 0.0) /* traingular gradients */
{
t_plateau_sr = 0.0;
gssr = sqrt(gssint / grate);
}
t_ramp_sr = gssr * grate; /* ramp time for refocusing gradient*/
gssrint = (gssr * t_plateau_sr) + (t_ramp_sr * gssr);
/***************************************************************************
* timing calculation *
***************************************************************************/
if (slice_select[0] == 'y')
{
t_after = tr - (predelay + p1 + t_plateau_sr + at + acq_delay + 2* (t_rampslice + t_ramp_sr));
min_tr = predelay + p1 + t_plateau_sr + at + acq_delay + 2* (t_rampslice + t_ramp_sr);
}
else
{
t_after = tr - (predelay + p1 + at + acq_delay );
min_tr = predelay + p1 + at + acq_delay ;
}
if (t_after < 0.0)
{
abort_message("Requested repetition time (TR) too short. Min tr = %.f[ms]\n",min_tr*1000);
}
/******************************************************/
/* */
/* S T A R T */
/* P U L S E S E Q U E N C E */
/* */
/******************************************************/
obspower(tpwr1); /* set tranmitter power */
/***************************************************************************
* Predelay *
***************************************************************************/
obsoffset(f_offset); /* set transmitter offset */
delay(predelay);
xgate(ticks); /* set gating */
if (slice_select[0] == 'y')
{
/***************************************************************************
* Slice select gradient & RF pulse *
***************************************************************************/
obl_gradient(0.0,0.0,gss); /* slice select gradient */
delay(t_rampslice); /* delay - time to ramp up gradient */
shaped_pulse(p1pat,p1,oph,rof1,rof1);
zero_all_gradients(); /* force all gradients back to 0 [G/cm] */
delay(t_rampslice); /* time to ramp down gradient */
/***************************************************************************
* Slice refocus gradient *
***************************************************************************/
obl_gradient(0.0,0.0,-gssr); /* slice refocus gradient */
delay(t_ramp_sr+t_plateau_sr); /* ramp up of refocus gradient */
zero_all_gradients(); /* force refocus gradient back to 0 [G/cm] */
delay(t_ramp_sr); /* time to ramp down gradient */
}
else
{
shaped_pulse(p1pat,p1,oph,rof1,rof1);
}
/***************************************************************************
* Pre-acquire delay *
***************************************************************************/
delay(acq_delay);
/***************************************************************************
* Acquire echo *
***************************************************************************/
startacq(alfa);
acquire(np,1.0/sw); /* acquire FID */
endacq();
delay(t_after); /* time padding to fill TR */
/******************************************************/
/* */
/* E N D */
/* P U L S E S E Q U E N C E */
/* */
/******************************************************/
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:101,代码来源:prescanfreq.c
示例15: pulsesequence
//.........这里部分代码省略.........
strncpy(dec.s.ch,"dec",3);
putCmd("chHspinal='dec'\n");
// Set Constant-time Period for d2.
if (d2_index == 0) d2_init = getval("d2");
double d2_ = (ni - 1)/sw1 + d2_init;
putCmd("d2acqret = %f\n",roundoff(d2_,12.5e-9));
putCmd("d2dwret = %f\n",roundoff(1.0/sw1,12.5e-9));
//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------
putCmd("groupcopy('current','processed','acquisition')");
// Dutycycle Protection
DUTY d = init_dutycycle();
d.dutyon = p1.pars.t + d2_ + p2.pars.t + getval("pwH90") + getval("pwHtilt") +
getval("tHX");
d.dutyoff = d1 + 4.0e-6 + getval("tHmix");
d.c1 = d.c1 + (!strcmp(dec.seq,"tppm"));
d.c1 = d.c1 + ((!strcmp(dec.seq,"tppm")) && (dec.t.a > 0.0));
d.t1 = getval("rd") + getval("ad") + at;
d.c2 = d.c2 + (!strcmp(dec.seq,"spinal"));
d.c2 = d.c2 + ((!strcmp(dec.seq,"spinal")) && (dec.s.a > 0.0));
d.t2 = getval("rd") + getval("ad") + at;
d = update_dutycycle(d);
abort_dutycycle(d,10.0);
// Set Phase Tables
settable(ph1H90,4,table1);
settable(phHpmlg,4,table2);
settable(ph2H90,4,table3);
settable(ph3H90,4,table4);
settable(phHtilt,4,table5);
settable(phXhx,4,table6);
settable(phHhx,4,table7);
settable(phRec,4,table8);
//Add STATES TPPI ("States with "FAD")
tsadd(phRec,2*d2_index,4);
if (phase1 == 2) {
tsadd(ph2H90,2*d2_index+3,4);
}
else {
tsadd(ph2H90,2*d2_index,4);
}
setreceiver(phRec);
// Begin Sequence
txphase(phXhx); decphase(ph1H90);
obspwrf(getval("aX180")); decpwrf(getval("aH90"));
obsunblank();decunblank(); _unblank34();
delay(d1);
sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);
// Offset H Preparation with a Tilt Pulse
_shape(p1,ph1H90);
// Offset SAMn Spinlock on H During F1 with Optional pwX180
_mpseqon(ph,phHpmlg);
delay(d22);
rgpulse(pwX180,zero,0.0,0.0);
obspwrf(getval("aX90"));
txphase(phXhx);
delay(d22);
_mpseqoff(ph);
// Offset 90-degree Pulse to Zed and Spin-Diffusion Mix
_shape(p2,ph2H90);
decpwrf(getval("aH90"));
delay(getval("tHmix"));
// H90, 35-degree Tilt and H-to-X Cross Polarization with LG Offset
decrgpulse(getval("pwH90"),ph3H90,0.0,0.0);
decunblank();
decrgpulse(getval("pwHtilt"),phHtilt,0.0,0.0);
decphase(phHhx);
_cp_(hx,phHhx,phXhx);
// Begin Acquisition
obsblank(); _blank34();
_dseqon(dec);
delay(getval("rd"));
startacq(getval("ad"));
acquire(np, 1/sw);
endacq();
_dseqoff(dec);
obsunblank(); decunblank(); _unblank34();
}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:101,代码来源:hetcorpmlgcp2d_1.c
示例16: pulsesequence
//.........这里部分代码省略.........
d.dutyoff = d1 + 4.0e-6;
if (!strcmp(homo1.dm,"y"))
d.dutyon += t1H_echo + t2H_echo;
else
d.dutyoff += t1H_echo + t2H_echo;
d.c1 = d.c1 + (!strcmp(Xseq,"tppm"));
d.c1 = d.c1 + ((!strcmp(Xseq,"tppm")) && (dec.t.a > 0.0));
d.t1 = getval("rd") + getval("ad") + at;
d.c2 = d.c2 + (!strcmp(Xseq,"spinal"));
d.c2 = d.c2 + ((!strcmp(Xseq,"spinal")) && (dec.s.a > 0.0));
d.t2 = getval("rd") + getval("ad") + at;
d = update_dutycycle(d);
abort_dutycycle(d,10.0);
//------------------------
// Set Phase Tables
//-----------------------
settable(phH90,4,table1);
settable(phHecho,8,table2);
settable(phRec,4,table3);
setreceiver(phRec);
//=======================
// Begin Sequence
//=======================
txphase(phH90); decphase(zero);
obspwrf(getval("aH90"));
obsunblank(); decunblank(); _unblank34();
delay(d1);
sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);
//------------------------
// H Direct Polarization
//------------------------
rgpulse(getval("pwH90"),phH90,0.0,0.0);
obsunblank(); decunblank(); _unblank34();
// -----------------------------
// H Hahn Echo
// -----------------------------
if (!strcmp(homo1.dm,"y")) {
delay (t1H_left);
if (getval("pwHshort1") > 0.0 ) {
obspwrf(getval("aHhdec1"));
rgpulse(getval("pwHshort1"),three,0.0,0.0);
obsunblank();
}
if (!strcmp(homo1.dm,"y")) _mpseqon(homo1.mps,zero);
delay(t1H_echo);
if (!strcmp(homo1.dm,"y")) _mpseqoff(homo1.mps);
if (getval("pwHshort1") > 0.0 ) {
obspwrf(getval("aHhdec1")); txphase(one);
rgpulse(getval("pwHshort1"),one,0.0,0.0);
obsunblank();
}
}
else delay(t1Hecho);
txphase(phHecho);
obspwrf(getval("aHecho"));
rgpulse(getval("pwHecho"),phHecho,0.0,0.0);
obsunblank();
if (!strcmp(homo1.dm,"y")) {
if (getval("pwHshort1") > 0.0 ) {
obspwrf(getval("aHhdec1"));
rgpulse(getval("pwHshort1"),three,0.0,0.0);
obsunblank();
}
if (!strcmp(homo1.dm,"y")) _mpseqon(homo1.mps,zero);
delay(t2H_echo);
if (!strcmp(homo1.dm,"y")) _mpseqoff(homo1.mps);
if(getval("pwHshort1")>0 ) {
obspwrf(getval("aHhdec1"));
rgpulse(getval("pwHshort1"),one,0.0,0.0);
obsunblank();
}
delay(t2H_left);
}
else delay(t2Hecho);
//====================
// Begin Acquisition
//====================
_dseqon(dec);
obsblank(); decblank(); _blank34();
delay(getval("rd"));
startacq(getval("ad"));
acquire(np, 1/sw);
endacq();
_dseqoff(dec);
obsunblank(); decunblank(); _unblank34();
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:101,代码来源:ssecho1dhdec.c
示例17: pulsesequence
//.........这里部分代码省略.........
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();
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:101,代码来源:pansy_tocsy.c
示例18: pulsesequence
//.........这里部分代码省略.........
MPSEQ spc5ref = getspc5("spc5X",spc5.iSuper,spc5.phAccum,spc5.phInt,1,1);
strncpy(spc5.ch,"obs",3);
putCmd("chXspc5='obs'\n");
DSEQ dec = getdseq("H");
strncpy(dec.t.ch,"dec",3);
putCmd("chHtppm='dec'\n");
strncpy(dec.s.ch,"dec",3);
putCmd("chHspinal='dec'\n");
// Set Constant-time Period for d2.
if (d2_index == 0) d2_init = getval("d2");
double d2_ = (ni - 1)/sw1 + d2_init;
putCmd("d2acqret = %f\n",roundoff(d2_,12.5e-9));
putCmd("d2dwret = %f\n",roundoff(1.0/sw1,12.5e-9));
//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------
putCmd("groupcopy('current','processed','acquisition')");
// Dutycycle Protection
DUTY d = init_dutycycle();
d.dutyon = getval("pwH90") + getval("tHX") + getval("pwX90") +
spc5.t + spc5ref.t;
d.dutyoff = d1 + 4.0e-6 + 2.0*getval("tZF");
d.c1 = d.c1 + (!strcmp(dec.seq,"tppm"));
d.c1 = d.c1 + ((!strcmp(dec.seq,"tppm")) && (dec.t.a > 0.0));
d.t1 = d2_ + getval("rd") + getval("ad") + at;
d.c2 = d.c2 + (!strcmp(dec.seq,"spinal"));
d.c2 = d.c2 + ((!strcmp(dec.seq,"spinal")) && (dec.s.a > 0.0));
d.t2 = d2_ + getval("rd") + getval("ad") + at;
d = update_dutycycle(d);
abort_dutycycle(d,10.0);
// Create Phasetables
settable(phH90,4,table1);
settable(phHhx,4,table2);
settable(phXhx,4,table3);
settable(phXmix1,4,table4);
settable(phXmix2,4,table5);
settable(phRec,4,table6);
setreceiver(phRec);
if (phase1 == 2)
tsadd(phXhx,1,4);
// Begin Sequence
txphase(phXhx); decphase(phH90);
obspwrf(getval("aXhx")); decpwrf(getval("aH90"));
obsunblank(); decunblank(); _unblank34();
delay(d1);
sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);
// H to X Cross Polarization
decrgpulse(getval("pwH90"),phH90,0.0,0.0);
decphase(phHhx);
_cp_(hx,phHhx,phXhx);
// F2 Indirect Period for X
obspwrf(getval("aX90"));
_dseqon(dec);
delay(d2);
_dseqoff(dec);
// Mixing with SPC5 Recoupling
rgpulse(getval("pwX90"),phXmix1,0.0,0.0);
obspwrf(getval("aXspc5"));
xmtrphase(v1); txphase(phXmix1);
delay(getval("tZF"));
decpwrf(getval("aHmix"));
decon();
_mpseq(spc5, phXmix1);
xmtrphase(v2); txphase(phXmix2);
_mpseq(spc5ref, phXmix2);
decoff();
obspwrf(getval("aX90"));
xmtrphase(zero); txphase(phXmix2);
delay(getval("tZF"));
rgpulse(getval(&q
|
请发表评论