Open dalekreitler-bnl opened 1 year ago
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.
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.
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: