本文整理汇总了C++中decpower函数的典型用法代码示例。如果您正苦于以下问题:C++ decpower函数的具体用法?C++ decpower怎么用?C++ decpower使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了decpower函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pulsesequence
pulsesequence()
{
double pp;
pp = getval("pp");
/* calculate phases */
mod2(ct,v1); /* 0101 */
dbl(v1,v1); /* 0202 */
hlv(ct,v2); /* 0011 2233 */
mod2(v2,v2); /* 0011 0011 */
add(v1,v2,v1); /* 0213 0213*/
assign(v1,oph);
status(A);
hsdelay(d1);
status(B);
pulse(pw, v1);
delay(d2);
if (declvlonoff)
declvlon(); /* sets power to pplvl */
else
decpower(pplvl);
simpulse(p1, pp, v1, v1, rof1, rof1);
if (declvlonoff)
declvloff();
else
decpower(dpwr);
delay(d2);
status(C);
}
示例2: pulsesequence
void pulsesequence()
{
double j1xh,
pwxlvl,
pwx,
tau;
pwxlvl = getval("pwxlvl");
pwx = getval("pwx");
j1xh = getval("j1xh");
tau = 1.0 / (2.0*j1xh);
settable(t1, 4, ph1);
settable(t2, 4, ph2);
getelem(t1, ct, v1);
getelem(t2, ct, oph);
/* BEGIN ACTUAL PULSE SEQUENCE CODE */
status(A);
decpower(pwxlvl);
delay(d1);
status(B);
rgpulse(pw, zero, rof1, rof1);
delay(tau - (2*pw/PI) - 2*rof1);
simpulse(2*pw,pwx,v1,zero,rof1,rof2);
decpower(dpwr);
delay(tau - POWER_DELAY);
status(C);
}
示例3: dec_c13_shpulse
double dec_c13_shpulse(shape pwxshape, codeint phase)
{
decpower(pwxshape.pwr);
decshaped_pulse(pwxshape.name, pwxshape.pw, phase, 0.0, 0.0);
decpower(getval("pwClvl"));
return(pwxshape.pw + 2.0*POWER_DELAY +WFG_STOP_DELAY + WFG_START_DELAY);
}
示例4: pulsesequence
void pulsesequence()
{
double pwxlvl,
pwx,
gzlvl1,
gt1,
gzlvl3,
gt3,
gstab,
tau,
j1xh;
pwxlvl = getval("pwxlvl");
pwx = getval("pwx");
gzlvl1 = getval("gzlvl1");
gzlvl3 = getval("gzlvl3");
gt1 = getval("gt1");
gt3 = getval("gt3");
gstab = getval("gstab");
j1xh = getval("j1xh");
tau = 1/(4*j1xh);
assign(zero,oph);
status(A);
decpower(pwxlvl);
obspower(tpwr);
delay(d1);
status(B);
rgpulse(pw,zero,rof1,rof1);
delay(tau);
simpulse(2*pw,2*pwx,zero,zero,rof1,rof1);
delay(tau);
simpulse(pw,pwx,one,zero,rof1,rof1);
delay(gt1+gstab + 2*GRADIENT_DELAY);
decrgpulse(2*pwx,zero,rof1,rof1);
zgradpulse(gzlvl1,gt1);
delay(gstab);
simpulse(pw,pwx,zero,zero,rof1,rof1);
delay(tau - (2*pw/PI) - 2*rof1);
simpulse(2*pw,2*pwx,zero,zero,rof1, rof2);
decpower(dpwr);
zgradpulse(gzlvl3,gt3);
delay(tau - gt3 - 2*GRADIENT_DELAY - POWER_DELAY);
status(C);
}
示例5: pulsesequence
void pulsesequence()
{
int rxgate;
double pp,
pplvl;
pp = getval("pp");
pplvl = getval("pplvl");
rxgate = (rof1 == 0.0);
if (rxgate)
rof1 = 1.0e-6; /* phase switching time */
if (newdecamp)
{
if (rxgate)
rof1 = 40.0e-6;
}
status(A);
hsdelay(d1);
status(B);
settable(t1,4,phasecycle);
pulse(pw, t1);
delay(d2);
if (newdecamp)
{
pplvl = getval("pplvl");
decpower(pplvl); /* sets DEC atten = pplvl */
}
else
{
declvlon(); /* sets dhp = 255 level */
}
simpulse(p1, pp, t1, t1, rof1, rof1);
if (newdecamp)
{
decpower(dpwr); /* sets DEC atten = dpwr */
}
else
{
declvloff();
}
delay(d2);
status(C);
setreceiver(t1);
}
示例6: pulsesequence
void pulsesequence()
{
char pwpat[MAXSTR],p1pat[MAXSTR];
/* equilibrium period */
getstr("pwpat",pwpat);
if (pwpat[0] == '\0')
{
abort_message("no pwpat? ABORT");
}
getstr("p1pat",p1pat);
if (p1pat[0] == '\0')
{
abort_message("no p1pat? ABORT");
}
status(A);
obspower(zero);
decpower(tpwr);
hsdelay(d1);
rcvroff();
status(B);
if (is_y(rfwg[1])) decshaped_pulse(p1pat,p1,zero,rof1,rof2);
else apshaped_decpulse(p1pat,p1,zero,t1,t2,rof1,rof2);
hsdelay(d2);
status(C);
if (is_y(rfwg[1])) decshaped_pulse(pwpat,pw,oph,rof1,rof2);
else apshaped_decpulse(pwpat,pw,oph,t1,t2,rof1,rof2);
}
示例7: pulsesequence
void pulsesequence()
{
double pwx;
char rcvrsflag[MAXSTR];
pwx = getval("pwx");
getstr("rcvrs",rcvrsflag);
/* check decoupling modes */
if ( (dm[C] == 'y') || (dm[D] == 'y') || (homo[0] == 'y') )
{
printf("dm[C], dm[D] should be set to 'n' and/or homo should set to 'n'");
psg_abort(1);
}
if (strcmp(rcvrsflag,"yy"))
printf("rcvrs parameter should be set to 'yy'\n");
settable(t1,4,ph1);
getelem(t1,ct,v1);
assign(v1,oph);
settable(t2,4,ph2);
status(A);
obspower(tpwr);
decpower(dpwr);
delay(d1);
status(B);
delay(d2);
rgpulse(pw, t2, rof1, rof2);
status(C);
setactivercvrs("yn");
startacq(alfa);
acquire(np,1.0/sw);
endacq();
status(B);
delay(d2);
decrgpulse(pwx, t2, rof1, rof2);
status(D);
setactivercvrs("ny");
startacq(alfa);
acquire(np,1.0/sw);
endacq();
}
示例8: pulsesequence
void pulsesequence()
{
/* equilibrium period */
status(A);
hsdelay(d1);
/* tau delay */
status(B);
if (newdecamp)
{
decpower(tpwr);
decrgpulse(p1, zero, rof1, rof2);
decpower(dpwr);
}
else
{
declvlon();
decrgpulse(p1, zero, rof1, rof2);
declvloff();
}
hsdelay(d2);
/* observe period */
status(C);
settable(t1,4,phasecycle);
if (newdecamp)
{
decpower(tpwr);
decrgpulse(pw, t1, rof1, rof2);
decpower(dpwr);
}
else
{
declvlon();
decrgpulse(pw, t1, rof1, rof2);
declvloff();
}
setreceiver(t1);
}
示例9: pulsesequence
//.........这里部分代码省略.........
/* Set up f2180 */
tau2 = d3; /* run 2D exp for NH correlation, but must use tau2 instead of tau1
because bionmr.h is written for nh_evol* to do tau2 evolution*/
if((f2180[A] == 'y') && (ni2 > 1.0)) /* use f2180 to control tau2 */
{ tau2 += ( 1.0 / (2.0*sw2) ); if(tau2 < 0.2e-6) tau2 = 0.0; }
tau2 = tau2/2.0;
/* Calculate modifications to phases for States-TPPI acquisition */
if( ix == 1) d3_init = d3;
t2_counter = (int) ( (d3-d3_init)*sw1 + 0.5 );
if(t2_counter % 2)
{ tsadd(t8,2,4); tsadd(t12,2,4); tsadd(t13,2,4); }
/* BEGIN PULSE SEQUENCE */
status(A);
delay(d1);
if (dm3[B]=='y') lk_hold();
rcvroff();
set_c13offset("cab");
obsoffset(tof);
obspower(tpwr);
obspwrf(4095.0);
decpower(pwClvl);
decpwrf(4095.0);
dec2power(pwNlvl);
txphase(one);
delay(1.0e-5);
if (TROSY[A] == 'n')
dec2rgpulse(pwN, zero, 0.0, 0.0); /*destroy N15 and C13 magnetization*/
decrgpulse(pwC, zero, 0.0, 0.0);
zgradpulse(gzlvl0, 0.5e-3);
delay(gstab);
if (TROSY[A] == 'n')
dec2rgpulse(pwN, one, 0.0, 0.0);
decrgpulse(pwC, zero, 0.0, 0.0);
zgradpulse(0.7*gzlvl0, 0.5e-3);
delay(gstab);
if(dm3[B] == 'y') /*optional 2H decoupling on */
{dec3unblank(); dec3rgpulse(1/dmf3, one, 0.0, 0.0);
dec3unblank(); setstatus(DEC3ch, TRUE, 'w', FALSE, dmf3);}
rgpulse(pw, zero, 2.0e-6, 0.0);
zgradpulse(gzlvl5, gt5);
delay(tauCH - gt5 - WFG2_START_DELAY - 0.5e-3 + 68.0e-6 );
sim_c13adiab_inv_pulse("", "aliph", stCwidth, "sech1", 2.0*pw, 1.0e-3,
zero, zero, 2.0e-6, 2.0e-6);
zgradpulse(gzlvl5, gt5);
delay(tauCH - gt5 - 0.5e-3 + 68.0e-6);
rgpulse(pw, one, 0.0, 0.0);
if (ser_flg[0] == 'n' )
delay(pwS5);
if (ser_flg[0] == 'y' )
示例10: pulsesequence
//.........这里部分代码省略.........
tau2 = tau2/2.0;
/* Calculate modifications to phases for States-TPPI acquisition */
if( ix == 1) d2_init = d2;
t1_counter = (int) ( (d2-d2_init)*sw1 + 0.5 );
if(t1_counter % 2)
{ tsadd(t3,2,4); tsadd(t11,2,4); }
if( ix == 1) d3_init = d3;
t2_counter = (int) ( (d3-d3_init)*sw2 + 0.5 );
if(t2_counter % 2)
{ tsadd(t5,2,4); tsadd(t11,2,4); }
/* BEGIN PULSE SEQUENCE */
status(A);
if ( dm3[B] == 'y' )
lk_sample();
if ((ni/sw1-d2)>0)
delay(ni/sw1-d2); /*decreases as t1 increases for const.heating*/
if ((ni2/sw2-d3)>0)
delay(ni2/sw2-d3); /*decreases as t2 increases for const.heating*/
delay(d1);
if ( dm3[B] == 'y' )
{ lk_hold(); lk_sampling_off();} /*freezes z0 correction, stops lock pulsing*/
rcvroff();
obspower(tpwr);
decpower(pwClvl);
dec2power(pwNlvl);
decpwrf(rf0);
obsoffset(tof);
txphase(t3);
delay(1.0e-5);
decrgpulse(pwC, zero, 0.0, 0.0); /*destroy C13 magnetization*/
zgradpulse(gzlvl1, 0.5e-3);
delay(1.0e-4);
decrgpulse(pwC, one, 0.0, 0.0);
zgradpulse(0.7*gzlvl1, 0.5e-3);
delay(5.0e-4);
if ( dm3[B] == 'y' ) /* begins optional 2H decoupling */
{
dec3rgpulse(1/dmf3,one,10.0e-6,2.0e-6);
dec3unblank();
dec3phase(zero);
delay(2.0e-6);
setstatus(DEC3ch, TRUE, 'w', FALSE, dmf3);
}
rgpulse(pw, t3, 0.0, 0.0); /* 1H pulse excitation */
decphase(zero);
delay(0.5*del + tau1 - 2.0*pwC);
decrgpulse(2.0*pwC, zero, 0.0, 0.0);
txphase(zero);
delay(tau1);
rgpulse(2.0*pw, zero, 0.0, 0.0);
示例11: pulsesequence
//.........这里部分代码省略.........
/* Calculate modifications to phases for States-TPPI acquisition */
if( ix == 1) d2_init = d2 ;
t1_counter = (int) ( (d2-d2_init)*sw1 + 0.5 );
if(t1_counter % 2) {
tsadd(t2,2,4);
tsadd(t6,2,4);
}
/* Set up f1180 tau1 = t1 */
tau1 = d2;
if(f1180[A] == 'y') {
tau1 += ( 1.0 / (2.0*sw1) );
}
tau1 = tau1/2.0;
/* 90-90 pulse for selective 180 of Cb but not Ca */
gp11 = 1/(2*fab) - 4/PI*pwsel90;
if (gp11 < 0.0) {
printf("gap of 90-90 negative, check fab and pwsel90");
psg_abort(1);
}
/* BEGIN ACTUAL PULSE SEQUENCE */
/* Receiver off time */
status(A);
decoffset(dof);
obspower(tsatpwr); /* Set transmitter power for 1H presaturation */
decpower(pwClvl); /* Set Dec1 power for hard 13C pulses */
dec2power(dpwr2); /* Set Dec2 power for 15N decoupling */
/* Presaturation Period */
if(mess_flg[A] == 'y') {
obspower(tpwrmess);
rgpulse(dly_pg1,zero,20.0e-6,20.0e-6);
rgpulse(dly_pg1/1.62,one,20.0e-6,20.0e-6);
obspower(tsatpwr);
}
if (fsat[0] == 'y')
{
delay(2.0e-5);
rgpulse(d1,zero,20.0e-6,20.0e-6);
obspower(tpwr); /* Set transmitter power for hard 1H pulses */
delay(2.0e-5);
if(fscuba[0] == 'y')
{
delay(2.2e-2);
rgpulse(pw,zero,2.0e-6,0.0);
rgpulse(2*pw,one,2.0e-6,0.0);
rgpulse(pw,zero,2.0e-6,0.0);
delay(2.2e-2);
}
}
else
{
delay(d1);
}
示例12: 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);
//.........这里部分代码省略.........
示例13: pulsesequence
//.........这里部分代码省略.........
if(d2_index%2)
{
tsadd(t21,2,4);
tsadd(t10,2,4);
}
if(d3_index%2)
{
tsadd(t12,2,4);
tsadd(t10,2,4);
}
/* BEGIN ACTUAL PULSE SEQUENCE */
status(A);
if (satmode[A] == 'y')
{
if(satmove)
obsoffset(satfrq);
obspower(satpwr);
rgpulse(d1,zero,rof1,rof1);
if(satmove)
obsoffset(tof);
}
else
{
delay(d1);
}
rcvroff();
decphase(t13);
obspower(tpwr); /* Set transmitter power for hard 1H pulses */
decpower(pwcalvl);
status(B);
rgpulse(pw,t21,1.0e-5,0.0); /* First 1H 90 degree pulse */
txphase(t11);
if(tau1 < (2*pwca + pw)) /* first t1-value */
{
delay(tauhc - 2*pwca - 1.0e-6); /* assuming pwca > pw */
decrgpulse(pwca,t13,0.0,0.0); /* 13C composite 180 deg pulse */
simpulse(2*pw, 2*pwca,t11, t14, 1.0e-6, 0.0);
decrgpulse(pwca,t13,1.0e-6,0.0); /* 13C composite 180 deg pulse */
txphase(one);
decphase(t12);
delay(tauhc - 2*pwca - 1.0e-6); /* assuming pwca > pw */
}
else
{
delay(tauhc + tau1/2 - 2*pwca -1.0e-6); /* t1-evol. plus pol. trans. */
decrgpulse(pwca,t13,0.0,0.0); /* 13C composite 180 deg pulse */
decrgpulse(2*pwca,t14,1.0e-6,0.0); /* 13C composite 180 deg pulse */
decrgpulse(pwca,t13,0.0,0.0); /* 13C composite 180 deg pulse */
delay(tau1/2 - 2*pwca - pw); /* continued t1-evol. */
rgpulse(2*pw,t11,0.0,0.0); /* proton echo pulse */
txphase(one);
decphase(t12);
delay(tauhc - pw);
}
simpulse(pw,pwca,one,t12,1.0e-6,0.2e-6);
decphase(zero);
decpower(pwcolvl);
if(tau2/2 > POWER_DELAY)
delay(tau2/2 - POWER_DELAY); /* t2 evolution */
else
示例14: pulsesequence
//.........这里部分代码省略.........
if(tau3 < 0.2e-6) tau3 = 0.4e-6;
}
tau3 = tau3/2.0;
/* Calculate modifications to phases for States-TPPI acquisition */
if( ix == 1) d2_init = d2 ;
t1_counter = (int) ( (d2-d2_init)*sw1 + 0.5 );
if(t1_counter % 2) {
tsadd(t1,2,4);
tsadd(t6,2,4);
}
if( ix == 1) d3_init = d3 ;
t2_counter = (int) ( (d3-d3_init)*sw2 + 0.5 );
if(t2_counter % 2) {
tsadd(t5,2,4);
tsadd(t6,2,4);
}
if( ix == 1) d4_init = d4 ;
t3_counter = (int) ( (d4-d4_init)*sw3 + 0.5 );
if(t3_counter % 2) {
tsadd(t2,2,4);
tsadd(t6,2,4);
}
/* BEGIN ACTUAL PULSE SEQUENCE */
status(A);
obsoffset(tof);
decoffset(dof); /* set Dec1 carrier at Co */
obspower(tsatpwr); /* Set transmitter power for 1H presaturation */
decpower(d_chirp); /* Set Dec1 power for hard 13C pulses */
dec2power(pwNlvl); /* Set Dec2 power for 15N hard pulses */
/* Presaturation Period */
if (fsat[0] == 'y')
{
delay(2.0e-5);
rgpulse(d1,zero,2.0e-6,2.0e-6); /* presaturation */
obspower(tpwr); /* Set transmitter power for hard 1H pulses */
delay(2.0e-5);
if (fscuba[0] == 'y')
{
delay(2.2e-2);
rgpulse(pw,zero,2.0e-6,0.0);
rgpulse(2*pw,one,2.0e-6,0.0);
rgpulse(pw,zero,2.0e-6,0.0);
delay(2.2e-2);
}
}
else
{
delay(d1);
}
obspower(tpwr); /* Set transmitter power for hard 1H pulses */
txphase(zero);
dec2phase(zero);
delay(1.0e-5);
/* Begin Pulses */
status(B);
示例15: pulsesequence
//.........这里部分代码省略.........
/* Set up f2180 */
tau2 = d3;
if((f2180[A] == 'y') && (ni2 > 1.0))
{ tau2 += ( 1.0 / (2.0*sw2) ); if(tau2 < 0.2e-6) tau2 = 0.0; }
tau2 = tau2/2.0;
/* Calculate modifications to phases for States-TPPI acquisition */
if( ix == 1) d2_init = d2;
t1_counter = (int) ( (d2-d2_init)*sw1 + 0.5 );
if(t1_counter % 2)
{ tsadd(t3,2,4); tsadd(t11,2,4); }
if( ix == 1) d3_init = d3;
t2_counter = (int) ( (d3-d3_init)*sw2 + 0.5 );
if(t2_counter % 2)
{ tsadd(t5,2,4); tsadd(t11,2,4); }
/* BEGIN PULSE SEQUENCE */
status(A);
if (dm3[B]=='y') lk_sample();
delay(d1);
if (dm3[B]=='y') lk_hold();
rcvroff();
obspower(tpwr);
decpower(pwClvl);
dec2power(pwNlvl);
decpwrf(rfC);
obsoffset(tof);
decoffset(dofa);
dec2offset(dof2);
txphase(t3);
delay(1.0e-5);
decrgpulse(pwC, zero, 0.0, 0.0); /*destroy C13 magnetization*/
zgradpulse(gzlvl1, 0.5e-3);
delay(grecov/2);
decrgpulse(pwC, one, 0.0, 0.0);
zgradpulse(0.7*gzlvl1, 0.5e-3);
delay(5.0e-4);
if(dm3[B] == 'y') /*optional 2H decoupling on */
{
dec3unblank();
dec3rgpulse(1/dmf3, one, 0.0, 0.0);
dec3unblank();
setstatus(DEC3ch, TRUE, 'w', FALSE, dmf3);
}
rgpulse(pw, t3, 0.0, 0.0); /* 1H pulse excitation */
decphase(zero);
delay(0.5*del + tau1 - 2.0*pwC);
decrgpulse(2.0*pwC, zero, 0.0, 0.0);
txphase(zero);
delay(tau1);