Skip to main content

Posts

Showing posts from April, 2018

Control of sCMOS cameras with Python

Running a sCMOS camera using a software with GUI is nice, but at some point I want to control the camera from Jupyter notebook, so that I can acquire images and analyse them on the same page of code. Unfortunately many camera manufacturers don't provide Python API (any of them do?). So the hard way would to ferret out camera's drivers (.dll files), figure out the names and arguments of functions, and write a home-made Python wrapper for a DLL file using ctypes, like I did for Thorlabs wavefront sensor . This is a way of tears and pain. Luckily, there is a silk road to the camera control. The API for many cameras and other instruments is already implemented in MicroManager, which also has a Python wrapper MMCorePy  around it! So, after quick and easy installation of the  MMCorePy,  Python code becomes simple and clean, with all heavy lifting done in MicroManager API running under the hood: