本文整理汇总了C++中settable函数的典型用法代码示例。如果您正苦于以下问题:C++ settable函数的具体用法?C++ settable怎么用?C++ settable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了settable函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
}
示例2: 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();
}
示例3: pulsesequence
pulsesequence()
{
double cycles,
bigtau = getval("bigtau"),
tau = getval("tau"),
satdly = getval("satdly");
char satmode[MAXSTR],
sspul[MAXSTR];
getstr("satmode",satmode);
getstr("sspul",sspul);
settable(t1,4,phs1);
settable(t2,8,phs2);
settable(t3,4,phs3);
getelem(t1,ct,v1);
getelem(t2,ct,v2);
getelem(t3,ct,v4);
assign(v1,oph);
/* calculate 'big tau' values */
cycles = bigtau/(2.0*tau);
cycles = (double)((int)((cycles/2.0) + 0.5)) * 2.0;
initval(cycles,v3);
/* equilibration period */
status(A);
delay(5.0e-5);
if (sspul[0] == 'y')
steadystate();
if (satmode[0] == 'y')
{
if ((d1-satdly) > 0.02)
delay(d1-satdly);
else
delay(0.02);
satpulse(satdly,v2,rof1,rof1);
}
else
delay(d1);
/* calculate exact delay and phases */
mod2(oph,v5);
incr(v5);
/* spin-echo loop */
status(B);
rgpulse(pw,v1,rof1,0.0);
starthardloop(v3);
delay(tau - p1/2.0 - rof2);
rgpulse(p1,v5,rof2,rof2);
delay(tau - p1/2.0 - rof2);
endhardloop();
/* observation period */
status(C);
}
示例4: 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();
}
示例5: 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);
}
示例6: 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();
}
示例7: 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);
}
示例8: 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();
}
示例9: 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);
}
示例10: intToRoman
char* intToRoman(int num) {
int ary[4] = {-1};
char *ans;
if(num == 0) {
return NULL;
}
Roman *table = (Roman*)malloc(7*sizeof(Roman));
if(table == 0) {
return NULL;
}
settable(table);
int dig = getdigitnumber(num);
ary[0] = num % 10;
ary[1] = (num /10) % 10;
ary[2] = (num /100) % 10;
ary[3] = (num /1000) % 10;
for(int i = dig+1 ; i < 4; i++) {
ary[i] = -1;
}
ans = malloc(150*sizeof(char));
memset(ans, 0, 150);
for(int i = 3; i >=0; i--) {
int j = 2*i;
if(ary[i]>=0 && ary[i] <=3) {
for(int k = 0; k < ary[i]; k++) {
strcat(ans, table[j].letter);
}
}
else if(ary[i] == 4) {
strcat(ans, table[j].letter);
strcat(ans, table[j+1].letter);
}
else if(ary[i] == 5) {
strcat(ans, table[j+1].letter);
}
else if(ary[i] > 5 && ary[i] <= 8) {
strcat(ans, table[j+1].letter);
for(int k = 0; k < ary[i] - 5; k++) {
strcat(ans, table[j].letter);
}
}
else if(ary[i] == 9) {
strcat(ans, table[j].letter);
strcat(ans, table[j+2].letter);
}
}
return ans;
}
示例11: assert
void breakpoint_Relocation::set_target(address x) {
assert(settable(), "must be settable");
jint target_bits = (jint)internal() ? scaled_offset (x)
: runtime_address_to_index(x);
short* p = &live_bits() + 1;
add_long(p, target_bits);
assert(p == instrs(), "new target must fit");
_target = x;
}
示例12: pulsesequence
pulsesequence()
{
settable(t1,4,phasecycle);
dec3power(dpwr3);
diplexer_override(0);
delay(d1);
dec3rgpulse(pw, t1, rof1, rof2);
setreceiver(t1);
}
示例13: pulsesequence
pulsesequence()
{
double pd, seqtime;
double minte,ted1,ted2;
double restol, resto_local;
int vph180 = v2; /* Phase of 180 pulse */
init_mri(); /****needed ****/
restol=getval("restol"); //local frequency offset
roff=getval("roff"); //receiver offset
init_rf(&p1_rf,p1pat,p1,flip1,rof1,rof2); /* hard pulse */
calc_rf(&p1_rf,"tpwr1","tpwr1f");
init_rf(&p2_rf,p2pat,p2,flip2,rof1,rof2); /* hard pulse */
calc_rf(&p2_rf,"tpwr2","tpwr2f");
seqtime = at+(p1/2.0)+rof1+d2;
pd = tr - seqtime; /* predelay based on tr */
if (pd <= 0.0) {
abort_message("%s: Requested tr too short. Min tr = %f ms",seqfil,seqtime*1e3);
}
minte = p1/2.0 + p2 + 2*rof2 + rof1;
if(d2 > 0) {
if(d2 < minte+4e-6)
abort_message("%s: TE too short. Min te = %f ms",seqfil,minte*1e3);
}
ted1 = d2/2 - p1/2 - p2/2 + rof2 + rof1;
ted2 = d2/2 - p2/2 + rof2;
resto_local=resto-restol;
status(A);
xgate(ticks);
delay(pd);
/* --- observe period --- */
obsoffset(resto_local);
obspower(p1_rf.powerCoarse);
obspwrf(p1_rf.powerFine);
shapedpulse(p1pat,p1,oph,rof1,rof2);
/* if d2=0 no 180 pulse applied */
if (d2 > 0) {
obspower(p2_rf.powerCoarse);
obspwrf(p2_rf.powerFine);
settable(t2,2,ph180); /* initialize phase tables and variables */
getelem(t2,ct,v6); /* 180 deg pulse phase alternates +/- 90 off the rcvr */
add(oph,v6,vph180); /* oph=zero */
delay(ted1);
shapedpulse(p2pat,p2,vph180,rof1,rof2);
delay(ted2);
}
startacq(alfa);
acquire(np,1.0/sw);
endacq();
}
示例14: 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();
}
示例15: pulsesequence
pulsesequence()
{
double gzlvl1,pwClvl,
gt1,
gstab;
gzlvl1 = getval("gzlvl1");
gt1 = getval("gt1");
gstab = getval("gstab");
pwClvl = getval("pwClvl");
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);
obspower(pwClvl);
delay(d1);
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);
}