您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wet4函数代码示例

51自学网 2021-06-03 09:55:17
  C++
这篇教程C++ wet4函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中wet4函数的典型用法代码示例。如果您正苦于以下问题:C++ wet4函数的具体用法?C++ wet4怎么用?C++ wet4使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了wet4函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: pulsesequence

void pulsesequence(){  /* DECLARE & READ IN NEW PARAMETERS */    char   compshape[MAXSTR];  getstr("compshape",compshape);    /* Composit pulse shape  */  loadtable("lc1d");              /* Phase table                   */  /* PULSE SEQUENCE */  status(A);    hsdelay(d1);  status(B);    if (getflag("wet")) wet4(t1,t2);  status(C);     if (getflag("composit"))     {       if (rfwg[OBSch-1] == 'y')          shaped_pulse(compshape,4.0*pw+0.8e-6,t3,rof1,rof2);       else          composite_pulse(pw,t3,rof1,rof2,v1);    }    else       rgpulse(pw,t3,rof1,rof2);    setreceiver(t4);}
开发者ID:timburrow,项目名称:ovj3,代码行数:31,


示例2: pulsesequence

void pulsesequence(){   double jc13,jtau;    jc13 = getval("jc13");   jtau = 1.0 / (2.0 * jc13);   mod4(ct, v1);		/*  v1 = 0 1 2 3 */   dbl(v1, v10);		/* v10 = 0 2 0 2 */   hlv(ct, v2);   hlv(v2, v2);   mod4(v2, v2);		/* v2 = 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 */   add(v2, v1, v1);   assign(v2, oph);   add(v10, oph, oph);   status(A);   hsdelay(d1);   if (getflag("wet")) wet4(zero,one);   status(C);   rgpulse(pw, v2, rof1, rof2);   jtau -= pw + rof2;   delay(jtau - rof1);   simpulse(2*pw, pwx, v1, zero, rof1, rof2);   delay(jtau);   status(C);}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:30,


示例3: pulsesequence

pulsesequence(){	double	gzlvl1,		gt1,		gstab,		hsglvl,		hsgt;	char	sspul[MAXSTR];	gzlvl1 = getval("gzlvl1");	gt1 = getval("gt1");	gstab = getval("gstab");	hsglvl = getval("hsglvl");	hsgt = getval("hsgt");	getstr("sspul",sspul);	settable(t1,4,ph1);	settable(t2,4,ph2);	settable(t3,4,ph3);	getelem(t1,ct,v1);	getelem(t2,ct,v2);	getelem(t3,ct,oph);	initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v10);		add(v1,v10,v1);		add(oph,v10,oph);status(A); 	delay(5.0e-5);	if (sspul[0] == 'y')	{		zgradpulse(hsglvl,hsgt);		rgpulse(pw,zero,rof1,rof1);		zgradpulse(hsglvl,hsgt);	}	delay(d1);     if (getflag("wet"))       wet4(zero,one);status(B);	rgpulse(pw, v1, rof1, rof1);	delay(d2); 	zgradpulse(gzlvl1,gt1);	delay(gstab);	rgpulse(pw, v2, rof1, rof2);	zgradpulse(gzlvl1,gt1);	delay(gstab);status(C);}
开发者ID:timburrow,项目名称:ovj3,代码行数:54,


示例4: pulsesequence

pulsesequence(){        double cmult = getval("cmult");	settable(t1,8,ph1);	settable(t2,8,ph2);	settable(t3,8,ph3);	getelem(t1,ct,v1);	getelem(t2,ct,v2);	getelem(t3,ct,oph);/*	mod2(id2,v10);	dbl(v10,v10);*/  	initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v10);	add(v1,v10,v1);	add(oph,v10,oph);	assign(v1,v4);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,v4,rof1,rof1);     }   else        delay(d1);   if (getflag("wet"))     wet4(zero,one);status(B);	rgpulse(pw, v1, rof1, rof1);	delay(d2); 	rgpulse(cmult*pw, v2, rof1, rof2);status(C);}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:51,


示例5: pulsesequence

