- 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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user