- Fixed some serious bugs in amor2t having to do with recent extensions

- fixed velocity selector code to properly display data at list
- got hkl to give proper answers when a psi value was specified and
  limited psi to 360 max.
- fixed a minor spelling  error in fitcenter messages
- fixed badly working soft zeros with  negative sign
This commit is contained in:
cvs
2000-08-18 14:45:56 +00:00
parent e7e85d7b13
commit f3e4add7b5
6 changed files with 55 additions and 20 deletions

37
hkl.c
View File

@ -822,6 +822,16 @@
return 0;
}
/* some people are stupid.......... */
if(myPsi > 360.)
{
myPsi -= 360;
}
if(myPsi < .0)
{
myPsi += 360.;
}
/* no retries if normal beam calculation
or specific Hamilton or specific
psi requested */
@ -901,11 +911,15 @@
return 1;
}
}
sprintf(pBueffel,
"ERROR: failed to find a possible setting for %4.1f %4.1f %4.1f %s",
fHKL[0], fHKL[1], fHKL[2], "\n Even tried 36 psi settings");
SCWrite(pCon,pBueffel,eError);
return 0;
if(iRetry != 1)
{
sprintf(pBueffel,
"ERROR: failed to find a possible setting for %4.1f %4.1f %4.1f %s",
fHKL[0], fHKL[1], fHKL[2], "\n Even tried 36 psi settings");
SCWrite(pCon,pBueffel,eError);
return 0;
}
return 0;
}
/*-------------------------------------------------------------------------*/
int RunHKL(pHKL self, float fHKL[3],
@ -1557,13 +1571,16 @@ ente:
return 0;
}
iRet = CalculateSettings(self,fHKL, fPsi, iHamil, fSet,pCon);
if(!iRet)
{
return 0;
}
sprintf(pBueffel,"{ theta = %f, omega = %f, chi = %f, phi = %f",
sprintf(pBueffel," theta = %f, omega = %f, chi = %f, phi = %f",
fSet[0], fSet[1], fSet[2],fSet[3]);
SCWrite(pCon,pBueffel,eValue);
if(!iRet)
{
SCWrite(pCon,
"WARNING: Settings violate motor limits or cannot be calculated",
eWarning);
return 0;
}
return 1;
}
/*------------------ run */