mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 13:27:14 +02:00
some bugs in the analysis solved
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@710 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -12,7 +12,7 @@ postProcessingFuncs::postProcessingFuncs(int *nModules,int *chPerMod,int modMask
|
|||||||
|
|
||||||
int postProcessingFuncs::initDataset() {
|
int postProcessingFuncs::initDataset() {
|
||||||
|
|
||||||
// cout << "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA init dataset " << endl;
|
cout << "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA init dataset " << endl;
|
||||||
|
|
||||||
if (nBins) {
|
if (nBins) {
|
||||||
mp=new double[nBins];
|
mp=new double[nBins];
|
||||||
@ -34,7 +34,7 @@ int postProcessingFuncs::initDataset() {
|
|||||||
|
|
||||||
int postProcessingFuncs::finalizeDataset(double *ang, double *val, double *err, int *np) {
|
int postProcessingFuncs::finalizeDataset(double *ang, double *val, double *err, int *np) {
|
||||||
|
|
||||||
// cout << "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA finalize dataset " << endl;
|
cout << "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA finalize dataset " << endl;
|
||||||
|
|
||||||
if (nBins)
|
if (nBins)
|
||||||
*np=finalizeMerging(mp,mv,me,mm,nBins);
|
*np=finalizeMerging(mp,mv,me,mm,nBins);
|
||||||
@ -62,15 +62,27 @@ int postProcessingFuncs::finalizeDataset(double *ang, double *val, double *err,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// cout << "delete mp " <<endl;
|
||||||
if (mp)
|
if (mp) {
|
||||||
delete [] mp;
|
delete [] mp;
|
||||||
if (mv)
|
mp=NULL;
|
||||||
|
}
|
||||||
|
// cout << "delete mv " <<endl;
|
||||||
|
if (mv) {
|
||||||
delete [] mv;
|
delete [] mv;
|
||||||
if (me)
|
mv=NULL;
|
||||||
|
}
|
||||||
|
// cout << "delete me " <<endl;
|
||||||
|
if (me) {
|
||||||
delete [] me;
|
delete [] me;
|
||||||
if (mm)
|
me=NULL;
|
||||||
|
}
|
||||||
|
// cout << "delete mm " <<endl;
|
||||||
|
if (mm) {
|
||||||
delete [] mm;
|
delete [] mm;
|
||||||
|
mm=NULL;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -536,6 +548,7 @@ int postProcessingFuncs::calculateFlatField(int* nModules, int *chPerMod, int *m
|
|||||||
cout << "done " << endl;
|
cout << "done " << endl;
|
||||||
|
|
||||||
delete [] xmed;
|
delete [] xmed;
|
||||||
|
xmed=NULL;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -421,7 +421,7 @@ void singlePhotonFilter::findHits(){
|
|||||||
int clusterIndex;
|
int clusterIndex;
|
||||||
// single_photon_hit *hit;
|
// single_photon_hit *hit;
|
||||||
|
|
||||||
double clusterData[nClusterX*nClusterY];// = hit.data;
|
double *clusterData;//[nClusterX*nClusterY];// = hit.data;
|
||||||
double sigmarms;
|
double sigmarms;
|
||||||
double clusterrms;
|
double clusterrms;
|
||||||
double clusterped;
|
double clusterped;
|
||||||
|
@ -25,8 +25,8 @@ class single_photon_hit {
|
|||||||
~single_photon_hit(){delete [] data;};
|
~single_photon_hit(){delete [] data;};
|
||||||
void write(FILE *myFile) {fwrite((void*)this, 1, 3*sizeof(int)+2*sizeof(double), myFile); fwrite((void*)data, 1, dx*dy*sizeof(double), myFile);};
|
void write(FILE *myFile) {fwrite((void*)this, 1, 3*sizeof(int)+2*sizeof(double), myFile); fwrite((void*)data, 1, dx*dy*sizeof(double), myFile);};
|
||||||
void read(FILE *myFile) {fread((void*)this, 1, 3*sizeof(int)+2*sizeof(double), myFile); fread((void*)data, 1, dx*dy*sizeof(double), myFile);};
|
void read(FILE *myFile) {fread((void*)this, 1, 3*sizeof(int)+2*sizeof(double), myFile); fread((void*)data, 1, dx*dy*sizeof(double), myFile);};
|
||||||
void set_data(double v, int ix, int iy=0){data[(iy+ny/2)*nx+ix+nx/2]=v;};
|
void set_data(double v, int ix, int iy=0){data[(iy+dy/2)*dx+ix+dx/2]=v;};
|
||||||
double get_data(int ix, int iy=0){return data[(iy+ny/2)*nx+ix+nx/2];};
|
double get_data(int ix, int iy=0){return data[(iy+dy/2)*dx+ix+dx/2];};
|
||||||
|
|
||||||
|
|
||||||
int x; /**< x-coordinate of the center of hit */
|
int x; /**< x-coordinate of the center of hit */
|
||||||
|
Reference in New Issue
Block a user