smo

Robust and unbiased estimation of the background distribution for fluorescence microscopy.

https://github.com/maurosilber/smo

Science Score: 57.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 7 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.8%) to scientific vocabulary

Keywords

background background-subtraction distribution fluorescence
Last synced: 6 months ago · JSON representation ·

Repository

Robust and unbiased estimation of the background distribution for fluorescence microscopy.

Basic Info
  • Host: GitHub
  • Owner: maurosilber
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage:
  • Size: 1.85 MB
Statistics
  • Stars: 12
  • Watchers: 2
  • Forks: 5
  • Open Issues: 2
  • Releases: 0
Topics
background background-subtraction distribution fluorescence
Created almost 5 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License Citation

README.md

PyPi License PyPi Conda Paper

SMO

SMO is a Python package that implements the Silver Mountain Operator (SMO), which allows to recover an unbiased estimation of the background intensity distribution in a robust way.

We provide an easy to use Python package and plugins for some of the major image processing softwares: napari, CellProfiler, and ImageJ / FIJI. See Plugins section below.

Citation

To learn more about the theory behind SMO, you can read:

If you use this software, please cite the peer-reviewed article.

Usage

To obtain a background-corrected image, it is as straightforward as:

```python import skimage.data from smo import SMO

image = skimage.data.humanmitosis() smo = SMO(sigma=0, size=7, shape=(1024, 1024)) backgroundcorrectedimage = smo.bgcorrected(image) ```

where we used a sample image from scikit-image. By default, the background correction subtracts the median value of the background distribution. Note that the background regions will end up with negative values, but with a median value of 0.

A notebook explaining in more detail the meaning of the parameters and other possible uses for SMO is available here: smo/examples/usage.ipynb Open In Colab.

Installation

It can be installed with pip from PyPI:

pip install smo

or with conda from the conda-forge channel:

conda install -c conda-forge smo

Plugins

Napari

A napari plugin is available.

To install:

  • Option 1: in napari, go to Plugins > Install/Uninstall Plugins... in the top menu, search for smo and click on the install button.

  • Option 2: just pip install this package in the napari environment.

It will appear in the Plugins menu.

CellProfiler

A CellProfiler plugin in available in the smo/plugins/cellprofiler folder.

To install, save this file into your CellProfiler plugins folder. You can find (or change) the location of your plugins directory in File > Preferences > CellProfiler plugins directory.

ImageJ / FIJI

An ImageJ / FIJI plugin is available in the smo/plugins/imagej folder.

To install, download this file and:

  • Option 1: in the ImageJ main window, click on Plugins > Install... (Ctrl+Shift+M), which opens a file chooser dialog. Browse and select the downloaded file. It will prompt to restart ImageJ for changes to take effect.

  • Option 2: copy into your ImageJ plugins folder (File > Show Folder > Plugins).

To use the plugin, type smo on the bottom right search box:

select smo in the Quick Search window and click on the Run button.

Note: the ImageJ plugin does not check that saturated pixels are properly excluded.

Development

Code style is enforced via pre-commit hooks. To set up a development environment, clone the repository, optionally create a virtual environment, install the [dev] extras and the pre-commit hooks:

git clone https://github.com/maurosilber/SMO cd SMO conda create -n smo python pip numpy scipy pip install -e .[dev] pre-commit install

Owner

  • Name: Mauro Silberberg
  • Login: maurosilber
  • Kind: user
  • Location: Argentina

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: >-
  Robust and unbiased estimation of the background
  distribution for automated quantitative imaging
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Mauro
    family-names: Silberberg
    email: maurosilber@df.uba.ar
    orcid: 'https://orcid.org/0000-0002-2402-1100'
    affiliation: >-
      Department of Physics, FCEN, University of
      Buenos Aires and IFIBA, CONICET, Buenos Aires.
      C1428EHA, Argentina
  - given-names: Hernán Edgardo
    family-names: Grecco
    email: hgrecco@df.uba.ar
    affiliation: >-
      Department of Physics, FCEN, University of
      Buenos Aires and IFIBA, CONICET, Buenos Aires.
      C1428EHA, Argentina; and, Department of
      Systemic Cell Biology, Max Planck Institute of
      Molecular Physiology, Dortmund, 44227, Germany
    orcid: 'https://orcid.org/0000-0002-1165-4320'
identifiers:
  - type: doi
    value: 10.1364/JOSAA.477468
abstract: >-
  Background estimation is the first step in quantitative analysis of images.
  It has an impact on all subsequent analyses,
  in particular for segmentation and calculation of ratiometric quantities.
  Most methods recover only a single value such as the median
  or yield a biased estimation in non-trivial cases.
  We introduce,
  to our knowledge,
  the first method to recover an unbiased estimation of background distribution.
  It leverages the lack of local spatial correlation in background pixels
  to robustly select a subset that accurately represents the background.
  The resulting background distribution can be used to test for foreground membership of individual pixels
  or estimate confidence intervals in derived quantities.
license: MIT

GitHub Events

Total
  • Fork event: 1
Last Year
  • Fork event: 1

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 73
  • Total Committers: 3
  • Avg Commits per committer: 24.333
  • Development Distribution Score (DDS): 0.027
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Mauro Silberberg m****r@g****m 71
Gonzalo Peña-Castellanos g****a@g****m 1
Robert Haase h****f 1

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 hours
  • Average time to close pull requests: about 22 hours
  • Total issue authors: 2
  • Total pull request authors: 4
  • Average comments per issue: 4.0
  • Average comments per pull request: 1.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 6.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • JoOkuma (1)
  • iuri-cv (1)
Pull Request Authors
  • DragaDoncila (1)
  • haesleinhuepf (1)
  • pre-commit-ci[bot] (1)
  • goanpeca (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 156 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 6
  • Total maintainers: 2
pypi.org: smo

Implementation of the Silver Mountain Operator (SMO) for the estimation of background distributions.

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 156 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 15.4%
Stargazers count: 16.1%
Average: 18.1%
Dependent repos count: 21.6%
Downloads: 27.3%
Maintainers (2)
Last synced: 6 months ago
conda-forge.org: smo
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 34.0%
Average: 46.8%
Stargazers count: 50.2%
Dependent packages count: 51.2%
Forks count: 51.6%
Last synced: 6 months ago

Dependencies

.github/workflows/publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/test.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
pyproject.toml pypi
setup.py pypi