Changed everywhere from float to double, even mythenDetectorServer and the standalone files

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@206 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2012-08-02 12:58:08 +00:00
parent 3795dcedfe
commit 5aebcd4888
47 changed files with 615 additions and 611 deletions

View File

@ -21,8 +21,8 @@ postProcessing::postProcessing(){
int postProcessing::flatFieldCorrect(float datain, float errin, float &dataout, float &errout, float ffcoefficient, float fferr){
float e;
int postProcessing::flatFieldCorrect(double datain, double errin, double &dataout, double &errout, double ffcoefficient, double fferr){
double e;
dataout=datain*ffcoefficient;
@ -40,10 +40,10 @@ int postProcessing::flatFieldCorrect(float datain, float errin, float &dataout,
};
int postProcessing::rateCorrect(float datain, float errin, float &dataout, float &errout, float tau, float t){
int postProcessing::rateCorrect(double datain, double errin, double &dataout, double &errout, double tau, double t){
// float data;
float e;
// double data;
double e;
dataout=(datain*exp(tau*datain/t));
@ -139,7 +139,7 @@ int postProcessing::setBadChannelCorrection(ifstream &infile, int &nbad, int *ba
void postProcessing::processFrame(int *myData, int delflag) {
string fname;
// float *fdata=NULL;
// double *fdata=NULL;
incrementProgress();
@ -182,7 +182,7 @@ if(*correctionMask&(1<<WRITE_FILE))
void postProcessing::doProcessing(float *lfdata, int delflag, string fname) {
void postProcessing::doProcessing(double *lfdata, int delflag, string fname) {
// /** write raw data file */
@ -193,9 +193,9 @@ void postProcessing::doProcessing(float *lfdata, int delflag, string fname) {
float *rcdata=NULL, *rcerr=NULL;
float *ffcdata=NULL, *ffcerr=NULL;
float *ang=NULL;
double *rcdata=NULL, *rcerr=NULL;
double *ffcdata=NULL, *ffcerr=NULL;
double *ang=NULL;
// int imod;
int np;
//string fname;
@ -207,8 +207,8 @@ void postProcessing::doProcessing(float *lfdata, int delflag, string fname) {
/** rate correction */
if (*correctionMask&(1<<RATE_CORRECTION)) {
rcdata=new float[getTotalNumberOfChannels()];
rcerr=new float[getTotalNumberOfChannels()];
rcdata=new double[getTotalNumberOfChannels()];
rcerr=new double[getTotalNumberOfChannels()];
rateCorrect(lfdata,NULL,rcdata,rcerr);
delete [] lfdata;
} else {
@ -222,8 +222,8 @@ void postProcessing::doProcessing(float *lfdata, int delflag, string fname) {
/** flat field correction */
if (*correctionMask&(1<<FLAT_FIELD_CORRECTION)) {
ffcdata=new float[getTotalNumberOfChannels()];
ffcerr=new float[getTotalNumberOfChannels()];
ffcdata=new double[getTotalNumberOfChannels()];
ffcerr=new double[getTotalNumberOfChannels()];
flatFieldCorrect(rcdata,rcerr,ffcdata,ffcerr);
delete [] rcdata;
rcdata=NULL;
@ -425,8 +425,8 @@ int postProcessing::fillBadChannelMask() {
#ifdef VERBOSE
cout << "deleting bad channel mask beacuse no bad channel correction is selected" << endl;
#endif
if (badChannelMask) delete [] badChannelMask;
badChannelMask=NULL;
//delete [] badChannelMask;
//badChannelMask=NULL;
}
}