microeye

A python toolkit for fluorescence microscopy.

https://github.com/samhitech/microeye

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 15 DOI reference(s) in README
  • Academic publication links
    Links to: frontiersin.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.3%) to scientific vocabulary

Scientific Fields

Mathematics Computer Science - 38% confidence
Last synced: 6 months ago · JSON representation ·

Repository

A python toolkit for fluorescence microscopy.

Basic Info
  • Host: GitHub
  • Owner: samhitech
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 26.5 MB
Statistics
  • Stars: 22
  • Watchers: 3
  • Forks: 7
  • Open Issues: 0
  • Releases: 0
Created over 4 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

The microEye

microEye

The microEye is a Python toolkit for fluorescence microscopy that supports super-resolution single-molecule localization microscopy and single-particle tracking. It features hardware control, data analysis, and visualization.

This toolkit is compatible with the hardware used in our microscope. For further details, refer to the miEye microscope paper and OSF project.

```bash


/ |/ ()_________ / /_ ___ _ |_ | |_ / < /_ / / /|/ / / _/ _/ _ \/ _// // / -) | |/ / _/ / <_ / //_ < // ///_/_/ _//_, /_/ |/()()// /_/ ```

Package Health Python Version Package Version Package Version DOI Package Version Package Version Package Version Downloads

Contributors GitHub Last Commit Maintenance

GitHub Issues GitHub Bugs GitHub Feature Requests GitHub Pull Requests

GitHub Forks GitHub Stars

Table of Contents

How to Install microEye

  1. Install Python:

Download and install the latest Python ≥3.9 stable release.

  1. Install microEye package:

Open a terminal and execute the following command to install microEye using pip:

powershell pip install microEye --upgrade

Or for a specific version:

powershell pip install microEye==version

  1. Install required packages: (Optional)

Download the requirements.txt file. Navigate to the directory containing the requirements file in your terminal and run:

powershell pip install -r requirements.txt

Note: This step is optional as dependecies are installed with the package.

  1. Install specific hardware drivers: (Optional)
  • For Integrated Optics: Download and install Laser control software.
  • For IDS uEye CMOS cameras: Install IDS Software Suite 4.96.1 for Windows 32/64-bit.
  • For Allied Vision CMOS cameras: Install Vimba SDK 5.0 or 6.0 outside the Program Files. Navigate to the directory containing setup.py and run:

    powershell python -m pip install .

  • For Thorlabs CMOS cameras: Install Thorcam in its default directory. Note: Some Thorlabs cameras may be identified as IDS uEye cameras by Windows and may run without Thorcam.

  • For Thorlabs hardware, install Kinesis® Software and Elliptec™ Software.

  1. Open a terminal and execute microEye: :partying_face:

```powershell usage: microEye.exe [-h] [--module MODULE] [--QTAPI QTAPI] [--theme THEME]

optional arguments: -h, --help show this help message and exit --module {mieye,viewer} The module to launch [mieye|viewer], If not specified, launcher is executed. --QTAPI {PySide6,PyQT6,PyQt5} Select QT API [PySide6|PyQT6|PyQt5], If not specified, the environment variable QTAPI is used. --theme {None,qdarktheme,qdarkstyle,...} The theme of the app, if not specified, the environment variable MITHEME is used. ```

Note: Ensure all necessary drivers are installed for microEye to function properly.

Troubleshooting Installation

If you encounter any issues during the installation process, please check the following:

  • Ensure that you have the latest version of Python installed (≥3.9).
  • Try installing the required packages repeating step (2) or individually using pip install <package_name>.
  • Check the system requirements for specific hardware drivers and follow the installation instructions provided by the manufacturers.
  • Refer to the project's issue tracker on GitHub for any known installation issues and solutions.

If the issue persists, feel free to open a new issue on the project's GitHub repository, providing detailed information about the problem and any error messages you encountered.

microEye Launcher

The microEye Launcher allows you to launch either the miEye Module or the Viewer Module, and provides options to select the Qt API and theme for the application.

Launcher Screenshot

Usage

Upon running the launcher, you will be presented with the following interface:

  • miEye Module: Launches the miEye module for microscope control and acquisition.
  • Viewer Module: Launches the viewer module for image/data anlysis and visualization.
  • QT API (dropdown): Select the Qt API to use. Options are PySide6, PyQt6, or PyQt5.
  • Theme (dropdown): Select the theme for the application. Options are None (default), qdarktheme, or qdarkstyle.

