mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-18 07:47:12 +02:00
fixed probelm with interpolation of rectangular pixels
This commit is contained in:
@ -195,11 +195,11 @@ class eta2InterpolationBase : public virtual etaInterpolationBase {
|
|||||||
ex=nbetaX-1;
|
ex=nbetaX-1;
|
||||||
}
|
}
|
||||||
if (ey<0) {
|
if (ey<0) {
|
||||||
cout << "y*"<< ey << endl;
|
cout << "y*"<< ey << " " << nbetaY << endl;
|
||||||
ey=0;
|
ey=0;
|
||||||
}
|
}
|
||||||
if (ey>=nbetaY) {
|
if (ey>=nbetaY) {
|
||||||
cout << "y?"<< ey << endl;
|
cout << "y?"<< ey << " " << nbetaY << endl;
|
||||||
ey=nbetaY-1;
|
ey=nbetaY-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ class etaInterpolationBase : public slsInterpolation {
|
|||||||
/* return 0; */
|
/* return 0; */
|
||||||
/* } */
|
/* } */
|
||||||
nbetaX=nnx;
|
nbetaX=nnx;
|
||||||
nbetaY=nnx;
|
nbetaY=nny;
|
||||||
if (gm) {
|
if (gm) {
|
||||||
if (heta) {
|
if (heta) {
|
||||||
delete [] heta;
|
delete [] heta;
|
||||||
|
@ -119,7 +119,7 @@ int main(int argc, char *argv[]) {
|
|||||||
#ifndef NOINTERPOLATION
|
#ifndef NOINTERPOLATION
|
||||||
cout << "read ff " << argv[2] << endl;
|
cout << "read ff " << argv[2] << endl;
|
||||||
sprintf(fname,"%s",argv[2]);
|
sprintf(fname,"%s",argv[2]);
|
||||||
interp->readFlatField(fname);
|
interp->readFlatField(fname, etamin, etamax);
|
||||||
interp->prepareInterpolation(ok);//, MAX_ITERATIONS);
|
interp->prepareInterpolation(ok);//, MAX_ITERATIONS);
|
||||||
#endif
|
#endif
|
||||||
// return 0;
|
// return 0;
|
||||||
@ -161,23 +161,20 @@ int main(int argc, char *argv[]) {
|
|||||||
totph++;
|
totph++;
|
||||||
if (lastframe!=cl.iframe) {
|
if (lastframe!=cl.iframe) {
|
||||||
lastframe=cl.iframe;
|
lastframe=cl.iframe;
|
||||||
// cout << cl.iframe << endl;
|
|
||||||
// f0=cl.iframe;
|
|
||||||
if (nframes==0) f0=lastframe;
|
if (nframes==0) f0=lastframe;
|
||||||
nframes++;
|
nframes++;
|
||||||
}
|
}
|
||||||
//quad=interp->calcQuad(cl.get_cluster(), sum, totquad, sDum);
|
|
||||||
quad=interp->calcEta(cl.get_cluster(), etax, etay, sum, totquad, sDum);
|
quad=interp->calcEta(cl.get_cluster(), etax, etay, sum, totquad, sDum);
|
||||||
if (sum>cmin && totquad/sum>0.8 && totquad/sum<1.2 && sum<cmax ) {
|
if (sum>cmin && totquad/sum>0.8 && totquad/sum<1.2 && sum<cmax ) {
|
||||||
nph++;
|
nph++;
|
||||||
// if (sum>200 && sum<580) {
|
// if (sum>200 && sum<580) {
|
||||||
// interp->getInterpolatedPosition(cl.x,cl.y, totquad,quad,cl.get_cluster(),int_x, int_y);
|
// interp->getInterpolatedPosition(cl.x,cl.y, totquad,quad,cl.get_cluster(),int_x, int_y);
|
||||||
// #ifdef SOLEIL
|
// #ifdef SOLEIL
|
||||||
// if (cl.x>210 && cl.x<240 && cl.y>210 && cl.y<240) {
|
// if (cl.x>210 && cl.x<240 && cl.y>210 && cl.y<240) {
|
||||||
// #endif
|
// #endif
|
||||||
#ifndef FF
|
#ifndef FF
|
||||||
// interp->getInterpolatedPosition(cl.x,cl.y, cl.get_cluster(),int_x, int_y);
|
// interp->getInterpolatedPosition(cl.x,cl.y, cl.get_cluster(),int_x, int_y);
|
||||||
interp->getInterpolatedPosition(cl.x,cl.y, etax, etay, quad,int_x, int_y);
|
interp->getInterpolatedPosition(cl.x,cl.y, etax, etay, quad,int_x, int_y);
|
||||||
// cout <<"**************"<< endl;
|
// cout <<"**************"<< endl;
|
||||||
// cout << cl.x << " " << cl.y << " " << sum << endl;
|
// cout << cl.x << " " << cl.y << " " << sum << endl;
|
||||||
// cl.print();
|
// cl.print();
|
||||||
|
Reference in New Issue
Block a user