void pulsesequence(){  char compshape[MAXSTR],	sspul[MAXSTR],	wet[MAXSTR],	composit[MAXSTR];  getstr("compshape",compshape);  getstr("composit",composit);  getstr("sspul",sspul);  getstr("wet",wet);  settable(t1,4,phs1);  settable(t2,8,phs2);  getelem(t1,ct,oph);  getelem(t2,ct,v2);  assign(oph,v1);   /* equilibrium period */   status(A);   delay(5.0e-5);   if (sspul[0] == 'y')        steadystate();	delay(d1);   if (wet[0] == 'y')     wet4(zero,one);   status(B);   pulse(p1,zero);    hsdelay(d2);    if (composit[0] == 'y')    {       if (rfwg[OBSch-1] == 'y')          shaped_pulse(compshape,4.0*pw+0.8e-6,v1,rof1,rof2);       else          comp90pulse(pw,v1,rof1,rof2);    }   else      rgpulse(pw,v1,rof1,rof2);   status(C);}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:47,


示例6: pulsesequence

void pulsesequence(){  double j1min = getval("j1min"),         j1max = getval("j1max"),         gzlvl0 = getval("gzlvl0"),         gt0 = getval("gt0"),	 tau,         tauA,         tauB,         taumb;  int	 phase1 = (int)(getval("phase")+0.5);  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);  settable(t1,1,ph1);  settable(t2,2,ph2);  settable(t3,4,ph3);  settable(t4,1,ph4);  settable(t5,8,ph5);  settable(t6,8,ph6);  settable(t7,4,ph7);if (getflag("jfilter")){ if (getflag("PFGflg"))   {        getelem(t2,ct,v3);        getelem(t7,ct,oph);        getelem(t3,ct,v4);   } else   {        getelem(t3,ct,v3);        getelem(t6,ct,oph);        getelem(t5,ct,v4);   }}else{        getelem(t2,ct,v3);        getelem(t7,ct,oph);        getelem(t3,ct,v4);}  if (phase1 == 2)    incr(v3);/*  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);  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"))   {     if (getflag("PFGflg"))     {     	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(gt0/3);     }     else     {     	delay(tau - rof2 - rof1);	decrgpulse(pwx,t2,rof1,rof1);//.........这里部分代码省略.........
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:101,


示例7: pulsesequence

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);//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:ovj3,代码行数:101,


示例8: pulsesequence

void pulsesequence(){  double   tpwr180r = getval("tpwr180r"),           pw180r = getval("pw180r"),	   pwx180 = getval("dnbippw"),	   pwxlvl180 = getval("dnbippwr"),           pp = getval("pp"),           pplvl = getval("pplvl"),	   tauC = getval("tauC"),	   tau;  int      prgcycle=(int)(getval("prgcycle")+0.5);  char     pw180ref[MAXSTR],	   dnbipshp[MAXSTR],	   bipflg[MAXSTR];  getstr("pw180ref", pw180ref);  getstr("dnbipshp", dnbipshp);  getstr("bipflg",bipflg);  tau    = 1.0 / (2.0 * (getval("j1xh")));  assign(ct,v17);  assign(zero,v18);  assign(zero,v19);  if (getflag("prgflg") && getflag("satmode") && (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,phs1);  settable(t2,8,phs2);  settable(t3,4,phs3);  getelem(t1,v17,v1);  getelem(t2,v17,v2);  getelem(t3,v17,v3);  assign(v1,oph);  add(oph,v18,oph);  add(oph,v19,oph);  if (getflag("prgflg") && getflag("satmode"))        assign(v3,v2);   /* equilibrium period */   status(A);   delay(5.0e-5);   if (getflag("sspul"))        steadystate();   if (getflag("satmode"))     {        if ((d1-satdly) > 0.02)                delay(d1-satdly);        else                delay(0.02);        if (getflag("slpsat"))           {                shaped_satpulse("relaxD",satdly,v2);                if (getflag("prgflg"))                   shaped_purge(v1,v2,v18,v19);           }        else           {                satpulse(satdly,v2,rof1,rof1);                if (getflag("prgflg"))                   purge(v1,v2,v18,v19);           }     }   else	delay(d1);   if (getflag("wet"))     wet4(zero,one);   status(B);	obspower(tpwr);	if (bipflg[1] == 'y')	    decpower(pwxlvl180);	else	    decpower(pplvl);        rgpulse(pw,v1,rof1,rof1);	if (bipflg[1] == 'y')	    { 		decshaped_pulse(dnbipshp,pwx180,zero,2.0e-6,2.0e-6);		delay(tau+tauC);	    }	else	    {	    	decrgpulse(2*pp,zero,2.0e-6,2.0e-6);		delay(tau);	    }	obspower(tpwr180r);//.........这里部分代码省略.........
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:101,


