-
Notifications
You must be signed in to change notification settings - Fork 31
Multi-tracking in FastADT experiment #145
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
base: main
Are you sure you want to change the base?
Conversation
…hese 3 lines took ~3h
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
… FastADT-track-multi
Alright, now I believe I addressed most of the things I wanted that take a reasonable time. I have mostly rewritten and generalized the code that runs FastADT experiment. The GUI shows much more information, and thanks to the new videostream processor, the tracking shows on image instead of on a line plot. I fixed multiple bugs, other than one that occurs when the oscillation angle is negative, which I will cover in a separate PR. |
# Conflicts: # src/instamatic/experiments/fast_adt/experiment.py
Currently, FastADT experiment supports manual tracking of one crystal. This can be performed by left-clicking at desired beam position on the images collected during a tracking scan. Tracking results are displayed on a 2-axis line plot and can be accepted by left-clicking or rejected by right-clicking.
This PR adds a QOL feature / quality improvement to FastADT. Firsty, the tracking results are now displayed as a colored dot on the tracking images using the
VideoStreamProcessor.temporary
context. The tracking can be likewise accepted or rejected OR a new tracking can be added using middle mouse button. Every new tracking is then done just like the first one, and the results of previous tracking are displayed using a large colored dot (different color for each tracking):Screen.Recording.2025-10-20.145950.mp4
With this feature, one tracking scan can be used to define tracking paths for several datasets to be collected one after another. This can be used to get several datasets from crystals laying in close proximity when repeating experiment on several samples or investigating different parts of one crystal.
This PR also includes several minor features, bug-fixes, and code quality improvements:
docs/gui/md
,gui/fast_adt_frame.py
: rename "tracking mode" to "tracking algo" for consistency;calibrate_beamshift.py
: fix the type hint forbeamshift_to_pixelcoord
andpixelcoord_to_beamshift
;calibrate_stage_rotation.py
: fixCalibStageRotation.plan_rotation
failing if rotating towards negative alpha;fast_adt/experiment.py
: middle mouse button can be used after tracking to add new one and run multiple experiments;fast_adt/experiment.py
: fixed bug where the tracking step was calculate incorrectly if it wasn't divisor of total range;fast_adt/experiment.py
: improved type hints, docs, and variable naming to be consistent with the rest of the codebase;fast_adt/experiment.py
: newdisplayed_step
context displays tracking on images as colored dots;fast_adt/experiment.py
: generalize stills and scanning experiments, add multiple new messages to the user;gui/click_dispatcher.py:MouseButton
: now a dataclass withSCROLL_UP
andSCROLL_DOWN
andxy
property;gui/fast_adt_frame.py
: Add the second message area that displays experiment status and estimates its runtime;utils/iterating.py
: new file for iterating tools with a newsawtooth
iterator:sawtool('abc') == 'abccbaabc...
;videostream.py
: add contextVideoStream.unblocked
to complementVideoStream.unblocked
.