To launch a module, simply click on the respective button (miEye Module or Viewer Module). If you wish to change the Qt API or theme, select the desired option from the dropdown menus before launching.

Modules

The miEye Module

The miEye_module provides the primary graphical user interface (GUI) for microscope control and data acquisition, combining the functionalities of the deprecated Acquisition and Control modules.

| miEye module (NOT UP TO DATE) | Acquisition Camera | | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | | miEye | CamStack |

How to use:

To launch the miEye module, run the following command:

powershell microEye --module mieye

Experiment Designer (Beta)

Experiment Designer (Beta)

The Experiment Designer is a new feature within the miEye Module that allows users to create and manage complex acquisition protocols through a graphical interface.

Key features include:

  • GUI-based design of acquisition protocols;
  • Support for loops and device parameter adjustments/actions;
  • Export and import capabilities for protocols;
  • Threaded execution with pause functionality;
  • Configurable delays between protocol steps
  • Context menu for easy adjustments
  • Nested protocol structure
  • Acquisition action wait option
  • Cell reordering and deletion via keyboard shortcuts
  • Real-time execution progress view

To access the Experiment Designer:

  1. Launch the miEye module.
  2. Look for the Experiment Designer (Protocols) view in the interface.

Note: This feature is currently in beta. We value your feedback to enhance its functionality and improve the user experience.

The Multi Viewer Module

The multi_viewer Module is an improved GUI that replaces the deprecated tiff_viewer module. It allows users to process multiple files and provides data analysis and visualization tools for super-resolution single-molecule localization microscopy and single-particle tracking.

| Raw Data | Localizations | | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | | imagesStack | locStack |

How to use:

To launch the Multi Viewer module, run the following command:

powershell microEye --module viewer

Uses Packages

The microEye uses the following Python packages:

| Data Analysis and Visualization | GUI and UI Development | Code Quality and Formatting | Image and Video Processing | File and Data Storage | Other Utilities | Microscopy | | :-----------------------------: | :--------------------: | :-------------------------: | :------------------------: | :-------------------: | :-------------: | :----------: | | dask | PySide6 | autopep8 | opencv-python | ome-types | hidapi | pycromanager | | matplotlib | pyqtdarktheme | pyflakes | | tables | pyfiglet | | | numba | pyqtgraph | | | zarr | pyserial | | | numpy | QDarkStyle | | | | pyjokes | | | pandas | QScintilla | | | | setuptools | | | scikit-image | PyQt5 (optional) | | | | tabulate | | | scikit_learn | PyQt6 (optional) | | | | pyueye | | | scipy | | | | | tqdm | | | tifffile | | | | | | | | h5py | | | | | | | | pco | | | | | | | | | | | | | | | | PyOpenGL | | | | | | |

Note: VimbaPython is included in Vimba SDK and needs to be installed manually.

Microscope Scheme

Schematic overview of the miEye instrument:

  • A) Single-Mode Fiber (SMF): Excitation path for TIRF-, HILO-, and Epi-mode.
  • B) Multi-Mode Fiber (MMF): Excitation path for Epi-mode when imaging MMF output on the sample plane.
  • C) Fluorescence Emission: Path for fluorescence emission.
  • D) Automatic Focus Stabilization: the automatic focus stabilization path using an IR laser in TIRF setting.

| Scheme 1 | Scheme 2 | | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | Quad Scheme | Scheme GIT |

Key Components: AC: Achromat lens, AS: Aspheric lens, BFP: Back-focal plane, TL: Tube lens, B: B-coated N-BK7 optics, BS: Beamsplitter.

Hardware

Supported Cameras

| Camera | Description | Link | | :-----------------------: | ------------------------------------------------------------------------ | :-----------------------------------------------------------------------------------------------------------: | | IDS uEye UI-3060CP Rev. 2 | IDS industrial-grade CMOS cameras | Product Link | | Thorlabs DCC1545M | DCx camera using UC480 driver | Product Link | | Allied Vision Alvium 1800 | Allied Vision industrial-grade CMOS cameras (U-158m, U-511m) | Product Link | | Excelitas PCO sCMOS | Excelitas pco.edge 4.2 LT USB sCMOS Camera | Product Link | | Pycro-camera | Access to cameras via Micro-Manager drivers/adapters using Pycro-Manager | - |