示例9: pulsesequence

//.........这里部分代码省略.........   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"))
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:67,


示例10: pulsesequence

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);//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:101,


示例11: pulsesequence

pulsesequence(){   double          slpwrR = getval("slpwrR"),                   slpwR = getval("slpwR"),                   mixR = getval("mixR"),                   gzlvlz = getval("gzlvlz"),                   gtz = getval("gtz"),		   zfphinc = getval("zfphinc");   char		   slpatR[MAXSTR];   int		   phase1 = (int)(getval("phase")+0.5);/* LOAD AND INITIALIZE PARAMETERS */   getstr("slpatR",slpatR);   if (strcmp(slpatR,"cw") &&        strcmp(slpatR,"troesy") &&        strcmp(slpatR,"dante"))        abort_message("SpinLock pattern %s not supported!./n", slpatR);   sub(ct,ssctr,v7);   settable(t1,4,ph1);	getelem(t1,v7,v1);   settable(t2,8,ph2);	getelem(t2,v7,v2);   settable(t3,8,ph3);	   settable(t8,4,ph8);	getelem(t8,v7,v8);   settable(t6,8,ph6);	getelem(t6,v7,v6);     assign(v1,oph);    if (getflag("zfilt"))	getelem(t3,v7,oph);   add(v2,one,v3);   add(v2,two,v4);   add(v2,three,v5);   if (phase1 == 2)      {incr(v1); incr(v6);}			/* hypercomplex method *//*   mod2(id2,v13);   dbl(v13,v13);*/  initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v13);       add(v1,v13,v1);       add(v6,v13,v6);       add(oph,v13,oph);/* The following is for flipback pulse */   zfphinc=zfphinc+180;   if (zfphinc < 0) zfphinc=zfphinc+360;   initval(zfphinc,v10);/* BEGIN 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);   decpower(dpwr);   status(B);      rgpulse(pw, v1, rof1, rof1);      if (d2 > 0.0)       delay(d2 - POWER_DELAY - (2*pw/PI) - rof1);      else       delay(d2);            obspower(slpwrR);      if (mixR > 0.0)      {        if (dps_flag)	  {	     if (!strcmp(slpatR,"troesy"))          	rgpulse(mixR,v2,0.0,0.0);	     else		rgpulse(mixR,v3,0.0,0.0);	  }        else          SpinLock(slpatR,mixR,slpwR,v2,v3,v4,v5, v9);      }       if ((getflag("zfilt")) && (getflag("PFGflg")))        {//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:101,


示例12: pulsesequence

//.........这里部分代码省略.........   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*/                    }
开发者ID:OpenVnmrJ,项目名称:OpenVnmrJ,代码行数:67,


示例13: pulsesequence

pulsesequence(){        double gzlvl1,qlvl,grise,gstab,gt1,ss,phase;	int icosel,iphase;  	ss = getval("ss");        grise=getval("grise");        gstab=getval("gstab");         gt1=getval("gt1");        gzlvl1=getval("gzlvl1");        qlvl=getval("qlvl");        phase=getval("phase");        iphase = (int) (phase + 0.5);/* DETERMINE STEADY-STATE MODE */   if (ss < 0) ss = (-1) * ss;   else      if ((ss > 0) && (ix == 1)) ss = ss;      else         ss = 0;   initval(ss, ssctr);   initval(ss, ssval);   assign(oph,v2);   assign(oph,v1);   if (iphase == 2)      incr(v1);/* HYPERCOMPLEX MODE */   initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v6);   if ((iphase==1) || (iphase==2))      {add(v1,v6,v1); add(oph,v6,oph);} 	     status(A);        rcvroff();	delay(d1);     if (getflag("wet")) wet4(zero,one);	rlpower(tpwr,TODEV);	rgpulse(pw,v1,rof1,rof2);     status(B);        if (d2 > rof1 + 4.0*pw/3.1416)           delay(d2 - rof1 - 4.0*pw/3.1416);     status(C);        rgpulse(pw,v2,rof1,rof2);              delay(gt1+2.0*grise+24.4e-6);        rgpulse(2.0*pw,v2,rof1,rof2);        icosel=-1;        rgradient('z',gzlvl1*(double)icosel);	delay(gt1+grise);	rgradient('z',0.0);        txphase(oph);	delay(grise);	rgpulse(pw,v2,rof1,rof2);        rgradient('z',gzlvl1*qlvl);	delay(gt1+grise);	rgradient('z',0.0);	delay(grise);       rcvron();	delay(gstab);       status(D);}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:68,


