All Projects → QI2lab → mcSIM

QI2lab / mcSIM

Licence: GPL-3.0 license
Code for running a multicolor structured illumination microscopy (SIM) experiment using a DLP6500 digital micromirror device (DMD) and performing SIM reconstruction.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to mcSIM

PyAbel
A python package for Abel and inverse Abel transforms
Stars: ✭ 74 (+289.47%)
Mutual labels:  physics, imaging
Berry
Berry is a simple Tiled Map Loader for Corona SDK.
Stars: ✭ 16 (-15.79%)
Mutual labels:  physics
SlicerRadiomics
A Slicer extension to provide a GUI around pyradiomics
Stars: ✭ 83 (+336.84%)
Mutual labels:  imaging
FunwithScience
No description or website provided.
Stars: ✭ 127 (+568.42%)
Mutual labels:  physics
cannon-es-debugger
Wireframe debugger for use with cannon-es https://github.com/react-spring/cannon-es
Stars: ✭ 69 (+263.16%)
Mutual labels:  physics
yii2-wizflow
The wizard UI pattern implemented using yii2-workflow
Stars: ✭ 14 (-26.32%)
Mutual labels:  experiment
spark-ar-physics
A helper module for connecting Spark AR with physics libraries
Stars: ✭ 28 (+47.37%)
Mutual labels:  physics
SpinMonteCarlo.jl
Markov chain Monte Carlo solver for lattice spin systems implemented by Julialang
Stars: ✭ 35 (+84.21%)
Mutual labels:  physics
Statistics-Notes
Personal notes on statistics with a focus on applications to experimental high energy physics
Stars: ✭ 19 (+0%)
Mutual labels:  physics
console-web-ui
Examples to show case how to build web based UI (that can be invoked using curl) for console applications using Javascript(NodeJS)
Stars: ✭ 28 (+47.37%)
Mutual labels:  experiment
mxfactorial
a payment application intended for deployment by the united states treasury
Stars: ✭ 36 (+89.47%)
Mutual labels:  physics
pyqentangle
Quantum Entanglement in Python
Stars: ✭ 16 (-15.79%)
Mutual labels:  physics
MarbleBlast
A web port of Marble Blast Gold and Marble Blast Platinum.
Stars: ✭ 71 (+273.68%)
Mutual labels:  physics
DynamicalBilliards.jl
An easy-to-use, modular, extendable and absurdly fast Julia package for dynamical billiards in two dimensions.
Stars: ✭ 97 (+410.53%)
Mutual labels:  physics
miepy
Python module to solve Maxwell's equations for a cluster of particles using the generalized multiparticle Mie theory (GMMT)
Stars: ✭ 24 (+26.32%)
Mutual labels:  physics
encounter
Remaking the classic C64 game in WebGL.
Stars: ✭ 45 (+136.84%)
Mutual labels:  physics
leaps
🎥 Declarative Vue.js animations library, spring-physics based.
Stars: ✭ 53 (+178.95%)
Mutual labels:  physics
MRQy
MRQy is a quality assurance and checking tool for quantitative assessment of magnetic resonance imaging (MRI) data.
Stars: ✭ 58 (+205.26%)
Mutual labels:  imaging
VariantRetriever
VariantRetriever is a minimalist package for feature flagging
Stars: ✭ 23 (+21.05%)
Mutual labels:  experiment
fkMigration.jl
A Julia project demonstrating the fast f-k migration algorithm.
Stars: ✭ 64 (+236.84%)
Mutual labels:  imaging

preprint paper website Github commit

multicolor DMD-SIM

This repository contains code for designing, analyzing, and carrying out multicolor structured illumination microscopy experiments based on a digital micromirror device (DMD-SIM), including DMD simulation code, DMD pattern generation, SIM reconstruction and instrument control. It also includes a number of useful utilities for simulating the resulting diffraction pattern given certain DMD patterns, determining system point-spread functions and optical transfer functions, and determining the affine transformation between the DMD coordinates and the imaging space coordinates. The various files are described in more detail below.

This repository is associated with the Biomedical Optics Express paper Multicolor structured illumination microscopy and quantitative control of polychromatic light with a digital micromirror device and the BioRxiv preprint. The repository state at the time of publication is archived here, or available as a release on GitHub.

The best way to use this python package is to install it with pip

