pybasic-illumination-correction

Python implementation of the BaSiC shading correction method

https://github.com/linum-uqam/pybasic

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 3 DOI reference(s) in README
  • Academic publication links
    Links to: springer.com, zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.4%) to scientific vocabulary

Keywords

image-processing microscopy shading-correction
Last synced: 6 months ago · JSON representation ·

Repository

Python implementation of the BaSiC shading correction method

Basic Info
  • Host: GitHub
  • Owner: linum-uqam
  • Language: Python
  • Default Branch: master
  • Size: 36.1 KB
Statistics
  • Stars: 9
  • Watchers: 4
  • Forks: 1
  • Open Issues: 2
  • Releases: 1
Topics
image-processing microscopy shading-correction
Created over 6 years ago · Last pushed over 2 years ago
Metadata Files
Readme Citation

README.md

PyBaSiC

Python implementation of the BaSiC shading correction method.

DOI

  • Original paper: T. Peng et al., “A BaSiC tool for background and shading correction of optical microscopy images,” Nat. Commun., vol. 8, p. 14836, Jun. 2017. DOI:10.1038/ncomms14836
  • Nature Supplementary Materials: PDF
  • Matlab implementation: https://github.com/QSCD/BaSiC
  • Fiji plugin: URL
  • Demo data examples: Dropbox

Installation

Option 1: pip

pip install pybasic-illumination-correction

Option 2: poetry

  • You need Poetry.
  • Install with poetry install

This will create a virtual environment and install all the dependencies. To execute the basic_shading_correction.py script, activate the virtual environment with poetry shell, then execute the script with python <path/to/script.py>

Usage

The main script to perform the retrospective shading estimation and correction is basic_shading_correction. Here is a description of its arguments. Note: You must first activate the pybasic environment to run this script.

```bash

basicshadingcorrection --help usage: Shading correction algorithm based on the BaSiC method [-h] [--extension EXTENSION] [--estimatedarkfield] [--applycorrection] [--useflatfield USEFLATFIELD] [--usedarkfield USEDARKFIELD] [--epsilon EPSILON] [--ls LS] [--ld LD] [--outputflatfieldfilename OUTPUTFLATFIELDFILENAME] [--outputdarkfieldfilename OUTPUTDARKFIELD_FILENAME] directory outputdirectory

positional arguments: directory Full path a directory containing the tiles to process output_directory Full path to a directory where the output will be saved

optional arguments: -h, --help show this help message and exit --extension EXTENSION Image tile extension (default=.tif) --estimatedarkfield Estimate the darkfield in addition to the flatfield. --applycorrection Apply the shading correction with the estimated or loaded profiles. --useflatfield USEFLATFIELD Use existing flatfield (skip estimation) --usedarkfield USEDARKFIELD Use existing darkfield (skip estimation) --epsilon EPSILON Stability coefficient to use for the shading correction. (default=1e-06) --ls LS Flat-field regularization parameter (set automatically if None) --ld LD Dark-field regularization parameter (set automatically if None) --outputflatfieldfilename OUTPUTFLATFIELDFILENAME Optional output flatfield filename (if none, flatfield.tif will be saved in the output directory). --outputdarkfieldfilename OUTPUTDARKFIELDFILENAME Optional output flatfield filename (if none, darkfield.tif will be saved in the output directory). --verbose ```

Owner

  • Name: LINUM @ UQAM
  • Login: linum-uqam
  • Kind: organization
  • Location: Canada

Laboratoire d'imagerie numérique, neurophotonique et microscopie

Citation (CITATION.cff)

cff-version: 1.1.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: "Lefebvre"
    given-names: "Joël"
    orcid: "https://orcid.org/0000-0002-6652-2130"
title: "linum-uqam/PyBaSiC: v1.0.0"
version: v1.0.0
doi: 10.5281/zenodo.7305570
date-released: 2022-11-08
url: "https://github.com/linum-uqam/PyBaSiC"

GitHub Events

Total
Last Year

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 16
  • Total Committers: 2
  • Avg Commits per committer: 8.0
  • Development Distribution Score (DDS): 0.438
Top Committers
Name Email Commits
joe-from-mtl j****e@g****m 9
Joël Lefebvre l****l@u****a 7
Committer Domains (Top 20 + Academic)
uqam.ca: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • sleepingcat4 (1)
Pull Request Authors
  • dependabot[bot] (1)
  • joe-from-mtl (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 56 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 2
  • Total maintainers: 1
pypi.org: pybasic-illumination-correction

Python Implementation of the BaSiC shading correction algorithm

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 56 Last month
Rankings
Dependent packages count: 10.0%
Dependent repos count: 21.8%
Forks count: 22.7%
Stargazers count: 23.1%
Average: 24.2%
Downloads: 43.4%
Maintainers (1)
Last synced: 6 months ago

Dependencies

poetry.lock pypi
  • colorama 0.4.5
  • numpy 1.23.2
  • opencv-python 4.6.0.66
  • scipy 1.9.0
  • tqdm 4.64.0
pyproject.toml pypi
  • numpy ^1.23.2
  • opencv-python ^4.6.0
  • python >=3.10,<3.12
  • scipy ^1.9.0
  • tqdm ^4.64.0