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

C++ psg_abort函数代码示例

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

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



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

示例1: pulsesequence

pulsesequence ()
{
double  gstab = getval("gstab"),
	gt1 = getval("gt1"),
	gzlvl1 = getval("gzlvl1"),
        gt2 = getval("gt2"),
        gzlvl2 = getval("gzlvl2"),
        mix = getval("mix"),
        wrefpw = getval("wrefpw"),
        wrefpwr = getval("wrefpwr"),
        wrefpwrf = getval("wrefpwrf"),
        phincr1 = getval("phincr1"),
        flippwr = getval("flippwr"),
        flippwrf = getval("flippwrf"),
        flippw = getval("flippw"),
        trimpwr = getval("trimpwr"),
        gt0 = getval("gt0"),
        gzlvl0 = getval("gzlvl0"),
	trim = getval("trim"),
        h1freq_local = getval("h1freq_local"),
        gcal_local = getval("gcal_local"),
        coil_size = getval("coil_size"),
        zqpw=getval("zqpw"),
        zqpwr=getval("zqpwr"),
        swfactor = 9.0,    /* do the adiabatic sweep over 9.0*sw  */
        gzlvlzq,invsw;
	
int	iphase = (int) (getval("phase") + 0.5);
char    sspul[MAXSTR], trim_flg[MAXSTR], wrefshape[MAXSTR],flipback[MAXSTR], 
        zqshape[MAXSTR],
	zqflg[MAXSTR], alt_grd[MAXSTR],flipshape[MAXSTR];
        
  getstr("sspul", sspul);
  getstr("trim_flg", trim_flg);
  getstr("wrefshape", wrefshape);
  getstr("flipshape", flipshape);
  getstr("flipback", flipback);
  getstr("zqshape", zqshape);
  getstr("zqflg", zqflg);
  getstr("alt_grd",alt_grd);
  rof1 = getval("rof1"); if(rof1 > 2.0e-6) rof1=2.0e-6;
   if (phincr1 < 0.0) phincr1=360+phincr1;
   initval(phincr1,v13);

  if (coil_size == 0) coil_size=16;
  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 */

  if ((zqflg[0] == 'y') && (mix < 0.051))
   {
     printf("Mixing time should be more than 51 ms for zero quantum suppression\n");
     psg_abort(1);
   }

  gzlvlzq=(invsw*h1freq_local*2349)/(gcal_local*coil_size*sfrq*1e+6);

  settable(t1,16,phi1);
  settable(t2,16,phi2);
  settable(t3,16,phi3);
  settable(t4,16,phi4);
  settable(t5,16,phi5);
  settable(t7,16,phi7);
  settable(t8,16,phi8);
  settable(t6,16,rec);
  settable(t9,16,phi9);

  sub(ct,ssctr,v12);

  getelem(t1,v12,v1);
  getelem(t2,v12,v2);
  getelem(t3,v12,v3);
  getelem(t4,v12,v4);
  getelem(t5,v12,v5);
  getelem(t6,v12,oph);
  getelem(t7,v12,v7);
  getelem(t8,v12,v8);
  getelem(t9,v12,v6);
  if (zqflg[0] == 'y') add(oph,two,oph);
  mod2(ct,v10);        /*changing gradient sign on even transitents */

  if (iphase == 2) 
   { incr(v1); incr(v6); }
/* HYPERCOMPLEX MODE USES REDFIELD TRICK TO MOVE AXIAL PEAKS TO EDGE */
   initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v9);
   if ((iphase == 1)||(iphase == 2)) {add(v1,v9,v1); add(oph,v9,oph), add(v6,v9,v6);}

status(A);
 obspower(tpwr); obspwrf(4095.0); decpower(dpwr);
   if (sspul[A] == 'y')
    {
       zgradpulse(gzlvl0,gt0);
       rgpulse(pw,zero,rof1,rof1);
       zgradpulse(gzlvl0,gt0);
    }
   delay(d1);

status(B);
   obsstepsize(45.0);
   initval(7.0,v11);
//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:ovj3,代码行数:101,代码来源:dpfgse_noesy.c


示例2: pulsesequence

pulsesequence()

{

/* DECLARE VARIABLES */	

char	scuba[MAXSTR],	
	mess_flg[MAXSTR],
	imino[MAXSTR],
	amino[MAXSTR],
	jumpret[MAXSTR],
	C13refoc[MAXSTR];

int	phase,
	t1_counter;

double	hscuba,		/* length of 1/2 SCUBA delay 	*/
	taunh,		/* 1/4J(NH)			*/
	tofps,		/* water frequency		*/
	tpwrmess,	/* power level for Messerlie purge */
	dly_pg,		/* Messerlie purge delay	*/
	pwClvl,		/* power level for 13C hard pulse */
	pwNlvl,		/* power level for 15N hard pulse */
	pwC,		/* pulse width for 13C hard pulse */
	pwN,		/* pulse width for 15N hard pulse */
	JNH,		/* coupling for NH		*/
	diff,		/* freq diff H2O & exit center	*/
	dof2a,		/* offset for imino/amino	*/
	tau1,		/* t1/2				*/
	grecov,		/* gradient recovery time 	*/
	gzlvl0,		/* level of grad. for purge	*/
	gzlvl1,		/* level of grad. for 1/2J	*/
	gt1,		/* grad. duration for 1/2J	*/
	gzlvlr;		/* level of RDt1-gradient (0.5G) */

/* LOAD VARIABLES */

	JNH	= getval("JNH");
	diff	= getval("diff");
	pwC	= getval("pwC");
	pwN	= getval("pwN");
	tofps	= getval("tofps");
	tpwrmess= getval("tpwrmess");
	dly_pg	= getval("dly_pg");
	pwClvl	= getval("pwClvl");
	pwNlvl	= getval("pwNlvl");
	hscuba	= getval("hscuba");
	phase	= (int)(getval("phase") + 0.5);
	sw1	= getval("sw1");
	at	= getval("at");
	grecov	= getval("grecov");
	gt1	= getval("gt1");
	gzlvl0	= getval("gzlvl0");
	gzlvl1	= getval("gzlvl1");
	gzlvlr  = getval("gzlvlr");

	getstr("scuba",scuba);
	getstr("mess_flg",mess_flg);
	getstr("imino",imino);
	getstr("amino",amino);
        getstr("jumpret",jumpret);
	getstr("C13refoc",C13refoc);

/* CHECK VALIDITY OF PARAMETER RANGE */

  if (dm[A] == 'y' || dm[B] == 'y')
   {
	printf(" dm must be 'nny' or 'nnn' ");
	psg_abort(1);
   }

  if ((dm[C] == 'y' || dm2[C] == 'y') && at > 0.21)
   {
	printf(" check at time! Don't fry probe \n");
	psg_abort(1);
   }

  if (dm2[A] == 'y' || dm2[B] == 'y')
   {
	printf(" dm2 must be 'nny' or 'nnn' ");
	psg_abort(1);
   }

  if ( ((imino[A]=='y') && (amino[A]=='y')) )
   {
        printf(" Choose  ONE  of  imino='y'  OR  amino='y' ");
        psg_abort(1);
   }

  if ((satmode[A] == 'y') && (jumpret[A] == 'y'))
   {
	printf(" Choose EITHER presat (satmode='y') OR Jump-Return (jumpret='y') \n");
	psg_abort(1);
   }

  if (satpwr > 12)
   {
	printf(" satpwr must be less than 13 \n");
	psg_abort(1);
   }
//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:ovj3,代码行数:101,代码来源:rna_gNhmqc.c


示例3: pulsesequence


//.........这里部分代码省略.........
    strcpy(cb180b,"Pg3_on");
    if (FIRST_FID)
    {
      compC = getval("compC");
      compH = getval("compH");
      sel90 = pbox("cal", SEL90, "", dfrq, compC*pwC, pwClvl);
      ar_180a = pbox(ar180a, AR180a, CB180ps, dfrq, compC*pwC, pwClvl);
      ar_180b = pbox(ar180b, AR180b, CB180ps, dfrq, compC*pwC, pwClvl);
      cb_180b = pbox(cb180b, CB180b, CB180ps, dfrq, compC*pwC, pwClvl);
      w16 = pbox_dec("cal", "WALTZ16", tpwrml, sfrq, compH*pw, tpwr);
    }
    pwsel90 = sel90.pw;      d_sel90 = sel90.pwr;
    pwar180a = ar_180a.pw;   d_ar180a = ar_180a.pwr;
    pwar180b = ar_180b.pw;   d_ar180b = ar_180b.pwr;       
    pwcb180b = cb_180b.pw;   d_cb180b = cb_180b.pwr;  
    pwmlev = 1.0/w16.dmf;
  }   


