napari generic SIMulator


A simple plugin to use with napari to simulate raw image stacks in Structured illumination microscopy (SIM) with napari.

    License BSD-3 PyPI Python Version tests codecov napari hub

    A napari plugin to simulate raw-image stacks of Structured illumination microscopy (SIM) with light sheet.

    The simulation is originally based on the paper GPU-accelerated real-time reconstruction in Python of three-dimensional datasets from structured illumination microscopy with hexagonal patterns by Hai Gong, Wenjun Guo and Mark A. A. Neil (

    The calculation can be GPU-accelerated if the CUPY (tested with cupy 8.3.0) is installed. In addition, the TORCH package can complete the acceleration both on CPU if TORCH is installed, and on GPU if TORCH is compiled with the CUDA (tested with torch v1.12.0+cu116) enabled.

    Currently applies to:

    • conventional 2-beam SIM data with 3 angles and 3 phases
    • 3-beam hexagonal SIM data with 7 phases, as described in the paper
    • 3-beam hexagonal SIM data with 7 phases at right-angles

    This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.


    You can install napari-generic-SIMulator via pip:

    pip install napari-generic-SIMulator

    To install latest development version :

    pip install git+


    1. Open napari and create the viewer.

    2. Launch the widget in Plugin raw raw

    3. Adjust the parameters in the widget and calculate the raw-image stack. raw

    4. The sum, psf and otf can be showed. Note the all of these correspond the generated raw-image stack, so keep the parameters the same before showing the sum (or psf and otf). raw

    5. The raw image stacks can be then processed by napari-sim-processor (


    Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.


    Distributed under the terms of the BSD-3 license, "napari-generic-SIMulator" is free and open source software


    If you encounter any problems, please file an issue along with a detailed description.


    • 0.0.19

    Last updated:

    • 17 January 2023

    First released:

    • 30 June 2022


    • BSD-3-Clause

    Supported data:

    • Information not submitted

    Plugin type:

    GitHub activity:

    • Stars: 1
    • Forks: 0
    • Issues + PRs: 3

    Python versions supported:

    Operating system:


    • numpy
    • magicgui
    • qtpy
    • tifffile

    Sign up to receive updates