• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ putCmd函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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


示例2: 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


示例3: g_setExpTime

void g_setExpTime(double val)
{
  if (ix == 1) {
    usertime = val;
    putCmd("displayscantime(%f)\n",usertime);
  }
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:7,代码来源:initacqparms.c


示例4: gltrace_putMark

static void
gltrace_putMark(JNIEnv *jni, jclass klass, jstring jstr)
{
    uint64_t bgn = gethrtime();
    const char *str = (*jni)->GetStringUTFChars(jni, jstr, 0);
    putCmd(OPC_MARK);
    putString(str);
    (*jni)->ReleaseStringUTFChars(jni, jstr, str);
    uint64_t end = gethrtime();
    putTime(bgn, end);
}
开发者ID:166MMX,项目名称:openjdk.java.net-openjfx-8u40-rt,代码行数:11,代码来源:agent.c


示例5: pulsesequence

void pulsesequence(){

//Define Variables and Get Parameter Values

   double pwTune = getval("pwTune");
   pwTune = pwTune*6.0;
   at = pwTune*2.0;
   char atval[MAXSTR]; 
   sprintf(atval,"at = %f\n", at);
   putCmd(atval);
   int chTune = (int) getval("chTune");
   if ((chTune < 1) || (chTune > 4)) {
         abort_message("chTune(%d) must be between 1 and 4\n", chTune);
   }

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

   putCmd("groupcopy('current','processed','acquisition')");

// Set Phase Tables

   settable(phTune,4,table1);
   settable(phRec,4,table2);
   setreceiver(t2);

//Begin Sequence

   obspwrf(getval("aTune"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2e-6); sp1off(); delay(2.0e-6);

//Begin Phase Detected Pulse

   set4Tune(chTune,getval("gain"));
   delay(1.0e-4);
   ShapedXmtNAcquire("phtran",pwTune,phTune,6.0e-6,chTune);
   obsunblank(); decunblank(); _unblank34();
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:41,代码来源:phtran.c


示例6: 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


示例7: putparsRf

/*------------------------------------------------*/
void putparsRf(RF_PULSE_T *rf)
{
  char str[MAX_STR];
   
  /* Generate "*pars" name from the base name */  
  strcpy(str,rf->pulseBase);
  strcat(str,"pars");

  /* Write the shape parameters back to "*pars" */
  putCmd("%s[1] = %f\n",str,rf->res*1.0e6);
  putCmd("%s[2] = %f\n",str,rf->bandwidth);
  putCmd("%s[3] = %d\n",str,rf->lobes);
  putCmd("%s[4] = %f\n",str,rf->cutoff);
  putCmd("%s[5] = %f\n",str,rf->mu);
  putCmd("%s[6] = %f\n",str,rf->beta);
}
开发者ID:timburrow,项目名称:ovj3,代码行数:17,代码来源:sglRF.c


示例8: 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,代码来源:Dghmqcidosy.c


示例9: excute


//.........这里部分代码省略.........
      chdir("/home/haoran");
      strcat(answer, "cd to HOME dir");
      write(newsock, answer, MAX);
      printf("cd to HOME dir\n");
      return 0;
    }
    else
    {
      printf("client request: cd FAILED\n");
      strcat(answer, "cd FAILED");
      write(newsock, answer, MAX);
      printf("cd FAILED\n");
    }
    return 1;
  } 
  if(strcmp(cmd, "mkdir") == 0)
  {
    printf("op = %s\n",op );
    write(newsock, "1", MAX);
    if(mkdir(op, 0777) < 0)
    {
      printf("mkdir FAIL \n");
      strcat(answer, "mkdir FAIL");
      write(newsock, answer, MAX);

      
    }else
    {
      printf("mkdir %s OK\n", op);
      strcat(answer, "mkdir OK");
      write(newsock, answer, MAX);
      printf("mkdir OK\n");
    }
    return 1;
  } 
  if(strcmp(cmd, "rmdir") == 0)
  {
    write(newsock, "1", MAX);
    if(rmdir(op) < 0)
    {
      
      printf("rmdir FAIL \n");
      strcat(answer, "rmdir FAIL ");
      write(newsock, answer, MAX);
      
      
    }else
    {
      printf("rmdir %s OK\n", op);
      strcat(answer, "rmdir OK");
      write(newsock, answer, MAX);
      printf("rmdir OK\n");

      //
    }
    return 1;
  } 
  if(strcmp(cmd, "rm") == 0)
  {
    write(newsock, "1", MAX);
    if(unlink(op) < 0)
    {
      printf("rm FAIL");
      strcat(answer, "rm FAIL");
      write(newsock, answer, MAX);

    }
    else
    {
      printf("rm %s OK\n", op);
      strcat(answer, "rm OK");
      write(newsock, answer, MAX);
      printf("rm OK\n");
    }
    return 1;
  } 
  if(strcmp(cmd, "get") == 0)
  {
    getCmd(myargc, myargv);
    return 2;//need to work with server
  } 
  if(strcmp(cmd, "put") == 0)
  {
    putCmd(myargc, myargv);   
    return 2;
  } 
  if(strcmp(cmd, "cat") == 0)
  {
    write(newsock, "1", MAX);
    strcat(answer, "Only cat local file");
    write(newsock, answer, MAX);
    
  }
  if(strcmp(cmd, "quit") == 0)//should never get this
  {
    exit(1);
  }

  return 0;
}
开发者ID:Airhaoran,项目名称:CS360,代码行数:101,代码来源:server.c


