PyOPIA 2.5.7__tar.gz → 2.5.9__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.7 → pyopia-2.5.9}/PKG-INFO +1 -1
- pyopia-2.5.9/pyopia/__init__.py +1 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/instrument/silcam.py +2 -1
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/io.py +14 -7
- pyopia-2.5.7/pyopia/__init__.py +0 -1
- {pyopia-2.5.7 → pyopia-2.5.9}/LICENSE +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/README.md +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/background.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/classify.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/cli.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/exampledata.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/instrument/__init__.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/instrument/common.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/instrument/holo.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/instrument/uvp.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/pipeline.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/plotting.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/process.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/simulator/__init__.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/simulator/silcam.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/statistics.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/tests/__init__.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/tests/test_classify.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/tests/test_notebooks.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyopia/tests/test_pipeline.py +0 -0
- {pyopia-2.5.7 → pyopia-2.5.9}/pyproject.toml +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '2.5.9'
|
|
@@ -214,7 +214,8 @@ class SilCamLoad():
|
|
|
214
214
|
:func:`pyopia.instrument.silcam.timestamp_from_filename`
|
|
215
215
|
|
|
216
216
|
Required keys in :class:`pyopia.pipeline.Data`:
|
|
217
|
-
- :attr:`pyopia.pipeline.Data.filename`
|
|
217
|
+
- :attr:`pyopia.pipeline.Data.filename` conforming to the format 'DYYYYmmddTHHMMSS.ffffff.silc'
|
|
218
|
+
e.g. 'D20240919T074500.183294.silc'
|
|
218
219
|
|
|
219
220
|
Parameters
|
|
220
221
|
----------
|
|
@@ -160,7 +160,11 @@ def load_image_stats(datafilename):
|
|
|
160
160
|
|
|
161
161
|
|
|
162
162
|
def load_stats(datafilename):
|
|
163
|
-
'''Load STATS file as
|
|
163
|
+
'''Load -STATS.nc file as xarray Dataset
|
|
164
|
+
|
|
165
|
+
.. warning:: Support for loading of old -STATS.h5 formats will be removed in version 3.0.0.
|
|
166
|
+
They will need to be converted to .nc prior to loading.
|
|
167
|
+
Data loaded from -STATS.h5 are returned as an xarray Dataset without metadata.
|
|
164
168
|
|
|
165
169
|
Parameters
|
|
166
170
|
----------
|
|
@@ -169,21 +173,24 @@ def load_stats(datafilename):
|
|
|
169
173
|
|
|
170
174
|
Returns
|
|
171
175
|
-------
|
|
172
|
-
|
|
173
|
-
|
|
176
|
+
xstats : xarray.Dataset
|
|
177
|
+
Particle statistics
|
|
174
178
|
'''
|
|
175
179
|
|
|
176
180
|
if datafilename.endswith('.nc'):
|
|
177
|
-
with xarray.open_dataset(datafilename) as
|
|
178
|
-
|
|
181
|
+
with xarray.open_dataset(datafilename) as xstats:
|
|
182
|
+
xstats.load()
|
|
179
183
|
elif datafilename.endswith('.h5'):
|
|
184
|
+
logger.warning('In future, load_stats will only take .nc files')
|
|
180
185
|
stats = pd.read_hdf(datafilename, 'ParticleStats/stats')
|
|
186
|
+
xstats = stats.to_xarray()
|
|
181
187
|
else:
|
|
182
188
|
logger.warning('WARNING. File extension not specified.' +
|
|
183
189
|
'Assuming prefix of -STATS.h5 for backwards compatability.' +
|
|
184
|
-
'In future,
|
|
190
|
+
'In future, load_stats will only take .nc files')
|
|
185
191
|
stats = pd.read_hdf(datafilename + '-STATS.h5', 'ParticleStats/stats')
|
|
186
|
-
|
|
192
|
+
xstats = stats.to_xarray()
|
|
193
|
+
return xstats
|
|
187
194
|
|
|
188
195
|
|
|
189
196
|
def combine_stats_netcdf_files(path_to_data, prefix='*'):
|
pyopia-2.5.7/pyopia/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '2.5.7'
|
|
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
|