#ifndef LINT static char SCCSid[] = "@(#)vnmrs_sems.c 21.1 03/21/08 Copyright (c) 2003-2007 Varian,Inc. All Rights Reserved"; #endif /* * Varian,Inc. All Rights Reserved. * This software contains proprietary and confidential * information of Varian, Inc. and its contributors. * Use, disclosure and reproduction is prohibited without * prior consent. */ /*********************************************************************** Spin echo imaging sequence modified for flow imaging v1 - flow compensation only v2 - added flow weighting in VNMRJ create('fwamp_x','real') create('fwamp_y','real') create('fwamp_z','real') and set these variables to gauss/cm (gradient amp) - to see corresponding values for m1, venc, type 'dps' and go see 'text output' To do gradient cycling inside pe loop, in VNMRJ array: fwamp_x=1,-1,0,0,0,0 fwamp_y=0,0,1,-1,0,0 fwamp_z=0,0,0,0,1,-1 array='(fwamp_x,fwamp_y,fwamp_z)' ************************************************************************/ #include #include "sgl.c" #include #include #define max(A,B) ( (A) > (B) ? (A):(B)) /* LSB */ GENERIC_GRADIENT_T ssr1_grad; // flow comp slice select refocus GENERIC_GRADIENT_T ssr2_grad; GENERIC_GRADIENT_T ss2l_grad, ss2r_grad; // crusher lobes around 180 GENERIC_GRADIENT_T ro8_grad, ro7_grad; // readout grad flow comp prephaser GENERIC_GRADIENT_T fc180l_grad, fc180r_grad; // 180 flow comp GENERIC_GRADIENT_T fw1_grad, fw2_grad; // bipolar flow weighting gradient /* Phase cycling of 180 degree pulse */ static int ph180[2] = {1,3}; pulsesequence() { /* Internal variable declarations *************************/ double freq90[MAXNSLICE],freq180[MAXNSLICE],freqIR[MAXNSLICE]; int shape90=0, shape180=0, shapeIR=0; double te_delay1, te_delay2, tr_delay, ti_delay = 0; double del1=0, del2=0, del3=0, del4=0; double tau1=0, tau2=0, tmp1=0, tmp2=0; int table=0; /* Used for slice profile */ double sign=1; char slprofile[MAXSTR]; /* Real-time variables ************************************/ int vpe_steps = v1; int vpe_ctr = v2; int vms_slices = v3; int vms_ctr = v4; int vpe_offset = v5; int vpe_index = v6; int vph180 = v7; /* Phase of 180 pulse */ int vfw_ga = v8; // LSB axis of flow weighted gradient int debug=0; // LSB new variables double G1, G2, G3, G4, G5, G6, G7, G8, G9, G10; double tplateau, tplateau2, tplateau7, tplateau3; double rfFraction, rfDuration; double tramp, tramp2, tramp7, tramp3; double gssr1_grad, tssr1_grad, gssr2_grad, tssr2_grad; double gss2l_grad, gss2r_grad, tss2l_grad, tss2r_grad; double gro8_grad, gro7_grad, tro8_grad, tro7_grad; double rfDelayCenterBack; double gfc180l_grad, gfc180r_grad, tfc180l_grad, tfc180r_grad; double gfw1_grad, tfw1_grad, gfw2_grad, tfw2_grad; double fwamp, fwamp_x, fwamp_y, fwamp_z; double gamma, m1, venc; /* Initialize paramaters *********************************/ init_mri(); getstrnwarn("slprofile",slprofile); if (debug) printf("line 1\n"); /* Check for external PE table ***************************/ if (strcmp(petable,"n") && strcmp(petable,"N") && strcmp(petable,"")) { loadtable(petable); table = 1; } if (debug) printf("line 2\n"); fwamp_x=getval("fwamp_x"); // LSB pull these parameter values from VNMRJ environment fwamp_y=getval("fwamp_y"); fwamp_z=getval("fwamp_z"); if (debug) printf("line 3\n"); /* Initialize gradient structures *************************/ init_rf(&p1_rf,p1pat,p1,flip1,rof1,rof2); init_rf(&p2_rf,p2pat,p2,flip2,rof2,rof2); init_slice(&ss_grad,"ss",thk); if (debug) printf("line 4\n"); init_slice(&ss2_grad,"ss2",thk*1.1); // slice select gradient // LSB init_readout(&ro_grad,"ro",lro,np,sw); // readout gradient // LSB init_phase(&pe_grad,"pe",lpe,nv); if (debug) printf("line 5\n"); /* RF Calculations ****************************************/ calc_rf(&p1_rf,"tpwr1","tpwr1f"); calc_rf(&p2_rf,"tpwr2","tpwr2f"); if (debug) printf("line 6\n"); /* Gradient calculations **********************************/ calc_readout(&ro_grad, WRITE, "gro","sw","at"); ro_grad.m0ref *= grof; calc_phase(&pe_grad, WRITE, "gpe","tpe"); if (debug) printf("line 7\n"); ss_grad.tramp=300e-6; // LSB fix ramp time calc_slice(&ss_grad,&p1_rf,WRITE,"gss"); calc_slice(&ss2_grad,&p2_rf,WRITE,"gss2"); if (debug) printf("line 8\n"); printf(" ss_grad.tramp=%f \n", ss_grad.tramp); printf("PE grad: amp=%f duration=%f tramp=%f \n", pe_grad.amp, pe_grad.duration, pe_grad.tramp); // calc_slice_refocus(&ssr_grad, &ss_grad, NOWRITE,"gssr"); // LSB flow weighting gradient fwamp=max(max(fabs(fwamp_x),fabs(fwamp_y)),fabs(fwamp_z)); gfw1_grad=fwamp; gfw2_grad=-fwamp; tfw1_grad=5e-3; // 5ms long tfw2_grad=5e-3; // 5ms long tramp=600e-6; // 600us ramp time if (debug) printf("line 9\n"); init_generic(&fw1_grad,"fw1",gfw1_grad,tfw1_grad); init_generic(&fw2_grad,"fw2",gfw2_grad,tfw2_grad); if (debug) printf("line 10\n"); fw1_grad.tramp=tramp; fw2_grad.tramp=tramp; fw1_grad.amp=fwamp; fw2_grad.amp=fwamp; fw1_grad.calcFlag=MOMENT_FROM_DURATION_AMPLITUDE_RAMP; fw2_grad.calcFlag=MOMENT_FROM_DURATION_AMPLITUDE_RAMP; if (debug) printf("line 11\n"); calc_generic(&fw1_grad,WRITE,"gfw1_grad","tfw1_grad"); calc_generic(&fw2_grad,WRITE,"gfw2_grad","tfw2_grad"); if (debug) printf("line 12\n"); tplateau=fw1_grad.duration-2.0*fw1_grad.tramp; tramp=fw1_grad.tramp; printf(" M1: FIRST MOMENT OF BIPOLAR GRADIENT:\n"); m1=fwamp*(tplateau + tramp)*(tplateau + 2.0*tramp); printf(" m1=%f [gauss/cm s2] \n", m1); printf(" VELOCITY ENCODING CORRESPONDING TO M1:\n"); gamma=2.0*M_PI*42.2e6; venc=100.0*M_PI/gamma/m1; // 100x factor arises from conversion of T to gauss, and cm to m. printf(" venc=%f [m/s] \n", venc); if (debug) printf("line 13\n"); // LSB calc flow comp ss refocus pulses G1=ss_grad.amp; tplateau=ss_grad.duration-2.0*ss_grad.tramp; tplateau2=0.3*tplateau; rfFraction=ss_grad.rfFraction; rfDuration=ss_grad.rfDuration; tramp=ss_grad.tramp; tramp2=300e-6; G2=-(1.0/(12.0*(tplateau2 + tramp2)*(tplateau2 + 2.0*tramp2))) * (6.0*G1*pow(rfDuration,2.0)*pow(rfFraction,2.0) + 18.0*G1*rfDuration*rfFraction*tplateau2 + 12.0*G1*rfDuration*rfFraction*tramp + 9.0*G1*tplateau2*tramp + 4.0*G1*pow(tramp,2.0) + 36.0*G1*rfDuration*rfFraction*tramp2 + 18.0*G1*tramp*tramp2); G3=-(1.0/(12.0*(tplateau2 + tramp2)*(tplateau2 + 2.0*tramp2))) * (-6.0*G1*pow(rfDuration,2.0)*pow(rfFraction,2.0) - 6.0*G1*rfDuration*rfFraction*tplateau2 - 12.0*G1*rfDuration*rfFraction*tramp - 3.0*G1*tplateau2*tramp - 4.0*G1*pow(tramp,2.0) - 12.0*G1*rfDuration*rfFraction*tramp2 - 6.0*G1*tramp*tramp2); printf(" G1=%f, G2=%f, G3=%f \n", G1, G2, G3); if (debug) printf("line 14\n"); gssr1_grad=G2; gssr2_grad=G3; tssr1_grad=tplateau2+2.0*tramp; tssr2_grad=tplateau2+2.0*tramp; init_generic(&ssr1_grad,"ssr1",gssr1_grad,tssr1_grad); // init_slice_refocus(&ssr_grad,"ssr"); init_generic(&ssr2_grad,"ssr2",gssr2_grad,tssr2_grad); if (debug) printf("line 15\n"); ssr1_grad.tramp=tramp; ssr2_grad.tramp=tramp; ssr1_grad.amp=G2; ssr2_grad.amp=G3; ssr1_grad.calcFlag=MOMENT_FROM_DURATION_AMPLITUDE_RAMP; ssr2_grad.calcFlag=MOMENT_FROM_DURATION_AMPLITUDE_RAMP; if (debug) printf("line 16\n"); calc_generic(&ssr1_grad,WRITE,"gssr1_grad","tssr1_grad"); calc_generic(&ssr2_grad,WRITE,"gssr2_grad","tssr2_grad"); if (debug) printf("line 17\n"); printf(" G1.amp=%f, G2.amp=%f, G3.amp=%f \n", ss_grad.amp, ssr1_grad.amp, ssr2_grad.amp); printf(" G1.tramp=%f, G2.tramp=%f, G3.tramp=%f \n", ss_grad.tramp, ssr1_grad.tramp, ssr2_grad.tramp); rfDelayCenterBack=ss_grad.rfFraction*ss_grad.rfDuration+ss_grad.pad2+ss_grad.rfDelayBack; printf(" RF1: amp=%f rfdelaycenterback=%f tramp=%f m0=%f \n", ss_grad.amp, rfDelayCenterBack, ss_grad.tramp, ss_grad.amp*(rfDelayCenterBack-0.5*ss_grad.tramp)); printf(" G2: m0=%f \n", G2*(ssr1_grad.duration-ssr1_grad.tramp)); printf(" G3: m0=%f \n", G3*(ssr2_grad.duration-ssr2_grad.tramp)); printf(" total m0=%f \n", ss_grad.amp*(rfDelayCenterBack-0.5*ss_grad.tramp) + G2*(ssr1_grad.duration-ssr1_grad.tramp) + G3*(ssr2_grad.duration-ssr2_grad.tramp)); if (debug) printf("line 18\n"); // LSB 180 crusher G4=ss2_grad.amp; tplateau=ss2_grad.duration-2.0*ss2_grad.tramp; tplateau2=0.5*tplateau; tramp=ss2_grad.tramp; tramp2=300e-6; G5=8.0; gss2l_grad=G5; gss2r_grad=G5; tss2l_grad=tplateau2+2.0*tramp2; tss2r_grad=tplateau2+2.0*tramp2; if (debug) printf("line 19\n"); init_generic(&ss2l_grad,"ss2l",gss2l_grad,tss2l_grad); init_generic(&ss2r_grad,"ss2r",gss2r_grad,tss2r_grad); if (debug) printf("line 20\n"); ss2l_grad.tramp=tramp2; ss2r_grad.tramp=tramp2; ss2l_grad.amp=G5; ss2r_grad.amp=G5; ss2l_grad.calcFlag=MOMENT_FROM_DURATION_AMPLITUDE_RAMP; ss2r_grad.calcFlag=MOMENT_FROM_DURATION_AMPLITUDE_RAMP; if (debug) printf("line 20\n"); calc_generic(&ss2l_grad,WRITE,"gss2l_grad","tss2l_grad"); calc_generic(&ss2r_grad,WRITE,"gss2r_grad","tss2r_grad"); if (debug) printf("line 21\n"); // LSB 180 flow comp // fc180l_grad, fc180r_grad tplateau2=ss2l_grad.duration-2.0*ss2l_grad.tramp; tplateau3=3000e-6; tramp3=600e-6; tramp2=ss2l_grad.tramp; tramp=ss2_grad.tramp; G10=(1.0/(12.0*(tplateau3 + tramp3)*(tplateau3 + 2.0*tramp3))) * (-3.0*ss2_grad.amp*pow(tplateau,2.0) - 12.0*G5*tplateau*tplateau2 - 12.0*G5*pow(tplateau2,2.0) - 6.0*ss2_grad.amp*tplateau*tramp - 24.0*G5*tplateau2*tramp - 4.0*ss2_grad.amp*pow(tramp,2.0) - 12.0*G5*tplateau*tramp2 - 36.0*G5*tplateau2*tramp2 - 24.0*G5*tramp*tramp2 - 24.0*G5*pow(tramp2,2.0)); gfc180l_grad=G10; gfc180r_grad=G10; tfc180l_grad=tplateau3+2.0*tramp3; tfc180r_grad=tplateau3+2.0*tramp3; if (debug) printf("line 22\n"); init_generic(&fc180l_grad,"fc180l",gfc180l_grad,tfc180l_grad); init_generic(&fc180r_grad,"fc180r",gfc180r_grad,tfc180r_grad); if (debug) printf("line 23\n"); fc180l_grad.tramp=tramp3; fc180r_grad.tramp=tramp3; fc180l_grad.amp=G10; fc180r_grad.amp=G10; fc180l_grad.calcFlag=MOMENT_FROM_DURATION_AMPLITUDE_RAMP; fc180r_grad.calcFlag=MOMENT_FROM_DURATION_AMPLITUDE_RAMP; calc_generic(&fc180l_grad,WRITE,"gfc180l_grad","tfc180l_grad"); calc_generic(&fc180r_grad,WRITE,"gfc180r_grad","tfc180r_grad"); if (debug) printf("line 24\n"); // LSB calc flow comp readout prephasers tplateau7=600e-6; tramp7=300e-6; G9=ro_grad.amp; G7=-(1.0/(24.0*(tplateau7 + tramp7)*(tplateau7 + 2.0*tramp7)))* (3.0*pow(ro_grad.acqTime,2.0)*G9 - 12.0*pow(ro_grad.acqTime,2.0)*ro_grad.echoFraction*G9 + 12.0*pow(ro_grad.acqTime,2.0)*pow(ro_grad.echoFraction,2.0)*G9 - 12.0*ro_grad.acqTime*G9*ro_grad.pad1 + 24.0*ro_grad.acqTime*ro_grad.echoFraction*G9*ro_grad.pad1 + 12.0*G9*pow(ro_grad.pad1,2.0)- 18.0*ro_grad.acqTime*G9*tplateau7 + 36.0*ro_grad.acqTime*ro_grad.echoFraction*G9*tplateau7 + 36.0*G9*ro_grad.pad1*tplateau7 - 12.0*ro_grad.acqTime*G9*ro_grad.tramp + 24.0*ro_grad.acqTime*ro_grad.echoFraction*G9*ro_grad.tramp + 24.0*G9*ro_grad.pad1*ro_grad.tramp + 18.0*G9*tplateau7*ro_grad.tramp + 8.0*G9*pow(ro_grad.tramp,2.0) - 36.0*ro_grad.acqTime*G9*tramp7 + 72.0*ro_grad.acqTime*ro_grad.echoFraction*G9*tramp7 + 72.0*G9*ro_grad.pad1*tramp7 + 36.0*G9*ro_grad.tramp*tramp7); G8=-(1.0/(24.0*(tplateau7 + tramp7)*(tplateau7 + 2.0*tramp7)))* (-3.0*pow(ro_grad.acqTime,2.0)*G9 + 12.0*pow(ro_grad.acqTime,2.0)*ro_grad.echoFraction*G9 - 12.0*pow(ro_grad.acqTime,2.0)*pow(ro_grad.echoFraction,2.0)*G9 + 12.0*ro_grad.acqTime*G9*ro_grad.pad1 - 24.0*ro_grad.acqTime*ro_grad.echoFraction*G9*ro_grad.pad1 - 12.0*G9*pow(ro_grad.pad1,2.0) + 6.0*ro_grad.acqTime*G9*tplateau7 - 12.0*ro_grad.acqTime*ro_grad.echoFraction*G9*tplateau7 - 12.0*G9*ro_grad.pad1*tplateau7 + 12.0*ro_grad.acqTime*G9*ro_grad.tramp - 24.0*ro_grad.acqTime*ro_grad.echoFraction*G9*ro_grad.tramp - 24.0*G9*ro_grad.pad1*ro_grad.tramp - 6.0*G9*tplateau7*ro_grad.tramp - 8.0*G9*pow(ro_grad.tramp,2.0) + 12.0*ro_grad.acqTime*G9*tramp7 - 24.0*ro_grad.acqTime*ro_grad.echoFraction*G9*tramp7 - 24.0*G*ro_grad.pad1*tramp7 - 12.0*G9*ro_grad.tramp*tramp7); gro8_grad=G8; gro7_grad=G7; tro8_grad=tplateau7+2.0*tramp7; tro7_grad=tplateau7+2.0*tramp7; if (debug) printf("line 25\n"); init_generic(&ro8_grad,"ro8",gro8_grad,tro8_grad); init_generic(&ro7_grad,"ro7",gro7_grad,tro7_grad); if (debug) printf("line 26\n"); ro8_grad.tramp=tramp7; ro7_grad.tramp=tramp7; ro8_grad.amp=G8; ro7_grad.amp=G7; ro8_grad.calcFlag=MOMENT_FROM_DURATION_AMPLITUDE_RAMP; ro7_grad.calcFlag=MOMENT_FROM_DURATION_AMPLITUDE_RAMP; if (debug) printf("line 27\n"); calc_generic(&ro8_grad,WRITE,"gro8_grad","tro8_grad"); calc_generic(&ro7_grad,WRITE,"gro7_grad","tro7_grad"); if (debug) printf("line 28\n"); printf("RO8: amp=%f tramp=%f dur=%f m0=%f \n", ro8_grad.amp, ro8_grad.tramp, ro8_grad.duration, ro8_grad.amp*(-ro8_grad.tramp+ro8_grad.duration)); printf("RO7: amp=%f tramp=%f dur=%f m0=%f \n", ro7_grad.amp, ro7_grad.tramp, ro7_grad.duration, ro7_grad.amp*(-ro7_grad.tramp+ro7_grad.duration)); printf("ro: amp=%f tramp=%f timeToEcho=%f m0=%f \n", ro_grad.amp, ro_grad.tramp, ro_grad.timeToEcho, ro_grad.amp*(-0.5*ro_grad.tramp+ro_grad.timeToEcho) ); printf("Total m0 moment: %f \n", G8*(-ro8_grad.tramp+ro8_grad.duration) + G7*(-ro7_grad.tramp+ro7_grad.duration) + G9*(-0.5*ro_grad.tramp+ro_grad.timeToEcho) ); /* Min TE *************************************************/ tau1 = ss_grad.rfCenterBack + pe_grad.duration + 6*(4e-6) + ss2_grad.rfCenterFront + ssr1_grad.duration + ssr2_grad.duration + ss2l_grad.duration + fw1_grad.duration + fw2_grad.duration; tau2 = ss2_grad.rfCenterBack + ro_grad.timeToEcho + alfa + ss2r_grad.duration + ro7_grad.duration + ro8_grad.duration + 5*(4e-6) + fc180l_grad.duration + fc180r_grad.duration; // temin = 2*(MAX(tau1,tau2) + 2*4e-6); /* have at least 4us between gradient events */ te_delay1 = te/2 - tau1; te_delay2 = te/2 - tau2; /* Min TR *************************************************/ trmin = (ss_grad.duration - ss_grad.rfCenterBack) + te + ro_grad.timeFromEcho; trmin *= ns; if (debug) printf("line 29\n"); if (tr < trmin) { abort_message("TR too short. Minimum TR= %.2fms\n",trmin*1000); } tr_delay = (tr - trmin)/ns > 4e-6 ? (tr - trmin)/ns : 4e-6; /* Generate phase-ramped pulses: 90, 180, and IR */ offsetlist(pss,ss_grad.ssamp,0,freq90,ns,seqcon[1]); shape90 = shapelist(p1pat,ss_grad.rfDuration,freq90,ns,0,seqcon[1]); offsetlist(pss,ss2_grad.ssamp,0,freq180,ns,seqcon[1]); shape180 = shapelist(p2pat,ss2_grad.rfDuration,freq180,ns,0,seqcon[1]); /* Set pe_steps for profile or full image **********/ pe_steps = prep_profile(profile[0],nv,&pe_grad,&null_grad); initval(pe_steps/2.0,vpe_offset); sgl_error_check(sglerror); if (debug) printf("line 30\n"); /* Return parameters to VnmrJ */ putvalue("rgss",ss_grad.tramp); //90 slice ramp putvalue("rgss2",ss2_grad.tramp); putvalue("rgro",ro_grad.tramp); //RO ramp putvalue("gpe",pe_grad.peamp); //PE max amp putvalue("gss",ss_grad.ssamp); putvalue("gro",ro_grad.roamp); g_setExpTime(tr*(nt*pe_steps*arraydim + ssc)); if (debug) printf("line 31\n"); /* PULSE SEQUENCE *************************************/ rotate(); obsoffset(resto); roff = -poffset(pro,ro_grad.roamp); delay(4e-6); if (debug) printf("line 32\n"); /* Begin phase-encode loop ****************************/ peloop(seqcon[2],pe_steps,vpe_steps,vpe_ctr); /* Read external kspace table if set ******************/ if (table) getelem(t1,vpe_ctr,vpe_index); else sub(vpe_ctr,vpe_offset,vpe_index); if (debug) printf("line 33\n"); settable(t2,2,ph180); /* initialize phase tables and variables */ getelem(t2,vpe_ctr,vph180); /* 180 deg pulse phase alternates +/- 90 off the receiver */ add(oph,vph180,vph180); if (debug) printf("line 34\n"); /* Begin multislice loop ******************************/ msloop(seqcon[1],ns,vms_slices,vms_ctr); if (ticks) { xgate(ticks); grad_advance(gpropdelay); } if (debug) printf("line 35\n"); /* TTL scope trigger **********************************/ sp1on(); delay(5e-6); sp1off(); /* Slice select RF pulse ******************************/ obspower(p1_rf.powerCoarse); obspwrf(p1_rf.powerFine); delay(4e-6); obl_shapedgradient(ss_grad.name,ss_grad.duration,0,0,G1,NOWAIT); delay(ss_grad.rfDelayFront); shapedpulselist(shape90,ss_grad.rfDuration,oph,rof1,rof2,seqcon[1],vms_ctr); delay(ss_grad.rfDelayBack); // LSB flow comp ss refocus delay(4e-6); obl_shapedgradient(ssr1_grad.name,ssr1_grad.duration,0,0,G2,WAIT); delay(4e-6); obl_shapedgradient(ssr2_grad.name,ssr2_grad.duration,0,0,G3,WAIT); /* Phase encode, refocus, and dephase gradient ********/ pe_shapedgradient(pe_grad.name,pe_grad.duration,0,0,0, pe_grad.increment,vpe_index,WAIT); // LSB bipolar flow weighting grad delay(4e-6); obl_shapedgradient(fw1_grad.name,fw1_grad.duration,fwamp_x,fwamp_y,fwamp_z,WAIT); // LSB bipolar flow weighting grad delay(4e-6); obl_shapedgradient(fw2_grad.name,fw2_grad.duration,-fwamp_x,-fwamp_y,-fwamp_z,WAIT); delay(te_delay1); // LSB crusher ss2 lobe delay(4e-6); obl_shapedgradient(ss2l_grad.name,ss2l_grad.duration,0,0,8.0,WAIT); /* Refocusing RF pulse ********************************/ obspower(p2_rf.powerCoarse); obspwrf(p2_rf.powerFine); delay(4e-6); obl_shapedgradient(ss2_grad.name,ss2_grad.duration,0,0,ss2_grad.amp,NOWAIT); delay(ss2_grad.rfDelayFront); // shapedpulselist(shape180,ss2_grad.rfDuration,vph180,rof2,rof2,seqcon[1],vms_ctr); shapedpulselist(shape180,ss2_grad.rfDuration,one,rof2,rof2,seqcon[1],vms_ctr); // LSB removed phase cycling delay(ss2_grad.rfDelayBack); // LSB crusher ss2 lobe delay(4e-6); obl_shapedgradient(ss2r_grad.name,ss2r_grad.duration,0,0,G5,WAIT); // G5 should be 8.0 // LSB 180 flow comp bipolar delay(4e-6); obl_shapedgradient(fc180l_grad.name,fc180l_grad.duration,0,0,-G10,WAIT); delay(4e-6); obl_shapedgradient(fc180r_grad.name,fc180r_grad.duration,0,0,G10,WAIT); delay(te_delay2); // LSB flow comp ro grad obl_shapedgradient(ro8_grad.name,ro8_grad.duration,G8,0,0,WAIT); // LSB flow comp ro grad delay(4e-6); obl_shapedgradient(ro7_grad.name,ro7_grad.duration,G7,0,0,WAIT); /* Readout gradient and acquisition ********************/ delay(4e-6); obl_shapedgradient(ro_grad.name,ro_grad.duration,G9,0,0,NOWAIT); delay(ro_grad.atDelayFront); startacq(alfa); acquire(np,1.0/sw); delay(ro_grad.atDelayBack); endacq(); /* Relaxation delay ***********************************/ delay(tr_delay); endmsloop(seqcon[1],vms_ctr); endpeloop(seqcon[2],vpe_ctr); }