示例10: pulsesequence

pulsesequence()
{
int     selectCTP = getval("selectCTP");
double	kappa = getval("kappa"), 
	gzlvl1 = getval("gzlvl1"),
	gzlvl3 = getval("gzlvl3"),
        gzlvl_max = getval("gzlvl_max"),
	gt1 = getval("gt1"),
	gt3 = getval("gt3"),
	del = getval("del"),
        gstab = getval("gstab"),
        gss = getval("gss"),
	tweak = getval("tweak"),
	gzlvl_read=getval("gzlvl_read"),
	num=getval("num"),
        hsgt = getval("hsgt"),
        gzlvlhs =  getval("gzlvlhs"),
	avm,gzlvl4,gt4,Dtau,Ddelta,dosytimecubed,dosyfrq;
char alt_grd[MAXSTR],avflag[MAXSTR],delflag[MAXSTR],STEflag[MAXSTR],sspul[MAXSTR];

gt4 = 2.0*gt1;
getstr("alt_grd",alt_grd);
getstr("delflag",delflag);
getstr("avflag",avflag);
getstr("STEflag",STEflag);
getstr("sspul",sspul);

avm=0.0;
if(avflag[0]=='y')
{
	avm=1.0;
}

/* Decrement gzlvl4 as gzlvl1 is incremented, to ensure constant 
   energy dissipation in the gradient coil 
   Current through the gradient coil is proportional to gzlvl */

gzlvl4=sqrt(2.0*gt1*(1+3.0*kappa*kappa)/gt4)*sqrt(gzlvl_max*gzlvl_max/((1+kappa)*(1+kappa))-gzlvl1*gzlvl1);

/* In pulse sequence, del>4.0*pw+3*rof1+2.0*gt1+5.0*gstab+gt3 */

if ((del-(4*pw+3.0*rof1+2.0*gt1+5.0*gstab+gt3)) < 0.0)
   { del=(4*pw+3.0*rof1+2.0*gt1+5.0*gstab+gt3);
     printf("Warning: del too short; reset to minimum value\n");}

if ((d1 - (gt3+gstab) -2.0*(gt4/2.0+gstab)) < 0.0)
   { d1 = (gt3+gstab) -2.0*(gt4/2.0+gstab);
     printf("Warning: d1 too short;  reset to minimum value\n");}

if ((abs(gzlvl1)*(1+kappa)) > gzlvl_max)
   { abort_message("Max. grad. amplitude exceeded: reduce either gzlvl1 or kappa\n");
     }

if (ni > 1.0)
   { abort_message("This is a 2D, not a 3D dosy sequence: please set ni to 0 or 1\n");
     }

Ddelta=gt1;
Dtau=2.0*pw+gstab+gt1/2.0+rof1;
dosyfrq = getval("sfrq");
dosytimecubed=del+(gt1*((kappa*kappa-2)/6.0))+Dtau*((kappa*kappa-1.0)/2.0);
dosytimecubed=(gt1*gt1)*dosytimecubed;
putCmd("makedosyparams(%e,%e)\n",dosytimecubed,dosyfrq);

/* This section determines the phase calculation for any number of transients   */
 
  initval(num,v14);
  add(v14,ct,v13);

/* phase cycling calculation */

if(delflag[0]=='y')
{
	mod4(v13,v3);	/* 1st 180,  0 1 2 3	*/
	hlv(v13,v9);	
	hlv(v9,v9);		
	mod4(v9,v4);	/* 2nd 90,  (0)4 (1)4 (2)4 (3)4  */
	hlv(v9,v9);
	hlv(v9,v9);
	mod4(v9,v1);	/* 2nd 180, (0)16 (1)16 (2)16 (3)16  */ 
	hlv(v9,v9);
	hlv(v9,v9);
	mod4(v9,v2);	/* 1st 90,  (0)64 (1)64 (2)64 (3)64  */
	hlv(v9,v9);
	hlv(v9,v9);
	mod4(v9,v5);	/* 3rd 90,  (0)256 (1)256 (2)256 (3)256  */

	if(STEflag[0]=='y')
				{
	dbl(v2,v6); assign(v6,oph); sub(oph,v1,oph);
        sub(oph,v3,oph); sub(oph,v4,oph); dbl(v5,v6);
        add(v6,oph,oph); mod4(oph,oph);                /* receiver phase for STE */
				}
	else

				{
 	assign(v1,oph); dbl(v2,v6); sub(oph,v6,oph);
        add(v3,oph,oph); sub(oph,v4,oph); dbl(v5,v6);
        add(v6,oph,oph); mod4(oph,oph);                /* receiver phase for STAE */
				}
//.........这里部分代码省略.........
开发者ID:OpenVnmrJ,项目名称:OpenVnmrJ,代码行数:101,代码来源:Doneshot_nugmap.c


示例11: putCmd

void CoreBasicHandler::putCmd(const QString &cmd, const QByteArray &param, const QByteArray &prefix, const bool prepend)
{
    QList<QByteArray> list;
    list << param;
    emit putCmd(cmd, list, prefix, prepend);
}
开发者ID:fish-face,项目名称:quassel,代码行数:6,代码来源:corebasichandler.cpp


示例12: serverEncode

void CtcpHandler::reply(const QString &bufname, const QString &ctcpTag, const QString &message) {
  QList<QByteArray> params;
  params << serverEncode(bufname) << lowLevelQuote(pack(serverEncode(ctcpTag), userEncode(bufname, message)));
  emit putCmd("NOTICE", params);
}
开发者ID:hades,项目名称:quassel,代码行数:5,代码来源:ctcphandler.cpp


示例13: calc_epi


//.........这里部分代码省略.........
    abort_message("Problem writing shape %s (%d points) to disk",
                  nav_grad->name,(int) nav_grad->numPoints);

  if (writeToDisk(pe_grad->dataPoints, pe_grad->numPoints, 0, 
                  pe_grad->resolution, TRUE /* rollout */, 
                  pe_grad->name) != ERR_NO_ERROR)
    abort_message("Problem writing shape %s (%d points) to disk",
                  pe_grad->name,(int) pe_grad->numPoints);
 

  /********************************************************************************/
  /* Create EPI tables */
  /********************************************************************************/
  /* Generates two tables:  */ 
  /* t1 that specifies the k-space ordering, used by recon_all */
  /* t2 that specifies which direction in k-space to go in a given shot */
  /*     1 = positive blips, and -1 = negative blips */
  if ((epi_grad->table1 = (int *)malloc(pe_grad->steps*sizeof(int))) == NULL) 
    abort_message("%s: Problem allocating memory for EPI table1",seqfil);
  if ((epi_grad->table2 = (int *)malloc(nseg*sizeof(int))) == NULL) 
    abort_message("%s: Problem allocating memory for EPI table2",seqfil);
  
  switch(ky_order[0]) {
    case 'l':
      inx = 0;
      for (seg = 0; seg < nseg; seg++) {
        epi_grad->table1[inx++] = -fract_ky + seg;
        for (n = 0; n < epi_grad->etl-1; n++) {
          epi_grad->table1[inx] = (int) (epi_grad->table1[inx-1]+nseg);
          inx++;
        }
      }
      for (seg = 0; seg < nseg; seg++) 
        epi_grad->table2[seg] = 1;
      break;
 
    case 'c':
      inx = 0;
      for (seg = 0; seg < nseg; seg++) {
        epi_grad->table1[inx++] = -(nseg/2 - seg);
        for (n = 0; n < epi_grad->etl-1; n++) {
          if (epi_grad->table1[inx-1] >= 0)
            epi_grad->table1[inx] = (int) (epi_grad->table1[inx-1] + nseg/2);
          else
            epi_grad->table1[inx] = (int) (epi_grad->table1[inx-1] - nseg/2);
          inx++;
        }
      }
      for (seg = 0; seg < nseg; seg++)
        epi_grad->table2[seg] = ((nseg/2 - 1 - seg >= 0) ? -1 : 1);
      break;

      default:  /* This should have been caught earlier */
        break;
  }
  steps = inx;

  /* Print table t1 to file in tablib */
  switch(ky_order[0]) {
    case 'l': sprintf(order_str,"lin"); break;
    case 'c': sprintf(order_str,"cen"); break;
    default:  
      abort_message("%s: ky_order %s not recognized, use 'l' (linear) or 'c' (centric)\n",
                     seqfil,ky_order);
  } 

  if (ky_order[1] == 'r')  /* not reversed */
    sprintf(gpe_tab,"%s_nv%d_f%d_%s%d_rev",seqfil,
       (int)pe_grad->steps,(int)fract_ky,order_str,(int)nseg);
  else
    sprintf(gpe_tab,"%s_nv%d_f%d_%s%d",seqfil,
       (int)pe_grad->steps,(int)fract_ky,order_str,(int)nseg);
  sprintf(tab_file,"%s/tablib/%s",userdir,gpe_tab);

  if ((fp = fopen(tab_file,"w")) == NULL) {
    abort_message("Error opening file %s\n",gpe_tab);
  }

  fprintf(fp,"t1 = ");
  for (inx = 0; inx < steps; inx++) {
    if (ky_order[1] == 'r')
      fprintf(fp,"%d ", epi_grad->table1[inx]);
    else
      fprintf(fp,"%d ", -epi_grad->table1[inx]);
  }
  fprintf(fp,"\n"); 
  fclose(fp);
  strcpy(petable,gpe_tab);
  putstring("petable",gpe_tab);

  /* Return values in VnmrJ parameter pe_table */
  putCmd("exists('pe_table','parameter'):$ex\n");
  putCmd("if ($ex > 0) then\n");
  putCmd("  pe_table = 0\n"); //reset pe_table array
  for (inx = 0; inx < steps; inx++) {
    putCmd("  pe_table[%d] = %d\n",inx+1,
      ((ky_order[1] == 'r') ? 1 : -1)*epi_grad->table1[inx]);
  }
  putCmd("endif\n");
}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:101,代码来源:sglEPI.c


示例14: pulsesequence

void pulsesequence() {

// Define Variables and Objects and Get Parameter Values

   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");
   MPSEQ spc5 = getspc5("spc5X",0,0.0,0.0,0,1);
   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("pwX90"),phXmix2,0.0,0.0);

// Begin Acquisition
//.........这里部分代码省略.........
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:101,代码来源:tancp2dspc5.c


示例15: pulsesequence

pulsesequence() {

// Define Variables and Objects and Get Parameter Values

   SHAPE p1 = getpulse("90H",0.0,0.0,1,0);
   strncpy(p1.pars.ch,"dec",3);
   putCmd("chH90='dec'\n");
   p1.pars.array = disarry("xx", p1.pars.array);
   p1 = update_shape(p1,0.0,0.0,1);

   MPSEQ ph = getpmlgxmx("pmlgH",0,0.0,0.0,1,0);
   strncpy(ph.ch,"dec",3);
   putCmd("chHpmlg='dec'\n");
   double pwHpmlg = getval("pwHpmlg");
   ph.nelem = (int) (d2/(2.0*pwHpmlg) + 0.1);
   ph.array = disarry("xx", ph.array);
   ph = update_mpseq(ph,0,p1.pars.phAccum,p1.pars.phInt,1);

   SHAPE p2 = getpulse("90H",0.0,0.0,2,0);
   strncpy(p2.pars.ch,"dec",3);
   putCmd("chH90='dec'\n");
   p2.pars.array = disarry("xx", p2.pars.array);
   p2 = update_shape(p2,ph.phAccum,ph.phInt,2);
   double pwX180 = getval("pwX180");
   double d22 = ph.t/2.0 - pwX180/2.0;
   if (d22 < 0.0) d22 = 0.0;

// CP hx and DSEQ dec Return to the Reference Phase

   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");

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


示例16: pulsesequence

pulsesequence()
{
double	del    = getval("del"),
        gstab  = getval("gstab"),
	gt1    = getval("gt1"),
	gzlvl1 = getval("gzlvl1"),
        gt2    = getval("gt2"),
        gzlvl2 = getval("gzlvl2"),
        satpwr = getval("satpwr"),
        satdly = getval("satdly"),
        prgtime = getval("prgtime"),
        prgpwr = getval("prgpwr"),
        gzlvlhs   = getval("gzlvlhs"),
        hsgt     = getval("hsgt"),
        d3 = getval("d3"),
	Dtau,Ddelta,dosytimecubed, dosyfrq;
char	delflag[MAXSTR],satmode[MAXSTR],prg_flg[MAXSTR],alt_grd[MAXSTR],
        sspul[MAXSTR],lkgate_flg[MAXSTR];

   getstr("delflag",delflag);
   getstr("satmode",satmode);
   getstr("prg_flg",prg_flg);
   getstr("alt_grd",alt_grd);
   getstr("lkgate_flg",lkgate_flg);
   getstr("sspul",sspul);

       //synchronize gradients to srate for probetype='nano'
       //   Preserve gradient "area"
          gt1 = syncGradTime("gt1","gzlvl1",0.5);
          gzlvl1 = syncGradLvl("gt1","gzlvl1",0.5);
          gt2 = syncGradTime("gt2","gzlvl2",1.0);
          gzlvl2 = syncGradLvl("gt2","gzlvl2",1.0);

   /* In pulse sequence, minimum del=4.0*pw+3*rof1+gt1+2.0*gstab	*/
   if (del < (4*pw+3.0*rof1+gt1+2.0*gstab))
   {  abort_message("Dbppste error: 'del' is less than %g, too short!",
		(4.0*pw+3*rof1+gt1+2.0*gstab));
   }

   Ddelta=gt1;
   Dtau=2.0*pw+rof1+gstab+gt1/2.0;
   dosyfrq = sfrq;
   dosytimecubed=Ddelta*Ddelta*(del-(Ddelta/3.0)-(Dtau/2.0));
   putCmd("makedosyparams(%e,%e)\n",dosytimecubed,dosyfrq);


   /* phase cycling calculation */
   mod2(ct,v1); dbl(v1,v1);    hlv(ct,v2);
   mod2(v2,v3); dbl(v3,v3);    hlv(v2,v2);
   mod2(v2,v4); add(v1,v4,v1);			/*   v1    */
   hlv(v2,v2);  add(v2,v3,v4);			/*   v4    */
   hlv(v2,v2);  mod2(v2,v3);   dbl(v3,v5);
   hlv(v2,v2);  mod2(v2,v3);   dbl(v3,v3);	/*   v3    */
   hlv(v2,v2);  mod2(v2,v6);   add(v5,v6,v5);	/*   v5    */
   hlv(v2,v2);  mod2(v2,v2);   dbl(v2,v2);	/*   v2    */

   assign(v1,oph);  dbl(v2,v6);      sub(oph,v6,oph);
   add(v3,oph,oph); sub(oph,v4,oph); dbl(v5,v6);
   add(v6,oph,oph); mod4(oph,oph);		/*receiver phase*/
   add(v1,v3,v7); add(v4,v7,v7);
   add(two,v7,v8);

   mod2(ct,v10);        /* gradients change sign at odd transients */

   if (ni > 1.0)
   {  abort_message("Dbppste is a 2D, not a 3D dosy sequence:  please set ni to 0 or 1");
   }

   /* equilibrium period */
   status(A);
     if (sspul[0]=='y')
       {
         zgradpulse(gzlvlhs,hsgt);
         rgpulse(pw,zero,rof1,rof1);
         zgradpulse(gzlvlhs,hsgt);
       }

      if (satmode[0] == 'y')
       {
       if (d1 - satdly > 0)
         delay(d1 - satdly);
         obspower(satpwr);
         txphase(zero);
         rgpulse(satdly,zero,rof1,rof1);
         obspower(tpwr);
      }
      else
      delay(d1); 
   status(B);
   /* first part of bppdel sequence */
   if (delflag[0]=='y')
   {  if (gt1>0 && gzlvl1>0)
      {  rgpulse(pw, v1, rof1, 0.0);		/* first 90, v1 */

         if (lkgate_flg[0] == 'y') lk_hold();   /* turn lock sampling off */
         if (alt_grd[0] == 'y')
         {  ifzero(v10);
              zgradpulse(gzlvl1,gt1/2.0);
            elsenz(v10);
              zgradpulse(-1.0*gzlvl1,gt1/2.0);
//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:ovj3,代码行数:101,代码来源:Dbppste_wg.c


示例17: pulsesequence

pulsesequence() {

// Define Variables and Objects and Get Parameter Values

   double aXecho = getval("aXecho"); 
   double t1Xechoinit = getval("t1Xecho");
   double pwXecho = getval("pwXecho"); 
   double t2Xechoinit = getval("t2Xecho");
   double t1Xecho  = t1Xechoinit - pwXecho/2.0;
   if (t1Xecho < 0.0) t1Xecho = 0.0;
   double t2Xecho  = t2Xechoinit - pwXecho/2.0 - getval("rd");
   if (t2Xecho < 0.0) t2Xecho = 0.0;

   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");

   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("pwH90") + getval("tHX") + pwXecho;
   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(phH90,4,table1);
   settable(phXhx,4,table2);
   settable(phHhx,4,table3);
   settable(phXecho,16,table4);
   settable(phRec,8,table5);
   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);
   sp1on();
    _cp_(hx,phHhx,phXhx);
   sp1off();

// Begin Decoupling

   _dseqon(dec);

// X Hahn Echo

   txphase(phXecho);
   obspwrf(aXecho);
   delay(t1Xecho);
   rgpulse(pwXecho,phXecho,0.0,0.0);
   delay(t2Xecho);

// Begin Acquisition

   obsblank(); _blank34();
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:91,代码来源:tancpxhahnecho.c


示例18: pulsesequence

void pulsesequence() {

//======================================================
// Define Variables and Objects and Get Parameter Values
//======================================================

// --------------------------------
// Acquisition Decoupling
// -------------------------------

   char Xseq[MAXSTR];
   getstr("Xseq",Xseq);
   DSEQ dec = getdseq("X");
   strncpy(dec.t.ch,"dec",3);
   putCmd("chXtppm='dec'\n");
   strncpy(dec.s.ch,"dec",3);
   putCmd("chXspinal='dec'\n");

//-------------------------------------
// Homonuclear Decoupling During Echo
//-------------------------------------

   MPDEC homo1 = getmpdec("hdec1H",0,0.0,0.0,0,1);
   strncpy(homo1.mps.ch,"obs",3);
   putCmd("chHhdec1='obs'\n"); 

// --------------------
// H echo calculation
// --------------------

   double t1Hecho = getval("t1Hecho") - getval("pwHecho")/2.0 - 
                    ((!strcmp(homo1.dm,"y"))?getval("pwHshort1")*2.:0.0);
   if (t1Hecho < 0.0) t1Hecho = 0.0;
   double t2Hecho = getval("t2Hecho") - getval("pwHecho")/2.0 - 
                    ((!strcmp(homo1.dm,"y"))?getval("pwHshort1")*2.:0.0) - 
                    getval("rd")- getval("ad");
   if (t2Hecho < 0.0) t2Hecho = 0.0;
 

   double t1H_echo = 0.0; 
   double t2H_echo = 0.0;
   double t1H_left = 0.0; 
   double t2H_left = 0.0;
   if (!strcmp(homo1.dm,"y")) {
      t2H_echo = homo1.mps.t*((int)(t2Hecho/homo1.mps.t));
      t2H_left = t2Hecho - t2H_echo;
      t1H_echo = t2H_echo;
      t1H_left = t1Hecho - t1H_echo;
   }

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

   putCmd("groupcopy('current','processed','acquisition')");

//----------------------
// Dutycycle Protection
//----------------------

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwH90");
   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);
//.........这里部分代码省略.........
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:101,代码来源:ssecho1dhdec.c


示例19: pulsesequence

void pulsesequence() {

// Set the Maximum Dynamic Table and v-var Numbers

   settablenumber(20);
   setvvarnumber(30);

// Define Variables and Objects and Get Parameter Values

   MPSEQ dumbo = getdumbogen("dumboX","dcf1X",0,0.0,0.0,0,1);
   strncpy(dumbo.ch,"obs",3); 
   putCmd("chXdumbo='obs'\n");

   MPSEQ c7 = getpostc7("c7X",0,0.0,0.0,0,1);  
   MPSEQ c7ref = getpostc7("c7X",c7.iSuper,c7.phAccum,c7.phInt,1,1);
   strncpy(c7.ch,"obs",3);
   putCmd("chXc7='obs'\n");

   WMPA wdumbo = getwdumbogen("wdumboX","dcfX");
   strncpy(wdumbo.ch,"obs",3);
   putCmd("chXwdumbo='obs'\n");

   double tXzfinit = getval("tXzf");            //Define the Z-filter delay in the sequence
   double tXzf = tXzfinit - 5.0e-6 - wdumbo.r1;

// 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 = c7.t + getval("pwXtilt") + d2_ + getval("pwXtilt") + c7ref.t + getval("pwX90") +
                   + wdumbo.q*wdumbo.cycles*wdumbo.pw;
   d.dutyoff = 4.0e-6 + d1 + tXzfinit + wdumbo.r2 + at - wdumbo.q*wdumbo.cycles*wdumbo.pw;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0); 

// Set Phase Tables

   settable(ph1Xc7,4,table1);
   settable(phXdumbo,4,table2);
   settable(ph2Xc7,4,table3);
   settable(phX90,16,table4);
   settable(phXwdumbo,4,table5); 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ putDebugChar函数代码示例发布时间:2022-05-30
下一篇:
C++ put32bit函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap