-
Notifications
You must be signed in to change notification settings - Fork 1
Extend support towards FEI Titan TEM and Titan-handled camera #4
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… be re-created locally
… be re-created locally 2
…due to multithreading...
…due to multithreading... 2
Member
Author
|
I don't think this repo has particularly many followers, but in case someone does follow it and would like to point to any issues or suggest any changes, I'll be waiting until the end of the weekend to merge this into main. From my perspective working on this branch in the last month on both Titan and Tecnai, it constitutes a straight-up upgrade. |
stefsmeets
approved these changes
Jan 15, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
documentation
Improvements or additions to documentation
enhancement
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduction
This PR constitutes a major rework of the original instamatic-tecnai-server, adding multiple new capabilities and features including new FEI hardware hooks in the interface, new camera support, separate camera server, improvements to the simulated TEM/CAM, handling of generators including movies (see Instamatic PR #154), addition of over 50 tests, addition of new config handling tools and config files. Some of the changes introduced requires polish (e.g. the tests were written for the old single-server design), but in overall this patch "doubles" the range of machines handled by this code. I believe in future it may be a good idea to expand this library further to allow for bare-bones Jeol microscope support, as suggested by @magnunor in instamatic issue #152.
Major changes
start.bat,tem_server.py,cam_server.py,tests.pyuseinstamaticServeras a module;Minor changes
Configclass to behave more similarly to itsinstamaticcounterpart;get_movie;prints; TEM and cam log to separate files; cam does not logevalto avoid spam;remote_movie.py: newRemoteMovielazy image generator (FEI camera works on a single thread only);settings.yaml: simplified by removing unused settingssimu_camera.py: added a rough simulated camera implementation to allow testing on cam-less setup;simu_microscope.py: extended range of supported methods, aligned withtecnaiTEM and its tests;utils/singleton.py: extractedSingletonclass now used in many places fromtecnai_microscope.py;Bugfixes
utils/config.py: fixed naming ambiguity and repeated (six times!) initialization.Documentation and code maintenance
a = None # type: int);README.md: adapted and expanded package description and documentation of its features;venvmisbehaves, addedstart.bathelp and commented boilerplate to elevate the issue;utils/config.py:configclass renamed toConfig, now init. once asconfig, replacing many_confs;tecnai_microscope.py: removed a bunch of comments repeated in calibration files' content;types.py: renamed fromtyping.pyto avoid import issue (see Instamatic #114 bug 2 discussion).I might be missing something but this is the general gist of it. This rework enables the server to interface an FEI Titan microscope (in addition to FEI Tecnai) and an FEI-Scripting-accessible camera. Funny enough, on the setup where this code was developed, the camera was handled by DM, DM accessed by FEI-Scripting, and I could only access the FEI layer. Some more context on the whole endeavour is available here.