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

Basic camera simulation #105

Merged
merged 8 commits into from
Nov 26, 2024
Merged

Conversation

viljarjf
Copy link
Contributor

Start work towards #104

Simple implementation of crystals dispersed on a grid. Tested a lot manually, by moving around on the simulated TEM, but the automatic tests are not too expansive.
Example image and corresponding diffraction pattern:
image
image

And zoomed in to a single crystal:
image
image

With this crystal:
image

There is a lot to do still, as evidenced by the many TODO-comments everywhere, but this is a start at least.

I'll do a follow-up PR with small refactoring for the simulation-TEM and camera to use this new simulation. I left them untouched in this PR to reduce the scope. At the moment, to know the microscope parameters, the camera keeps track of the TEM instance in the same way that the TEMControl object does. Kind of hacky, I like the suggested implementation in #104 (comment) better.

@viljarjf viljarjf requested a review from stefsmeets November 26, 2024 11:22
Copy link
Member

@stefsmeets stefsmeets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, looks good to me. Played around a bit myself and works as advertised 😁

My main problem with the code is the circular dependency (camera->ctrl->camera). I'm happy if this is fixed in a follow-up PR.

@stefsmeets stefsmeets merged commit f9cf3f7 into instamatic-dev:main Nov 26, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants