Cleaned up ANSTO code to merge with sinqdev.sics
This is our new RELEASE-4_0 branch which was taken from ansto/93d9a7c Conflicts: .gitignore SICSmain.c asynnet.c confvirtualmot.c counter.c devexec.c drive.c event.h exebuf.c exeman.c histmem.c interface.h motor.c motorlist.c motorsec.c multicounter.c napi.c napi.h napi4.c network.c nwatch.c nxscript.c nxxml.c nxxml.h ofac.c reflist.c scan.c sicshipadaba.c sicsobj.c site_ansto/docs/Copyright.txt site_ansto/instrument/lyrebird/config/tasmad/sicscommon/nxsupport.tcl site_ansto/instrument/lyrebird/config/tasmad/taspub_sics/tasscript.tcl statusfile.c tasdrive.c tasub.c tasub.h tasublib.c tasublib.h
This commit is contained in:
25
fourmess.c
25
fourmess.c
@@ -753,11 +753,11 @@ static int GenInconsumerate(pSICSOBJ self, SConnection * pCon,
|
||||
{
|
||||
double hkl[3], qvec[3];
|
||||
pFourMess priv = self->pPrivate;
|
||||
int i, j;
|
||||
int i, j, iGen = 0, startCount;
|
||||
|
||||
if (nPar < 3) {
|
||||
SCWrite(pCon,
|
||||
"ERROR: need q displacement vector with three compononts",
|
||||
"ERROR: need q displacement vector with three components",
|
||||
eError);
|
||||
return 0;
|
||||
}
|
||||
@@ -765,31 +765,32 @@ static int GenInconsumerate(pSICSOBJ self, SConnection * pCon,
|
||||
qvec[1] = par[1]->value.v.doubleValue;
|
||||
qvec[2] = par[2]->value.v.doubleValue;
|
||||
|
||||
for (i = 0; i < priv->masterCount; i++) {
|
||||
startCount = priv->masterCount;
|
||||
for (i = 0; i < startCount; i++) {
|
||||
GetRefIndex(priv->messList, i, hkl);
|
||||
if(ABS(hkl[0])+ABS(hkl[1])+ABS(hkl[2]) < .3){
|
||||
/*
|
||||
* Stop generation for 0,0,0,
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
for (j = 0; j < 3; j++) {
|
||||
hkl[j] += qvec[j];
|
||||
}
|
||||
AddRefIdx(priv->messList, hkl);
|
||||
iGen++;
|
||||
GetRefIndex(priv->messList, i, hkl);
|
||||
for (j = 0; j < 3; j++) {
|
||||
hkl[j] -= qvec[j];
|
||||
}
|
||||
AddRefIdx(priv->messList, hkl);
|
||||
if(FindHKL(priv->messList, hkl[0], hkl[1], hkl[2]) == NULL){
|
||||
AddRefIdx(priv->messList, hkl);
|
||||
iGen++;
|
||||
}
|
||||
if(SCGetInterrupt(pCon) != eContinue){
|
||||
SCWrite(pCon,"ERROR: generating incommensurate reflections aborted", eError);
|
||||
return 0;
|
||||
}
|
||||
if( (i % 50) == 0 ){
|
||||
SCPrintf(pCon,eLog, "%d of %d input reflections processed", i, startCount);
|
||||
}
|
||||
}
|
||||
SCPrintf(pCon, eValue,
|
||||
"%d additional inconsumerate reflections generated",
|
||||
priv->masterCount*2);
|
||||
"%d additional inconsumerate reflections generated", iGen);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user