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

Make rotation axis alignment plan more robust under varied lighting #13

Open
dalekreitler-bnl opened this issue Feb 20, 2023 · 2 comments
Assignees

Comments

@dalekreitler-bnl
Copy link
Contributor

Rotation axis alignment plan occasionally fails to determine the true rotation axis and requires 2-3 attempts to bring the cross hairs into +/- 2 um of true rotation axis. This failure may be due to new lighting conditions around the sample position following installation of front light, holey mirror realignment, microscope focus, or some combination of these factors.

A more robust algorithm is required, things to try:

  • Use canny edge -> contour detection instead of AD stats max pixels
  • take more measurements for least squares regression
  • fly scan pin position for focus scan
  • disable mpeg server during scan to avoid disrupting LSDC camera loops
@dalekreitler-bnl
Copy link
Contributor Author

This commit adds a custom function to ADCompVision for determining camera coordinates of an alignment pin tip. Input parameters are varied under hutch lighting conditions to minimize the variance in the y pixel signal, the pertinent output for rotation axis measurement.

Screenshot from 2023-02-26 15-07-53

Screenshot from 2023-02-26 14-54-58

@dalekreitler-bnl
Copy link
Contributor Author

Towards increasing the number of measurements. When acquiring multiple images occasionally an incoming acquire signal is missed by the camera resulting in a repeated read:

{'value': 260.0, 'timestamp': 1677435457.8841}
{'value': 256.0, 'timestamp': 1677435458.336215}
{'value': 256.0, 'timestamp': 1677435458.885434}
{'value': 260.0, 'timestamp': 1677435459.133155}
{'value': 256.0, 'timestamp': 1677435459.551832}
{'value': 259.0, 'timestamp': 1677435460.102981}
{'value': 260.0, 'timestamp': 1677435460.504927}
{'value': 260.0, 'timestamp': 1677435460.504927}

{'value': 260.0, 'timestamp': 1677435461.305329}

This effect seems worse in "Free Run" trigger mode and is somewhat mitigated by using "Fixed Rate" and increasing NumImages from 1->2. General strategy to minimize constantly rotating omega is to use the per_step argument for a scan and increase the number of measurements with the repeat plan_stub, except here we also will read the rotation motor position for linear regression.

@dalekreitler-bnl dalekreitler-bnl self-assigned this Feb 26, 2023
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

1 participant