- Removed old code

- Extended tasker to support task groups
- Added task functions for motors and counters
- Modifed devexec to use the new task functions
- Modified TAS to treat the monochromator separatly
- Coded a EIGER monochromator module to reflect even more new
  requirements
- Added EPICS counters and motors
- Modified multicounter to be better performing


SKIPPED:
	psi/eigermono.c
	psi/make_gen
	psi/makefile_linux
	psi/psi.c
	psi/sinqhttp.c
This commit is contained in:
koennecke
2013-04-02 15:13:35 +00:00
parent 86e246416b
commit 1afe142812
54 changed files with 1654 additions and 2841 deletions

View File

@@ -10,6 +10,10 @@
Heavily reworked to fit into the new four circle system
Mark Koennecke, July 2008
Added UBfromCell
Mark Koennecke, March 2013
-----------------------------------------------------------------------*/
#include <stdlib.h>
#include <assert.h>
@@ -252,7 +256,39 @@ static int calcUB(pUBCALC self, SConnection * pCon, char *ref1, char *ref2)
return 1;
}
}
/*---------------------------------------------------------------------*/
static int UBFromCell(pUBCALC self, SConnection *pCon)
{
const double *cell;
lattice mycell;
MATRIX B;
double ub[9];
int i;
cell = SXGetCell();
mycell.a = cell[0];
mycell.b = cell[1];
mycell.c = cell[2];
mycell.alpha = cell[3];
mycell.beta = cell[4];
mycell.gamma = cell[5];
B = mat_creat(3,3,ZERO_MATRIX);
if(B == NULL){
SCWrite(pCon,"ERROR: out of memory in UBfromCell",eError);
return 0;
}
calculateBMatrix(mycell,B);
if(self->UB != NULL){
mat_free(self->UB);
}
self->UB = B;
SCSendOK(pCon);
return 1;
}
/*---------------------------------------------------------------------*/
static int sendUBToHKL(SConnection * pCon, SicsInterp * pSics,
pHKL hkl, MATRIX UB)
@@ -551,6 +587,8 @@ int UBCalcWrapper(SConnection * pCon, SicsInterp * pSics, void *pData,
return sendUBToHKL(pCon, pSics, self->hkl, self->UB);
} else if (strcmp(argv[1], "index") == 0) {
return findIndex(self, pCon, pSics, argc, argv);
} else if (strcmp(argv[1], "fromcell") == 0) {
return UBFromCell(self, pCon);
} else {
if (argc > 2) {
return setUBCalcParameters(self, pCon, argv[1], argv[2]);