git clone https://github.com/QI2lab/mcSIM.git
cd mcSIM
pip install .

If you would like to edit the code, then install using the -e options,

git clone https://github.com/QI2lab/mcSIM.git
cd mcSIM
pip install -e .

The dependencies for the experimental control code are not installed by default because the DMD control code relies on the windows specific pywinusb. To install these dependencies run

git clone https://github.com/QI2lab/mcSIM.git
cd mcSIM
pip install .[expt_ctrl]

Some functions can be optionally run on a GPU. If this is desired, ensure your python environment has the appropriate version of CuPy installed

Analysis and simulation code

sim_reconstruction.py

Code for reconstructing SIM images from raw data using a Gustafsson/Wiener filter style reconstruction. Several different reconstruction options are available, largely following either the approach of openSIM or fairSIM. To get started with reconstructing SIM data, see the example script reconstruct_sim.py.

simulate_dmd.py

Code for simulating the diffraction patterns produced by the DMD. Various scripts illustrating the usage of this code can be found in the examples directory. This simulation code has many useful features, including an analytic solution for the joint blaze/diffraction condition, pattern simulation tools, tools for extracting the intensity pattern in the Fourier plane of a collecting lens, etc.

dmd_patterns.py

This file can be used to generate multicolor SIM patterns and other useful calibrations patterns for the DMD. It also contains many tools for working with the basis vector/unit cell representation of DMD patterns. This allows a complete enumeration of DMD diffraction orders in a compact and computationally efficient form.

fit_dmd_affine.py

Code to fit the affine transformation between the DMD coordinates and camera coordinates using imaging data from a DMD pattern consisting of many small points. These code relies on tools for working with affine transformations found here

otf_tools.py

Code for extracting optical transfer function from measurement of the strength of various Fourier peaks for a given SIM DMD pattern.

psd.py

Code for doing the periodic/smooth image decomposition, an alternative to apodization for the Fourier transform. This code is taken from https://github.com/jacobkimmel/ps_decomp (with permission), and included here for convenience.

analysis_tools.py

Miscellaneous image processing tools

mm_io.py

Tools for IO of MicroManager style tif files and metadata.

localize-psf

Useful tools for automatically localizing sparse fluorescent beads and performing both 2D and 3D PSF fitting using various PSF models. Also provides useful statistics and figures summarizing the results. This code has now been split out into a separate repository. For more information about these tools, see the readme pip installing the mcsim repository as described above will also pull in these dependncies.

Examples

Scripts illustrated examples of different DMD simulations and analysis are stored in examples. Associated data is located in examples/data

Hardware control code

expt_ctrl/dlp6500.py

Code for controlling the DLP6500 DMD over USB on Windows. This code was initially based on the approaches of Lightcrafter6500DMDControl and Pycrafter6500.

expt_ctrl/set_dmd_sim.py

This is the script used to define pattern sequences on the DMD using patterns which have been previously loaded onto the firmware using the Texas Instruments DLP6500 and DLP9000 GUI. It is a command line interface to dlp6500.py, and it is used by run_sim_triggerscop.bsh.

expt_ctrl/run_sim_triggerscop.bsh

A beanshell script which can be run from MicroManager 2.0 Gamma to acquire SIM data using dlp6500.py to set the DMD patterns (assuming they have already been loaded into the DMD firmware as described above). This script programs a Triggerscope 3B, which then provides the analog and digital voltages required to run the rest of the experiment. The camera free runs as the master clock, triggering the Triggerscope. We use a customized version of the Triggerscope firmware V601.

This script supports collecting multidimensional data with the axis order xy-position/time/z-position/channel/SIM pattern. It also supports time-lapse imaging with arbitrary wait time.

This code was initially developed with Micro-Manager 2.0.0-gamma1 20200514, MMCore Version 10.1.0, Device API version 69, Module API version 10. But for more recent development we are using Micro-Manager 2.0.0-gamma1 20210516, MMCore Version 10.1.1, Device API version 70, Module API version 10.

expt_ctrl/SIM.cfg

MicroManager configuration file describing the equipment and settings used in the experiment.

Instrument design

Mechanical drawings of some parts used in the setup are included in the parts directory. For a more complete description of the setup and a parts list, see the published paper linked above. See in particular the parts list

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].