/SOMM

Code for systematically optimized miniaturized microscope

Primary LanguagePython

A Systematically Optimized Miniaturized Mesoscope (SOMM) for large-scale calcium imaging in freely moving mice

Code and meterials for systematically optimized miniaturized mesoscope (SOMM)

Imaging modality Purpose

πŸ“‹ Table of content

  1. Overview
  2. DOE optimization
    1. Prepare environment
    2. Generate Zernike polynomals
    3. Generate NAOMi samples
    4. Run the optimization
  3. Mechanical and electrical part details
    1. Realistic widefield capture generation
    2. Background removal network training
    3. Soft PCB design
  4. Processing code
    1. Deconvolution
    2. DeepWonder
  5. Contact
    1. Citation
    2. Email

πŸ“š Overview

Interrogating neural circuits in freely behaving mammals is poised to shed a light on the neuronal systems dynamics underlying complex naturalistic behaviors. However, optical recording of neuronal activity in freely behaving animals has remained limited to a small scale and is vulnerable to motion-induced focus drifting. Here, we present a systematically optimized miniaturized mesoscope (SOMM), a widefield, head-mounted fluorescent mesoscope that overcomes these obstacles and allows imaging during free behavior at mesoscopic field-of-view, single-cell resolution, with uniform illumination, and robust axial accessibility. Powered by compact diffractive optics and associated computational algorithms, SOMM can capture neuronal network activity within a field-of-view of 3.6 × 3.6 mm¬2 at 4 ¡m resolution and at up to 16 Hz in the cortex of freely moving mice, with great defocus tolerance across 300 ¡m and a weight of less than 2.5 g. Using SOMM, we recorded large-scale population activity during social interactions, cross-region neuronal activity evoked by visual and electrical stimuli, and neurovascular coupling in dual-color, all at single-cell spatial resolution and physiologically relevant temporal resolution

⏳ DOE optimization

In this part we introduce the DOE optimization in SOMM.

πŸ’‘ Environment

  • Ubuntu 16.04
  • Python 3.6
  • tnesorflow = 1.14
  • NVIDIA GPU (24 GB Memory) + CUDA

πŸ’‘ Generate zernike polynomials

  • run DOE_optimization\gen_zernike_polynomial.m to generate Zernike basis for optimization

πŸ’‘ Generate NAOMi samples for training

πŸ’‘ Run optimization for DOE

  • Run main_LFOV_DOE_train.py to train a DOE and corresponding decovnolution algorithm for large FOV capability and depth robustness. Optical parameters should be corresondingly modified for different systems.
  • The output phase would

πŸ” Mechanical part details

πŸ’‘ SOMM

  • The mechanical design for single-color SOMM can be found in Mechanical\SOMM folder. Require Solidworks >= v.2022.

πŸ’‘ Dual-color SOMM

  • The mechanical design for dual-color SOMM can be found in Mechanical\Dual_Color_SOMM folder. Require Solidworks >= v.2022.

πŸ’‘ Soft PCB design

  • The soft PCB design for dual-color SOMM can be found in TODO folder. Require Solidworks >= v.2022.

🀝 Processing code

πŸ“ Deconvolution

  • We use L2 regularized deconvolution for each patches. A demo data and demo script can be found in Processing\Deconvolution.

πŸ“ DeepWonder

  • We use DeepWonder for extracting neuronal spatial and temporal profiles from deconvolved videos. The full processing code can be found in Processing\DeepWonder. A standalone readme containing environment setup and running instruments can be found in Processing\DeepWonder\readme.md

🀝 Contact

πŸ“ Citation

Yuanlong Zhang*, Lekang Yuan*, Jiamin Wu, Tobias NΓΆbauer, Rujin Zhang, Guihua Xiao, Mingrui Wang, Hao Xie, Qionghai Dai‑, and Alipasha Vaziri‑, "A Systematically Optimized Miniaturized Mesoscope (SOMM) for large-scale calcium imaging in freely moving mice", bioRxiv 2022.

πŸ“ Email

We are pleased to address any questions regarding the above tools through emails (yuanlongzhang94@gmail.com).