- New batch file management module

- New oscillator module
- Bug fixes


SKIPPED:
	psi/buffer.c
	psi/el734hp.c
	psi/el737hpdriv.c
	psi/make_gen
	psi/nextrics.c
	psi/nxamor.c
	psi/pimotor.c
	psi/polterwrite.c
	psi/psi.c
	psi/swmotor2.c
	psi/tasscan.c
	psi/tricssupport.c
	psi/tricssupport.h
	psi/tecs/make_gen
	psi/utils/ecb_load_new/ecb_load.c
	psi/utils/ecb_load_new/ecb_load.h
	psi/utils/ecb_load_new/ecbdriv_els.c
	psi/utils/ecb_load_new/gpib_els.c
	psi/utils/ecb_load_new/makefile
	psi/utils/ecb_load_new/makefile_EGPIB
	psi/utils/ecb_load_new/makefile_GPIB
This commit is contained in:
cvs
2004-11-17 10:50:15 +00:00
parent f7c8ae30c6
commit 0f4e959e22
46 changed files with 3675 additions and 834 deletions

61
hkl.c
View File

@ -35,10 +35,7 @@
#include "hkl.h"
#include "hkl.i"
#include "splitter.h"
/*
the space we leave in omega in order to allow for a scan to be done
*/
#define SCANBORDER 3.
/*
the tolerance in chi we give before we allow to fix omega with phi
*/
@ -62,6 +59,7 @@
self->fUB[0], self->fUB[1], self->fUB[2], self->fUB[3], self->fUB[4],
self->fUB[5], self->fUB[6], self->fUB[7], self->fUB[8]);
fprintf(fd,"%s hm %d\n",name, self->iHM);
fprintf(fd,"%s scantolerance %f\n", name,self->scanTolerance);
return 1;
}
@ -106,6 +104,7 @@
pNew->fUB[4] = 1.;
pNew->fUB[8] = 1.;
pNew->UBinv = NULL;
pNew->scanTolerance = 2.5;
return pNew;
}
@ -433,12 +432,12 @@ static int checkBisecting(pHKL self,
a omega scan
*/
MotorGetPar(self->pOmega,"softlowerlim",&fLimit);
if((float)om < fLimit + SCANBORDER){
if((float)om < fLimit + self->scanTolerance){
iTest = 0;
} else {
iTest = 1;
MotorGetPar(self->pOmega,"softupperlim",&fLimit);
if((float)om > fLimit - SCANBORDER){
if((float)om > fLimit - self->scanTolerance){
iTest = 0;
} else {
iTest = 1;
@ -512,11 +511,11 @@ static int tryOmegaTweak(pHKL self, MATRIX z1, double *stt, double *om,
omTarget = -9999;
MotorGetPar(self->pOmega,"softlowerlim",&fLower);
MotorGetPar(self->pOmega,"softupperlim",&fUpper);
if(*om < fLower + SCANBORDER) {
omTarget = fLower + SCANBORDER + .5;
if(*om < fLower + self->scanTolerance) {
omTarget = fLower + self->scanTolerance;
}
if(*om > fUpper - SCANBORDER){
omTarget = fUpper - SCANBORDER - .5;
if(*om > fUpper - self->scanTolerance){
omTarget = fUpper - self->scanTolerance;
}
if(omTarget < -7000){
return 0;
@ -1309,6 +1308,9 @@ ente:
sprintf(pBueffel,"Last HKL: %f %f %f ",
self->fLastHKL[0], self->fLastHKL[1],self->fLastHKL[2]);
SCWrite(pCon,pBueffel,eValue);
snprintf(pBueffel,510,"%s.scantolerance = %f", argv[0],
self->scanTolerance);
SCWrite(pCon,pBueffel,eValue);
return 1;
}
/*----------- current */
@ -1370,8 +1372,9 @@ ente:
{
if(argc < 3)
{
SCWrite(pCon,"ERROR: Insufficient number of arguments to HKL lambda",eError);
return 0;
snprintf(pBueffel,132,"%s.lambda = %f", argv[0],self->fLambda);
SCWrite(pCon,pBueffel,eValue);
return 1;
}
if(!SCMatchRights(pCon,usUser))
{
@ -1393,6 +1396,16 @@ ente:
SCSendOK(pCon);
return 1;
}
/*------------- getub*/
else if(strcmp(argv[1],"getub") == 0)
{
snprintf(pBueffel,510,"%s.ub = %f %f %f %f %f %f %f %f %f",
argv[0], self->fUB[0], self->fUB[1], self->fUB[2],
self->fUB[3], self->fUB[4], self->fUB[5],
self->fUB[6], self->fUB[7], self->fUB[8]);
SCWrite(pCon,pBueffel,eValue);
return 1;
}
/*------- lambdavar*/
else if(strcmp(argv[1],"lambdavar") == 0)
{
@ -1547,6 +1560,30 @@ ente:
SCSendOK(pCon);
return 1;
}
/*------------- scantolerance */
else if(strcmp(argv[1],"scantolerance") == 0)
{
if(argc < 3)
{
snprintf(pBueffel,510,"%s.scantolerance = %f",argv[0],
self->scanTolerance);
SCWrite(pCon,pBueffel,eValue);
return 1;
}
if(!SCMatchRights(pCon,usUser))
{
return 0;
}
if(!isNumeric(argv[2]))
{
sprintf(pBueffel,"ERROR: %s was not recognized as a number", argv[2]);
SCWrite(pCon,pBueffel,eError);
return 0;
}
self->scanTolerance = atof(argv[2]);
SCSendOK(pCon);
return 1;
}
/*------------- calculate */
else if(strcmp(argv[1],"calc") == 0)
{