示例14: pulsesequence

//.........这里部分代码省略.........*/  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);
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:67,


示例15: pulsesequence

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));//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:ovj3,代码行数:101,


示例16: pulsesequence

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);//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:ovj3,代码行数:101,


示例17: pulsesequence

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); //.........这里部分代码省略.........
开发者ID:timburrow,项目名称:ovj3,代码行数:101,


示例18: pulsesequence

pulsesequence(){   double          tau, rg1 = 2.0e-6,                   jXH = getval("jXH"),                   mult = getval("mult"),                   gt0 = getval("gt0"),                   gzlvl0 = getval("gzlvl0"),                   gt1 = getval("gt1"),                   gzlvl1 = getval("gzlvl1"),                   gt2 = getval("gt2"),                   gzlvl2 = getval("gzlvl2"),                   gt3 = getval("gt3"),                   gzlvl3 = getval("gzlvl3"),                   Gratio = getval("Gratio"),                   gstab = getval("gstab"),                   compH = getval("compH"),                   compX = getval("compX"),                   Hpwr = getval("Hpwr"),		   jevol = 0.25 / 140.0;    /* default for C-13 */   char            pshape[MAXSTR], zz[MAXSTR], ad180[MAXSTR], sspul[MAXSTR];   shape           hdx;                     /* HADAMARD stuff */   void            setphases();   getstr("pshape", pshape);              /* pulse shape as in wavelib */   getstr("sspul", sspul);   getstr("zz", zz);   getstr("ad180", ad180);   if (jXH > 0.0) jevol = 0.25 / jXH;      tau = gt3 + gstab;   if (mult > 0.5)    tau = 2*jevol;   setphases();   /* MAKE PBOX SHAPES */   if (FIRST_FID)   {     ad180sh = pbox_ad180("ad180", pwx, pwxlvl);    /* make adiabatic 180 */     if (strcmp(pwpat,"Hdec") == 0)     {       /* make H decoupling shape */       Hdec = pboxHT_dec(pwpat, pshape, jXH, 20.0, pw, compH, tpwr);       Hpwr = Hdec.pwr;     }   }   hdx = pboxHT_F1i(pshape, pwx*compX, pwxlvl);         /* HADAMARD stuff */   if (getval("htcal1") > 0.5)           /* enable manual power calibration */     hdx.pwr += getval("htpwr1"); /* THE PULSE PROGRAMM STARTS HERE */   status(A);    delay(5.0e-5);    zgradpulse(gzlvl0,gt0);    if (sspul[0] == 'y')    {      rgpulse(pw,zero,rof1,rof1);      zgradpulse(gzlvl0,gt0);    }    pre_sat();          if (getflag("wet"))      wet4(zero,one);   decoffset(dof);   decpower(pwxlvl);   obspower(tpwr);   obsoffset(tof);   delay(2.0e-5);    status(B);   rgpulse(pw, v2, rg1, rg1);   delay(jevol - ad180sh.pw/2.0 - 3.0*rg1); /* +rg on both sides */   decshaped_pulse(ad180sh.name, ad180sh.pw, zero, rg1, rg1);   rgpulse(2.0*pw, zero, rg1, rg1);   delay(jevol + ad180sh.pw/2.0 - rg1);   rgpulse(pw, one, rg1, rg1);   zgradpulse(-gzlvl2, gt2);   delay(gstab);   decpower(hdx.pwr);   if (strcmp(pwpat,"") == 0)     decshaped_pulse(hdx.name, hdx.pw, zero, rg1, rg1);   else   {     obspower(Hpwr);     simshaped_pulse(pwpat, hdx.name, hdx.pw, hdx.pw, zero, zero, rg1, rg1);   }   zgradpulse(gzlvl2*1.4, gt2);   decpower(pwxlvl); obspower(tpwr);   if((zz[A] == 'y') && (mult == 0))    {//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:ovj3,代码行数:101,


示例19: pulsesequence

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);//.........这里部分代码省略.........
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:101,


示例20: pulsesequence

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)//.........这里部分代码省略.........
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:101,


