- Added tabledrive: table driven path for MARS

- Initial MARS development
- Upgraded Manager Manual


SKIPPED:
	psi/make_gen
	psi/psi.c
	psi/tabledrive.c
	psi/tabledrive.h
	psi/tabledrive.w
	psi/utils/SerPortServer.c
This commit is contained in:
koennecke
2005-07-22 14:56:18 +00:00
parent d96fb7377d
commit 76abbe1042
39 changed files with 1822 additions and 672 deletions

56
hkl.c
View File

@ -60,6 +60,8 @@
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);
fprintf(fd,"%s nb %d\n", name, self->iNOR);
fprintf(fd,"%s phiom %d\n", name, self->iOMPHI);
return 1;
}
@ -853,6 +855,27 @@ static int calculateNormalBeamOmega(MATRIX z1, pHKL self,
if(self->iNOR == 0)
{
status = calculateBisecting(z1,self,pCon,fSet, myPsi, iRetry);
/*
* Betrand mode: wrap phi rotation into omega
*/
if(self->iOMPHI > 0) {
if(ABS(fSet[2] - .0) < .1 || ABS(fSet[2] - 180.) < .1){
fSet[1] -= fSet[3];
fSet[3] = .0;
if(fSet[1] < 0.){
fSet[1] += 360.;
}
if(fSet[1] > 360.0){
fSet[1] -= 360.;
}
} else {
snprintf(pBueffel,511,
"ERROR: for omphi mode chi must be 0 or 180, is %f",
fSet[2]);
SCWrite(pCon,pBueffel,eError);
return 0;
}
}
}
else if(self->iNOR == 1)
{
@ -1333,8 +1356,9 @@ ente:
if(strcmp(argv[1],"list") == 0 )
{
sprintf(pBueffel,
"lambda = %f Normal Beam = %d Quadrant = %d HM = %d",
self->fLambda, self->iNOR, self->iQuad,self->iHM);
"lambda = %f Normal Beam = %d PHIOM = %d Quadrant = %d HM = %d",
self->fLambda, self->iNOR, self->iOMPHI,
self->iQuad,self->iHM);
SCWrite(pCon,pBueffel,eValue);
sprintf(pBueffel,"UB = { %f %f %f",
self->fUB[0], self->fUB[1],self->fUB[2]);
@ -1547,8 +1571,9 @@ ente:
{
if(argc < 3)
{
SCWrite(pCon,"ERROR: Insufficient number of arguments to HKL nb",eError);
return 0;
snprintf(pBueffel,511,"%s.nb = %d",argv[0],self->iNOR);
SCWrite(pCon,pBueffel,eValue);
return 1;
}
if(!SCMatchRights(pCon,usUser))
{
@ -1571,6 +1596,29 @@ ente:
SCSendOK(pCon);
return 1;
}
/*------------- phi omega mode (to be removed) */
else if(strcmp(argv[1],"phiom") == 0)
{
if(argc < 3)
{
snprintf(pBueffel,511,"%s.phiom = %d",argv[0],self->iOMPHI);
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->iOMPHI = atoi(argv[2]);
SCSendOK(pCon);
return 1;
}
/*------------- quadrant */
else if(strcmp(argv[1],"quadrant") == 0)
{