- First commit of the new UB based TAS calculation. A milestone has been

reached: it handles one test case correctly back and forth
- Fixed oscillation code
- Added a feature for switching off automatic updates in nxupdate
  Autoamtic updates cause problems when scanning...
This commit is contained in:
koennecke
2005-04-22 14:07:06 +00:00
parent 288c65e0bb
commit 6387994017
17 changed files with 1897 additions and 34 deletions

64
tasub.h Normal file
View File

@ -0,0 +1,64 @@
/*----------------------------------------------------------------------
SICS interface to the triple axis spectrometer calculation
module.
copyright: see file COPYRIGHT
Mark Koennecke, April-May 2005
----------------------------------------------------------------------*/
#ifndef TASUB
#define TASUB
#include <stdio.h>
#include "tasublib.h"
#include "cell.h"
#include "motor.h"
/*------------------- defines for tasMode -----------------------------------*/
#define KICONST 1
#define KFCONST 2
/*-----------------------------------------------------------------------------*/
typedef struct{
pObjectDescriptor pDes;
tasMachine machine;
int reflectionList;
lattice cell;
tasQEPosition target;
tasQEPosition current;
int tasMode;
double targetEn, actualEn;
int mustRecalculate;
int mustDrive;
pMotor motors[12];
}tasUB, *ptasUB;
/*----------------------- defines for virtual motors -----------------------------*/
#define EI 1
#define KI 2
#define QH 3
#define QK 4
#define QL 5
#define EF 6
#define KF 7
#define EN 8
#define QM 9
/*--------------------- the tas virtual motor data structure ---------------------*/
typedef struct {
pObjectDescriptor pDes;
pIDrivable pDriv;
ptasUB math;
int code;
}tasMot, *ptasMot;
/*--------------------------------------------------------------------*/
int TasUBFactory(SConnection *pCon,SicsInterp *pSics, void *pData,
int argc, char *argv[]);
int TasUBWrapper(SConnection *pCon,SicsInterp *pSics, void *pData,
int argc, char *argv[]);
int TasMot(SConnection *pCon,SicsInterp *pSics, void *pData,
int argc, char *argv[]);
#endif