示例#1
0
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();
}
示例#2
0
文件: fidelity.c 项目: timburrow/ovj3
pulsesequence()
{
	/* Internal variable declarations *********************/
	char txphase[MAXSTR];
	char rxphase[MAXSTR];
    char blankmode[MAXSTR]={0};
	double  postDelay;
	double rfDuration;
	double acqt;
	int i,ret=-1;
	static int phs1[4] = {0,2,1,3}; /* from T1meas.c */

	/*************************************************/                                     
	/*  Initialize paramter **************************/
	i                = 0;
	postDelay        = 0.5;
	acqt             = 0.0;
	getstr("rxphase",rxphase);
	getstr("txphase",txphase);  

	ret = P_getstring(GLOBAL,"blankmode",blankmode,1,MAXSTR);
    //getparm("blankmode","string",GLOBAL,blankmode,MAXSTR);
	postDelay = tr - at;

   //printf("blankmode=%s\n",blankmode);
                        
	/*************************************************/
	/* check phase setting ***************************/
	if ( (txphase[0] =='n')   && (rxphase[0] =='n') )
	{
		abort_message("ERROR - Select at least one phase [Tx or Rx]\n");   
	}

	/**************************************************/
	/* check pulse width  *****************************/
	rfDuration = shapelistpw(p1pat, p1);     /* assign exitation pulse  duration */
	acqt = rfDuration + rof1 - alfa;
	if (FP_GT(acqt, at))
	{
		abort_message("Pulse duration too long. max [%.3f]    ms\n",(at-rof1+alfa)*1000.0);   
	}
    if(ret==0 && blankmode[0]=='u')
    	obsunblank();
	delay(postDelay);
    
	settable(t1,4,phs1); /*from T1meas.c */
	getelem(t1,ct,v11);  /*from T1meas.c */
	setreceiver(t1);                    
	/*==============================================*/
	/*  START LOOPBACK PULSE SEQUENCE               */
	/*==============================================*/
	status(A);
	obsoffset(resto);

	/* TTL trigger to scope sequence ****************************/       
	sp1on();             

	/* Relaxation delay ***********************************/       
    xgate(ticks);

	/* RF pulse *******************************************/ 
	obspower(tpwr);
	obspwrf(tpwrf);
	ShapedXmtNAcquire(p1pat, rfDuration, v11, rof1, OBSch);

	endacq();
	sp1off();
    if(ret==0 && blankmode[0]=='u')
 		obsunblank();
}