- Updated the managers documentation a little

- The  crystal settings calculation in hkl now tried to put omega into
  the limts by calculating a delta omega.
- TRICS data files now include HKL and the UB
- The scan module has been expanded to support user defined scans which
  run a script at any scan point.
- A small fix to the PSD code in SinqHM_srv_filler
This commit is contained in:
cvs
2001-07-20 08:05:25 +00:00
parent 8f84d45dd6
commit 0fac95ea9b
25 changed files with 741 additions and 522 deletions

75
userscan.c Normal file
View File

@ -0,0 +1,75 @@
/*------------------------------------------------------------------------
User configurable scans. At each scan point a scripted procedure is
called.
More info: userscan.tex
copyright: see copyright.h
Mark Koennecke, June 2001
-------------------------------------------------------------------------*/
#include <stdlib.h>
#include <assert.h>
#include <tcl.h>
#include "fortify.h"
#include "sics.h"
#include "scan.h"
#include "scan.i"
#include "userscan.h"
/*-----------------------------------------------------------------------*/
static int UserScanPoints(pScanData self, int iPoint)
{
/*
do nothing as the user is supposed to take care of the data file
*/
return 1;
}
/*-----------------------------------------------------------------------
Execute the users special procedure
------------------------------------------------------------------------*/
static int UserCount(pScanData self, int iPoint)
{
int status;
char pBueffel[512];
assert(self);
assert(self->pSics);
assert(self->pCon);
/* check for existence of command to run */
if(self->pCommand == NULL)
{
SCWrite(self->pCon,
"ERROR: configuration error, need procedure to run for user scan",
eError);
SCSetInterrupt(self->pCon,eAbortScan);
return 0;
}
/* invoke command */
sprintf(pBueffel,"%s %d",self->pCommand, iPoint);
status = Tcl_GlobalEval(self->pSics->pTcl,pBueffel);
if(status != TCL_OK)
{
sprintf(pBueffel,"ERROR in count script: %s",
Tcl_GetStringResult(self->pSics->pTcl));
SCWrite(self->pCon,pBueffel,eError);
return 0;
}
return 1;
}
/*------------------------------------------------------------------------*/
int UserCollect(pScanData self, int iPoint)
{
/* do nothing, its the users job*/
return 1;
}
/*------------------------------------------------------------------------*/
void ConfigureUserScan(pScanData self)
{
assert(self);
self->WriteScanPoints = UserScanPoints;
self->ScanCount = UserCount;
self->CollectScanData = UserCollect;
}