Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Origin keyword foes nothing for planar detectors #575

Open
saransh13 opened this issue Nov 7, 2023 · 2 comments
Open

Origin keyword foes nothing for planar detectors #575

saransh13 opened this issue Nov 7, 2023 · 2 comments
Assignees

Comments

@saransh13
Copy link
Member

For the planar_detector.pixel_angles function, passing the origin keyword does not change the results at all.

@saransh13 saransh13 self-assigned this Nov 7, 2023
@ZackAttack614
Copy link
Collaborator

@donald-e-boyce do you have any insight into this? This is related to the tVec_c variable in the detectorXYToGvec function, in old_xfcapi.

@donald-e-boyce
Copy link
Collaborator

Not really sure at this point. Trying to track it down led me to the old_capi C code. Digging down, I see tvec_c gets used in detectorXYToGvec_cfunc in setting up the tvec_1 argument. So it should do something, but I don't really understand how the python interface is set up though for the old C-API.

One comment though: in the gvec_to_xy, the input gvec is in crystal components, while in xy_to_gvec, the output gvec is in lab components and doesn't take rmat_c the crystal rotation, but it does take tvec_c the crystal translation. It needs to know the beam source, so tvec-c should make a difference.

  /* Compute shift vector */
  for (j=0; j<3; j++) {
    tVec1[j] = tVec_d[j]-tVec_s[j];
    for (k=0; k<3; k++) {
      tVec1[j] -= rMat_s[3*j+k]*tVec_c[k];
    }
  }

  for (i=0; i<npts; i++) {
        detectorXYToGVecOne_cfunc(xy+2*i, rMat_d, rMat_e, tVec1, bVec, tTh + i, eta + i, gVec_l + 3*i);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants