in between moench stuff

This commit is contained in:
Dhanya Maliakal
2017-11-20 14:23:32 +01:00
parent c5c23e73d5
commit 99037449f4
6 changed files with 24 additions and 17 deletions

View File

@ -714,17 +714,24 @@ int slsDetector::initializeDetectorSize(detectorType type) {
thisDetector->timerValue[CYCLES_NUMBER]=1;
thisDetector->timerValue[SAMPLES_JCTB]=1;
// calculating databytes (special when with gap pixels, jctb, mythen in 24bit mode or using probes)
thisDetector->dataBytes=thisDetector->nMod[X]*thisDetector->nMod[Y]*thisDetector->nChips*thisDetector->nChans*thisDetector->dynamicRange/8;
thisDetector->dataBytesInclGapPixels = getTotalNumberOfChannelsInclGapPixels(X)*getTotalNumberOfChannelsInclGapPixels(Y) * thisDetector->dynamicRange/8;
thisDetector->dataBytesInclGapPixels =
(thisDetector->nMod[X] * thisDetector->nChips[X] * thisDetector->nChans[X] + thisDetector->gappixels * thisDetector->nGappixels[X]) *
(thisDetector->nMod[Y] * thisDetector->nChips[Y] * thisDetector->nChans[Y] + thisDetector->gappixels * thisDetector->nGappixels[Y]) *
thisDetector->dynamicRange/8;
if(thisDetector->myDetectorType==JUNGFRAUCTB) {
getTotalNumberOfChannels();
// thisDetector->dataBytes=getTotalNumberOfChannels()*thisDetector->dynamicRange/8*thisDetector->timerValue[SAMPLES_JCTB];
if(thisDetector->myDetectorType==JUNGFRAUCTB){
getTotalNumberOfChannels(); // recalculates nchans and databytes
thisDetector->dataBytesInclGapPixels = thisDetector->dataBytes;
}
if(thisDetector->myDetectorType==MYTHEN){
else if(thisDetector->myDetectorType==MYTHEN){
if (thisDetector->dynamicRange==24 || thisDetector->timerValue[PROBES_NUMBER]>0) {
thisDetector->dataBytes=thisDetector->nMod[X]*thisDetector->nMod[Y]*thisDetector->nChips*thisDetector->nChans*4;
thisDetector->dataBytesInclGapPixels = getTotalNumberOfChannelsInclGapPixels(X)*getTotalNumberOfChannelsInclGapPixels(Y) * thisDetector->nChans*4;
thisDetector->dataBytesInclGapPixels =
(thisDetector->nMod[X] * thisDetector->nChips[X] * thisDetector->nChans[X] + thisDetector->gappixels * thisDetector->nGappixels[X]) *
(thisDetector->nMod[Y] * thisDetector->nChips[Y] * thisDetector->nChans[Y] + thisDetector->gappixels * thisDetector->nGappixels[Y]) *
4;
}
}

View File

@ -114,7 +114,7 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
int nModMax[2];
/** maximum number of modules (nModMax[X]*nModMax[Y]) \see nModMax */
int nModsMax;
/** number of channels per chip */
/** number of channels per chip (used mainly in databytes calculation) */
int nChans;
/** number of channels per chip in one direction */
int nChan[2];
@ -664,7 +664,7 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
/** Returns the number of modules in direction d (without connecting to the detector) */
int getNMod(dimension d){return thisDetector->nMod[d];}; //
int getChansPerMod(int imod=0){return thisDetector->nChans*thisDetector->nChips;};
int getChansPerMod(int imod=0){return thisDetector->nChan[X]*thisDetector->nChan[Y]*thisDetector->nChips;};
int getChansPerMod( dimension d,int imod=0){return thisDetector->nChan[d]*thisDetector->nChip[d];};