PyOPIA 2.4.1__tar.gz → 2.4.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.
- {pyopia-2.4.1 → pyopia-2.4.3}/PKG-INFO +1 -1
- pyopia-2.4.3/pyopia/__init__.py +1 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/simulator/silcam.py +47 -21
- pyopia-2.4.3/pyopia/tests/__init__.py +1 -0
- pyopia-2.4.1/pyopia/__init__.py +0 -1
- {pyopia-2.4.1 → pyopia-2.4.3}/LICENSE +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/README.md +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/background.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/classify.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/cli.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/exampledata.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/instrument/__init__.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/instrument/common.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/instrument/holo.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/instrument/silcam.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/instrument/uvp.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/io.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/pipeline.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/plotting.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/process.py +0 -0
- {pyopia-2.4.1/pyopia/tests → pyopia-2.4.3/pyopia/simulator}/__init__.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/statistics.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/tests/test_classify.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/tests/test_notebooks.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyopia/tests/test_pipeline.py +0 -0
- {pyopia-2.4.1 → pyopia-2.4.3}/pyproject.toml +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '2.4.3'
|
|
@@ -15,15 +15,7 @@ from pyopia.pipeline import Pipeline
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class SilcamSimulator():
|
|
18
|
-
|
|
19
|
-
d50=1000,
|
|
20
|
-
MinD=10,
|
|
21
|
-
PIX_SIZE=28,
|
|
22
|
-
PATH_LENGTH=40,
|
|
23
|
-
imx=2048,
|
|
24
|
-
imy=2448,
|
|
25
|
-
nims=50):
|
|
26
|
-
'''SilCam simulator
|
|
18
|
+
'''SilCam simulator
|
|
27
19
|
|
|
28
20
|
Parameters
|
|
29
21
|
----------
|
|
@@ -44,20 +36,28 @@ class SilcamSimulator():
|
|
|
44
36
|
nims : int, optional
|
|
45
37
|
number of images to simulate, by default 50
|
|
46
38
|
|
|
47
|
-
Example
|
|
48
|
-
|
|
39
|
+
Example
|
|
40
|
+
-------
|
|
49
41
|
|
|
50
|
-
|
|
51
|
-
from pyopia.simulator.silcam import SilcamSimulator
|
|
42
|
+
.. code-block:: python
|
|
52
43
|
|
|
53
|
-
|
|
54
|
-
sim.check_convergence()
|
|
55
|
-
sim.synthesize()
|
|
56
|
-
sim.process_synthetic_image()
|
|
57
|
-
sim.plot()
|
|
58
|
-
```
|
|
44
|
+
from pyopia.simulator.silcam import SilcamSimulator
|
|
59
45
|
|
|
60
|
-
|
|
46
|
+
sim = SilcamSimulator()
|
|
47
|
+
sim.check_convergence()
|
|
48
|
+
sim.synthesize()
|
|
49
|
+
sim.process_synthetic_image()
|
|
50
|
+
sim.plot()
|
|
51
|
+
|
|
52
|
+
'''
|
|
53
|
+
def __init__(self, total_volume_concentration=1000,
|
|
54
|
+
d50=1000,
|
|
55
|
+
MinD=10,
|
|
56
|
+
PIX_SIZE=28,
|
|
57
|
+
PATH_LENGTH=40,
|
|
58
|
+
imx=2048,
|
|
59
|
+
imy=2448,
|
|
60
|
+
nims=50):
|
|
61
61
|
self.total_volume_concentration = total_volume_concentration
|
|
62
62
|
self.d50 = d50
|
|
63
63
|
self.MinD = MinD
|
|
@@ -94,6 +94,18 @@ class SilcamSimulator():
|
|
|
94
94
|
return (a / n) * (x / n) ** (a - 1) * np.exp(-(x / n) ** a)
|
|
95
95
|
|
|
96
96
|
def check_convergence(self):
|
|
97
|
+
'''Check statistical convergence of randomly selected size distributions
|
|
98
|
+
over the `nims`number of images
|
|
99
|
+
|
|
100
|
+
Parameters
|
|
101
|
+
----------
|
|
102
|
+
data['volume_distribution'] : array
|
|
103
|
+
volume distribution of shape (nims, dias)
|
|
104
|
+
data['cumulative_volume_concentration'] : float
|
|
105
|
+
cumulative mean volume concentration of length `nims`
|
|
106
|
+
data['cumulative_d50'] : float
|
|
107
|
+
cumulative average d50 of length `nims`
|
|
108
|
+
'''
|
|
97
109
|
self.data['weibull_x'] = np.linspace(np.min(self.dias), np.max(self.dias), 10000)
|
|
98
110
|
self.data['weibull_y'] = self.weibull_distribution(self.data['weibull_x'])
|
|
99
111
|
|
|
@@ -150,7 +162,14 @@ class SilcamSimulator():
|
|
|
150
162
|
self.dias)
|
|
151
163
|
|
|
152
164
|
def synthesize(self):
|
|
153
|
-
'''
|
|
165
|
+
'''Synthesize an image and measure droplets
|
|
166
|
+
|
|
167
|
+
Parameters
|
|
168
|
+
----------
|
|
169
|
+
data['synthetic_image_data']['image'] : array
|
|
170
|
+
synthetic image
|
|
171
|
+
data['synthetic_image_data']['input_volume_distribution'] : array
|
|
172
|
+
Volume distribution used to create the synthetic image
|
|
154
173
|
'''
|
|
155
174
|
nc = int(sum(self.data['number_distribution'])) # number concentration
|
|
156
175
|
|
|
@@ -184,6 +203,13 @@ class SilcamSimulator():
|
|
|
184
203
|
self.data['synthetic_image_data']['input_volume_distribution'] = log_vd
|
|
185
204
|
|
|
186
205
|
def process_synthetic_image(self):
|
|
206
|
+
'''Put the synthetic image `data['synthetic_image_data']['image']` through a basic pyopia processing pipeline
|
|
207
|
+
|
|
208
|
+
Parameters
|
|
209
|
+
----------
|
|
210
|
+
data['synthetic_image_data']['pyopia_processed_volume_distribution'] : array
|
|
211
|
+
pyopia processed volume distribution associated with `dias`size classes
|
|
212
|
+
'''
|
|
187
213
|
pipeline_config = {
|
|
188
214
|
'general': {
|
|
189
215
|
'raw_files': '',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
pyopia-2.4.1/pyopia/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '2.4.1'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|