-
Notifications
You must be signed in to change notification settings - Fork 30
Bugfixes to support FEI Titan microscope and camera #154
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
Conversation
stefsmeets
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, glad to hear you got it working on the Titan and that the workshop was a success =)
Just one comment from my side, add a link to https://sites.google.com/view/instamatic-on-titan/index in the docs (sidebar or installation page would be a good place), or consider copying the entire page to the instamatic docs as an application note.
|
@stefsmeets The workshop is in March, but I decided to visit earlier just in case to set up everything beforehand. I will think how to integrate the website with documentation: I made it mostly for workshop participants, and some information repeats with docs, but I'll likely just identify and put new stuff (e.g. configuration with remote detector or how to work if your detector has 0.5 s delay) in the docs. Afterwards I will merge it immediately as this PR includes bugfix + docs only. |
Last week I had the pleasure to visit Tatiana Gorelik from Ernst Ruska-Center where, with great support of Alex Clausen, I patched Instamatic and Instamatic-Tecnai-Server to fully support their FEI Titan 80-300 STEM with a built-in Gatan Ultrascan camera. The camera was particularly "interesting": being handled by Digital Micrograph software and accessible via the FEI comtypes interface, it boasts a massive 0.5 second delay (with binning 4). This was a real test for many Instamatic systems, in particular the cRED frames: I found the original cRED to work decently with RMB beam control (#151), while FastADT really required the movie delay calibration (#137). Ultimately, only two features were not supported nicely.
Firstly, in #143 I added support for streamable cameras. This was mainly to allow emulating TEM and camera in a separate process on the same computer (see also #104, #140, #141, and instamatic-TEM-emulator. However, I found that extending this support to truly remote cameras is not particularly demanding. In particular, the only thing that is currently missing is a proper generator support for
get_movie: this I suggest adding using the following mechanism: whenever a server were to return a generator, it returns generator ID instead. Then, whenever a client attempts to yield from or close this generator, a request with generator ID and__gen_next__or__gen_close__attribute is sent.The second fix introduced here is a fix for annotating an image if the image binsize is different than 1. I never found this issue because we always use binning = 1 on our camera, but for the Gatan ultrascan we had to use binsize = 4 because anything significantly increased delay and caused socket communication issues. With this patch, images in the GUI are properly annotated whenever default_binning is different than 1.
This PR will be briefly followed by PR instamatic-tecnai-server#4 that will introduce tests and optional separate camera server. To read more about configuring a Titan machine, check out this website.