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.
Files changed (146) hide show
  1. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/_version.py +2 -2
  2. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/base_class.py +6 -0
  3. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/delta.py +1 -8
  4. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/lognormal.py +1 -8
  5. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/normal.py +1 -8
  6. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/particle_size_distribution.py +1 -8
  7. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/uniform.py +1 -9
  8. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/weibull.py +4 -9
  9. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy.egg-info/PKG-INFO +2 -2
  10. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy.egg-info/SOURCES.txt +13 -0
  11. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy.egg-info/requires.txt +1 -1
  12. {flowcypy-0.5.2 → flowcypy-0.5.3}/PKG-INFO +2 -2
  13. flowcypy-0.5.3/developments/create_images.py +42 -0
  14. flowcypy-0.5.3/docs/images/distributions/Delta.png +0 -0
  15. flowcypy-0.5.3/docs/images/distributions/LogNormal.png +0 -0
  16. flowcypy-0.5.3/docs/images/distributions/Normal.png +0 -0
  17. flowcypy-0.5.3/docs/images/distributions/RosinRammler.png +0 -0
  18. flowcypy-0.5.3/docs/images/distributions/Uniform.png +0 -0
  19. flowcypy-0.5.3/docs/images/distributions/Weibull.png +0 -0
  20. flowcypy-0.5.3/docs/source/code/analysis.rst +10 -0
  21. flowcypy-0.5.3/docs/source/code/base.rst +18 -0
  22. flowcypy-0.5.3/docs/source/code/detector.rst +11 -0
  23. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/code/distributions.rst +26 -0
  24. flowcypy-0.5.3/docs/source/code/flow_cell.rst +9 -0
  25. flowcypy-0.5.3/docs/source/code/flow_cytometer.rst +9 -0
  26. flowcypy-0.5.3/docs/source/code/scatterer.rst +15 -0
  27. flowcypy-0.5.3/docs/source/code/source.rst +15 -0
  28. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/conf.py +1 -1
  29. flowcypy-0.5.3/docs/source/internal/core_components.rst +95 -0
  30. flowcypy-0.5.3/docs/source/internal/prerequisites/programming.rst +92 -0
  31. {flowcypy-0.5.2 → flowcypy-0.5.3}/pyproject.toml +1 -1
  32. flowcypy-0.5.2/docs/source/code/base.rst +0 -90
  33. flowcypy-0.5.2/docs/source/internal/core_components.rst +0 -32
  34. flowcypy-0.5.2/docs/source/internal/prerequisites/programming.rst +0 -41
  35. {flowcypy-0.5.2 → flowcypy-0.5.3}/.condarc +0 -0
  36. {flowcypy-0.5.2 → flowcypy-0.5.3}/.flake8 +0 -0
  37. {flowcypy-0.5.2 → flowcypy-0.5.3}/.github/dependabot.yml +0 -0
  38. {flowcypy-0.5.2 → flowcypy-0.5.3}/.github/workflows/deploy_PyPi.yml +0 -0
  39. {flowcypy-0.5.2 → flowcypy-0.5.3}/.github/workflows/deploy_anaconda.yml +0 -0
  40. {flowcypy-0.5.2 → flowcypy-0.5.3}/.github/workflows/deploy_coverage.yml +0 -0
  41. {flowcypy-0.5.2 → flowcypy-0.5.3}/.github/workflows/deploy_documentation.yml +0 -0
  42. {flowcypy-0.5.2 → flowcypy-0.5.3}/.gitignore +0 -0
  43. {flowcypy-0.5.2 → flowcypy-0.5.3}/.readthedocs.yml +0 -0
  44. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/__init__.py +0 -0
  45. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/classifier.py +0 -0
  46. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/coupling_mechanism/__init__.py +0 -0
  47. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/coupling_mechanism/empirical.py +0 -0
  48. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/coupling_mechanism/mie.py +0 -0
  49. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/coupling_mechanism/rayleigh.py +0 -0
  50. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/coupling_mechanism/uniform.py +0 -0
  51. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/cytometer.py +0 -0
  52. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/detector.py +0 -0
  53. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/directories.py +0 -0
  54. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/distribution/__init__.py +0 -0
  55. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/event_correlator.py +0 -0
  56. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/flow_cell.py +0 -0
  57. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/helper.py +0 -0
  58. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/logger.py +0 -0
  59. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/noises.py +0 -0
  60. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/particle_count.py +0 -0
  61. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/peak_locator/__init__.py +0 -0
  62. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/peak_locator/base_class.py +0 -0
  63. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/peak_locator/basic.py +0 -0
  64. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/peak_locator/derivative.py +0 -0
  65. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/peak_locator/moving_average.py +0 -0
  66. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/physical_constant.py +0 -0
  67. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/plottings.py +0 -0
  68. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/population.py +0 -0
  69. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/populations_instances.py +0 -0
  70. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/report.py +0 -0
  71. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/scatterer.py +0 -0
  72. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/source.py +0 -0
  73. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/units.py +0 -0
  74. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy/utils.py +0 -0
  75. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy.egg-info/dependency_links.txt +0 -0
  76. {flowcypy-0.5.2 → flowcypy-0.5.3}/FlowCyPy.egg-info/top_level.txt +0 -0
  77. {flowcypy-0.5.2 → flowcypy-0.5.3}/LICENSE +0 -0
  78. {flowcypy-0.5.2 → flowcypy-0.5.3}/README.rst +0 -0
  79. {flowcypy-0.5.2 → flowcypy-0.5.3}/Untitled.ipynb +0 -0
  80. {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/dev_beads_analysis.py +0 -0
  81. {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/dev_canto.py +0 -0
  82. {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/dev_classifier.py +0 -0
  83. {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/dev_shot_noise_check.py +0 -0
  84. {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/dev_study_on_ri.py +0 -0
  85. {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/dev_study_on_size.py +0 -0
  86. {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/get_started.md +0 -0
  87. {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/image.png +0 -0
  88. {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/internship.pdf +0 -0
  89. {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/output_file.prof +0 -0
  90. {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/profiler.py +0 -0
  91. {flowcypy-0.5.2 → flowcypy-0.5.3}/developments/test.pdf +0 -0
  92. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/Makefile +0 -0
  93. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/density_plots/1_populations.py +0 -0
  94. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/density_plots/2_populations.py +0 -0
  95. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/density_plots/3_populations.py +0 -0
  96. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/density_plots/README.rst +0 -0
  97. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/density_plots/custom_populations.py +0 -0
  98. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/extras/README.rst +0 -0
  99. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/extras/distributions.py +0 -0
  100. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/extras/flow_cytometer_signal.py +0 -0
  101. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/extras/full_workflow.py +0 -0
  102. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/extras/scatterer_distribution.py +0 -0
  103. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/noise_sources/README.rst +0 -0
  104. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/noise_sources/dark_current.py +0 -0
  105. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/noise_sources/shot_noise.py +0 -0
  106. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/noise_sources/thermal.py +0 -0
  107. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/tutorials/README.rst +0 -0
  108. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/examples/tutorials/workflow.py +0 -0
  109. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/images/example_0.png +0 -0
  110. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/images/example_1.png +0 -0
  111. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/images/example_2.png +0 -0
  112. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/images/example_3.png +0 -0
  113. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/images/flow_cytometer.png +0 -0
  114. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/images/logo.png +0 -0
  115. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/make.bat +0 -0
  116. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/_static/default.css +0 -0
  117. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/_static/logo.png +0 -0
  118. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/_static/thumbnail.png +0 -0
  119. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/code/peak_locator.rst +0 -0
  120. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/code.rst +0 -0
  121. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/examples.rst +0 -0
  122. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/index.rst +0 -0
  123. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/internal/getting_started.rst +0 -0
  124. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/internal/prerequisites/index.rst +0 -0
  125. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/internal/prerequisites/mathematics.rst +0 -0
  126. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/internal/prerequisites/optics.rst +0 -0
  127. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/internal/ressources.rst +0 -0
  128. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/internal/tasks.rst +0 -0
  129. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/internal.rst +0 -0
  130. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/references.rst +0 -0
  131. {flowcypy-0.5.2 → flowcypy-0.5.3}/docs/source/theory.rst +0 -0
  132. {flowcypy-0.5.2 → flowcypy-0.5.3}/meta.yaml +0 -0
  133. {flowcypy-0.5.2 → flowcypy-0.5.3}/notebook.ipynb +0 -0
  134. {flowcypy-0.5.2 → flowcypy-0.5.3}/setup.cfg +0 -0
  135. {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/__init__.py +0 -0
  136. {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_coupling_mechanism.py +0 -0
  137. {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_detector_noise.py +0 -0
  138. {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_distribution.py +0 -0
  139. {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_extra.py +0 -0
  140. {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_flow_cytometer.py +0 -0
  141. {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_noises.py +0 -0
  142. {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_peak_algorithm.py +0 -0
  143. {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_peak_analyzer.py +0 -0
  144. {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_population.py +0 -0
  145. {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_scatterer_distribution.py +0 -0
  146. {flowcypy-0.5.2 → flowcypy-0.5.3}/tests/test_source.py +0 -0
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.5.2'
16
- __version_tuple__ = version_tuple = (0, 5, 2)
15
+ __version__ = version = '0.5.3'
16
+ __version_tuple__ = version_tuple = (0, 5, 3)
@@ -4,6 +4,12 @@ import matplotlib.pyplot as plt
4
4
  from MPSPlots.styles import mps
5
5
  from FlowCyPy.units import particle, Quantity
6
6
 
7
+ config_dict = dict(
8
+ arbitrary_types_allowed=True,
9
+ kw_only=True,
10
+ slots=True,
11
+ extra='forbid'
12
+ )
7
13
 
8
14
  class Base:
9
15
  """
@@ -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.2
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.0; extra == "documentation"
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
@@ -18,7 +18,7 @@ numpydoc==1.8.0
18
18
  sphinx>=5.1.1
19
19
  sphinx-rtd-theme==3.0.2
20
20
  sphinx-gallery==0.18.0
21
- pydata-sphinx-theme==0.16.0
21
+ pydata-sphinx-theme==0.16.1
22
22
 
23
23
  [testing]
24
24
  pytest>=0.6
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: FlowCyPy
3
- Version: 0.5.2
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.0; extra == "documentation"
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()
@@ -0,0 +1,10 @@
1
+ .. _analysis-tools:
2
+
3
+ Analysis Tools
4
+ --------------
5
+ Classes for processing and analyzing data from flow cytometry experiments.
6
+
7
+
8
+ .. autoclass:: FlowCyPy.event_correlator.EventCorrelator
9
+ :members:
10
+ :show-inheritance:
@@ -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,9 @@
1
+
2
+ FlowCell Class
3
+ --------------
4
+
5
+ .. autoclass:: FlowCyPy.FlowCell
6
+ :members:
7
+ :show-inheritance:
8
+ :exclude-members: flow_speed, flow_area, run_time
9
+ :undoc-members:
@@ -0,0 +1,9 @@
1
+ .. _cytometry-systems:
2
+
3
+ FlowCytometer
4
+ -------------
5
+ Classes related to the overall configuration of a flow cytometry system.
6
+
7
+ .. autoclass:: FlowCyPy.cytometer.FlowCytometer
8
+ :members:
9
+ :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
@@ -14,7 +14,7 @@ from FlowCyPy.directories import doc_css_path
14
14
  package_name = "FlowCyPy"
15
15
  version = FlowCyPy.__version__
16
16
 
17
- current_dir = Path(".")
17
+ current_dir = Path("../")
18
18
 
19
19
  sys.path.append(str(current_dir.resolve()))
20
20
 
@@ -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>`_.
@@ -65,7 +65,7 @@ documentation = [
65
65
  "sphinx >=5.1.1",
66
66
  "sphinx-rtd-theme ==3.0.2",
67
67
  "sphinx-gallery ==0.18.0",
68
- "pydata-sphinx-theme ==0.16.0",
68
+ "pydata-sphinx-theme ==0.16.1",
69
69
  ]
70
70
 
71
71
  dev = [