FlowCyPy 0.5.2__tar.gz → 0.5.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/_version.py +2 -2
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/base_class.py +6 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/delta.py +1 -8
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/lognormal.py +1 -8
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/normal.py +1 -8
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/particle_size_distribution.py +1 -8
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/uniform.py +1 -9
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/weibull.py +4 -9
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy.egg-info/PKG-INFO +2 -2
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy.egg-info/SOURCES.txt +13 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy.egg-info/requires.txt +1 -1
- {flowcypy-0.5.2 → flowcypy-0.5.3}/PKG-INFO +2 -2
- flowcypy-0.5.3/developments/create_images.py +42 -0
- flowcypy-0.5.3/docs/images/distributions/Delta.png +0 -0
- flowcypy-0.5.3/docs/images/distributions/LogNormal.png +0 -0
- flowcypy-0.5.3/docs/images/distributions/Normal.png +0 -0
- flowcypy-0.5.3/docs/images/distributions/RosinRammler.png +0 -0
- flowcypy-0.5.3/docs/images/distributions/Uniform.png +0 -0
- flowcypy-0.5.3/docs/images/distributions/Weibull.png +0 -0
- flowcypy-0.5.3/docs/source/code/analysis.rst +10 -0
- flowcypy-0.5.3/docs/source/code/base.rst +18 -0
- flowcypy-0.5.3/docs/source/code/detector.rst +11 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/code/distributions.rst +26 -0
- flowcypy-0.5.3/docs/source/code/flow_cell.rst +9 -0
- flowcypy-0.5.3/docs/source/code/flow_cytometer.rst +9 -0
- flowcypy-0.5.3/docs/source/code/scatterer.rst +15 -0
- flowcypy-0.5.3/docs/source/code/source.rst +15 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/conf.py +1 -1
- flowcypy-0.5.3/docs/source/internal/core_components.rst +95 -0
- flowcypy-0.5.3/docs/source/internal/prerequisites/programming.rst +92 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/pyproject.toml +1 -1
- flowcypy-0.5.2/docs/source/code/base.rst +0 -90
- flowcypy-0.5.2/docs/source/internal/core_components.rst +0 -32
- flowcypy-0.5.2/docs/source/internal/prerequisites/programming.rst +0 -41
- {flowcypy-0.5.2 → flowcypy-0.5.3}/.condarc +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/.flake8 +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/.github/dependabot.yml +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/.github/workflows/deploy_PyPi.yml +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/.github/workflows/deploy_anaconda.yml +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/.github/workflows/deploy_coverage.yml +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/.github/workflows/deploy_documentation.yml +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/.gitignore +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/.readthedocs.yml +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/__init__.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/classifier.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/coupling_mechanism/__init__.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/coupling_mechanism/empirical.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/coupling_mechanism/mie.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/coupling_mechanism/rayleigh.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/coupling_mechanism/uniform.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/cytometer.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/detector.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/directories.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/__init__.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/event_correlator.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/flow_cell.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/helper.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/logger.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/noises.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/particle_count.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/peak_locator/__init__.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/peak_locator/base_class.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/peak_locator/basic.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/peak_locator/derivative.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/peak_locator/moving_average.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/physical_constant.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/plottings.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/population.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/populations_instances.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/report.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/scatterer.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/source.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/units.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/utils.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy.egg-info/dependency_links.txt +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy.egg-info/top_level.txt +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/LICENSE +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/README.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/Untitled.ipynb +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/dev_beads_analysis.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/dev_canto.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/dev_classifier.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/dev_shot_noise_check.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/dev_study_on_ri.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/dev_study_on_size.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/get_started.md +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/image.png +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/internship.pdf +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/output_file.prof +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/profiler.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/test.pdf +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/Makefile +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/density_plots/1_populations.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/density_plots/2_populations.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/density_plots/3_populations.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/density_plots/README.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/density_plots/custom_populations.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/extras/README.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/extras/distributions.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/extras/flow_cytometer_signal.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/extras/full_workflow.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/extras/scatterer_distribution.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/noise_sources/README.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/noise_sources/dark_current.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/noise_sources/shot_noise.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/noise_sources/thermal.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/tutorials/README.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/tutorials/workflow.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/images/example_0.png +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/images/example_1.png +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/images/example_2.png +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/images/example_3.png +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/images/flow_cytometer.png +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/images/logo.png +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/make.bat +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/_static/default.css +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/_static/logo.png +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/_static/thumbnail.png +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/code/peak_locator.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/code.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/examples.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/index.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/internal/getting_started.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/internal/prerequisites/index.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/internal/prerequisites/mathematics.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/internal/prerequisites/optics.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/internal/ressources.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/internal/tasks.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/internal.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/references.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/theory.rst +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/meta.yaml +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/notebook.ipynb +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/setup.cfg +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/__init__.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_coupling_mechanism.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_detector_noise.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_distribution.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_extra.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_flow_cytometer.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_noises.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_peak_algorithm.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_peak_analyzer.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_population.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_scatterer_distribution.py +0 -0
- {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_source.py +0 -0
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
from FlowCyPy.distribution.base_class import Base
|
|
2
|
+
from FlowCyPy.distribution.base_class import Base, config_dict
|
|
3
3
|
import numpy as np
|
|
4
4
|
from typing import Tuple
|
|
5
5
|
from PyMieSim.units import Quantity
|
|
6
6
|
from pydantic.dataclasses import dataclass
|
|
7
7
|
|
|
8
|
-
config_dict = dict(
|
|
9
|
-
arbitrary_types_allowed=True,
|
|
10
|
-
kw_only=True,
|
|
11
|
-
slots=True,
|
|
12
|
-
extra='forbid'
|
|
13
|
-
)
|
|
14
|
-
|
|
15
8
|
|
|
16
9
|
@dataclass(config=config_dict)
|
|
17
10
|
class Delta(Base):
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
from FlowCyPy.distribution.base_class import Base
|
|
1
|
+
from FlowCyPy.distribution.base_class import Base, config_dict
|
|
2
2
|
import numpy as np
|
|
3
3
|
from typing import Tuple
|
|
4
4
|
from scipy.stats import lognorm
|
|
5
5
|
from PyMieSim.units import Quantity
|
|
6
6
|
from pydantic.dataclasses import dataclass
|
|
7
7
|
|
|
8
|
-
config_dict = dict(
|
|
9
|
-
arbitrary_types_allowed=True,
|
|
10
|
-
kw_only=True,
|
|
11
|
-
slots=True,
|
|
12
|
-
extra='forbid'
|
|
13
|
-
)
|
|
14
|
-
|
|
15
8
|
|
|
16
9
|
@dataclass(config=config_dict)
|
|
17
10
|
class LogNormal(Base):
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
from FlowCyPy.distribution.base_class import Base
|
|
1
|
+
from FlowCyPy.distribution.base_class import Base, config_dict
|
|
2
2
|
import numpy as np
|
|
3
3
|
from typing import Tuple
|
|
4
4
|
from scipy.stats import norm
|
|
5
5
|
from PyMieSim.units import Quantity
|
|
6
6
|
from pydantic.dataclasses import dataclass
|
|
7
7
|
|
|
8
|
-
config_dict = dict(
|
|
9
|
-
arbitrary_types_allowed=True,
|
|
10
|
-
kw_only=True,
|
|
11
|
-
slots=True,
|
|
12
|
-
extra='forbid'
|
|
13
|
-
)
|
|
14
|
-
|
|
15
8
|
|
|
16
9
|
@dataclass(config=config_dict)
|
|
17
10
|
class Normal(Base):
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
from FlowCyPy.distribution.base_class import Base
|
|
1
|
+
from FlowCyPy.distribution.base_class import Base, config_dict
|
|
2
2
|
import numpy as np
|
|
3
3
|
from typing import Tuple
|
|
4
4
|
from PyMieSim.units import Quantity
|
|
5
5
|
from pydantic.dataclasses import dataclass
|
|
6
6
|
|
|
7
|
-
config_dict = dict(
|
|
8
|
-
arbitrary_types_allowed=True,
|
|
9
|
-
kw_only=True,
|
|
10
|
-
slots=True,
|
|
11
|
-
extra='forbid'
|
|
12
|
-
)
|
|
13
|
-
|
|
14
7
|
|
|
15
8
|
@dataclass(config=config_dict)
|
|
16
9
|
class RosinRammler(Base):
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
from FlowCyPy.distribution.base_class import Base
|
|
1
|
+
from FlowCyPy.distribution.base_class import Base, config_dict
|
|
2
2
|
import numpy as np
|
|
3
3
|
from typing import Tuple
|
|
4
4
|
from scipy.stats import uniform
|
|
5
5
|
from PyMieSim.units import Quantity
|
|
6
6
|
from pydantic.dataclasses import dataclass
|
|
7
7
|
|
|
8
|
-
config_dict = dict(
|
|
9
|
-
arbitrary_types_allowed=True,
|
|
10
|
-
kw_only=True,
|
|
11
|
-
slots=True,
|
|
12
|
-
extra='forbid'
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
|
|
16
8
|
@dataclass(config=config_dict)
|
|
17
9
|
class Uniform(Base):
|
|
18
10
|
r"""
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
+
from FlowCyPy.distribution.base_class import Base, config_dict
|
|
1
2
|
import numpy as np
|
|
2
3
|
from typing import Tuple
|
|
3
4
|
from PyMieSim.units import Quantity
|
|
4
|
-
from FlowCyPy.distribution.base_class import Base
|
|
5
5
|
from pydantic.dataclasses import dataclass
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
config_dict = dict(
|
|
9
|
-
arbitrary_types_allowed=True,
|
|
10
|
-
kw_only=True,
|
|
11
|
-
slots=True,
|
|
12
|
-
extra='forbid'
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
|
|
16
8
|
@dataclass(config=config_dict)
|
|
17
9
|
class Weibull(Base):
|
|
18
10
|
r"""
|
|
@@ -78,3 +70,6 @@ class Weibull(Base):
|
|
|
78
70
|
pdf = a * b ** (self.shape - 1) * c
|
|
79
71
|
|
|
80
72
|
return x, self.scale_factor * pdf
|
|
73
|
+
|
|
74
|
+
def __repr__(self) -> str:
|
|
75
|
+
return f"Weibull({self.scale:.2f~P}, {self.shape:.2f~P})"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: FlowCyPy
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.3
|
|
4
4
|
Summary: A package for flow-cytometry simulations.
|
|
5
5
|
Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -60,7 +60,7 @@ Requires-Dist: numpydoc==1.8.0; extra == "documentation"
|
|
|
60
60
|
Requires-Dist: sphinx>=5.1.1; extra == "documentation"
|
|
61
61
|
Requires-Dist: sphinx-rtd-theme==3.0.2; extra == "documentation"
|
|
62
62
|
Requires-Dist: sphinx-gallery==0.18.0; extra == "documentation"
|
|
63
|
-
Requires-Dist: pydata-sphinx-theme==0.16.
|
|
63
|
+
Requires-Dist: pydata-sphinx-theme==0.16.1; extra == "documentation"
|
|
64
64
|
Provides-Extra: dev
|
|
65
65
|
Requires-Dist: flake8==7.1.1; extra == "dev"
|
|
66
66
|
|
|
@@ -57,6 +57,7 @@ FlowCyPy/peak_locator/base_class.py
|
|
|
57
57
|
FlowCyPy/peak_locator/basic.py
|
|
58
58
|
FlowCyPy/peak_locator/derivative.py
|
|
59
59
|
FlowCyPy/peak_locator/moving_average.py
|
|
60
|
+
developments/create_images.py
|
|
60
61
|
developments/dev_beads_analysis.py
|
|
61
62
|
developments/dev_canto.py
|
|
62
63
|
developments/dev_classifier.py
|
|
@@ -93,6 +94,12 @@ docs/images/example_2.png
|
|
|
93
94
|
docs/images/example_3.png
|
|
94
95
|
docs/images/flow_cytometer.png
|
|
95
96
|
docs/images/logo.png
|
|
97
|
+
docs/images/distributions/Delta.png
|
|
98
|
+
docs/images/distributions/LogNormal.png
|
|
99
|
+
docs/images/distributions/Normal.png
|
|
100
|
+
docs/images/distributions/RosinRammler.png
|
|
101
|
+
docs/images/distributions/Uniform.png
|
|
102
|
+
docs/images/distributions/Weibull.png
|
|
96
103
|
docs/source/code.rst
|
|
97
104
|
docs/source/conf.py
|
|
98
105
|
docs/source/examples.rst
|
|
@@ -103,9 +110,15 @@ docs/source/theory.rst
|
|
|
103
110
|
docs/source/_static/default.css
|
|
104
111
|
docs/source/_static/logo.png
|
|
105
112
|
docs/source/_static/thumbnail.png
|
|
113
|
+
docs/source/code/analysis.rst
|
|
106
114
|
docs/source/code/base.rst
|
|
115
|
+
docs/source/code/detector.rst
|
|
107
116
|
docs/source/code/distributions.rst
|
|
117
|
+
docs/source/code/flow_cell.rst
|
|
118
|
+
docs/source/code/flow_cytometer.rst
|
|
108
119
|
docs/source/code/peak_locator.rst
|
|
120
|
+
docs/source/code/scatterer.rst
|
|
121
|
+
docs/source/code/source.rst
|
|
109
122
|
docs/source/internal/core_components.rst
|
|
110
123
|
docs/source/internal/getting_started.rst
|
|
111
124
|
docs/source/internal/ressources.rst
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: FlowCyPy
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.3
|
|
4
4
|
Summary: A package for flow-cytometry simulations.
|
|
5
5
|
Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -60,7 +60,7 @@ Requires-Dist: numpydoc==1.8.0; extra == "documentation"
|
|
|
60
60
|
Requires-Dist: sphinx>=5.1.1; extra == "documentation"
|
|
61
61
|
Requires-Dist: sphinx-rtd-theme==3.0.2; extra == "documentation"
|
|
62
62
|
Requires-Dist: sphinx-gallery==0.18.0; extra == "documentation"
|
|
63
|
-
Requires-Dist: pydata-sphinx-theme==0.16.
|
|
63
|
+
Requires-Dist: pydata-sphinx-theme==0.16.1; extra == "documentation"
|
|
64
64
|
Provides-Extra: dev
|
|
65
65
|
Requires-Dist: flake8==7.1.1; extra == "dev"
|
|
66
66
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
import matplotlib.pyplot as plt
|
|
3
|
+
from FlowCyPy import distribution
|
|
4
|
+
from FlowCyPy.units import nanometer, particle
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
import FlowCyPy
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
save_path = Path(FlowCyPy.__file__).parent.parent / "docs/images/distributions"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# Set random seed for reproducibility
|
|
14
|
+
np.random.seed(3)
|
|
15
|
+
|
|
16
|
+
# Define the number of particles to generate
|
|
17
|
+
n_particles = 10000 * particle
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# 1. Normal Distribution
|
|
21
|
+
distributions = [
|
|
22
|
+
distribution.Normal(mean=100 * nanometer, std_dev=10 * nanometer),
|
|
23
|
+
distribution.LogNormal(mean=100 * nanometer, std_dev=0.25 * nanometer),
|
|
24
|
+
distribution.RosinRammler(characteristic_size=50 * nanometer, spread=2.0),
|
|
25
|
+
distribution.Weibull(scale=100 * nanometer, shape=1.5 * nanometer),
|
|
26
|
+
distribution.Delta(position=100 * nanometer),
|
|
27
|
+
distribution.Uniform(lower_bound=50 * nanometer, upper_bound=150 * nanometer)
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
for dist in distributions:
|
|
32
|
+
name = type(dist).__name__
|
|
33
|
+
sizes = dist.generate(n_particles)
|
|
34
|
+
figure, ax = plt.subplots(1, 1, figsize=(8, 4))
|
|
35
|
+
ax.hist(sizes, bins=50, color='skyblue', edgecolor='black')
|
|
36
|
+
ax.set_title(f'{repr(dist)} Distribution')
|
|
37
|
+
ax.set_xlabel('Size (nm)')
|
|
38
|
+
ax.set_ylabel('Frequency')
|
|
39
|
+
plt.tight_layout()
|
|
40
|
+
file_directory = save_path / f'{name}.png'
|
|
41
|
+
plt.savefig(file_directory)
|
|
42
|
+
# plt.show()
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Classes and Methods
|
|
2
|
+
===================
|
|
3
|
+
|
|
4
|
+
This section documents the main classes and methods available in the **FlowCyPy** library, grouped by functionality.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
.. toctree::
|
|
8
|
+
:maxdepth: 2
|
|
9
|
+
|
|
10
|
+
./flow_cell.rst
|
|
11
|
+
./source.rst
|
|
12
|
+
./scatterer.rst
|
|
13
|
+
./detector.rst
|
|
14
|
+
./flow_cytometer.rst
|
|
15
|
+
./analysis.rst
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
.. _detectors:
|
|
2
|
+
|
|
3
|
+
Detectors
|
|
4
|
+
---------
|
|
5
|
+
|
|
6
|
+
Classes for modeling the signal detection process in flow cytometry.
|
|
7
|
+
|
|
8
|
+
.. autoclass:: FlowCyPy.detector.Detector
|
|
9
|
+
:members:
|
|
10
|
+
:show-inheritance:
|
|
11
|
+
:exclude-members: resistance, responsitivity, sampling, sampling_freq, saturation_level, temperature, n_bins, name, noise_level, numerical_aperture, phi_angle, dark_current, gamma_angle
|
|
@@ -13,15 +13,25 @@ Normal Distribution
|
|
|
13
13
|
|
|
14
14
|
The `Normal` class generates particle sizes that follow a **normal (Gaussian) distribution**. This distribution is characterized by a symmetric bell curve, where most particles are concentrated around the mean size, with fewer particles at the extremes.
|
|
15
15
|
|
|
16
|
+
.. image:: ./../../images/distributions/Normal.png
|
|
17
|
+
:width: 600
|
|
18
|
+
:align: center
|
|
19
|
+
|
|
16
20
|
.. autoclass:: FlowCyPy.distribution.Normal
|
|
17
21
|
:members:
|
|
18
22
|
:show-inheritance:
|
|
19
23
|
|
|
24
|
+
|
|
25
|
+
|
|
20
26
|
LogNormal Distribution
|
|
21
27
|
----------------------
|
|
22
28
|
|
|
23
29
|
The `LogNormal` class generates particle sizes based on a **log-normal distribution**. In this case, the logarithm of the particle sizes follows a normal distribution. This type of distribution is often used to model phenomena where the particle sizes are positively skewed, with a long tail towards larger sizes.
|
|
24
30
|
|
|
31
|
+
.. image:: ./../../images/distributions/LogNormal.png
|
|
32
|
+
:width: 600
|
|
33
|
+
:align: center
|
|
34
|
+
|
|
25
35
|
.. autoclass:: FlowCyPy.distribution.LogNormal
|
|
26
36
|
:members:
|
|
27
37
|
:show-inheritance:
|
|
@@ -31,6 +41,10 @@ Rosin-Rammler Distribution
|
|
|
31
41
|
|
|
32
42
|
The `RosinRammler` class generates particle sizes using the **Rosin-Rammler distribution**, which is commonly used to describe the size distribution of powders and granular materials. It provides a skewed distribution where most particles are within a specific range, but some larger particles may exist.
|
|
33
43
|
|
|
44
|
+
.. image:: ./../../images/distributions/RosinRammler.png
|
|
45
|
+
:width: 600
|
|
46
|
+
:align: center
|
|
47
|
+
|
|
34
48
|
.. autoclass:: FlowCyPy.distribution.RosinRammler
|
|
35
49
|
:members:
|
|
36
50
|
:show-inheritance:
|
|
@@ -40,6 +54,10 @@ Weibull Distribution
|
|
|
40
54
|
|
|
41
55
|
The `Weibull` class generates particle sizes according to the **Weibull distribution**. This distribution is flexible and can model various types of particle size distributions, ranging from light-tailed to heavy-tailed distributions, depending on the shape parameter.
|
|
42
56
|
|
|
57
|
+
.. image:: ./../../images/distributions/Weibull.png
|
|
58
|
+
:width: 600
|
|
59
|
+
:align: center
|
|
60
|
+
|
|
43
61
|
.. autoclass:: FlowCyPy.distribution.Weibull
|
|
44
62
|
:members:
|
|
45
63
|
:show-inheritance:
|
|
@@ -49,6 +67,10 @@ Delta Distribution
|
|
|
49
67
|
|
|
50
68
|
The `Delta` class models particle sizes as a **delta function**, where all particles have exactly the same size. This distribution is useful for simulations where all particles are of a fixed size, without any variation.
|
|
51
69
|
|
|
70
|
+
.. image:: ./../../images/distributions/Delta.png
|
|
71
|
+
:width: 600
|
|
72
|
+
:align: center
|
|
73
|
+
|
|
52
74
|
.. autoclass:: FlowCyPy.distribution.Delta
|
|
53
75
|
:members:
|
|
54
76
|
:show-inheritance:
|
|
@@ -58,6 +80,10 @@ Uniform Distribution
|
|
|
58
80
|
|
|
59
81
|
The `Uniform` class generates particle sizes that are **evenly distributed** between a specified lower and upper bound. This results in a flat distribution, where all particle sizes within the range are equally likely to occur.
|
|
60
82
|
|
|
83
|
+
.. image:: ./../../images/distributions/Uniform.png
|
|
84
|
+
:width: 600
|
|
85
|
+
:align: center
|
|
86
|
+
|
|
61
87
|
.. autoclass:: FlowCyPy.distribution.Uniform
|
|
62
88
|
:members:
|
|
63
89
|
:show-inheritance:
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.. _scatterers:
|
|
2
|
+
|
|
3
|
+
Scatterers
|
|
4
|
+
----------
|
|
5
|
+
Classes representing particles and populations within the cytometer.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
.. autoclass:: FlowCyPy.Scatterer
|
|
9
|
+
:members:
|
|
10
|
+
:show-inheritance:
|
|
11
|
+
|
|
12
|
+
.. autoclass:: FlowCyPy.population.Population
|
|
13
|
+
:members:
|
|
14
|
+
:show-inheritance:
|
|
15
|
+
:exclude-members: name, refractive_index, size
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.. _laser-sources:
|
|
2
|
+
|
|
3
|
+
Laser Sources
|
|
4
|
+
-------------
|
|
5
|
+
Classes representing laser beam sources.
|
|
6
|
+
|
|
7
|
+
.. autoclass:: FlowCyPy.source.GaussianBeam
|
|
8
|
+
:members:
|
|
9
|
+
:show-inheritance:
|
|
10
|
+
:exclude-members: numerical_aperture, optical_power, polarization, wavelength
|
|
11
|
+
|
|
12
|
+
.. autoclass:: FlowCyPy.source.AstigmaticGaussianBeam
|
|
13
|
+
:members:
|
|
14
|
+
:show-inheritance:
|
|
15
|
+
:exclude-members: numerical_aperture_x, numerical_aperture_y, optical_power, polarization, wavelength
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Core Components
|
|
2
|
+
===============
|
|
3
|
+
|
|
4
|
+
**FlowCyPy** provides a modular framework to simulate key elements of a flow cytometry system. Below are its core components, their attributes, and functionalities. For more details, refer to the `API Reference <https://martinpdes.github.io/FlowCyPy/docs/latest/code.html>`_.
|
|
5
|
+
|
|
6
|
+
Scatterer
|
|
7
|
+
---------
|
|
8
|
+
The **Scatterer** represents particle distributions and their interactions with light.
|
|
9
|
+
|
|
10
|
+
- **Attributes**:
|
|
11
|
+
|
|
12
|
+
- `populations`: List of particle populations, each with size and refractive index distributions.
|
|
13
|
+
- `medium_refractive_index`: Refractive index of the surrounding medium (e.g., water).
|
|
14
|
+
- `dataframe`: Contains particle data, including size, refractive index, and time of arrival.
|
|
15
|
+
|
|
16
|
+
- **Key Features**:
|
|
17
|
+
|
|
18
|
+
- Add populations with `add_population(name, size, refractive_index, concentration)`.
|
|
19
|
+
- Initialize the scatterer using `initialize(flow_cell)`.
|
|
20
|
+
- Visualize particle distributions with `plot()`.
|
|
21
|
+
|
|
22
|
+
Source
|
|
23
|
+
------
|
|
24
|
+
The **Source** models the laser used for illumination in flow cytometry.
|
|
25
|
+
|
|
26
|
+
- **Attributes**:
|
|
27
|
+
|
|
28
|
+
- `wavelength`: Wavelength of the laser (e.g., 800 nm).
|
|
29
|
+
- `optical_power`: Power of the laser beam (e.g., 20 mW).
|
|
30
|
+
- `numerical_aperture`: Numerical aperture defining the beam's focus.
|
|
31
|
+
|
|
32
|
+
- **Key Features**:
|
|
33
|
+
|
|
34
|
+
- Simulates the laser profile for scattering calculations.
|
|
35
|
+
- Models coherent light sources using Gaussian beam theory.
|
|
36
|
+
|
|
37
|
+
Detector
|
|
38
|
+
--------
|
|
39
|
+
The **Detector** emulates the response of flow cytometer detectors.
|
|
40
|
+
|
|
41
|
+
- **Attributes**:
|
|
42
|
+
|
|
43
|
+
- `phi_angle`: Angle of detection relative to the beam (e.g., forward or side scatter).
|
|
44
|
+
- `responsitivity`: Sensitivity of the detector (e.g., current per unit power).
|
|
45
|
+
- `saturation_level`: Maximum signal level the detector can handle.
|
|
46
|
+
- `noise_levels`: Configurable noise types (thermal, shot, dark current).
|
|
47
|
+
- `dataframe`: Stores raw and processed signal data.
|
|
48
|
+
|
|
49
|
+
- **Key Features**:
|
|
50
|
+
|
|
51
|
+
- Add various noise models using `NoiseSetting`.
|
|
52
|
+
- Simulate digitization with configurable bit-depth (e.g., 12-bit, 14-bit).
|
|
53
|
+
- Visualize signal data using `plot()`.
|
|
54
|
+
|
|
55
|
+
FlowCytometer
|
|
56
|
+
-------------
|
|
57
|
+
The **FlowCytometer** integrates all components to simulate a complete flow cytometry experiment.
|
|
58
|
+
|
|
59
|
+
- **Attributes**:
|
|
60
|
+
|
|
61
|
+
- `scatterer`: The scatterer object defining particle distributions.
|
|
62
|
+
- `source`: The laser source illuminating particles.
|
|
63
|
+
- `detectors`: List of detectors for signal acquisition.
|
|
64
|
+
- `background_power`: Ambient light contribution.
|
|
65
|
+
|
|
66
|
+
- **Key Features**:
|
|
67
|
+
|
|
68
|
+
- Combines the scatterer, source, and detectors for realistic simulations.
|
|
69
|
+
- Computes Forward Scatter (FSC) and Side Scatter (SSC) signals.
|
|
70
|
+
- Uses **PyMieSim** for accurate scattering computations.
|
|
71
|
+
|
|
72
|
+
EventCorrelator
|
|
73
|
+
---------------
|
|
74
|
+
The **EventCorrelator** (previously called Analyzer) provides tools for signal analysis and particle event detection.
|
|
75
|
+
|
|
76
|
+
- **Attributes**:
|
|
77
|
+
|
|
78
|
+
- `cytometer`: The associated FlowCytometer object.
|
|
79
|
+
- `coincidence_dataframe`: Stores data for coinciding signals across detectors.
|
|
80
|
+
- `algorithm`: Peak detection algorithm for identifying particle events.
|
|
81
|
+
|
|
82
|
+
- **Key Features**:
|
|
83
|
+
|
|
84
|
+
- Detect peaks in signals using customizable algorithms (e.g., MovingAverage).
|
|
85
|
+
- Correlate events between detectors to identify coincidences.
|
|
86
|
+
- Generate 2D density plots of Forward Scatter (FSC) and Side Scatter (SSC) signals.
|
|
87
|
+
|
|
88
|
+
Example Use Cases
|
|
89
|
+
-----------------
|
|
90
|
+
|
|
91
|
+
- Simulate a scatterer with two distinct populations to analyze overlapping signals.
|
|
92
|
+
- Configure detectors with high noise to study the effect on signal clarity.
|
|
93
|
+
- Use EventCorrelator to investigate coincidence events in a multi-detector setup.
|
|
94
|
+
|
|
95
|
+
For further details on classes and methods, visit the `API Reference <https://martinpdes.github.io/FlowCyPy/docs/latest/code.html>`_.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
.. _programming-skills:
|
|
2
|
+
|
|
3
|
+
**Programming Skills**
|
|
4
|
+
----------------------
|
|
5
|
+
|
|
6
|
+
A solid grasp of programming concepts and tools is crucial for contributing to the development and validation of **FlowCyPy**.
|
|
7
|
+
Below, we highlight the essential skills and resources to enhance your proficiency.
|
|
8
|
+
|
|
9
|
+
.. _python-programming:
|
|
10
|
+
|
|
11
|
+
Python Programming
|
|
12
|
+
~~~~~~~~~~~~~~~~~~
|
|
13
|
+
|
|
14
|
+
Python is the backbone of **FlowCyPy**. It is essential to understand its key concepts, features, and best practices to effectively contribute to the project.
|
|
15
|
+
|
|
16
|
+
Key areas of focus include:
|
|
17
|
+
|
|
18
|
+
- **Object-Oriented Programming (OOP)**:
|
|
19
|
+
|
|
20
|
+
- Writing and understanding functions and classes.
|
|
21
|
+
- Classes in Python should always start with an uppercase letter (e.g., ``class Detector``).
|
|
22
|
+
- All other objects are fully lowercase (e.g., ``object``, ``function``).
|
|
23
|
+
|
|
24
|
+
- **Popular Libraries**:
|
|
25
|
+
|
|
26
|
+
- ``numpy`` for numerical operations.
|
|
27
|
+
- ``matplotlib`` for creating visualizations.
|
|
28
|
+
- ``pandas`` for efficient data manipulation and analysis.
|
|
29
|
+
|
|
30
|
+
- **Debugging and Troubleshooting**:
|
|
31
|
+
|
|
32
|
+
- Use tools like `pdb`, `ipdb`, or IDE-based debuggers (e.g., in VS Code or PyCharm).
|
|
33
|
+
|
|
34
|
+
Additional Python Essentials
|
|
35
|
+
****************************
|
|
36
|
+
|
|
37
|
+
- **What is pip?**
|
|
38
|
+
|
|
39
|
+
- ``pip`` is the Python package manager used to install, update, and manage libraries in Python projects.
|
|
40
|
+
- Example: ``pip install numpy``
|
|
41
|
+
|
|
42
|
+
- **What is conda?**
|
|
43
|
+
|
|
44
|
+
- ``conda`` is an environment and package manager that supports Python and other languages.
|
|
45
|
+
- It is useful for managing dependencies and creating isolated environments.
|
|
46
|
+
- Example: ``conda create --name flowcypy-env python=3.10``
|
|
47
|
+
|
|
48
|
+
- **PEP Standards**:
|
|
49
|
+
|
|
50
|
+
- Python Enhancement Proposals (PEPs) define Python's design and best practices.
|
|
51
|
+
- Follow `PEP 8 <https://peps.python.org/pep-0008/>`_ for consistent and clean coding style.
|
|
52
|
+
|
|
53
|
+
- Example:
|
|
54
|
+
|
|
55
|
+
- Indentations should be 4 spaces.
|
|
56
|
+
- Use snake_case for variable and method names.
|
|
57
|
+
|
|
58
|
+
- **Interactive Python**:
|
|
59
|
+
|
|
60
|
+
- Use Jupyter notebooks or Python's interactive shell for rapid testing and prototyping.
|
|
61
|
+
|
|
62
|
+
*Suggested Practice*: Enhance your skills with hands-on exercises available on `CodeChef Practice <https://www.codechef.com/practice>`_.
|
|
63
|
+
|
|
64
|
+
.. _git-and-version-control:
|
|
65
|
+
|
|
66
|
+
Git and Version Control
|
|
67
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
|
68
|
+
|
|
69
|
+
Version control is essential for collaborative software development. You will use Git to manage the **FlowCyPy** codebase effectively.
|
|
70
|
+
Familiarity with the following Git commands is expected:
|
|
71
|
+
|
|
72
|
+
- ``git clone``: Clone repositories to your local machine for development.
|
|
73
|
+
- ``git pull``: Fetch and merge changes from the remote repository.
|
|
74
|
+
- ``git commit``: Save changes locally with descriptive commit messages.
|
|
75
|
+
- ``git push``: Upload your changes to the remote repository.
|
|
76
|
+
- ``git branch``: Create and manage branches for new features or experimental changes.
|
|
77
|
+
- ``git merge``: Integrate updates from different branches.
|
|
78
|
+
- ``git stash``: Temporarily save changes without committing them.
|
|
79
|
+
|
|
80
|
+
Best Practices for Git
|
|
81
|
+
**********************
|
|
82
|
+
|
|
83
|
+
- Commit frequently with clear and concise commit messages.
|
|
84
|
+
- Always pull the latest changes before starting new work to avoid conflicts.
|
|
85
|
+
- Use branches to isolate different tasks or features.
|
|
86
|
+
|
|
87
|
+
.. note::
|
|
88
|
+
|
|
89
|
+
**Mini Objective**:
|
|
90
|
+
Try creating a new branch, making a change, committing it, and merging it back into the main branch.
|
|
91
|
+
|
|
92
|
+
*Recommended Resource*: Master Git workflows through the `Pro Git Book <https://git-scm.com/book/en/v2>`_.
|