/* LOAD PHASE TABLE */

  settable(t1,1,phi1);
  settable(t2,1,phi2);
  settable(t3,4,phi3);
  settable(t4,8,phi4);
  settable(t6,8,rec);

/* CHECK VALIDITY OF PARAMETER RANGES */

    if( 0.5*ni*1/(sw1) > TCb - 2*POWER_DELAY 
        - WFG_START_DELAY - pwar180a  - WFG_STOP_DELAY)
    {
        printf(" ni is too big\n");
        psg_abort(1);
    }

    if((dm[A] == 'y' || dm[B] == 'y' ))
    {
        printf("incorrect dec1 decoupler flags!  ");
        psg_abort(1);
    }

    if(dm2[A] == 'y' || dm2[B] == 'y' || dm2[C] == 'y')
    {
        printf("incorrect dec2 decoupler flags!  ");
        psg_abort(1);
    }

    if( tsatpwr > 6 )
    {
        printf("TSATPWR too large !!!  ");
        psg_abort(1);
    }

    if( tpwrml > 53 )
    {
        printf("tpwrml too large !!!  ");
        psg_abort(1);
    }

    if( tpwrmess > 56 )
    {
        printf("tpwrmess too large !!!  ");
        psg_abort(1);
    }
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:66,代码来源:hbcbcgcdceheA.c


示例4: pulsesequence