示例21: pulsesequence

//.........这里部分代码省略.........  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);
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:67,


示例22: pulsesequence

pulsesequence(){	double	gzlvlE = getval("gzlvlE"),                gtE = getval("gtE"),                EDratio = getval("EDratio"),		gstab = getval("gstab"),		hsglvl = getval("hsglvl"),		hsgt = getval("hsgt"),		satdly = getval("satdly"),                pwxlvl = getval("pwxlvl"),		pwx = getval("pwx"),                jFH = getval("jFH"),                dly1, dly2;	char	sspul[MAXSTR],		satmode[MAXSTR];        int     icosel;	getstr("satmode",satmode);	getstr("sspul",sspul);        if (jFH == 0.0) jFH=7.0;        dly1 = 1.0 / (2.0*jFH);        dly2 = 1.0 / (3.0*jFH);        icosel = -1;	settable(t1,4,ph1);	settable(t2,4,ph2);	settable(t3,8,ph3);        settable(t4,32,ph4);        settable(t5,16,ph5);	getelem(t1,ct,v1);	getelem(t2,ct,v2);	getelem(t3,ct,v3);        getelem(t4,ct,v4);        getelem(t5,ct,oph);	initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v10);              {		add(v1,v10,v1);		add(oph,v10,oph);               }       decpower(pwxlvl); decpwrf(4095.0);status(A);      if (sspul[0] == 'y')	{		zgradpulse(hsglvl,hsgt);		rgpulse(pw,zero,rof1,rof1);                decrgpulse(pwx,zero,rof1,rof1);		zgradpulse(hsglvl,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);   if (getflag("wet"))      wet4(zero,one);status(B);	decrgpulse(pwx, v1, rof1, rof1);        if (d2/2.0==0.0) delay(d2);        else delay(d2/2.0-2*rof1-pw);        rgpulse(2.0*pw,v3,rof1,rof1);        if (d2/2.0==0.0) delay(d2);        else delay(d2/2.0-2*rof1-pw);        delay(dly1 - gtE-gstab);	zgradpulse(gzlvlE*EDratio,gtE);        delay(gstab);        decrgpulse(pwx,v2,rof1,rof1);	rgpulse(pw, v4, rof1, rof1); 	zgradpulse(icosel*gzlvlE,gtE);        decpower(dpwr);	delay(dly2 - gtE);status(C);}
开发者ID:timburrow,项目名称:ovj3,代码行数:86,


示例23: pulsesequence

