PyOPIA 2.5.2__tar.gz → 2.5.4__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.5.2 → pyopia-2.5.4}/PKG-INFO +1 -1
- pyopia-2.5.4/pyopia/__init__.py +1 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/cli.py +3 -2
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/io.py +4 -7
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/statistics.py +9 -4
- pyopia-2.5.2/pyopia/__init__.py +0 -1
- {pyopia-2.5.2 → pyopia-2.5.4}/LICENSE +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/README.md +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/background.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/classify.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/exampledata.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/instrument/__init__.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/instrument/common.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/instrument/holo.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/instrument/silcam.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/instrument/uvp.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/pipeline.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/plotting.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/process.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/simulator/__init__.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/simulator/silcam.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/tests/__init__.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/tests/test_classify.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/tests/test_notebooks.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyopia/tests/test_pipeline.py +0 -0
- {pyopia-2.5.2 → pyopia-2.5.4}/pyproject.toml +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '2.5.4'
|
|
@@ -132,8 +132,9 @@ def process(config_filename: str, num_chunks: int = 1):
|
|
|
132
132
|
|
|
133
133
|
progress.console.print("[blue]OBTAIN FILE LIST")
|
|
134
134
|
raw_files = pyopia.pipeline.FilesToProcess(pipeline_config['general']['raw_files'])
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
conf_corrbg = pipeline_config['steps'].get('correctbackground', dict())
|
|
136
|
+
average_window = conf_corrbg.get('average_window', 0)
|
|
137
|
+
bgshift_function = conf_corrbg.get('bgshift_function', 'pass')
|
|
137
138
|
raw_files.prepare_chunking(num_chunks, average_window, bgshift_function)
|
|
138
139
|
|
|
139
140
|
progress.console.print('[blue]PREPARE FOLDERS')
|
|
@@ -213,16 +213,13 @@ def combine_stats_netcdf_files(path_to_data, prefix='*'):
|
|
|
213
213
|
coords='minimal', compat='override') as ds:
|
|
214
214
|
xstats = ds.load()
|
|
215
215
|
|
|
216
|
-
# Check if we have image statistics
|
|
217
|
-
# The last file should contain the entire time series of processed images.
|
|
216
|
+
# Check if we have image statistics, if so, load it.
|
|
218
217
|
try:
|
|
219
|
-
|
|
218
|
+
with xarray.open_mfdataset(sorted_filelist, group='image_stats') as ds:
|
|
219
|
+
image_stats = ds.load()
|
|
220
220
|
except OSError:
|
|
221
|
+
logger.info('Could get image_stats from netcdf files for merging, returning None for this.')
|
|
221
222
|
image_stats = None
|
|
222
|
-
else:
|
|
223
|
-
image_stats = ds.load()
|
|
224
|
-
finally:
|
|
225
|
-
ds.close()
|
|
226
223
|
|
|
227
224
|
return xstats, image_stats
|
|
228
225
|
|
|
@@ -763,12 +763,14 @@ def make_timeseries_vd(stats, pixel_size, path_length, time_reference):
|
|
|
763
763
|
similar to Sequoia LISST-100 output,
|
|
764
764
|
and exportable to things like Excel or csv.
|
|
765
765
|
|
|
766
|
-
Note
|
|
766
|
+
Note
|
|
767
|
+
----
|
|
768
|
+
If zero particles are detected within the stats daraframe,
|
|
767
769
|
then the volume concentration should be reported as zero for that
|
|
768
770
|
time. For this function to have awareness of these times, it requires
|
|
769
771
|
time_reference variable. If you use `stats['timestamp'].unique()` for this,
|
|
770
772
|
then you are assuming you have at least one particle per image.
|
|
771
|
-
It is better to use image_stats['
|
|
773
|
+
It is better to use `image_stats['timestamp'].values` instead, which can be obtained from
|
|
772
774
|
:func:`pyopia.io.load_image_stats`
|
|
773
775
|
|
|
774
776
|
Parameters
|
|
@@ -790,9 +792,12 @@ def make_timeseries_vd(stats, pixel_size, path_length, time_reference):
|
|
|
790
792
|
Example
|
|
791
793
|
-------
|
|
792
794
|
.. code-block:: python
|
|
795
|
+
path_length = 40 # for a 40mm long path length
|
|
796
|
+
|
|
793
797
|
time_series_vd = pyopia.statistics.make_timeseries_vd(stats,
|
|
794
798
|
settings['general']['pixel_size'],
|
|
795
|
-
path_length
|
|
799
|
+
path_length,
|
|
800
|
+
image_stats['timestamp'].values)
|
|
796
801
|
|
|
797
802
|
# particle diameters
|
|
798
803
|
dias = np.array(time_series_vd.columns[0:52], dtype=float)
|
|
@@ -807,7 +812,7 @@ def make_timeseries_vd(stats, pixel_size, path_length, time_reference):
|
|
|
807
812
|
time = pd.to_datetime(time_series_vd['Time'].values)
|
|
808
813
|
|
|
809
814
|
# time-series of total volume concentration
|
|
810
|
-
|
|
815
|
+
volume_concentration = np.sum(vdarray, axis=1)
|
|
811
816
|
'''
|
|
812
817
|
sample_volume = get_sample_volume(pixel_size, path_length=path_length)
|
|
813
818
|
|
pyopia-2.5.2/pyopia/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '2.5.2'
|
|
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
|