postprocessing based on external functions - can work with f90 interface

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@285 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
bergamaschi
2012-10-08 09:34:14 +00:00
parent e5c5b76236
commit 05181fa618
27 changed files with 1291 additions and 864 deletions

View File

@ -23,26 +23,25 @@ int externPostProcessing::InitDataset(int *nModules,int *chPerMod,int moduleMask
{
init_dataset(nModules,chPerMod,moduleMask,badChans,ffcoeff,fferr,tDead,angRadius,angOffset,angCentre,totalOffset,binSize,sampleX,sampleY);
return 0;
}
int externPostProcessing::finalizeDataset(double ang[], double val[], double err[])
int externPostProcessing::finalizeDataset(double ang[], double val[], double err[], int *np)
{
cout<<"Finalize Dataset"<<endl;
return 0;
finalize_dataset(ang, val, err, np);
return 0;
};
int addFrame(double data[], double *pos, double *IO, double expTime, const char *filename, int *var=0)
int addFrame(double data[], double *pos, double *IO, double *expTime, const char *filename, int *var)
{
cout<<"Do Processing"<<endl;
return 0;
add_frame(data, pos, i0, expTime, filename, var);
return 0;
};
int calculateFlatField(int* nModules, int badChannelMask[], double ffData[], double ffCoeff[], double ffErr[])
int calculateFlatField(int* nModules, int *chPerMod, int modMask[], int badChanMask[], double data[], double ffCoeff[], double ffErr[])
{
cout<<"Outputs Flat Field Coefficient and errors from the input data"<<endl;
return 0;
calculate_flat_field(nModules, chPerMod, modMask, badChanMask, data, ffCoeff, ffErr);
return 0;
};

View File

@ -3,10 +3,6 @@
#include "detectorData.h"
#include "sls_detector_defs.h"
#include "slsDetectorBase_Standalone.h"
#include <string>
@ -34,13 +30,10 @@ void calculate_flat_field(int *nMod, int *chPerMod, int *modMask,int *badChanMas
class externPostProcessing : public virtual slsDetectorBase1
class externPostProcessing
{
public:
externPostProcessing(){};
virtual ~externPostProcessing(){};
@ -50,11 +43,11 @@ class externPostProcessing : public virtual slsDetectorBase1
int finalizeDataset(double ang[], double val[], double err[]);
static int finalizeDataset(double ang[], double val[], double err[], int *np);
int addFrame(double data[], double *pos, double *IO, double expTime, const char *filename, int *var=0);
static int addFrame(double data[], double *pos, double *IO, double expTime, const char *filename, int *var=0);
int calculateFlatField(int* nModules, int badChannelMask[], double ffData[], double ffCoeff[], double ffErr[]);
static int calculateFlatField(int* nModules, int *chPerMod, int moduleMask[], int badChannelMask[], double ffData[], double ffCoeff[], double ffErr[]);

View File

@ -106,10 +106,10 @@ end subroutine finalizedataset
subroutine addframe(data, pos, i0, fname, var) bind(c, name='add_frame')
subroutine addframe(data, pos, i0, exptime, fname, var) bind(c, name='add_frame')
IMPLICIT NONE
real(C_DOUBLE), intent(IN) :: data(totalnumberofchannels)
real(C_DOUBLE), intent(IN) :: pos, i0, var
real(C_DOUBLE), intent(IN) :: pos, i0, exptime, var
character(kind=c_char), dimension(*), intent(IN) :: fname
integer :: l
integer :: i
@ -132,6 +132,9 @@ print*,pos
print*,'I0: '
print*,i0
print*,'Exposure time: '
print*,exptime
print*,'Var: '
print*,var