//.........这里部分代码省略.........   divn(v7,v10,v7);	/* (ct+16)/192 */   add(v5,v6,v5);   sub(v5,v7,v5);	/* ((ct+4)/32-ct/32)+((ct+20)/192-(ct+16)/192) */                        /* flag for exceptions on even transients */   dbl(v2,v6);		/* 0022 */   add(v6,three,v6);	/* 3355 */   ifzero(v1);		/* for odd transients */      ifzero(v2);       /* 1+4n:                             */         assign(zero,v3);             /* 0xxx 0xxx 0xxx 0xxx */      endif(v2);        /* 3+4n:         xx0x xx2x xx4x xx6x */   elsenz(v1);		/* for even transients */      ifzero(v5);	/* normal case:        */         assign(v4,v3); /*                x1x7 */      elsenz(v5);	/* exceptions:         */         assign(v6,v3); /*                x3x5 */      endif(v5);	/* v3 = phase of first and second pulse */			/*      in 45 degrees steps:            */                        /* 01070127 01470167 01070127 01470365  */                        /* 01070127 01470167 01070127 01470365  */                        /* 01070127 01470167 01070127 01470365  */                        /* 01070127 01470167 01070127 01470365  */                        /* 01070127 01470167 01070127 01470365  */                        /* 01070127 01470365 01070127 01470365  */   endif(v1);   assign(two,v4);	/* v4 = phase of last 90 degrees pulse */   assign(v1,oph);	/* oph = 0202 */   assign(zero,v20);  if (getflag("prgflg") && (satmode[0] == 'y'))        assign(v14,v20);  add(oph,v18,oph);  add(oph,v19,oph);   if (phase1 == 2) 	incr(v14); /* States - Habercorn *//*      mod2(id2,v9);      dbl(v9,v9);*/	initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v9);      add(v14,v9,v14);      add(oph,v9,oph); /* BEGIN ACTUAL PULSE SEQUENCE CODE */   status(A);   obsstepsize(45.0);   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"))           {		if (getflag("prgflg"))			xmtrphase(v3);                shaped_satpulse("relaxD",satdly,v20);                if (getflag("prgflg"))		{                   shaped_purge(v14,v20,v18,v19);		   xmtrphase(zero);		}           }        else           {                if (getflag("prgflg"))			xmtrphase(v3);                satpulse(satdly,v20,rof1,rof1);                if (getflag("prgflg"))		{                   purge(v14,v20,v18,v19);		   xmtrphase(zero);		}           }     }   else        delay(d1);   if (getflag("wet"))     wet4(zero,one);   status(B);      xmtrphase(v3);      rgpulse(pw, v14, rof1, 2.0e-6);      if (d2 > 0.0)         delay(d2 - (4.0*pw/PI) - 4.0e-6);      else	delay(d2);      rgpulse(pw, zero, 2.0e-6, rof1);      xmtrphase(zero);      rgpulse(pw, v4, rof1, rof2);   status(C);} 
开发者ID:timburrow,项目名称:ovj3,代码行数:101,


示例24: pulsesequence

//.........这里部分代码省略.........        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);
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:67,


示例25: pulsesequence

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);//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:101,


示例26: pulsesequence

pulsesequence(){   double          slpwrT = getval("slpwrT"),                   slpwT = getval("slpwT"),                   trim = getval("trim"),                   mixT = getval("mixT"),		   gzlvlz = getval("gzlvlz"),		   gtz = getval("gtz"),		   zfphinc = getval("zfphinc");   char		   slpatT[MAXSTR];   int		   phase1 = (int)(getval("phase")+0.5);/* LOAD AND INITIALIZE VARIABLES */   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);/*    mod2(id2,v14);   dbl(v14,v14);*/  initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v14);    			sub(ct,ssctr,v12);   settable(t1,4,ph1); 	getelem(t1,v12,v6);   settable(t2,4,ph2); 	getelem(t2,v12,v1);   settable(t3,8,ph3); 	   settable(t4,4,ph4); 	getelem(t4,v12,v13);   settable(t5,4,ph5); 	getelem(t5,v12,v2);   settable(t7,8,ph7); 	getelem(t7,v12,v7);   settable(t8,4,ph8); 	getelem(t8,v12,v8);      assign(v1,oph);   if (getflag("zfilt")) 	getelem(t3,v12,oph);         sub(v2, one, v3);   add(two, v2, v4);   add(two, v3, v5);   if (phase1 == 2)      {incr(v1); incr(v6);}   add(v1, v14, v1);   add(v6, v14, v6);   add(oph,v14,oph);/* The following is for flipback pulse */   zfphinc=zfphinc+180;   if (zfphinc < 0) zfphinc=zfphinc+360;   initval(zfphinc,v10);/* BEGIN ACTUAL PULSE SEQUENCE CODE */   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);      obspower(slpwrT);      txphase(v13);      if (d2 > 0.0)       delay(d2 - rof1 - POWER_DELAY - (2*pw/PI));      else       delay(d2);      if (mixT > 0.0)      { 	rgpulse(trim,v13,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("zfilt")) && (getflag("PFGflg")))        {           obspower(tpwr);//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:101,


示例27: pulsesequence

pulsesequence(){   double  gzlvl1 = getval("gzlvl1"),              gt1 = getval("gt1"),           zqfpw1 = getval("zqfpw1"),          zqfpwr1 = getval("zqfpwr1"),         gzlvlzq1 = getval("gzlvlzq1"),	    gstab = getval("gstab"),     h1freq_local = getval("h1freq_local"),            flip1 = getval("flip1"),            flip2 = getval("flip2"),         swfactor = 9.0,    /* do the adiabatic sweep over 9.0*sw  */         gzlvlzq,invsw;   int     iphase = (int) (getval("phase") + 0.5),	 prgcycle = (int)(getval("prgcycle")+0.5);   char		   satmode[MAXSTR],		   zqfpat1[MAXSTR],		   wet[MAXSTR],		   antiz_flg[MAXSTR],		   alt_grd[MAXSTR];              getstr("satmode",satmode);   getstr("wet",wet);   getstr("zqfpat1",zqfpat1);   getstr("antiz_flg", antiz_flg);   getstr("alt_grd",alt_grd);   invsw = sw*swfactor;   if (invsw > 60000.0) invsw = 60000.0; /* do not exceed 60 kHz */   invsw = invsw/0.97;     /* correct for end effects of the cawurst-20 shape */  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);           }     }//   sub(ct,ssctr,v12);   settable(t1,8,ph1);  getelem(t1,v17,v1);   settable(t2,8,ph2);  getelem(t2,v17,v2);   settable(t3,8,ph3);  getelem(t3,v17,v3);   settable(t4,8,ph4);  getelem(t4,v17,oph);   add(oph,v18,oph);   add(oph,v19,oph);   if (alt_grd[0] == 'y') mod2(ct,v8); /* alternate gradient sign */   if (getflag("Gzqfilt")) add(oph,two,oph);   if (iphase == 2) incr(v1);/* HYPERCOMPLEX MODE USES REDFIELD TRICK TO MOVE AXIAL PEAKS TO EDGE */   initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v6);   if ((iphase==1)||(iphase==2))      {add(v1,v6,v1); add(oph,v6,oph);}/* BEGIN THE ACTUAL PULSE SEQUENCE */   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,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 (wet[0] == 'y')     wet4(zero,one);      obsstepsize(45.0);      initval(7.0,v7);      xmtrphase(v7);//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:101,


