- Many fixes to the four circle codes during taking the new code into
operation. - Fixed some missing output - Second generation histogram memory and velocity selector objects - Fixed a problem in diffscan
This commit is contained in:
38
singlex.c
38
singlex.c
@@ -26,6 +26,7 @@
|
||||
#include "singlenb.h"
|
||||
#include "singletas.h"
|
||||
#include "lld.h"
|
||||
#include "fourlib.h"
|
||||
|
||||
extern void InitSimpleIndex(SConnection * pCon, SicsInterp * pSics); /* from simindex.c */
|
||||
|
||||
@@ -425,7 +426,35 @@ static int SymRefCmd(pSICSOBJ self, SConnection * pCon, pHdb commandNode,
|
||||
SCWrite(pCon, "ERROR: no reachable symmetry equivalent found", eError);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
static int SttUBCmd(pSICSOBJ self, SConnection * pCon, pHdb commandNode,
|
||||
pHdb par[], int nPar)
|
||||
{
|
||||
double hkl[3], theta, d;
|
||||
MATRIX z1 = NULL;
|
||||
|
||||
if (nPar < 3) {
|
||||
SCWrite(pCon, "ERROR: need start h,k,l for sttUB", eError);
|
||||
return 0;
|
||||
}
|
||||
hkl[0] = par[0]->value.v.doubleValue;
|
||||
hkl[1] = par[1]->value.v.doubleValue;
|
||||
hkl[2] = par[2]->value.v.doubleValue;
|
||||
z1 = calculateScatteringVector(SXGetDiffractometer(), hkl);
|
||||
if(z1 == NULL){
|
||||
SCWrite(pCon,"ERROR: cannot calculate scattering vector", eError);
|
||||
return 0;
|
||||
}
|
||||
if(!calcTheta(SXGetLambda(), z1, &d, &theta )){
|
||||
mat_free(z1);
|
||||
SCWrite(pCon,"ERROR: cannot calculate theta", eError);
|
||||
return 0;
|
||||
}
|
||||
mat_free(z1);
|
||||
SCPrintf(pCon,eValue,"%f", 2.*theta);
|
||||
|
||||
return 1;
|
||||
}
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
static int SingleXAction(SConnection * pCon, SicsInterp * pSics,
|
||||
void *data, int argc, char *argv[])
|
||||
@@ -599,6 +628,13 @@ int MakeSingleX(SConnection * pCon, SicsInterp * pSics,
|
||||
AddSICSHdbPar(cmd, "k", usUser, MakeHdbInt(0));
|
||||
AddSICSHdbPar(cmd, "l", usUser, MakeHdbInt(0));
|
||||
|
||||
cmd =
|
||||
AddSICSHdbPar(pNew->objectNode, "sttub", usUser,
|
||||
MakeSICSFunc(SttUBCmd));
|
||||
AddSICSHdbPar(cmd, "h", usUser, MakeHdbFloat(.0));
|
||||
AddSICSHdbPar(cmd, "k", usUser, MakeHdbFloat(.0));
|
||||
AddSICSHdbPar(cmd, "l", usUser, MakeHdbFloat(.0));
|
||||
|
||||
cmd =
|
||||
AddSICSHdbPar(pNew->objectNode, "peaksearch", usUser,
|
||||
makeHdbValue(HIPNONE, 1));
|
||||
|
||||
Reference in New Issue
Block a user