- 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

View File

@@ -14,6 +14,7 @@
Mark Koennecke, April 1998
Revised: Mark Koennecke, October 2000
Revised: Mark Koennecke, July 2001
----------------------------------------------------------------------------*/
#include <stdlib.h>
#include <assert.h>
@@ -36,7 +37,7 @@
#define DET1Y 256 /* y-length of detector 1 */
#define DET1XS 2 /* pixel size in x of detector 1 */
#define DET1YS 2 /* pixel size in y of detector 1 */
#define DET1DESC "Non existent Detector"
#define DET1DESC "EMBL PSD"
#define DET2X 256 /* x -length of detector 1 */
#define DET2Y 256 /* y-length of detector 1 */
#define DET2XS 2 /* pixel size in x of detector 1 */
@@ -60,6 +61,11 @@
#define HM2OFF "hm2off"
#define HM3OFF "hm3off"
/*
name of hkl object holding crystallographic information
*/
#define HKLNAME "hkl"
/*------------------------ the data structure ----------------------------*/
typedef struct __NexTrics {
pObjectDescriptor pDes;
@@ -72,6 +78,7 @@
int iFrameNum;
pICallBack pCall;
float hm2Off, hm3Off;
pHKL pCrystal;
} NexTrics;
/* event type */
@@ -138,6 +145,15 @@
{
pNew->pHistogram3 = NULL;
}
pCom = FindCommand(pSics,HKLNAME);
if(pCom)
{
pNew->pCrystal = (pHKL)pCom->pData;
}
else
{
pNew->pCrystal = NULL;
}
pNew->iFirst = 1;
pNew->iFrameNum = 0;
@@ -419,6 +435,7 @@
CommandList *pCom = NULL;
pHKL pCryst = NULL;
float fVal, fPix[DETAMAX];
float fHKL[3], fUB[9];
iRet = NXopen(self->pCurrentFile,NXACC_RDWR,&hfil);
if(iRet != NX_OK)
@@ -501,18 +518,9 @@
}
/* lambda */
pCom = FindCommand(pServ->pSics,"HKL");
if(pCom)
if(self->pCrystal != NULL)
{
pCryst = (pHKL)pCom->pData;
}
if(!pCryst)
{
SCWrite(pCon,"ERROR: HKL not found, cannot write lambda",eError);
}
else
{
GetLambda(pCryst,&fVal);
GetLambda(self->pCrystal,&fVal);
iRet = NXDputalias(hfil,self->pDict,"monolambda",&fVal);
if(iRet != NX_OK)
{
@@ -846,6 +854,21 @@
{
SCWrite(pCon,"ERROR: failed to write sample name",eError);
}
if(self->pCrystal != NULL)
{
GetUB(self->pCrystal,fUB);
iRet = NXDputalias(hfil,self->pDict,"sampleub",fUB);
if(iRet != NX_OK)
{
SCWrite(pCon,"ERROR: failed to write sample UB",eError);
}
GetCurrentHKL(self->pCrystal,fHKL);
iRet = NXDputalias(hfil,self->pDict,"samplehkl",fHKL);
if(iRet != NX_OK)
{
SCWrite(pCon,"ERROR: failed to write HKL",eError);
}
}
/* put the frame number */
iRet = 0;
@@ -914,7 +937,7 @@
iRet = NXDputalias(hfil,self->pDict,"fnum",&iFrameNum);
if(iRet != NX_OK)
{
SCWrite(pCon,"EERROR: cannot write new framenumber, NO data written",eError);
SCWrite(pCon,"ERROR: cannot write new framenumber, NO data written",eError);
return 0;
}
@@ -1094,6 +1117,19 @@
{
SCWrite(pCon,"WARNING: cannot link against sample name",eWarning);
}
if(self->pCrystal != NULL)
{
iRet = NXDaliaslink(hfil,self->pDict,"samplev","sampleub");
if(iRet != NX_OK)
{
SCWrite(pCon,"WARNING: cannot link against sample UB",eWarning);
}
iRet = NXDaliaslink(hfil,self->pDict,"samplev","samplehkl");
if(iRet != NX_OK)
{
SCWrite(pCon,"WARNING: cannot link against sample HKL",eWarning);
}
}
/* write actual data */
iRet = DumpData(self,pCon,hfil,iFrameNum);