-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
96 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,68 @@ | ||
# -*- coding: utf-8 -*- | ||
# Author: Arthur Imbert <[email protected]> | ||
# License: BSD 3 clause | ||
|
||
""" | ||
The bigfish.detection module includes function to detect RNA spot in 2-d and | ||
3-d. | ||
""" | ||
|
||
from .spot_detection import ( | ||
log_lm, local_maximum_detection, spots_thresholding, compute_snr, | ||
from_threshold_to_snr, get_sigma, log_cc, get_cc) | ||
from .cluster_decomposition import ( | ||
gaussian_3d, precompute_erf, build_reference_spot_3d, | ||
initialize_spot_parameter_3d, objective_function, fit_gaussian_3d, | ||
simulate_fitted_gaussian_3d, fit_gaussian_mixture, filter_clusters, | ||
decompose_clusters, run_decomposition) | ||
from .foci_detection import ( | ||
convert_spot_coordinates, cluster_spots, extract_foci) | ||
|
||
|
||
_spots = ["log_lm", "local_maximum_detection", "spots_thresholding", | ||
"compute_snr", "from_threshold_to_snr", "get_sigma", "log_cc", | ||
"get_cc", "filter_cc"] | ||
|
||
_clusters = ["gaussian_3d", "precompute_erf", "build_reference_spot_3d", | ||
"initialize_spot_parameter_3d", "objective_function", | ||
"fit_gaussian_3d", "simulate_fitted_gaussian_3d", | ||
"fit_gaussian_mixture", "filter_clusters", "decompose_clusters", | ||
"run_decomposition"] | ||
|
||
_foci = ["convert_spot_coordinates", "cluster_spots", "extract_foci"] | ||
from .spot_detection import log_lm | ||
from .spot_detection import local_maximum_detection | ||
from .spot_detection import spots_thresholding | ||
from .spot_detection import compute_snr | ||
from .spot_detection import from_threshold_to_snr | ||
from .spot_detection import get_sigma | ||
from .spot_detection import log_cc | ||
from .spot_detection import get_cc | ||
from .spot_detection import log_lm | ||
from .spot_detection import log_lm | ||
from .spot_detection import log_lm | ||
|
||
from .cluster_decomposition import gaussian_3d | ||
from .cluster_decomposition import precompute_erf | ||
from .cluster_decomposition import build_reference_spot_3d | ||
from .cluster_decomposition import initialize_spot_parameter_3d | ||
from .cluster_decomposition import objective_function | ||
from .cluster_decomposition import fit_gaussian_3d | ||
from .cluster_decomposition import simulate_fitted_gaussian_3d | ||
from .cluster_decomposition import fit_gaussian_mixture | ||
from .cluster_decomposition import filter_clusters | ||
from .cluster_decomposition import decompose_clusters | ||
from .cluster_decomposition import run_decomposition | ||
|
||
from .foci_detection import convert_spot_coordinates | ||
from .foci_detection import cluster_spots | ||
from .foci_detection import extract_foci | ||
|
||
|
||
_spots = [ | ||
"log_lm", | ||
"local_maximum_detection", | ||
"spots_thresholding", | ||
"compute_snr", | ||
"from_threshold_to_snr", | ||
"get_sigma", | ||
"log_cc", | ||
"get_cc", | ||
"filter_cc"] | ||
|
||
_clusters = [ | ||
"gaussian_3d", | ||
"precompute_erf", | ||
"build_reference_spot_3d", | ||
"initialize_spot_parameter_3d", | ||
"objective_function", | ||
"fit_gaussian_3d", | ||
"simulate_fitted_gaussian_3d", | ||
"fit_gaussian_mixture", | ||
"filter_clusters", | ||
"decompose_clusters", | ||
"run_decomposition"] | ||
|
||
_foci = [ | ||
"convert_spot_coordinates", | ||
"cluster_spots", | ||
"extract_foci"] | ||
|
||
__all__ = _spots + _clusters + _foci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Author: Arthur Imbert <[email protected]> | ||
# License: BSD 3 clause | ||
|
||
""" | ||
Functions to fit gaussian functions to the detected RNA spots, especially in | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Author: Arthur Imbert <[email protected]> | ||
# License: BSD 3 clause | ||
|
||
""" | ||
Functions to fit gaussian functions to the detected RNA spots, especially in | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Author: Arthur Imbert <[email protected]> | ||
# License: BSD 3 clause | ||
|
||
""" | ||
Class and functions to detect RNA spots in 2-d and 3-d. | ||
|
@@ -15,6 +17,7 @@ | |
# TODO complete documentation methods | ||
# TODO add sanity check functions | ||
# TODO improve documentation with optional output | ||
# TODO add function to calibrate psf | ||
|
||
# ### LoG detection ### | ||
|
||
|
@@ -96,6 +99,7 @@ def local_maximum_detection(image, minimum_distance): | |
stack.check_parameter(minimum_distance=(float, int)) | ||
|
||
# compute the kernel size (centered around our pixel because it is uneven) | ||
# TODO use tuple with a different size for each axis | ||
kernel_size = int(2 * minimum_distance + 1) | ||
|
||
# apply maximum filter to the original image | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# -*- coding: utf-8 -*- | ||
# Author: Arthur Imbert <[email protected]> | ||
# License: BSD 3 clause | ||
|
||
""" | ||
Unitary tests for bigfish.stack.filter submodule. | ||
""" | ||
|
||
import pytest | ||
|
||
import numpy as np | ||
import bigfish.stack as stack | ||
|
||
from bigfish.stack.filter import _define_kernel | ||
|
||
from numpy.testing import assert_array_equal | ||
from numpy.testing import assert_allclose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Author: Arthur Imbert <[email protected]> | ||
# License: BSD 3 clause | ||
|
||
""" | ||
The bigfish.stack module includes functions to read data, preprocess them and | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Author: Arthur Imbert <[email protected]> | ||
# License: BSD 3 clause | ||
|
||
""" | ||
Functions to augment the data (images or coordinates). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Author: Arthur Imbert <[email protected]> | ||
# License: BSD 3 clause | ||
|
||
"""Filter functions.""" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Author: Arthur Imbert <[email protected]> | ||
# License: BSD 3 clause | ||
|
||
"""Illumination correction functions.""" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Author: Arthur Imbert <[email protected]> | ||
# License: BSD 3 clause | ||
|
||
""" | ||
Functions used to format and clean any intermediate results loaded in or | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Author: Arthur Imbert <[email protected]> | ||
# License: BSD 3 clause | ||
|
||
"""2-d projection functions.""" | ||
|
||
|