smo
Robust and unbiased estimation of the background distribution for fluorescence microscopy.
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
Repository
Robust and unbiased estimation of the background distribution for fluorescence microscopy.
Basic Info
Statistics
- Stars: 12
- Watchers: 2
- Forks: 5
- Open Issues: 2
- Releases: 0
Topics
Metadata Files
README.md
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:
- the peer-reviewed article in the Journal of the Optical Society of America,
- the pre-print in BioRxiv.
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 .
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 forsmoand click on the install button.Option 2: just
pipinstall 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
- Twitter: maurosilber
- Repositories: 47
- Profile: https://github.com/maurosilber
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
Top Committers
| Name | 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.
- Homepage: https://github.com/maurosilber/smo
- Documentation: https://smo.readthedocs.io/
- License: MIT
-
Latest release: 2.0.2
published about 3 years ago
Rankings
Maintainers (2)
conda-forge.org: smo
- Homepage: https://github.com/maurosilber/smo
- License: MIT
-
Latest release: 2.0.0
published about 4 years ago
Rankings
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite