PyOPIA 2.13.1__tar.gz → 2.14.0__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 (34) hide show
  1. {pyopia-2.13.1 → pyopia-2.14.0}/PKG-INFO +1 -1
  2. pyopia-2.14.0/pyopia/__init__.py +1 -0
  3. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/cf_metadata.json +49 -1
  4. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/io.py +3 -0
  5. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/process.py +7 -1
  6. pyopia-2.13.1/pyopia/__init__.py +0 -1
  7. {pyopia-2.13.1 → pyopia-2.14.0}/.gitignore +0 -0
  8. {pyopia-2.13.1 → pyopia-2.14.0}/LICENSE +0 -0
  9. {pyopia-2.13.1 → pyopia-2.14.0}/README.md +0 -0
  10. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/auxillarydata.py +0 -0
  11. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/background.py +0 -0
  12. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/classify.py +0 -0
  13. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/cli.py +0 -0
  14. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/dataexport/__init__.py +0 -0
  15. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/dataexport/ecotaxa.py +0 -0
  16. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/exampledata.py +0 -0
  17. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/instrument/__init__.py +0 -0
  18. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/instrument/common.py +0 -0
  19. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/instrument/holo.py +0 -0
  20. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/instrument/silcam.py +0 -0
  21. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/instrument/uvp.py +0 -0
  22. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/metadata.py +0 -0
  23. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/pipeline.py +0 -0
  24. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/plotting.py +0 -0
  25. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/simulator/__init__.py +0 -0
  26. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/simulator/silcam.py +0 -0
  27. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/statistics.py +0 -0
  28. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/tests/__init__.py +0 -0
  29. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/tests/test_auxillarydata.py +0 -0
  30. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/tests/test_classify.py +0 -0
  31. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/tests/test_io.py +0 -0
  32. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/tests/test_notebooks.py +0 -0
  33. {pyopia-2.13.1 → pyopia-2.14.0}/pyopia/tests/test_pipeline.py +0 -0
  34. {pyopia-2.13.1 → pyopia-2.14.0}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyOPIA
3
- Version: 2.13.1
3
+ Version: 2.14.0
4
4
  Summary: A Python Ocean Particle Image Analysis toolbox.
5
5
  Project-URL: Repository, https://github.com/sintef/pyopia
6
6
  Project-URL: Documentation, https://pyopia.readthedocs.io
@@ -0,0 +1 @@
1
+ __version__ = "2.14.0"
@@ -62,4 +62,52 @@
62
62
  "standard_name": "timestamp",
63
63
  "long_name": "Timestamp of particle observation",
64
64
  "calculation_method": "Recorded during particle observation",
65
- "pyopia_process_level": 0}}
65
+ "pyopia_process_level": 0},
66
+ "filename": {
67
+ "standard_name": "filename",
68
+ "long_name": "Filename of the raw image",
69
+ "units": "",
70
+ "calculation_method": "Recorded during image loading",
71
+ "pyopia_process_level": 0},
72
+ "particle_count": {
73
+ "standard_name": "particle_count",
74
+ "long_name": "Number of particles detected in the image",
75
+ "units": "1",
76
+ "calculation_method": "Count of particles from segmentation",
77
+ "pyopia_process_level": 1},
78
+ "saturation": {
79
+ "standard_name": "image_saturation",
80
+ "long_name": "Percentage saturation of the image",
81
+ "units": "percent",
82
+ "calculation_method": "Computed as the percentage of the image covered by particles relative to the maximum acceptable coverage",
83
+ "pyopia_process_level": 1},
84
+ "d50": {
85
+ "standard_name": "median_particle_diameter",
86
+ "long_name": "Median particle diameter (D50) from volume distribution",
87
+ "units": "micrometers",
88
+ "calculation_method": "Calculated from volume-based particle size distribution",
89
+ "pyopia_process_level": 2},
90
+ "nc": {
91
+ "standard_name": "number_concentration",
92
+ "long_name": "Number concentration of particles",
93
+ "units": "L^-1",
94
+ "calculation_method": "Calculated from particle count and sample volume",
95
+ "pyopia_process_level": 2},
96
+ "vc": {
97
+ "standard_name": "volume_concentration",
98
+ "long_name": "Volume concentration of particles",
99
+ "units": "uL L^-1",
100
+ "calculation_method": "Calculated from particle volumes and sample volume",
101
+ "pyopia_process_level": 2},
102
+ "sample_volume": {
103
+ "standard_name": "sample_volume",
104
+ "long_name": "Volume of water sampled",
105
+ "units": "L",
106
+ "calculation_method": "Calculated from image area, pixel size, and path length",
107
+ "pyopia_process_level": 2},
108
+ "junge": {
109
+ "standard_name": "junge_parameter",
110
+ "long_name": "Junge parameter (slope of particle size number distribution)",
111
+ "units": "1",
112
+ "calculation_method": "Fitted slope of particle size number distribution between 150-350 µm",
113
+ "pyopia_process_level": 2}}
@@ -128,6 +128,9 @@ def write_stats(
128
128
  # Add auxillary data to ximage_stats
129
129
  ximage_stats = auxillary_data.add_auxillary_data_to_xstats(ximage_stats)
130
130
 
131
+ # Add CF-compliant attributes
132
+ ximage_stats = add_cf_attributes(ximage_stats)
133
+
131
134
  encoding_imagestats = setup_xstats_encoding(ximage_stats)
132
135
  ximage_stats.to_netcdf(
133
136
  datafilename + "-STATS.nc",
@@ -639,7 +639,13 @@ class CalculateImageStats():
639
639
 
640
640
  path_length = getattr(data['settings']['general'], 'path_length', 40)
641
641
  if path_length is not None:
642
- nc_vc = pyopia.statistics.nc_vc_from_stats(data['stats'], pixel_size, path_length)
642
+ # Get image dimensions from the corrected image
643
+ image = data.get('imraw')
644
+ if image is not None:
645
+ imy, imx = image.shape[:2]
646
+ else:
647
+ imx, imy = 2048, 2448 # fallback defaults
648
+ nc_vc = pyopia.statistics.nc_vc_from_stats(data['stats'], pixel_size, path_length, imx=imx, imy=imy)
643
649
  for k, v in zip(['nc', 'vc', 'sample_volume', 'junge'], nc_vc):
644
650
  data['image_stats'].loc[data['timestamp'], k] = v
645
651
 
@@ -1 +0,0 @@
1
- __version__ = "2.13.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