示例28: pulsesequence

pulsesequence(){   double   hsglvl = getval("hsglvl"),            hsgt = getval("hsgt"),            tau,            evolcorr,	    taug,	    mult = getval("mult"),	    null = getval("null");   int	    phase1 = (int)(getval("phase")+0.5),            prgcycle = (int)(getval("prgcycle")+0.5),	    ZZgsign;   tau  = 1/(4*(getval("j1xh")));   if (mult > 0.5)    taug = 2*tau;   else    taug = 0.0;   evolcorr=2*pw+4.0e-6;   ZZgsign=-1;   if (mult == 2) ZZgsign=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);/*   mod2(id2,v14);   dbl(v14,v14);*/  initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v14);   if (phase1 == 2)     incr(v2);   add(v2,v14,v2);   add(oph,v14,oph);   if (mult > 0.5) 	add(oph,two,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);//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:101,


示例29: pulsesequence

pulsesequence(){   double   hsglvl = getval("hsglvl"),            hsgt = getval("hsgt"),            slpwT = getval("slpwT"),            slpwrT = getval("slpwrT"),            trim = getval("trim"),            mixT = getval("mixT"),            mult = getval("mult"),            tau,            null = getval("null");   char     slpatT[MAXSTR];   int	    phase1 = (int)(getval("phase")+0.5);   tau  = 1/(4*(getval("j1xh")));   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);   settable(t1,8,phs1);   settable(t2,8,phs2);   settable(t3,2,phs3);   settable(t4,1,phs4);   settable(t5,4,phs5);   getelem(t3,ct,v6);   getelem(t2,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)      incr(v6);   add(v14, v6, v6);   add(v14, oph, oph);/* BEGIN ACTUAL PULSE SEQUENCE CODE */   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("PFGflg")) && (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);     }     else if (null != 0.0)     {        rgpulse(pw,zero,rof1,rof1);        delay(2*tau);        simpulse(2*pw,2*pwx,zero,zero,rof1,rof1);        delay(2*tau);        rgpulse(pw,two,rof1,rof1);        if (satmode[1] == 'y')           satpulse(null,zero,rof1,rof1);        else           delay(null);      }    //.........这里部分代码省略.........
开发者ID:timburrow,项目名称:ovj3,代码行数:101,



注:本文中的wet4函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ wf_invalidate_region函数代码示例
C++ weston_log函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。