- Added brute force indexing support to ubcalc

- Added calculation of UB from 3 reflections to ubcalc
- Added calculation of lattice constants from UB to ubcalc
- Some fixes in stdscan in order to make the scripted scan work
This commit is contained in:
koennecke
2005-04-01 13:48:25 +00:00
parent 152bc961ec
commit 5c30a7ea7b
10 changed files with 637 additions and 45 deletions

View File

@ -47,12 +47,15 @@ static char *fixExtension(char *filename)
int iLen, iNum, iYear;
char pNumText[10];
CommandList *pCom = NULL;
char simName[255];
/*
make a simulated filename if in simulation mode
*/
if(pServ->simMode)
return strdup("sim001001901.sim");
if(pServ->simMode){
snprintf(simName,255,"%s/tmp/sim001001901.sim",getenv("HOME"));
return strdup(simName);
}
pRes = makeFilename(pSics,pCon);
if(pRes == NULL)
@ -756,6 +759,10 @@ int ScriptWriteHeader(pScanData self){
}
/*---------------------------------------------------------------------*/
int ScriptPrepareScan(pScanData self){
/* configure counter */
SetCounterMode((pCounter)self->pCounterData,self->iMode);
SetCounterPreset((pCounter)self->pCounterData, self->fPreset);
self->iCounts = 0;
return StandardScriptInvoke(self,"prepare");
}
/*-----------------------------------------------------------------------*/
@ -764,7 +771,31 @@ int ScriptScanDrive(pScanData self, int iPoint){
}
/*------------------------------------------------------------------------*/
int ScriptScanCount(pScanData self, int iPoint){
return StandardScriptInvokeWithPoint(self,"count",iPoint);
pDynString command = NULL;
int status;
char pNumber[50];
command = GetStandardInvocation(self,"count");
if(command == NULL){
return 0;
}
snprintf(pNumber,49,"%d",iPoint);
DynStringConcat(command,pNumber);
if(self->iMode == eTimer){
DynStringConcat(command," timer ");
} else {
DynStringConcat(command," monitor ");
}
snprintf(pNumber,49," %f ", self->fPreset);
DynStringConcat(command,pNumber);
status = InterpExecute(self->pSics, self->pCon,
GetCharArray(command));
DeleteDynString(command);
if(status != 1) {
return 0;
}
return status;
}
/*-------------------------------------------------------------------------*/
int ScriptScanCollect(pScanData self, int iPoint){