Additional Hardware

| Hardware | Description | Link | | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Integrated Optics MatchBox | Multi-wavelength Laser Combiner, Single Laser MatchBox | Products Link | | Piezo Concept FOC | Nanopositioner for microscope objectives | Piezo Concept FOC | | Thorlabs Elliptec ELL6/ELL9/ELL12 | Dual/Four/Six-Position Slider | ELL6, ELL9, ELL12 | | Thorlabs Elliptec ELL14 | Rotation Mount: SM1 Threaded | ELL14 | | Thorlabs Elliptec ELL20 | Linear Stage: 60 mm Travel | ELL20 | | Thorlabs KDC101 | Kinesis Controller for Z825B/Z925B actuators (Activate USB VCP to access the COM port in device manager) | KDC101 | | Parallax TSL1401-DB (#28317) | Linescan Camera Module | Parallax TSL1401-DB | | RelayBox Arduino | For laser control using camera GPIO signals | RelayBox | | miEye OSF Project Parts List | Parts list of miEye OSF Project | Repo Link |

Pycro-Manager Integration

Integration with Pycro-Manager is now implemented, providing support for managing headless instances and Core instances. This allows for seamless control and configuration of hardware devices through the Pycro-Manager framework.

Features

  • Headless Manager: Manage multiple headless Micro-Manager instances (JavaBackend), including starting, stopping, and saving configurations.
  • Core Instances Manager: Handle multiple PycroCore instances for device communication and control.

Integrated Hardware

The following table lists the hardware devices that are integrated and supported by the miEye module:

| Device | Description | | :----: | ------------------------------------------------------------------------------------------- | | Camera | Access Micro-Manager cameras (mainly done for focus stabilization). | | ZStage | Access Micro-Manager Z-stage devices for focus stabilization and axial positioning control. |

How to Use

  1. Headless Manager:
  • Open the miEye_module and navigate to Tools -> Micro-Manager Headless Manager in the main menu.
  • Start a new headless instance using a specific configuration file.
  • Stop individual running instances or terminate all instances simultaneously.
  • Save configurations for future use or load previously saved configurations for headless instances.
  1. Core Instances:
  • Open the miEye_module and navigate to Tools -> Micro-Manager Core Bridges in the main menu.
  • Click on Add Core Bridge and provide the port address in the dialog box.
  • A list of connected devices will be displayed, allowing you to view each device's properties.
  • Close the window and refresh the camera list to access Pycro-Manager cameras.

    Accessing other types of devices is under development!

Note: Currently, only acquisition has been tested with the developed PycroPanel. Full implementation of focus stabilization is planned for future updates by implementing further stage-related widgets.

pycromanager integration

Authors

Mohammad Nour Alsamsam, PhD student @ Vilnius University.

Twitter URL

People Involved

PhD supervision: Dr. Marijonas Tutkus

Twitter URL

Sample preparation, experiments and testing:

Acknowledgement

Research and access to intruments and samples is credited to:

  • Vilnius University, Lithuania.
  • Center For Physical Sciences and Technology, Vilnius, Lithuania.
  • Research Council of Lithuania.

Special thanks to the following projects and libraries that make this work possible:

  • SMAP/fit3Dcspline: The original code, provided as a part of the Ries group SMAP software. The pyfit3Dcspline module in our project is a Python adaptation of this functionality, offering both CPU and GPU accelerated fitting of Single-Molecule Localization Microscopy (SMLM) data. For more details, refer to the pyfit3Dcspline README.

  • ACCéNT: a partial implementation of the photon free calibration within the acquisition pipeline which generates pixel-wise mean and variance images.

Robin Diekmann, Joran Deschamps, Yiming Li, Aline Tschanz, Maurice Kahnwald, Ulf Matti, Jonas Ries, "Photon-free (s)CMOS camera characterization for artifact reduction in high- and super-resolution microscopy", bioRxiv 2021.04.16.440125. doi: 2021.04.16.440125

  • Phasor Fit: We have implemented the 2D phasor fitting algorithm in Python for fast pre-fitting visualization of localizations.

K.J.A. Martens, A.N. Bader, S. Baas, B. Rieger, J. Hohlbein. "Phasor based single-molecule localization microscopy in 3D (pSMLM-3D): an algorithm for MHz localization rates using standard CPUs," bioRxiv, 2017. DOI: 10.1101/191957.

  • Endesfelder Lab/SMLMComputational: A numba accelerated adaptation of Drift Correction, Fourier Ring Correlation (FRC) structural resolution and Nearest Neighbour Analysis (NeNA) for localization precision from Endesfelder Lab.

Raw data to results: a hands-on introduction and overview of computational analysis for single-molecule localization microscopy", Martens et al., (2022), Frontiers in Bioinformatics. Paper

  • TARDIS (Temporal Analysis of Relative Distances): We have developed a partial Python implementation of TARDIS without fitting for now. For more information, refer to the TARDIS software releases. The underlying algorithms and scientific details of TARDIS are detailed in the manuscript: > Martens et al., “Temporal analysis of relative distances (TARDIS) is a robust, parameter-free alternative to single-particle tracking”, Nature Methods (2024). Article

Note: I'm committed to maintaining an accurate acknowledgment list for our project. However, if I inadvertently miss acknowledging your work, please don't hesitate to reach out to us. I appreciate your understanding, and I'm doing my best to manage all acknowledgments amidst my other responsibilities.

I make it a standard practice to cite and provide credit within a function's docstring whenever I draw inspiration from any external reference.

Citation

If you find our work or software helpful in your research or project, we kindly request that you cite it appropriately. Here is the suggested citation format:

M.N. Alsamsam, A. Kopūstas, M. Jurevičiūtė, and M. Tutkus, “The miEye: Bench-top super-resolution microscope with cost-effective equipment,” HardwareX 12, e00368 (2022). Paper

Additionally, we would appreciate it if you could provide a link to our GitHub repository or any relevant publication associated with the software.

Alsamsam, M. N. microEye, https://github.com/samhitech/microEye [Computer software]

Thank you for your support!

Owner

  • Name: Nour
  • Login: samhitech
  • Kind: user
  • Location: Lithuania

Citation (CITATION.cff)

cff-version: 1.2.0
title: microEye
message: 'If you use this software, please cite it as below.'
type: software
authors:
  - given-names: Mohammad Nour
    family-names: Alsamsam
    orcid: 'https://orcid.org/0000-0001-6998-9468'
identifiers:
  - type: url
    value: 'https://github.com/samhitech/microEye'
    description: Github repository

GitHub Events

Total
  • Watch event: 4
  • Push event: 14
  • Create event: 15
Last Year
  • Watch event: 4
  • Push event: 14
  • Create event: 15

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 104
  • Total Committers: 2
  • Avg Commits per committer: 52.0
  • Development Distribution Score (DDS): 0.029
Top Committers
Name Email Commits
Nour 8****h@u****m 101
marijonasT m****s@g****m 3

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 2
  • Total pull requests: 4
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 1 minute
  • Total issue authors: 2
  • Total pull request authors: 2
  • Average comments per issue: 2.5
  • Average comments per pull request: 0.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 minute
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • tayfun91 (1)
  • beniroquai (1)
Pull Request Authors
  • samhitech (4)
  • marijonasT (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 475 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 62
  • Total maintainers: 1
pypi.org: microeye

A python toolkit for fluorescence microscopy that features hardware control, data analysis and vizualization for super-resolution single-molecule localization microscopy and single-partical tracking.

  • Versions: 62
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 475 Last month
Rankings
Dependent packages count: 10.1%
Downloads: 10.1%
Forks count: 13.3%
Average: 14.2%
Stargazers count: 16.0%
Dependent repos count: 21.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • PyQt5 ==5.15.6
  • QDarkStyle ==3.0.2
  • dask ==2022.1.0
  • emcee ==3.1.1
  • matplotlib ==3.4.3
  • numba ==0.55.0
  • numpy ==1.21.5
  • ome_types ==0.2.9
  • opencv_python ==4.5.3.56
  • pandas ==1.3.3
  • pydantic ==1.8.2
  • pyqode.python ==2.12.1
  • pyqtgraph ==0.12.2
  • pyueye ==4.90.0.0
  • scikit_image ==0.18.3
  • scikit_learn ==1.1.0
  • scipy ==1.8.0
  • setuptools ==49.2.1
  • sympy ==1.8
  • tifffile ==2022.2.2
  • zarr ==2.10.3