dataReady called

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@288 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
bergamaschi
2012-10-10 08:12:42 +00:00
parent 7f8f89f89d
commit b75b09cc7b
10 changed files with 160 additions and 58 deletions

View File

@ -657,6 +657,8 @@ int slsDetector::initializeDetectorSize(detectorType type) {
flatFieldFile=thisDetector->flatFieldFile;
badChanFile=thisDetector->badChanFile;
timerValue=thisDetector->timerValue;
expTime=&timerValue[ACQUISITION_TIME];
currentSettings=&thisDetector->currentSettings;
currentThresholdEV=&thisDetector->currentThresholdEV;
filePath=thisDetector->filePath;
@ -4087,8 +4089,9 @@ int slsDetector::setFlatFieldCorrection(string fname)
chpm[im]=getChansPerMod(im);
mMask[im]=im;
}
fillModuleMask(mMask);
if ((postProcessingFuncs::calculateFlatField(&nm, chpm, mMask, badChannelMask, data, ffcoefficients, fferrors))) {
if ((postProcessingFuncs::calculateFlatField(&nm, chpm, mMask, badChannelMask, data, ffcoefficients, fferrors))>=0) {
strcpy(thisDetector->flatFieldFile,fname.c_str());
@ -4107,7 +4110,13 @@ int slsDetector::setFlatFieldCorrection(string fname)
}
int slsDetector::fillModuleMask(int *mM){
if (mM)
for (int i=0; i<getNMods(); i++)
mM[i]=i;
return getNMods();
}
int slsDetector::setFlatFieldCorrection(double *corr, double *ecorr) {

View File

@ -1452,8 +1452,7 @@ typedef struct sharedSlsDetector {
/returns OK
*/
int updateReceiver();
int fillModuleMask(int *mM);
protected:

View File

@ -33,7 +33,6 @@ slsDetectorUtils::slsDetectorUtils() {
cout << "done " << endl;
#endif
expTime=timerValue+ACQUISITION_TIME;
};
@ -62,7 +61,7 @@ void slsDetectorUtils::acquire(int delflag){
if ((*correctionMask&(1<< ANGULAR_CONVERSION)) || (*correctionMask&(1<< I0_NORMALIZATION)) || getActionMode(angCalLog) || (getScanMode(0)==positionScan)|| (getScanMode(0)==positionScan)) {
if ((*correctionMask&(1<< ANGULAR_CONVERSION)) || (*correctionMask&(1<< I0_NORMALIZATION)) || getActionMode(angCalLog) || (getScanMode(0)==positionScan)|| (getScanMode(1)==positionScan)) {
if (connectChannels==0)
if (connect_channels) {
connect_channels(CCarg);
@ -176,8 +175,10 @@ void slsDetectorUtils::acquire(int delflag){
} else
break;
pthread_mutex_lock(&mp);
createFileName();
pthread_mutex_unlock(&mp);
if (*stoppedFlag==0) {
executeAction(scriptBefore);