mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 13:27:14 +02:00
solved bug with multidetector angular conversion
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@180 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -36,21 +36,40 @@ angularConversion::~angularConversion(){
|
||||
|
||||
|
||||
float* angularConversion::convertAngles(float pos) {
|
||||
int imod;
|
||||
int imod=0;
|
||||
float *ang=new float[getTotalNumberOfChannels()];
|
||||
float enc=pos;
|
||||
angleConversionConstant *p=NULL;
|
||||
|
||||
int ch0=0;
|
||||
int chlast=getChansPerMod(0);
|
||||
int nchmod=getChansPerMod(0);
|
||||
p=getAngularConversionPointer(imod);
|
||||
if (getMoveFlag(imod)==0)
|
||||
enc=0;
|
||||
else
|
||||
enc=pos;
|
||||
|
||||
for (int ip=0; ip<getTotalNumberOfChannels(); ip++) {
|
||||
imod=ip/(getChansPerMod(0)); // always for module 0?????
|
||||
p=getAngularConversionPointer(imod);
|
||||
|
||||
if (getMoveFlag(imod)==0)
|
||||
enc=0;
|
||||
else
|
||||
enc=pos;
|
||||
|
||||
#ifdef VERBOSE
|
||||
// cout << "ip " << ip << " ch0 " << ch0 << " chlast " << chlast << " imod " << imod << endl;
|
||||
#endif
|
||||
if (ip>=chlast) {
|
||||
imod++;
|
||||
p=getAngularConversionPointer(imod);
|
||||
if (getMoveFlag(imod)==0)
|
||||
enc=0;
|
||||
else
|
||||
enc=pos;
|
||||
|
||||
ch0=chlast;
|
||||
nchmod=getChansPerMod(imod);
|
||||
if (nchmod>0)
|
||||
chlast+=nchmod;
|
||||
}
|
||||
|
||||
if (p)
|
||||
ang[ip]=angle(ip%(getChansPerMod()), \
|
||||
ang[ip]=angle(ip-ch0, \
|
||||
enc, \
|
||||
(*fineOffset)+(*globalOffset), \
|
||||
p->r_conversion, \
|
||||
|
Reference in New Issue
Block a user