- Added a protocol to spuuoprt the FOCUS Pfeiffer vacuum protocol

- Changed floor() to round() in sanslirebin
- Some changes to accomodate the new run/drive behaviour
- Added the the sps bipa command
This commit is contained in:
koennecke
2009-04-17 12:54:16 +00:00
parent 6a0449ac95
commit 28bee49727
12 changed files with 157 additions and 12 deletions

View File

@ -58,7 +58,19 @@ static int loadCorrectionData(SConnection * pCon, double *xPos,
fclose(fd);
return 1;
}
/*---------------------------------------------------------------------------*/
static double sansround(double d)
{
double frac, low;
low = floor(d);
frac = d - low;
if(frac > .5){
return low +1;
} else {
return low;
}
}
/*---------------------------------------------------------------------------*/
int SansliRebin(SConnection * pCon, SicsInterp * pSics, void *pData,
int argc, char *argv[])
@ -146,7 +158,7 @@ int SansliRebin(SConnection * pCon, SicsInterp * pSics, void *pData,
doubleCounts = (double) totalCounts;
for (ix = 0; ix < 128 * 128; ix++, pos++) {
if (corrSum > .01) {
val = floor(dataset->u.dPtr[ix] * doubleCounts / corrSum);
val = sansround(dataset->u.dPtr[ix] * doubleCounts / corrSum);
} else {
val = .0;
}