instamatic-dev / instamatic

Python program for automated electron diffraction data collection
https://instamatic.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
56 stars 25 forks source link

Adding support for MerlinEM Medipix3 detector #62

Closed magnunor closed 1 year ago

magnunor commented 1 year ago

We're planning on starting to utilize Instamatic for automating parts of our TEM workflows, which includes MerlinEM detectors. So at some point in the future (not sure exactly when) we'll have a pull request which includes remote control of the Quantum Detector MerlinEM detectors via the TCP/IP API.

This will most likely be via incorporating the code from my old library Merlin Interface, which I can relicense to work with Instamatic's license.

At first this will most likely be just the control part, without getting data.

stefsmeets commented 1 year ago

Hi @magnunor great to hear you are interested in contributing some code to instamatic! Merlin support is definitely something that would be great to have. I have been in contact with Quantum Detectors over the last couple of weeks to support the Merlin detector for the data collection part. So I think our efforts will be quite complementary :-)

GearoidM commented 1 year ago

Hi @stefsmeets, I noticed another branch for the Merlin. We will be getting a Merlin soon, and we would certainly like to test Instamatic on our system. Have you tested the new software with a Merlin detector?

stefsmeets commented 1 year ago

Hi @GearoidM , glad to hear you want to test instamatic on your system.

The Merlin interface is currently still work in progress. I'm testing it with a development unit I have access to provided by QD. So far I can read data from the detector, but I still need to do a lot of work to optimize the interface and make sure it is stable with different settings.

I hope that by the end of the month I have something functional. When it's ready for testing I'll make sure to give you a signal. Of course, don't let that stop you if you want to play with the code a bit earlier :-)

GearoidM commented 1 year ago

Thanks for the update! We'll be getting a Merlin with from QD in a few weeks, so I will test it then! I had a chance to set up Instamatic on our microscope using a simulated camera this week. I have some issues that I will raise in another post, but very excited to get it working with the Merlin.

magnunor commented 1 year ago

@stefsmeets, I noticed the merlin branch. Could you make a pull request with this branch? To make it easier to collaborate on the changes. I think I could include some of the code from https://gitlab.com/fast_pixelated_detectors/merlin_interface directly, after relicensing it to BSD.

stefsmeets commented 1 year ago

Yeah, I can do that later this week. I may also merge to main directly to have a baseline to work from.

stefsmeets commented 1 year ago

I just merged preliminary support for the merlin detector in #65

It's still early stages (see limitations in the PR 😅), but the interface at least works well.

magnunor commented 1 year ago

Nice! I'll try to have a look at this sometime in June, but not 100% sure. In any case, I'll have some students working on this from the autumn.

stefsmeets commented 1 year ago

The merlin interface is working and seems to be quite stable. So I think this issue can be closed. Feel free to re-open or make a new issue if you run into any issues with testing.