PyOPIA 2.5.9__tar.gz → 2.5.10__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 (26) hide show
  1. {pyopia-2.5.9 → pyopia-2.5.10}/PKG-INFO +1 -1
  2. pyopia-2.5.10/pyopia/__init__.py +1 -0
  3. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/cli.py +12 -3
  4. pyopia-2.5.9/pyopia/__init__.py +0 -1
  5. {pyopia-2.5.9 → pyopia-2.5.10}/LICENSE +0 -0
  6. {pyopia-2.5.9 → pyopia-2.5.10}/README.md +0 -0
  7. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/background.py +0 -0
  8. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/classify.py +0 -0
  9. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/exampledata.py +0 -0
  10. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/instrument/__init__.py +0 -0
  11. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/instrument/common.py +0 -0
  12. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/instrument/holo.py +0 -0
  13. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/instrument/silcam.py +0 -0
  14. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/instrument/uvp.py +0 -0
  15. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/io.py +0 -0
  16. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/pipeline.py +0 -0
  17. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/plotting.py +0 -0
  18. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/process.py +0 -0
  19. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/simulator/__init__.py +0 -0
  20. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/simulator/silcam.py +0 -0
  21. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/statistics.py +0 -0
  22. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/tests/__init__.py +0 -0
  23. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/tests/test_classify.py +0 -0
  24. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/tests/test_notebooks.py +0 -0
  25. {pyopia-2.5.9 → pyopia-2.5.10}/pyopia/tests/test_pipeline.py +0 -0
  26. {pyopia-2.5.9 → pyopia-2.5.10}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyOPIA
3
- Version: 2.5.9
3
+ Version: 2.5.10
4
4
  Summary: A Python Ocean Particle Image Analysis toolbox.
5
5
  Home-page: https://github.com/sintef/pyopia
6
6
  Keywords: Ocean,Particles,Imaging,Measurement,Size distribution
@@ -0,0 +1 @@
1
+ __version__ = '2.5.10'
@@ -37,7 +37,7 @@ def docs():
37
37
 
38
38
  @app.command()
39
39
  def modify_config(existing_filename: str, modified_filename: str,
40
- raw_files=None,
40
+ raw_files=None, pixel_size=None,
41
41
  step_name=None, modify_arg=None, modify_value=None):
42
42
  '''Modify a existing config.toml file and write a new one to disc
43
43
 
@@ -49,6 +49,8 @@ def modify_config(existing_filename: str, modified_filename: str,
49
49
  e.g. config_new.toml
50
50
  raw_files : str, optional
51
51
  modify the raw file input in the `[general]` settings, by default None
52
+ pixel_size : str, optional
53
+ modify the pixel size in the `[general]` settings, by default None
52
54
  step_name : str, optional
53
55
  the name of the step to modify e.g. `segmentation`, by default None
54
56
  modify_arg : str, optional
@@ -61,11 +63,18 @@ def modify_config(existing_filename: str, modified_filename: str,
61
63
  toml_settings = pyopia.io.load_toml(existing_filename)
62
64
 
63
65
  if raw_files is not None:
64
- toml_settings['general']['raw_files'] = raw_files
66
+ toml_settings['general']['raw_files'] = f'{raw_files}'
67
+ if pixel_size is not None:
68
+ toml_settings['general']['pixel_size'] = float(pixel_size)
65
69
 
66
70
  if step_name is not None:
67
71
  try:
68
- modify_value = float(modify_value)
72
+ if modify_arg == 'average_window':
73
+ modify_value = int(modify_value)
74
+ elif modify_arg == 'threshold':
75
+ modify_value = float(modify_value)
76
+ else:
77
+ modify_value = str(modify_value)
69
78
  except ValueError:
70
79
  pass
71
80
 
@@ -1 +0,0 @@
1
- __version__ = '2.5.9'
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