Jungfrau server with changed ADC phase

This commit is contained in:
2014-12-19 14:28:41 +01:00
parent 94a73ecd45
commit 785f025d1b
7 changed files with 255 additions and 122 deletions

View File

@ -4384,6 +4384,23 @@ double* slsDetector::decodeData(int *datain, double *fdata) {
int ipos=0, ichan=0, ibyte;
if (thisDetector->timerValue[PROBES_NUMBER]==0) {
if (thisDetector->myDetectorType==JUNGFRAUCTB) {
for (ichan=0; ichan<nch; ichan++) {
// dataout[ichan]=0;
ival=0;
// for (ibyte=0; ibyte<2; ibyte++) {
ibyte=0;
iptr=ptr[ichan*2+ibyte];
ival|=((iptr<<(ibyte*bytesize))&(0xff<<(ibyte*bytesize)));
ibyte=1;
iptr=ptr[ichan*2+ibyte];
ival|=((iptr<<(ibyte*bytesize))&(0x3f<<(ibyte*bytesize)));
// }
dataout[ichan]=ival;
}
} else {
switch (nbits) {
case 1:
for (ibyte=0; ibyte<thisDetector->dataBytes; ibyte++) {
@ -4430,6 +4447,7 @@ double* slsDetector::decodeData(int *datain, double *fdata) {
dataout[ichan]=ival;
}
}
}
} else {
for (ichan=0; ichan<nch; ichan++) {
dataout[ichan]=datain[ichan];