Skip to content
Control software for mesoSPIM microscopes
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Code and documentation for the mesoSPIM light-sheet microscope software. The documentation of the microscope hardware information can be found here.


The Swiss mesoSPIM is a versatile light-sheet microscope for imaging cleared tissue samples. It is compatible with all major clearing approaches - including CLARITY - and optimized for quickly creating large-field-of-view overview datasets of whole mouse brains.



  • Windows 7 or Windows 10
  • Python >3.6

Device drivers


mesoSPIM-control is usually running with Anaconda using a >3.6 Python. For a clean python install, the following packages are necessary (part of Anaconda):

  • csv
  • traceback
  • pprint
  • numpy
  • scipy
  • ctypes
  • importlib
  • PyQt5

In addition (for Anaconda), the following packages need to be installed:

  • nidaqmx (python -m pip install nidaqmx)
  • indexed (python -m pip install
  • serial (python -m pip install pyserial)
  • pyqtgraph (python -m pip install pyqtgraph)
  • pywinusb (python -m pip install pywinusb)
  • PIPython (part of the Physik Instrumente software collection. Unzip it, cd to the directory with the Anaconda terminal as an admin user, then install with python install. Test install with test installation with import pipython)

Preparing python bindings for device drivers

  • For PI stages, copy C:\ProgramData\PI\GCSTranslator\PI_GCS2_DLL_x64.dll in the main mesoSPIM folder: PI_GCS2_DLL_x64.dll
  • For Galil stages, copy into mesoSPIM/src/devices/stages/galil/gclib/
  • For zoom control via dynamixel servos, copy the dynamixel Python file into mesoSPIM/src/devices/zoom/dynamixel/

Prepare a configuration file and wire the NI DAQ

The configuration files are in the config directory. The "demo" files have some devices replaced with dummy devices for testing purposes. You can start with one of those if you wish or proceed directly to a non-demo config file. Choose one of the ZMB config files as appropriate and work through each section, filling it out for your hardware:

  • You can rename your DAQ devices in NI MAX to match the names in the config file (PXI6259 and PXI6733).
  • The master_trigger_out_line should be connected to the line which serves as the trigger source for the camera and the galvo/etl task. At time of writing that means the master trigger out (PXI6259/port0/line1) should be connected to PXI6259/PFI0.
  • On Toptica lasers, analog line 1 is the longest wavelength and line 4 is the shortest wavelength. Use BNC T connectors to split each analog output line to both lasers.
  • You will need to set the ThorLabs shutter controllers to run on TTL input mode.

Run the software.


After launch, it will prompt you for a configuration file. Please choose a file with demo devices (e.g. DemoStage) for testing.

Documentation for users

For instructions on how to use mesoSPIM-control, please check out the documentation here.

You can’t perform that action at this time.