pulsesequence()
{
    /* DECLARE VARIABLES */

    char        shape_ss[MAXSTR];

    int	     t1_counter;

    double
    tau1,                  /* t1/2  */
    taua = getval("taua"),     /* 2.25ms  */
    taub = getval("taub"),     /* 2.75ms  */
    time_T1,
    pwN,                   /* PW90 for N-nuc            */
    pwNlvl,                /* power level for N hard pulses */
    ncyc = getval("ncyc"),
    compH= getval("compH"),
    pwHs = getval("pwHs"),	        /* H1 90 degree pulse length at tpwrs */
    tpwrs ,                    /* power for the pwHs ("H2Osinc") pulse */
    tpwrsf ,                   /* fine power for the pwHs ("H2Osinc") pulse */
    shss_pwr,             /* power for cos modulated NH pulses */
    pw_shpss=getval("pw_shpss"),
    waterdly,              /* pw for water pulse  */
    waterpwrf,             /* fine power for water pulse  */
    waterpwr,              /* power for water pulse  */
    gt0,
    gt1 = getval("gt1"),
    gt2 = getval("gt2"),
    gt3 = getval("gt3"),
    gt4 = getval("gt4"),
    gt5 = getval("gt5"),
    gt6 = getval("gt6"),
    gzlvl0 = getval("gzlvl0"),
    gzlvl1 = getval("gzlvl1"),
    gzlvl2 = getval("gzlvl2"),
    gzlvl3 = getval("gzlvl3"),
    gzlvl4 = getval("gzlvl4"),
    gzlvl5 = getval("gzlvl5"),
    gzlvl6 = getval("gzlvl6");

    /* LOAD VARIABLES */

    pwN = getval("pwN");
    pwNlvl = getval("pwNlvl");
    tpwrsf = getval("tpwrsf");
    waterpwrf = getval("waterpwrf");
    waterdly = getval("waterdly");


    getstr("shape_ss",shape_ss);

    time_T1=ncyc*(2.0*2.5e-3+pw_shpss);

    if (ix==1) printf(" ncyc= %f,   time_T1= %f \n", ncyc,time_T1);


    /* selective H20 one-lobe sinc pulse */
    tpwrs = tpwr - 20.0*log10(pwHs/(compH*pw*1.69));   /* needs 1.69 times more */
    tpwrs = (int) (tpwrs);                   /* power than a square pulse */

    /* selective H20 watergate pulse */
    waterpwr = tpwr - 20.0*log10(waterdly/(compH*pw));
    waterpwr = (int) (waterpwr);

    /* selective cos modulated NH 180 degree pulse */
    shss_pwr = tpwr - 20.0*log10(pw_shpss/((compH*2*pw)*2));   /* needs 2 times more */
    shss_pwr = (int) (shss_pwr);                   /* power than a square pulse */




    /* check validity of parameter range */

    if((dm[A] == 'y' || dm[B] == 'y' ))
    {
        printf("incorrect Dec1 decoupler flags!  ");
        psg_abort(1);
    }

    if (dm2[A] == 'y' || dm2[B] == 'y' || dm2[C] == 'y')
    {
        printf("incorrect Dec2 decoupler flag! dm2 should be 'nnn' ");
        psg_abort(1);
    }

    if (dmm2[A] == 'g' || dmm2[B] == 'g' || dmm2[C] == 'g')
    {
        printf("incorrect Dec2 decoupler flag! dmm2 should be 'ccc' ");
        psg_abort(1);
    }

    if( dpwr > 50 )
    {
        printf("don't fry the probe, dpwr too large!  ");
        psg_abort(1);
    }

    if( dpwr2 > 50 )
    {
        printf("don't fry the probe, dpwr2 too large!  ");
//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:101,代码来源:gNT1.c


示例5: pulsesequence

pulsesequence()
{
    /*DEFINE LOCAL VARIABLES */
    double mix,control,sattime,spacing;
    int pattern,times,jj;
    char intsub[MAXSTR],cycle[MAXSTR],sspul[MAXSTR];


    /* LOAD AND INITIALIZE VARIABLES */
    getstr("intsub",intsub);
    getstr("cycle",cycle);
    getstr("sspul",sspul);
    control = getval("control");
    sattime = getval("sattime");
    spacing = getval("spacing");
    pattern = (int)getval("pattern");
    mix = getval("mix");
    if (pattern == 0) pattern = 1;
    if (tau == 0.0) tau = 0.1;
    times = (int)(sattime/(pattern*tau));

    /* CHECK CONDITIONS */
    if (!newtrans)
    {
        fprintf(stdout,"REQUIRED:  direct syn. RF and linear amplifiers.\n");
        psg_abort(1);
    }


    /* CALCULATE PHASES */
    if (intsub[0] == 'y') hlv(ct,v1);
    else assign(ct,v1);
    assign(v1,oph);
    if (intsub[0] == 'y')
    {
        mod2(ct,v14);  /* trigger for the alteration of the saturation freq */
        ifzero(v14);
        add(oph,two,oph);
        endif(v14);
    }


    /* BEGIN ACTUAL PULSE SEQUENCE CODE */
    status(A);
    if (sspul[A] == 'y')
    {
        pulse(200*pw,zero);
        pulse(200*pw,one);
    }
    hsdelay(d1);
    obspower(satpwr);
    delay(0.2e-6);                             /*reduce xmtr leakage */
    status(B);

    /* selective pulse or decoupler saturation */
    /* no cycling or interleaved subtraction (make control an array)*/
    if ((intsub[0] == 'n') && (cycle[0] == 'n'))
    {
        obsoffset(satfrq);
        rgpulse(sattime,zero,rof1,rof2);
    }
    /* interleaved subtraction without cycling */
    if ((intsub[0] == 'y') && (cycle[0] == 'n'))
    {
        ifzero(v14);
        obsoffset(control);
        rgpulse(sattime,zero,rof1,rof2);
        elsenz(v14);
        obsoffset(satfrq);
        rgpulse(sattime,zero,rof1,rof2);
        endif(v14);
    }
    /* no interleaved subtraction but cycling is used (make cycle array)*/
    if ((cycle[0] == 'y') && (intsub[0] == 'n'))
    {
        for (jj = 0; jj < times; jj++)
        {
            double startfrq;
            int i;
            startfrq = satfrq - (pattern/2)*spacing;
            if ((pattern %2) == 0) startfrq = startfrq + spacing/2.0;
            for (i = 0; i < pattern; i++)
            {
                obsoffset(startfrq);
                rgpulse(tau,zero,rof1,rof2);
                startfrq = startfrq + spacing;
            }
        }
    }
    /* interleaved subtraction with cycling (no array needed for one
       value of satfrq. Link array satfrq with pattern and spacing for
       multiple noe difference spectra within one experiment. For example
       set array = '(satfrq,pattern,spacing)') */

    if ((cycle[0] == 'y') && (intsub[0] == 'y'))
    {
        ifzero(v14);
        for (jj = 0; jj < times; jj++)
        {
            double startfrq;
//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:101,代码来源:cyclenoe.c


示例6: pulsesequence

void pulsesequence()
{

/* DECLARE AND LOAD VARIABLES */

char        f1180[MAXSTR],   		      /* Flag to start t1 @ halfdwell */
            Cfilter[MAXSTR];                /*do C' Cfilter */
 
int         icosel,          			  /* used to get n and p type */
            t1_counter;  		        /* used for states tppi in t1 */
 
double tCN = getval("tCN"), 
            kappa, /*semi-constant time scale factor*/
	     tau1,         				         /*  t1 delay */
	    lambda = 0.91/(4.0*getval("JNH")), 	   /* 1/4J H1 evolution delay */
        
/* the sech/tanh pulse is automatically calculated by the macro "proteincal", */
/* and is called directly from your shapelib.                  		      */

   pwClvl = getval("pwClvl"), 	  	        /* coarse power for C13 pulse */
   pwC = getval("pwC"),     	      /* C13 90 degree pulse length at pwClvl */
   rf0,            	          /* maximum fine power when using pwC pulses */

	pwC3 = getval("pwC3"), /* 180 selective Ca null on C' */
	pwC8 = getval("pwC8"), /* 180 selective C' null on Ca */
	pwC6 = getval("pwC6"), /* 90 selective C' null on Ca */
	rf8,
	Ca90power = getval("Ca90power"),
	Ca180power = getval("Ca180power"),

   compH = getval("compH"),        /* adjustment for H1 amplifier compression */
   compN = getval("compN"),       /* adjustment for N15 amplifier compression */
   compC = getval("compC"),       /* adjustment for C13 amplifier compression */


  tpwrsf_n = getval("tpwrsf_n"), /* fine power adustment for first soft pulse*/
  tpwrsf_d = getval("tpwrsf_d"), /* fine power adustment for second soft pulse*/
   	pwHs = getval("pwHs"),	        /* H1 90 degree pulse length at tpwrs */
   	tpwrs,	  	              /* power for the pwHs ("H2Osinc") pulse */

	pwNlvl = getval("pwNlvl"),	              /* power for N15 pulses */
        pwN = getval("pwN"),          /* N15 90 degree pulse length at pwNlvl */
	sw1 = getval("sw1"),

	gt1 = getval("gt1"),  		       /* coherence pathway gradients */
        gzcal = getval("gzcal"),               /* dac to G/cm conversion      */
	gzlvl1 = getval("gzlvl1"),
	gzlvl2 = getval("gzlvl2"),

	gt0 = getval("gt0"),				   /* other gradients */
	gt3 = getval("gt3"),
	gt5 = getval("gt5"),
	gstab = getval("gstab"),
	gzlvl0 = getval("gzlvl0"),
	gzlvl3 = getval("gzlvl3"),
	gzlvl5 = getval("gzlvl5");

    getstr("f1180",f1180);
	getstr("Cfilter",Cfilter);



/*   LOAD PHASE TABLE    */

	settable(t1,2,phi1);
	settable(t2,4,phi2);
	settable(t3,1,phi3);
	settable(t4,2,rec);


/*   INITIALIZE VARIABLES   */

	rf0 = 4095.0;  

    /* 180 degree one-lobe sinc pulse on CO, null at Ca 118ppm away */
	rf8 = (compC*4095.0*pwC*2.0*1.65)/pwC8;	/* needs 1.65 times more     */
	rf8 = (int) (rf8 + 0.5);		/* power than a square pulse */
	


/* selective H20 one-lobe sinc pulse */
    tpwrs = tpwr - 20.0*log10(pwHs/(compH*pw*1.69));   /*needs 1.69 times more*/
    tpwrs = (int) (tpwrs);                   	  /*power than a square pulse */

/* CHECK VALIDITY OF PARAMETER RANGES */


  if((dm[A] == 'y' || dm[B] == 'y' || dm[C] == 'y' ))
  { text_error("incorrect dec1 decoupler flags! Should be 'nnn' "); psg_abort(1); }

  if((dm2[A] == 'y' || dm2[B] == 'y'))
  { text_error("incorrect dec2 decoupler flags! Should be 'nny' "); psg_abort(1); }

  if( dpwr2 > 50 )
  { text_error("don't fry the probe, DPWR2 too large!  ");   	    psg_abort(1); }

  if( pw > 50.0e-6 )
  { text_error("dont fry the probe, pw too high ! ");               psg_abort(1); } 
  
  if( pwN > 100.0e-6 )
//.........这里部分代码省略.........
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:101,代码来源:Cafiltered_TROSYnietl_sCT.c


示例7: pulsesequence


//.........这里部分代码省略.........
  gt7 = getval("gt7");
  gt8 = getval("gt8");

  gzlvl1 = getval("gzlvl1");
  gzlvl2 = getval("gzlvl2");
  gzlvl3 = getval("gzlvl3");
  gzlvl4 = getval("gzlvl4");
  gzlvl5 = getval("gzlvl5");
  gzlvl6 = getval("gzlvl6");
  gzlvl7 = getval("gzlvl7");
  gzlvl8 = getval("gzlvl8");

/* LOAD PHASE TABLE */

  settable(t1,16,phi1);
  settable(t2,2,phi2);
  settable(t3,16,phi3);
  settable(t4,4,phi4);
  settable(t6,4,phi6);
  settable(t7,8,phi7);
  settable(t5,16,rec_d);

/* CHECK VALIDITY OF PARAMETER RANGES */

    if( TC - 0.50*(ni-1)*1/(sw1) - WFG_STOP_DELAY 
             - gt6 - 102e-6 - POWER_DELAY 
             - PRG_START_DELAY - POWER_DELAY
             - 4.0e-6 - pwd1 - POWER_DELAY
             - PRG_START_DELAY - PRG_STOP_DELAY
             - 2.0e-6 - POWER_DELAY - 2.0e-6
             < 0.2e-6 ) 
    {
        printf(" ni is too big\n");
        psg_abort(1);
    }


    if((dm[A] == 'y' || dm[B] == 'y' || dm[C] == 'y' ))
    {
        printf("incorrect dec1 decoupler flags!  ");
        psg_abort(1);
    }

    if((dm2[A] == 'y' || dm2[B] == 'y' || dm2[C] == 'y' || dm2[D] == 'y'))
    {
        printf("incorrect dec2 decoupler flags!  ");
        psg_abort(1);
    }

    if( tsatpwr > 6 )
    {
        printf("TSATPWR too large !!!  ");
        psg_abort(1);
    }

    if( dpwr > 48 )
    {
        printf("don't fry the probe, DPWR too large!  ");
        psg_abort(1);
    }

    if( dpwr2 > 49 )
    {
        printf("don't fry the probe, DPWR2 too large!  ");
        psg_abort(1);
    }
开发者ID:OpenVnmrJ,项目名称:OpenVnmrJ,代码行数:67,代码来源:T2D.c


示例8: pulsesequence

pulsesequence()
{
  void      makeHHdec(), makeCdec(); 	                  /* utility functions */
  int       ihh=1,        /* used in HH decouling to improve water suppression */
            t1_counter;
  char	    C13refoc[MAXSTR],		/* C13 sech/tanh pulse in middle of t1 */
	    Hdecflg[MAXSTR],                        /* HH-homo decoupling flag */
	    Cdecflg[MAXSTR],                 /* low power C-13 decoupling flag */
	    IPAP[MAXSTR],		       /* Flag for anti-phase spectrum */
            wtg3919[MAXSTR];
  double    tauxh, tau1,
            pwNt = 0.0,               /* pulse only active in the TROSY option */
            gsign = 1.0,
            maxHpwr = 51.0,            /* maximum allowed H-H decoupling power */
            maxCpwr = 45.0,            /* maximum allowed C-H decoupling power */
            gzlvl0=getval("gzlvl0"),
            gzlvl1=getval("gzlvl1"),
            gzlvl2=getval("gzlvl2"),
            gzlvl3=getval("gzlvl3"),
            gt0=getval("gt0"),
            gt1=getval("gt1"),
            gt2=getval("gt2"),
            gt3=getval("gt3"),
            JNH = getval("JNH"),
            pwN = getval("pwN"),
            pwNlvl = getval("pwNlvl"),  
            pwHs, tpwrs=0.0, compH,      /* H1 90 degree pulse length at tpwrs */               
            sw1 = getval("sw1"),
            pwClvl = getval("pwClvl"), 	         /* coarse power for C13 pulse */
            pwC = getval("pwC"),       /* C13 90 degree pulse length at pwClvl */
            rfst = 4095.0,	            /* fine power for the stCall pulse */
            compC = getval("compC");   /* adjustment for C13 amplifier compr-n */


/* INITIALIZE VARIABLES */

    getstr("C13refoc",C13refoc);
    getstr("IPAP",IPAP);	       /* IPAP = 'y' for AP; IPAP = 'n' for IP */
    getstr("wtg3919",wtg3919);
    getstr("Hdecflg", Hdecflg);
    getstr("Cdecflg", Cdecflg);
    
    tauxh = ((JNH != 0.0) ? 1/(4*(JNH)) : 2.25e-3);

    if (C13refoc[A]=='y')  /* 180 degree adiabatic C13 pulse from 0 to 200 ppm */
    {
      rfst = (compC*4095.0*pwC*4000.0*sqrt((30.0*sfrq/600.0+7.0)/0.35));   
      rfst = (int) (rfst + 0.5);
      if ( 1.0/(4000.0*sqrt((30.0*sfrq/600.0+7.0)/0.35)) < pwC )
      { 
        text_error( " Not enough C13 RF. pwC must be %f usec or less.\n", 
	          (1.0e6/(4000.0*sqrt((30.0*sfrq/600.0+7.0)/0.35))) );    
	psg_abort(1); 
      }
    }

    if(wtg3919[0] != 'y')      /* selective H20 one-lobe sinc pulse needs 1.69  */
    { pwHs = getval("pwHs");            /* times more power than a square pulse */
      compH = getval("compH");
      if (pwHs > 1e-6) tpwrs = tpwr - 20.0*log10(pwHs/(compH*pw*1.69));  
      else tpwrs = 0.0;
      tpwrs = (int) (tpwrs); }
    else
      pwHs = pw*2.385+7.0*rof1+d3*2.5;                       	  

    if(Cdecflg[0] == 'y') makeCdec(maxCpwr);     /* make shapes for HH homo-decoupling */
    if(Hdecflg[0] == 'y') makeHHdec(maxHpwr);
    if(Hdecflg[0] != 'n') ihh = -3;

/* check validity of parameter range */

    if((dm[A] == 'y' || dm[B] == 'y' || dm[C] == 'y' ))
    { text_error("incorrect Dec1 decoupler flags!  "); psg_abort(1); } 

    if((dm2[A] == 'y' || dm2[B] == 'y') )
    { text_error("incorrect Dec2 decoupler flags!  "); psg_abort(1); } 

    if( dpwr > 0 )
    { text_error("don't fry the probe, dpwr too large!  "); psg_abort(1); }

    if( dpwr2 > 50 )
    { text_error("don't fry the probe, dpwr2 too large!  "); psg_abort(1); }

/* LOAD VARIABLES */

    if(ix == 1) d2_init = d2;
    t1_counter = (int) ( (d2-d2_init)*sw1 + 0.5);
    
    tau1 = d2/2.0;
    if(tau1 < 0.0) tau1 = 0.0;

/* LOAD PHASE TABLES */

    settable(t1, 2, phi1);
    if (IPAP[A]=='y') settable(t2,4,phi2A);
    else settable(t2, 4, phi2); 
    settable(t3, 16, phi3);
    settable(t4, 16, phi4);
    if (IPAP[A]=='y') settable(t5,8,recA);
    else settable(t5, 4, rec);
//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:101,代码来源:gNfhsqc_IPAPHD.c


示例9: pulsesequence


//.........这里部分代码省略.........
        cos_CO = 0;
        cos_Ca = 0;
        kappa = 5.4e-3;

    getstr("cbdecseq", cbdecseq);

/* LOAD PHASE TABLE */

  settable(t1,1,phi1);
  settable(t2,4,phi2);
  settable(t3,1,phi3);
  settable(t4,1,phi4);
  settable(t5,4,phi5);
  settable(t7,4,phi7);
  settable(t6,4,rec);

   /* get calculated pulse lengths of shaped C13 pulses */
        pwS1 = c13pulsepw("ca", "co", "square", 90.0);
        pwS2 = c13pulsepw("co", "ca", "sinc", 90.0);
        pwS3 = c13pulsepw("ca","co","square",180.0);
        pwS4 = c13pulsepw("co","ca","sinc",180.0);

   tpwrs = tpwr - 20.0*log10(pwHs/(compH*pw*1.69));   /*needs 1.69 times more*/
   tpwrs = (int) (tpwrs);                          /*power than a square pulse */
   widthHd = 2.681*waltzB1/sfrq;  /* bandwidth of H1 WALTZ16 decoupling */
   pwHd = h1dec90pw("WALTZ16", widthHd, 0.0);     /* H1 90 length for WALTZ16 */


/* CHECK VALIDITY OF PARAMETER RANGES */

    if((dm[A] == 'y' || dm[B] == 'y' || dm[C] == 'y' ))
    {
        printf("incorrect dec1 decoupler flags!  ");
        psg_abort(1);
    }

    if((dm2[A] == 'y' || dm2[B] == 'y' || dm2[C] == 'n'))
    {
        printf("incorrect dec2 decoupler flags! Should be 'nny' ");
        psg_abort(1);
    }

    if( satpwr > 6 )
    {
        printf("SATPWR too large !!!  ");
        psg_abort(1);
    }

    if( dpwr > 46 )
    {
        printf("don't fry the probe, DPWR too large!  ");
        psg_abort(1);
    }

    if( dpwr2 > 47 )
    {
        printf("don't fry the probe, DPWR2 too large!  ");
        psg_abort(1);
    }

    if( pw > 200.0e-6 )
    {
        printf("dont fry the probe, pw too high ! ");
        psg_abort(1);
    } 
    if( pwN > 200.0e-6 )
开发者ID:OpenVnmrJ,项目名称:OpenVnmrJ,代码行数:67,代码来源:PR42_ghn_ca_coP.c


示例10: pulsesequence

pulsesequence()

{
    char	normal[MAXSTR],
            focus[MAXSTR];
    double	spp, spplvl, pp, mult, j, d3;
    double  gt, gzlvl;

    /* GATHER AND INTIALIZE */
    getstr("focus", focus);
    getstr("normal", normal);
    spp = getval("spp");
    spplvl = getval("spplvl");
    pp   = getval("pp");
    mult = getval("mult");
    j    = getval("j");
    gt = getval("gt");
    gzlvl = getval("gzlvl");

    /* calculate phases */
    mod2(ct,v1);  /* v1 = 01010101 */
    dbl(v1,v1);  /* v1 = 0 2 */
    hlv(ct,v2);
    mod2(v2,v2);  /* v2 = 0 0 1 1 */
    add(v1,v2,oph);  /* oph = 0 2 1 3 */

    /* if mult is zero, then do normal s2pul sequence */
    if (mult == 0.0)
    {
        status(A);
        hsdelay(d1);
        pulse(p1, zero);
        status(B);
        delay(d2);
        status(C);
        pulse(pw,oph);
    }

    else  /* this is the INEPT part of the sequence  */
    {
        if (j != 0.0)
        {   /* calculation of delays */
            d3 = 1.0 / (2.0 * j);
            if (mult < 2.5)
            {
                d2 = 1.0 / (2.0 * j);
            }
            else if (mult < 3.5)
            {
                d2 = 3.0 / (4.0 * j);
            }
            else
            {
                d2 = 1.0 / (3.0 * j);
            }
        }
        else
            d3 = getval("d3");


        /* do equilibration delay */
        if ((dm[A] == 'y') || (dm[B] == 'y'))
        {
            (void) printf("Decoupler must be set as dm=nny or n\n");
            psg_abort(1);
        }
        if (declvlonoff)
            declvlon();		/* use pplvl for pulse */
        else
            decpower(pplvl);
        dec_pw_ovr(FALSE);

        status(A);
        delay(d1);

        /* excitation transfer */
        status(B);
        decrgpulse(pp, v1, rof1, rof1);
        decpower(spplvl);
        dec_pw_ovr(TRUE);
        delay(d3/2 - 2.0*(gt + spp + 1.0e-4));
        /*nominal 1/(4j) corrected for H1 & gradient pulses */
        zgradpulse(gzlvl,gt);
        delay(1.0e-4);
        simpulse(2*pw, 2*spp, zero, zero, rof1, rof1);
        delay(1.0e-4);
        zgradpulse(gzlvl,2.0*gt);
        delay(1.0e-4);
        simpulse(2.0*pw, 2.0*spp, zero, two, rof1, rof1);
        zgradpulse(gzlvl,gt);
        delay(1.0e-4);
        decpower(pplvl);
        dec_pw_ovr(FALSE);
        delay(d3/2 - 2.0*(gt + spp + 1.0e-4));
        simpulse(pw, pp, v2, one, 0.0, 0.0);

        /* make decision on refocussing */
        if ((focus[A] == 'y') || (dm[C] == 'y'))
        {
            decpower(spplvl);
//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:ovj3,代码行数:101,代码来源:glrinept.c


示例11: pulsesequence


//.........这里部分代码省略.........
  gzlvl4 = getval("gzlvl4");
  gzlvl5 = getval("gzlvl5");
  gzlvl6 = getval("gzlvl6");
  gzlvl7 = getval("gzlvl7");
  gzlvl8 = getval("gzlvl8");

/* LOAD PHASE TABLE */
           
  settable(t1,4,phi1);
  settable(t2,2,phi2);
  settable(t3,8,phi3);
  settable(t4,16, phi4);

  if (ref_flg[A] == 'y')
  {
     settable(t10,8,ref);
  }
  else
  {
     settable(t10,8,rec);
  }
  

/* selective H20 one-lobe sinc pulse */
    tpwrs = tpwr - 20.0*log10(pwHs/(compH*pw*1.69));   /*needs 1.69 times more*/
    tpwrs = (int) (tpwrs);                   	  /*power than a square pulse */

/* CHECK VALIDITY OF PARAMETER RANGES */

    if (ref_flg[A] == 'y' && ni > 1)
    {
       printf(" Incorrect setting of ni and ref_flg.\n");
       printf(" Please choose either ni=1 or ref_flg=n.\n");
       psg_abort(1);
    }
    
    if (ref_flg[A] == 'y' && dps_flag)
    {
       printf(" Please use phase2 and ni2 for 2D reference spectrum\n");
       if (ni2/sw2 > 2.0*(2.0*bigT - gt5 - 200.0e-6))
       {
           printf("ni2 is too big, should be < %f\n", 2.0*sw2*(2.0*bigT-gt5-200.0e-6));
           psg_abort(1);
       }
    }

    if ((ni2/sw2 > 2.0*(bigT -  gt5 - 200.0e-6)) && (ref_flg[A] !='y'))
    {
       printf(" ni2 is too big, should be < %f\n", 2.0*sw2*(bigT-gt6-200.0e-6));
       psg_abort(1);
    }

    if(dpwr2 > 50)
    {
        printf("don't fry the probe, dpwr2 is  too large!  ");
        psg_abort(1);
    }

    if((dm[A] == 'y' || dm[B] == 'y' || dm[C] == 'y'))
    {
       printf("incorrect dec1 decoupler flags! should be 'nnn' ");
       psg_abort(1);
    }

    if((dm2[A] == 'y' || dm2[B] == 'y' ))
    {
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:67,代码来源:ghnhb.c


示例12: pulsesequence


//.........这里部分代码省略.........
    dfCO180  = (compC*4095.0*pwC*2.0*fac180)/pwCO180;

/* LOAD PHASE TABLE */

    settable(t1,4,phi1);
    settable(t2,2,phi2);
    settable(t3,16,phi3);
    settable(t4,16,phi4);
    settable(t5, 1, phi5);
   
    settable(t10,16,rec);
  

/* CHECK VALIDITY OF PARAMETER RANGES */
        
    if((ref_flg[A] == 'y') && (dps_flag))
    {
       printf("ref_flg=y: for 2D HN-CO or 3D HNCO reference spectrum without CO-HB coupling.\n");
    }

    if(ni2/sw2 > 2.0*(bigTN))
    {
       printf(" ni2 is too big, should < %f\n", 2.0*sw2*(bigTN));
    }

    if((ni/sw1 > 2.0*(bigTCO - gt6 - maxcan))&&(ref_flg[A] == 'y'))
    {
       printf("ni is too big, should < %f\n", 2.0*sw1*(bigTCO-gt6-maxcan));
    }
  
    if(( dpwr > 50 ) || (dpwr2 > 50))
    {
        printf("don't fry the probe, either dpwr or dpwr2 is  too large!  ");
        psg_abort(1);
    }

    if((gt1 > 5.0e-3) ||(gt2>5e-3)||(gt3>5e-3)|| (gt0 > 5.0e-3))
    {
        printf("The length of gradients are too long\n");
        psg_abort(1);
    }

    if((taub - 2.0*pw - gt8 - 1.0e-3 - 6.0*GRADIENT_DELAY)<0.0)
    {
        printf("Shorten gt8 so that preceding delay is not negative\n");
        psg_abort(1);
    }

    if((dm[A] == 'y' || dm[B] == 'y' || dm[C] == 'y'))
    {
        printf("incorrect dec1 decoupler flags! should be 'nnn' ");
        psg_abort(1);
    }

    if((dm2[A] == 'y' || dm2[B] == 'y' ))
    {
        printf("incorrect dec2 decoupler flags! Should be 'nny' ");
        psg_abort(1);
    }

/*  Phase incrementation for hypercomplex 2D data */

    if (phase == 2)
    {
        if(ref_flg[A] == 'y') tsadd(t1,3,4);
        else tsadd(t1, 1, 4);
开发者ID:timburrow,项目名称:ovj3,代码行数:67,代码来源:ghn_co_hb.c


示例13: pulsesequence


//.........这里部分代码省略.........
    pwchirp1 = chirp1.pw;    dres_chp = chirp1.dres;       
    dchrp2 = chirp1.pwr;     dmfchp2 = chirp2.dmf;
    pwchirp2 = chirp2.pw;     
    dchrpi = chirpi.pwr;     dmfchpi = chirpi.dmf;
    pwchirpi = chirpi.pw;     

    pwrcor = pwClvl - dchrp1 - 6.0;  /* use more power for adiabatic pulses, if available */
    if(pwrcor > 3.0) pwrcor = 3.0;
    else if (pwrcor < 0.0) pwrcor = 0.0;
    dchrp1 = dchrp1 + pwrcor;
    dchrp2 = dchrp2 + pwrcor;
    pwrcor = pwClvl - dchrpi - 4.0;
    if(pwrcor > 2.0) pwrcor = 2.0;
    else if (pwrcor < 0.0) pwrcor = 0.0;
    dchrpi = dchrpi + pwrcor;

  }   
  
/* LOAD PHASE TABLE */

  settable(t1,8,phi1);
  settable(t2,16,phi2);
  settable(t4,16,rec);
  settable(t5,4,phi5);
  settable(t6,2,phi6);
  settable(t7,4,phi7);

/* CHECK VALIDITY OF PARAMETER RANGES */


    if((dm[A] == 'y' || dm[B] == 'y' ))
    {
        printf("incorrect dec1 decoupler flags!  ");
        psg_abort(1);
    }

    if((dm2[A] == 'y' || dm2[B] == 'y'))
    {
        printf("incorrect dec2 decoupler flags! Should be 'nnn' ");
        psg_abort(1);
    }

    if( tsatpwr > 6 )
    {
        printf("TSATPWR too large !!!  ");
        psg_abort(1);
    }

    if( dpwr > 50 )
    {
        printf("don't fry the probe, DPWR too large!  ");
        psg_abort(1);
    }

    if( dpwrco > 50 )
    {
        printf("don't fry the probe, dpwrco too large!  ");
        psg_abort(1);
    }

    if( dpwr2 > 46 )
    {
        printf("don't fry the probe, DPWR2 too large!  ");
        psg_abort(1);
    }
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:66,代码来源:noesyCA_800.c


示例14: pulsesequence


//.........这里部分代码省略.........



/*   INITIALIZE VARIABLES   */

 	kappa = 5.4e-3;

   pwHs = 1.7e-3*500.0/sfrq;       /* length of H2O flipback, 1.7ms at 500 MHz*/
   widthHd = 34.0;  /* bandwidth of H1 WALTZ16 decoupling, 7.3 kHz at 600 MHz */
   pwHd = h1dec90pw("WALTZ16", widthHd, 0.0);     /* H1 90 length for WALTZ16 */
 
    /* get calculated pulse lengths of shaped C13 pulses */
        pwS1 = c13pulsepw("co", "ca", "sinc", 90.0); 
        pwS2 = c13pulsepw("ca", "co", "square", 180.0);

    /* get calculated pulse lengths of shaped C13 pulses
	pwS1 = c13pulsepw("ca", "co", "square", 90.0); 
	pwS2 = c13pulsepw("co", "ca", "sinc", 180.0); */

    /* the 180 pulse on CO at the middle of t1 */
	if ((ni2 > 0.0) && (ni == 1.0)) ni = 0.0;
        if (pwS2 > 2.0*pwN) pwZ = pwS2; else pwZ = 2.0*pwN;
        if ((pwS==0.0) && (pwS2>2.0*pwN)) pwZ1=pwS2-2.0*pwN; else pwZ1=0.0;
	if ( ni > 1 )     pwS = 180.0;
	if ( pwS > 0 )   phshift = 130.0;
	else             phshift = 130.0;



/* CHECK VALIDITY OF PARAMETER RANGES */

    if ( 0.5*ni2*1/(sw2) > timeTN - WFG3_START_DELAY)
       { printf(" ni2 is too big. Make ni2 equal to %d or less.\n", 
  	 ((int)((timeTN - WFG3_START_DELAY)*2.0*sw2))); 	     psg_abort(1);}

    if ( dm[A] == 'y' || dm[B] == 'y' || dm[C] == 'y' )
       { printf("incorrect dec1 decoupler flags! Should be 'nnn' "); psg_abort(1);}

    if ( dm2[A] == 'y' || dm2[B] == 'y' )
       { printf("incorrect dec2 decoupler flags! Should be 'nny' "); psg_abort(1);}

    if ( dm3[A] == 'y' || dm3[C] == 'y' )
       { printf("incorrect dec3 decoupler flags! Should be 'nyn' or 'nnn' ");
							             psg_abort(1);}	
    if ( dpwr2 > 46 )
       { printf("dpwr2 too large! recheck value  ");		     psg_abort(1);}

    if ( pw > 20.0e-6 )
       { printf(" pw too long ! recheck value ");	             psg_abort(1);} 
  
    if ( pwN > 100.0e-6 )
       { printf(" pwN too long! recheck value ");	             psg_abort(1);} 
 
    if ( TROSY[A]=='y' && dm2[C] == 'y')
       { text_error("Choose either TROSY='n' or dm2='n' ! ");        psg_abort(1);}



/* PHASES AND INCREMENTED TIMES */

/*  Phase incrementation for hypercomplex 2D data, States-Haberkorn element */

    if (phase1 == 2)   tsadd(t3,1,4);  
    if (TROSY[A]=='y')
	 {  if (phase2 == 2)   				      icosel = +1;
            else 	    {tsadd(t4,2,4);  tsadd(t10,2,4);  icosel = -1;}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:67,代码来源:ghnca_intraP.c


示例15: pulsesequence

void pulsesequence()
{
   double          p1lvl,
                   trim,
                   mix,
                   window,
                   cycles;
   char            sspul[MAXSTR];


/* LOAD AND INITIALIZE VARIABLES */
   mix = getval("mix");
   trim = getval("trim");
   p1lvl = getval("p1lvl");
   window=getval("window");
   getstr("sspul", sspul);

/* CHECK CONDITIONS */
   if ((phase1 != 3) && (arrayelements > 2))
   {
      fprintf(stdout, "PHASE=3 is required if MIX is arrayed!\n");
      psg_abort(1);
   }
   if (satdly > 9.999)
   {
      fprintf(stdout, "Presaturation period is too long.\n");
      psg_abort(1);
   }
   if (!newtransamp)
   {
      fprintf(stdout, "TOCSY requires linear amplifiers on transmitter.\n");
      fprintf(stdout, "Use DECTOCSY with the appropriate re-cabling,\n");
      psg_abort(1);
   }
   if ((p1 == 0.0) && (ix == 1))
      fprintf(stdout, "Warning:  P1 has a zero value.\n");
   if ((rof1 < 9.9e-6) && (ix == 1))
      fprintf(stdout,"Warning:  ROF1 is less than 10 us\n");

   if (satpwr > 40)
        {
         printf("satpwr too large  - acquisition aborted./n");
         psg_abort(1);
        }

/* STEADY-STATE PHASECYCLING */
/* This section determines if the phase calculations trigger off of (SS - SSCTR)
   or off of CT */

   ifzero(ssctr);
      hlv(ct, v13);
      mod2(ct, v1);
      hlv(ct, v2);
   elsenz(ssctr);
      sub(ssval, ssctr, v12);	/* v12 = 0,...,ss-1 */
      hlv(v12, v13);
      mod2(v12, v1);
      hlv(v12, v2);
   endif(ssctr);


/* CALCULATE PHASES */
/* A 2-step cycle is performed on the first pulse (90 degrees) to suppress
   axial peaks in the first instance.  Second, the 2-step F2 quadrature image
   suppression subcycle is added to all pulse phases and receiver phase.
   Finally, a 2-step cycle is performed on the spin-lock pulses. */

   mod2(v13, v13);
   dbl(v1, v1);
   incr(v1);
   hlv(v2, v2);
   mod2(v2, v2);
   dbl(v2, v2);
   incr(v2);
   add(v13, v2, v2);
   sub(v2, one, v3);
   add(two, v2, v4);
   add(two, v3, v5);
   add(v1, v13, v1);
   assign(v1, oph);
   if (phase1 == 2)
      incr(v1);
   if (phase1 == 3)
      add(v1, id2, v1);

 /*HYPERCOMPLEX MODE USES REDFIELD TRICK TO MOVE AXIAL PEAKS TO EDGE*/
   if ((phase1==1)||(phase1==2))
   {
      initval(2.0*(double)(d2_index%2),v6);
      add(v1,v6,v1); add(oph,v6,oph);
   } 

/* CALCULATE AND INITIALIZE LOOP COUNTER */
      if (pw > 0.0)
      {
         cycles = (mix - trim) / (64.66*pw+32*window);
         cycles = 2.0*(double) (int) (cycles/2.0);
      }
      else
      {
//.........这里部分代码省略.........
开发者ID:timburrow,项目名称:ovj3,代码行数:101,代码来源:tntocsy.c


示例16: pulsesequence

pulsesequence()
{
/* DECLARE VARIABLES */

 char        fscuba[MAXSTR],f1180[MAXSTR],fsat[MAXSTR],mess_flg[MAXSTR],
             shp_flg[MAXSTR],shp_sl[MAXSTR];


 int	     phase,
             t1_counter;

 double      hscuba,                /* length of 1/2 scuba delay */
             tauxh,                 /* 1 / 4J(XH)                */
             pwN,                  /* PW90 for X-nuc on channel 3  */
             tsatpwr,               /* low power level for presat */
             pwNlvl,                /* power level for X hard pulses */
             jxh,                   /* coupling for XH           */
	     tau1,	      	    /* t1/2 */
	     sw1,
             tpwrmess,    /* power level for Messerlie purge */
             dly_pg1,     /* duration of first part of purge */
             tpwrsl,
             pw_sl,
             d1_wait,
 
             gzlvl1,
             gt1,
             gzlvl2,
             gt2;


/* LOAD VARIABLES */

  jxh = getval("jxh");
  pwN = getval("pwN");
  tsatpwr = getval("tsatpwr");
  pwNlvl = getval("pwNlvl"); 
  hscuba = getval("hscuba");
  phase = (int) (getval("phase") + 0.5);
  sw1 = getval("sw1");
  tpwrmess = getval("tpwrmess");
  dly_pg1 = getval("dly_pg1");
  d1_wait = getval("d1_wait");
  tpwrsl = getval("tpwrsl");
  pw_sl = getval("pw_sl");

  gzlvl1 = getval("gzlvl1");
  gt1 = getval("gt1");
  gzlvl2 = getval("gzlvl2");
  gt2 = getval("gt2");
 

  getstr("fscuba",fscuba); 
  getstr("fsat",fsat); 
  getstr("f1180",f1180); 
  getstr("shp_flg",shp_flg);
  getstr("mess_flg",mess_flg);
  getstr("shp_sl",shp_sl);

/* check validity of parameter range */

    if((dm2[A] == 'y' || dm2[B] == 'y'))
	{
	printf("incorrect Dec2 decoupler flags!  ");
	psg_abort(1);
    } 

    if((dm[A] == 'y' || dm[B] == 'y' || dm[C] == 'y' ))
	{
	printf("incorrect Dec decoupler flags!  ");
	psg_abort(1);
    } 

    if( tsatpwr > 8 )
    {
	printf("tsatpwr too large !!!  ");
	psg_abort(1);
    }

    if( dpwr > 10 )
    {
	printf("don't fry the probe, dpwr too large!  ");
	psg_abort(1);
    }

    if( dpwr2 > 50 )
    {
	printf("don't fry the probe, dpwr2 too large!  ");
	psg_abort(1);
    }

    if( pwNlvl > 63 )
    {
	printf("don't fry the probe, pwNlvl too large!  ");
	psg_abort(1);
    }

    if(tpwrmess > 55)
    {
        printf("dont fry the probe, tpwrmess too large < 55");
//.........这里部分代码省略.........
开发者ID:t

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ psi函数代码示例发布时间:2022-05-30
下一篇:
C++ psf_fseek函数代码示例发布时间: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