diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index 894988111..e3da61386 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -5846,6 +5846,8 @@ void multiSlsDetector::readFrameFromReceiver(){ int maxX = (bytesperchannel >= 1.0) ? thisMultiDetector->numberOfChannelInclGapPixels[X] : thisMultiDetector->numberOfChannel[X]; int maxY = (bytesperchannel >= 1.0) ? thisMultiDetector->numberOfChannelInclGapPixels[Y] : thisMultiDetector->numberOfChannel[Y]; int multidatabytes = (bytesperchannel >= 1.0) ? thisMultiDetector->dataBytesInclGapPixels : thisMultiDetector->dataBytes; + int dr = bytesperchannel * 8; + //getting multi values //calculating offsets (for eiger interleaving ports) @@ -5956,10 +5958,10 @@ void multiSlsDetector::readFrameFromReceiver(){ int nx = thisMultiDetector->numberOfChannelInclGapPixels[X]; int ny = thisMultiDetector->numberOfChannelInclGapPixels[Y]; int n = processImageWithGapPixels(multiframe, multigappixels); - thisData = new detectorData(NULL,NULL,NULL,getCurrentProgress(),currentFileName.c_str(), nx, ny,multigappixels, n); + thisData = new detectorData(NULL,NULL,NULL,getCurrentProgress(),currentFileName.c_str(), nx, ny,multigappixels, n, dr); } else { - thisData = new detectorData(NULL,NULL,NULL,getCurrentProgress(),currentFileName.c_str(),maxX,maxY,multiframe, multidatabytes); + thisData = new detectorData(NULL,NULL,NULL,getCurrentProgress(),currentFileName.c_str(),maxX,maxY,multiframe, multidatabytes, dr); } dataReady(thisData, currentFrameIndex, currentSubFrameIndex, pCallbackArg); delete thisData; diff --git a/slsDetectorSoftware/slsDetectorAnalysis/detectorData.h b/slsDetectorSoftware/slsDetectorAnalysis/detectorData.h index 8e5c8a07d..9f5313bef 100644 --- a/slsDetectorSoftware/slsDetectorAnalysis/detectorData.h +++ b/slsDetectorSoftware/slsDetectorAnalysis/detectorData.h @@ -9,16 +9,18 @@ class detectorData { public: /** @short The constructor - \param val pointer to the data + \param val pointer to the data in double data type(valid only for MYTHEN) \param err pointer to errors \param ang pointer to the angles \param f_ind file index \param fname file name to which the data are saved - \param np number of points in x coordinate defaults to the number of detector channels (1D detector) - \param ny dimension in y (1D detector) - \param gval pointer to gain data (for jungfrau) + \param np number of points in x coordinate defaults to the number of detector channels (1D detector) or dimension in x (2D detector) + \param ny dimension in y (2D detector) + \param cval pointer to data in char* format (valid only for non MYTHEN detectors) + \param dbytes number of bytes of image pointed to by cval pointer (valid only for non MYTHEN detectors) + \param dr dynamic range or bits per pixel (valid only for non MYTHEN detectors) */ - detectorData(double *val=NULL, double *err=NULL, double *ang=NULL, double p_ind=-1, const char *fname="", int np=-1, int ny=1, char *cval=NULL, int dbytes=0) : values(val), errors(err), angles(ang), progressIndex(p_ind), npoints(np), npy(ny), cvalues(cval), databytes(dbytes), dgainvalues(NULL) { + detectorData(double *val=NULL, double *err=NULL, double *ang=NULL, double f_ind=-1, const char *fname="", int np=-1, int ny=1, char *cval=NULL, int dbytes=0, int dr=0) : values(val), errors(err), angles(ang), progressIndex(f_ind), npoints(np), npy(ny), cvalues(cval), databytes(dbytes), dynamicRange(dr), dgainvalues(NULL) { strcpy(fileName,fname); }; @@ -29,15 +31,16 @@ class detectorData { */ ~detectorData() {if (values) delete [] values; if (errors) delete [] errors; if (angles) delete [] angles; if(dgainvalues) delete [] dgainvalues;}; //private: - double *values; /**< @short pointer to the data as double array */ + double *values; /**< @short pointer to the data as double array (MYTHEN only) */ double *errors; /**< @short pointer to the errors */ double *angles;/**< @short pointer to the angles (NULL if no angular conversion) */ double progressIndex;/**< @short file index */ char fileName[1000];/**< @short file name */ int npoints;/**< @short number of points */ int npy;/**< @short dimensions in y coordinate*/ - char* cvalues; /**< @short pointer to the data as char arary */ + char* cvalues; /**< @short pointer to the data as char arary (non MYTHEN detectors) */ int databytes; /**< @short number of bytes of data. Used with cvalues */ + int dynamicRange; /**< @short dynamic range */ double* dgainvalues; /**< @short pointer to gain data as double array */ };