hydrotoolbox 2.1.0__tar.gz → 2.3.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 (127) hide show
  1. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/.github/workflows/clean-workflow-runs.yml +3 -7
  2. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/.pre-commit-config.yaml +4 -4
  3. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/CHANGELOG.md +12 -0
  4. {hydrotoolbox-2.1.0/src/hydrotoolbox.egg-info → hydrotoolbox-2.3.0}/PKG-INFO +2 -2
  5. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/README.rst +1 -1
  6. hydrotoolbox-2.3.0/VERSION +1 -0
  7. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/docs/command_line.rst +2 -2
  8. hydrotoolbox-2.3.0/docs/function_summary.rst +28 -0
  9. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/docs/index.rst +3 -3
  10. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/pyproject.toml +1 -1
  11. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/__init__.py +12 -11
  12. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/comparison.py +5 -0
  13. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/methods/boughton.py +4 -0
  14. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/methods/chapman.py +4 -0
  15. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/methods/chapman_maxwell.py +4 -0
  16. hydrotoolbox-2.3.0/src/hydrotoolbox/baseflow/methods/eckhardt.py +22 -0
  17. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/methods/ewma.py +4 -0
  18. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/methods/five_day.py +4 -0
  19. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/methods/fixed.py +5 -1
  20. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/methods/furey.py +4 -0
  21. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/methods/ihacres.py +9 -8
  22. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/methods/local.py +5 -1
  23. hydrotoolbox-2.3.0/src/hydrotoolbox/baseflow/methods/lyne_hollick.py +19 -0
  24. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/methods/slide.py +5 -1
  25. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/methods/strict.py +5 -1
  26. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/methods/ukih.py +4 -0
  27. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/methods/willems.py +4 -0
  28. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/param_estimate.py +7 -2
  29. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/separation.py +6 -6
  30. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow_sep.py +121 -47
  31. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/hydrotoolbox.py +1259 -1188
  32. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/indices/indices.py +1 -1
  33. hydrotoolbox-2.3.0/src/hydrotoolbox/toolbox_utils/src/toolbox_utils/readers/__init__.py +0 -0
  34. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/src/toolbox_utils/readers/hbn.py +32 -172
  35. hydrotoolbox-2.3.0/src/hydrotoolbox/toolbox_utils/src/toolbox_utils/readers/utils.py +179 -0
  36. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/src/toolbox_utils/tsutils.py +69 -49
  37. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/src/toolbox_utils/utils.py +52 -0
  38. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/tests/test_asbestfreq.py +5 -3
  39. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0/src/hydrotoolbox.egg-info}/PKG-INFO +2 -2
  40. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox.egg-info/SOURCES.txt +2 -0
  41. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_baseflow_eckhardt.csv +2513 -2513
  42. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_baseflow_ihacres.csv +5 -5
  43. hydrotoolbox-2.1.0/VERSION +0 -1
  44. hydrotoolbox-2.1.0/docs/function_summary.rst +0 -28
  45. hydrotoolbox-2.1.0/src/hydrotoolbox/baseflow/methods/eckhardt.py +0 -27
  46. hydrotoolbox-2.1.0/src/hydrotoolbox/baseflow/methods/lyne_hollick.py +0 -10
  47. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/.deepsource.toml +0 -0
  48. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/.github/dependabot.yml +0 -0
  49. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/.github/workflows/pypi-package.yml +0 -0
  50. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/.github/workflows/tests.yml +0 -0
  51. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/.gitignore +0 -0
  52. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/.gitmodules +0 -0
  53. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/.sourcery.yaml +0 -0
  54. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/AUTHORS.rst +0 -0
  55. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/BADGES.rst +0 -0
  56. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/CONTRIBUTING.rst +0 -0
  57. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/LICENSE.txt +0 -0
  58. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/docs/Makefile +0 -0
  59. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/docs/authors.rst +0 -0
  60. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/docs/conf.py +0 -0
  61. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/docs/contributing.rst +0 -0
  62. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/docs/license.rst +0 -0
  63. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/docs/make.bat +0 -0
  64. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/docs/readme.rst +0 -0
  65. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/pytest.ini +0 -0
  66. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/setup.cfg +0 -0
  67. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/__init__.py +0 -0
  68. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/example.csv +0 -0
  69. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/methods/__init__.py +0 -0
  70. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/methods/general_form.py +0 -0
  71. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/baseflow/utils.py +0 -0
  72. {hydrotoolbox-2.1.0/src/hydrotoolbox/toolbox_utils/src/toolbox_utils → hydrotoolbox-2.3.0/src/hydrotoolbox/indices}/__init__.py +0 -0
  73. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/docs/conf.py +0 -0
  74. {hydrotoolbox-2.1.0/src/hydrotoolbox/toolbox_utils/src/toolbox_utils/readers → hydrotoolbox-2.3.0/src/hydrotoolbox/toolbox_utils/src/toolbox_utils}/__init__.py +0 -0
  75. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/src/toolbox_utils/readers/plotgen.py +0 -0
  76. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/src/toolbox_utils/readers/wdm.py +0 -0
  77. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/tests/test_date_slice.py +0 -0
  78. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/tests/test_dateparse.py +0 -0
  79. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/tests/test_extract.py +0 -0
  80. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/tests/test_hbn.py +0 -0
  81. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/tests/test_make_list.py +0 -0
  82. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/tests/test_period_timestamp.py +0 -0
  83. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/tests/test_plotgen.py +0 -0
  84. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/tests/test_range_to_numlist.py +0 -0
  85. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/tests/test_read.py +0 -0
  86. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/toolbox_utils/tests/test_wdm.py +0 -0
  87. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox/utils.py +0 -0
  88. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox.egg-info/dependency_links.txt +0 -0
  89. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox.egg-info/entry_points.txt +0 -0
  90. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox.egg-info/requires.txt +0 -0
  91. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/src/hydrotoolbox.egg-info/top_level.txt +0 -0
  92. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/BEC_test.sh +0 -0
  93. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/Q_BEC_BE_6500.csv +0 -0
  94. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/Q_BEC_BE_6500.ssf +0 -0
  95. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/black_earth_creek_05406500_flow.csv +0 -0
  96. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/black_earth_creek_05406500_test.sh +0 -0
  97. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data.csv +0 -0
  98. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_02239501.csv +0 -0
  99. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_baseflow_boughton.csv +0 -0
  100. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_baseflow_chapman.csv +0 -0
  101. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_baseflow_chapman_maxwell.csv +0 -0
  102. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_baseflow_ewma.csv +0 -0
  103. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_baseflow_five_day.csv +0 -0
  104. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_baseflow_furey.csv +0 -0
  105. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_baseflow_lyne_hollick.csv +0 -0
  106. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_baseflow_strict.csv +0 -0
  107. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_baseflow_ukih.csv +0 -0
  108. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_baseflow_usgs_hysep_fixed.csv +0 -0
  109. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_baseflow_usgs_hysep_local.csv +0 -0
  110. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_baseflow_usgs_hysep_slide.csv +0 -0
  111. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_baseflow_willems.csv +0 -0
  112. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_percentile_test.csv +0 -0
  113. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_short.csv +0 -0
  114. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/data_test_storm_events.csv +0 -0
  115. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/gtable.out +0 -0
  116. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/gtable_1955.out +0 -0
  117. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/hydrotoolbox_indices.txt +0 -0
  118. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/run_test.sh +0 -0
  119. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/test_baseflow_sep.py +0 -0
  120. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/test_exceedance_time.py +0 -0
  121. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/test_flow_duration.py +0 -0
  122. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/test_indices.py +0 -0
  123. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/test_recession.py +0 -0
  124. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/test_storm_events.py +0 -0
  125. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/tsproc_hydrologic_indices.inp +0 -0
  126. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/tsproc_hydrologic_indices.rec +0 -0
  127. {hydrotoolbox-2.1.0 → hydrotoolbox-2.3.0}/tests/tsproc_hydrologic_indices_percentile_test.inp +0 -0
@@ -16,10 +16,6 @@ jobs:
16
16
  - name: Delete workflow runs
17
17
  uses: dmvict/clean-workflow-runs@v1.2.2
18
18
 
19
- with:
20
-
21
- run_conclusions: |
22
- failure
23
- timed_out
24
- save_period: 5
25
- save_min_runs_number: 1
19
+ with:
20
+ save_period: 5
21
+ save_min_runs_number: 1
@@ -29,7 +29,7 @@ repos:
29
29
 
30
30
  - repo: https://github.com/astral-sh/ruff-pre-commit
31
31
  # Ruff version.
32
- rev: v0.15.6
32
+ rev: v0.15.16
33
33
  hooks:
34
34
  # Run the linter.
35
35
  - id: ruff
@@ -40,7 +40,7 @@ repos:
40
40
  types_or: [python, pyi, jupyter]
41
41
 
42
42
  - repo: https://github.com/pycqa/isort
43
- rev: 8.0.1
43
+ rev: 9.0.0a3
44
44
  hooks:
45
45
  - id: isort
46
46
  name: isort (python)
@@ -52,7 +52,7 @@ repos:
52
52
  types: [pyi]
53
53
 
54
54
  - repo: https://github.com/pappasam/toml-sort
55
- rev: v0.24.3
55
+ rev: v0.24.4
56
56
  hooks:
57
57
  - id: toml-sort-fix
58
58
  args: [--in-place, --spaces-indent-inline-array, '4']
@@ -91,7 +91,7 @@ repos:
91
91
  - id: pyupgrade
92
92
 
93
93
  - repo: https://github.com/commitizen-tools/commitizen
94
- rev: v4.13.9
94
+ rev: v4.16.3
95
95
  hooks:
96
96
  - id: commitizen
97
97
  stages: [commit-msg]
@@ -1,3 +1,15 @@
1
+ ## v2.3.0 (2026-06-09)
2
+
3
+ ### Feat
4
+
5
+ - add "passes" to Lynne Hollick function
6
+
7
+ ## v2.2.0 (2026-03-29)
8
+
9
+ ### Feat
10
+
11
+ - moved to using scipy lfilter for most baseflow_sep filters, better separation between API and CLI
12
+
1
13
  ## v2.1.0 (2026-03-19)
2
14
 
3
15
  ### Feat
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hydrotoolbox
3
- Version: 2.1.0
3
+ Version: 2.3.0
4
4
  Summary: Command line script and Python library for analysis of flow time-series.
5
5
  Author-email: Tim Cera <tim@cerazone.net>
6
6
  License: BSD-3-Clause
@@ -72,7 +72,7 @@ or numpy (http://numpy.scipy.org) for any heavy lifting.
72
72
 
73
73
  Requirements
74
74
  ------------
75
- * python 3.7 or higher
75
+ * python 3.10 or higher
76
76
 
77
77
  Installation
78
78
  ------------
@@ -31,7 +31,7 @@ or numpy (http://numpy.scipy.org) for any heavy lifting.
31
31
 
32
32
  Requirements
33
33
  ------------
34
- * python 3.7 or higher
34
+ * python 3.10 or higher
35
35
 
36
36
  Installation
37
37
  ------------
@@ -0,0 +1 @@
1
+ 2.3.0
@@ -28,7 +28,7 @@ baseflow_sep chapman
28
28
  :prompt:
29
29
 
30
30
  baseflow_sep chapman_maxwell
31
- ---------------
31
+ ----------------------------
32
32
  .. program-output:: hydrotoolbox baseflow_sep chapman_maxwell --help
33
33
  :prompt:
34
34
 
@@ -58,7 +58,7 @@ baseflow_sep ihacres
58
58
  :prompt:
59
59
 
60
60
  baseflow_sep lyne_hollick
61
- ---------------
61
+ -------------------------
62
62
  .. program-output:: hydrotoolbox baseflow_sep lyne_hollick --help
63
63
  :prompt:
64
64
 
@@ -0,0 +1,28 @@
1
+ .. include:: ../BADGES.rst
2
+
3
+ Python API Function Summary
4
+ ===========================
5
+
6
+ .. autosummary::
7
+ :toctree: _function_autosummary
8
+
9
+ hydrotoolbox.about
10
+ hydrotoolbox.baseflow_sep.boughton
11
+ hydrotoolbox.baseflow_sep.chapman
12
+ hydrotoolbox.baseflow_sep.chapman_maxwell
13
+ hydrotoolbox.baseflow_sep.eckhardt
14
+ hydrotoolbox.baseflow_sep.ewma
15
+ hydrotoolbox.baseflow_sep.five_day
16
+ hydrotoolbox.baseflow_sep.furey
17
+ hydrotoolbox.baseflow_sep.ihacres
18
+ hydrotoolbox.baseflow_sep.lyne_hollick
19
+ hydrotoolbox.baseflow_sep.ukih
20
+ hydrotoolbox.baseflow_sep.usgs_hysep_fixed
21
+ hydrotoolbox.baseflow_sep.usgs_hysep_local
22
+ hydrotoolbox.baseflow_sep.usgs_hysep_slide
23
+ hydrotoolbox.baseflow_sep.willems
24
+ hydrotoolbox.exceedance_time
25
+ hydrotoolbox.flow_duration
26
+ hydrotoolbox.indices
27
+ hydrotoolbox.recession
28
+ hydrotoolbox.storm_events
@@ -5,10 +5,10 @@
5
5
  hydrotoolbox
6
6
  ============
7
7
 
8
- This is the home page for hydrotoolbox. hydrotoolbox is a command line program and
9
- Python library for hydrologic analysis.
8
+ This is the home page for hydrotoolbox. hydrotoolbox is a command line program
9
+ and Python library for hydrologic analysis.
10
10
 
11
- hydrotoolbox should work with Python 3.6+.
11
+ hydrotoolbox should work with Python 3.10+.
12
12
 
13
13
  Table of Contents
14
14
  -----------------
@@ -65,7 +65,7 @@ github = "https://github.com/timcera/hydrotoolbox"
65
65
  name = "cz_conventional_commits"
66
66
  tag_format = "v$version"
67
67
  update_changelog_on_bump = true
68
- version = "2.1.0"
68
+ version = "2.3.0"
69
69
  version_files = ["VERSION"]
70
70
 
71
71
  [tool.isort]
@@ -1,21 +1,22 @@
1
1
  """Define hydrotoolbox package."""
2
2
 
3
+ # Import main functions from hydrotoolbox module
4
+ from hydrotoolbox.hydrotoolbox import (
5
+ about,
6
+ exceedance_time,
7
+ flow_duration,
8
+ indices,
9
+ recession,
10
+ storm_events,
11
+ )
12
+
13
+ # Define __all__ list
3
14
  __all__ = [
15
+ # Main functions
4
16
  "about",
5
- "baseflow_sep",
6
17
  "exceedance_time",
7
18
  "flow_duration",
8
19
  "indices",
9
20
  "recession",
10
21
  "storm_events",
11
22
  ]
12
-
13
- from .hydrotoolbox import (
14
- about,
15
- baseflow_sep,
16
- exceedance_time,
17
- flow_duration,
18
- indices,
19
- recession,
20
- storm_events,
21
- )
@@ -1,3 +1,8 @@
1
+ __all__ = [
2
+ "KGE",
3
+ "strict_baseflow",
4
+ ]
5
+
1
6
  import numpy as np
2
7
 
3
8
 
@@ -1,3 +1,7 @@
1
+ __all__ = [
2
+ "boughton",
3
+ ]
4
+
1
5
  from hydrotoolbox.baseflow.methods.general_form import general_form_digital_filter
2
6
 
3
7
 
@@ -1,3 +1,7 @@
1
+ __all__ = [
2
+ "chapman",
3
+ ]
4
+
1
5
  from hydrotoolbox.baseflow.methods.general_form import general_form_digital_filter
2
6
 
3
7
 
@@ -1,3 +1,7 @@
1
+ __all__ = [
2
+ "chapman_maxwell",
3
+ ]
4
+
1
5
  from hydrotoolbox.baseflow.methods.general_form import general_form_digital_filter
2
6
 
3
7
 
@@ -0,0 +1,22 @@
1
+ __all__ = [
2
+ "eckhardt",
3
+ ]
4
+
5
+ from hydrotoolbox.baseflow.methods.general_form import general_form_digital_filter
6
+
7
+
8
+ def eckhardt(flow, k, BFImax):
9
+ """Eckhardt filter (Eckhardt, 2005)"""
10
+ denom = 1 - k * BFImax
11
+ alpha = ((1 - BFImax) * k) / denom
12
+ beta = ((1 - k) * BFImax) / denom
13
+ gamma = 0
14
+
15
+ return general_form_digital_filter(flow, alpha, beta, gamma)
16
+
17
+
18
+ def f_Eckhardt(a):
19
+ def _Eckhardt(Q, b_LH, BFImax):
20
+ return eckhardt(Q, b_LH, a, BFImax)
21
+
22
+ return _Eckhardt
@@ -1,3 +1,7 @@
1
+ __all__ = [
2
+ "ewma",
3
+ ]
4
+
1
5
  import numpy as np
2
6
 
3
7
 
@@ -7,6 +7,10 @@ hydrotoolbox baseflow_sep eckhardt,sliding < daily.csv
7
7
 
8
8
  hydrotoolbox recession"""
9
9
 
10
+ __all__ = [
11
+ "five_day",
12
+ ]
13
+
10
14
  import pandas as pd
11
15
 
12
16
 
@@ -1,6 +1,10 @@
1
+ __all__ = [
2
+ "fixed",
3
+ ]
4
+
1
5
  import numpy as np
2
6
 
3
- from .local import hysep_interval
7
+ from hydrotoolbox.baseflow.methods.local import hysep_interval
4
8
 
5
9
 
6
10
  def fixed(Q, area=None, num_days=None):
@@ -1,3 +1,7 @@
1
+ __all__ = [
2
+ "furey",
3
+ ]
4
+
1
5
  import numpy as np
2
6
 
3
7
 
@@ -7,9 +7,15 @@ hydrotoolbox baseflow_sep eckhardt,sliding < daily.csv
7
7
 
8
8
  hydrotoolbox recession"""
9
9
 
10
+ __all__ = [
11
+ "ihacres",
12
+ ]
13
+
14
+ from hydrotoolbox.baseflow.methods.general_form import general_form_digital_filter
15
+
10
16
 
11
17
  def ihacres(
12
- Q,
18
+ flow,
13
19
  k: float,
14
20
  C: float,
15
21
  a: float,
@@ -18,13 +24,8 @@ def ihacres(
18
24
 
19
25
  Jakeman-Hornberger digital filter (Jakeman and Hornberger, 1993)
20
26
  """
21
- Qb = Q.copy()
22
-
23
27
  alpha = k / (1 + C)
24
28
  beta = C / (1 + C)
29
+ gamma = a
25
30
 
26
- for row in range(1, len(Q)):
27
- Qb[row] = alpha * Qb[row - 1] + beta * (Q[row] + a * Q[row - 1])
28
- mask = Qb > Q
29
- Qb[mask] = Q[mask]
30
- return Qb
31
+ return general_form_digital_filter(flow, alpha, beta, gamma)
@@ -1,5 +1,9 @@
1
1
  from typing import Optional
2
2
 
3
+ __all__ = [
4
+ "local",
5
+ ]
6
+
3
7
  import numpy as np
4
8
 
5
9
  try:
@@ -7,7 +11,7 @@ try:
7
11
  except ImportError:
8
12
  from pydantic import validate_arguments as validate_call
9
13
 
10
- from .ukih import linear_interpolation
14
+ from hydrotoolbox.baseflow.methods.ukih import linear_interpolation
11
15
 
12
16
 
13
17
  def local(Q, b_LH, area=None, num_days=None):
@@ -0,0 +1,19 @@
1
+ __all__ = [
2
+ "lyne_hollick",
3
+ ]
4
+
5
+ from hydrotoolbox.baseflow.methods.general_form import general_form_digital_filter
6
+
7
+
8
+ def lyne_hollick(flow, k, passes=1):
9
+ """LH digital filter (Lyne & Hollick, 1979)"""
10
+ alpha = k
11
+ beta = (1 - k) / 2
12
+ gamma = 1.0
13
+
14
+ for pss in range(passes):
15
+ if pss > 0:
16
+ flow = flow[::-1]
17
+ flow, count = general_form_digital_filter(flow, alpha, beta, gamma)
18
+
19
+ return flow, count
@@ -1,6 +1,10 @@
1
+ __all__ = [
2
+ "slide",
3
+ ]
4
+
1
5
  import numpy as np
2
6
 
3
- from .local import hysep_interval
7
+ from hydrotoolbox.baseflow.methods.local import hysep_interval
4
8
 
5
9
 
6
10
  def slide(Q, area=None, num_days=None):
@@ -7,7 +7,11 @@ hydrotoolbox baseflow_sep eckhardt,sliding < daily.csv
7
7
 
8
8
  hydrotoolbox recession"""
9
9
 
10
- from ..comparison import strict_baseflow
10
+ __all__ = [
11
+ "strict",
12
+ ]
13
+
14
+ from hydrotoolbox.baseflow.comparison import strict_baseflow
11
15
 
12
16
 
13
17
  def strict(Q):
@@ -1,3 +1,7 @@
1
+ __all__ = [
2
+ "ukih",
3
+ ]
4
+
1
5
  import numpy as np
2
6
 
3
7
 
@@ -1,3 +1,7 @@
1
+ __all__ = [
2
+ "willems",
3
+ ]
4
+
1
5
  from hydrotoolbox.baseflow.methods.general_form import general_form_digital_filter
2
6
 
3
7
 
@@ -1,6 +1,11 @@
1
+ __all__ = [
2
+ "recession_coefficient",
3
+ "recession_period",
4
+ ]
5
+
1
6
  import numpy as np
2
7
 
3
- from .utils import NSE, moving_average, multi_arange
8
+ from hydrotoolbox.baseflow.utils import NSE, moving_average, multi_arange
4
9
 
5
10
 
6
11
  def recession_coefficient(Q, strict, date=None, ice_period=None):
@@ -31,7 +36,7 @@ def recession_coefficient(Q, strict, date=None, ice_period=None):
31
36
  return np.exp(-1 / K)
32
37
 
33
38
 
34
- def param_calibrate(param_range, method, Q, b_LH):
39
+ def param_calibrate(param_range, method, Q, b_LH=0):
35
40
  idx_rec = recession_period(Q)
36
41
  idx_oth = np.full(Q.shape[0], True)
37
42
  idx_oth[idx_rec] = False
@@ -37,6 +37,7 @@ def separation(
37
37
  C=None,
38
38
  a=None,
39
39
  bfi_max=None,
40
+ passes=1,
40
41
  ):
41
42
  if method == "all":
42
43
  method = [
@@ -72,12 +73,11 @@ def separation(
72
73
  "ukih",
73
74
  "local",
74
75
  "chapman_maxwell",
75
- "furey",
76
- "eckhardt",
77
76
  "ewma",
77
+ "furey",
78
78
  "willems",
79
79
  ]:
80
- b_lh = lyne_hollick(Q, k=k)[0]
80
+ b_lh = lyne_hollick(Q, k=k, passes=passes)[0]
81
81
 
82
82
  if m == "ukih":
83
83
  b[m] = ukih(Q, b_lh)
@@ -92,7 +92,7 @@ def separation(
92
92
  b[m] = slide(Q, area=area, num_days=num_days)
93
93
 
94
94
  if m == "lyne_hollick":
95
- b[m] = lyne_hollick(Q, k=k)[0]
95
+ b[m] = lyne_hollick(Q, k=k, passes=passes)[0]
96
96
 
97
97
  if m == "chapman":
98
98
  b[m] = chapman(Q, k)[0]
@@ -120,7 +120,7 @@ def separation(
120
120
  np.arange(0.0001, 1, 0.0001), f_Eckhardt(k), Q, b_lh
121
121
  )
122
122
  bfi_max = float(bfi_max)
123
- b[m] = eckhardt(Q, b_lh, k, bfi_max)[0]
123
+ b[m] = eckhardt(Q, k, bfi_max)[0]
124
124
 
125
125
  if m == "ewma":
126
126
  e = param_calibrate(np.arange(0.0001, 0.5, 0.0001), ewma, Q, b_lh)
@@ -131,7 +131,7 @@ def separation(
131
131
  b[m] = willems(Q, b_lh, k, w)[0]
132
132
 
133
133
  if m == "ihacres":
134
- b[m] = ihacres(Q, k=k, C=C, a=a)
134
+ b[m] = ihacres(Q, k=k, C=C, a=a)[0]
135
135
 
136
136
  if m == "strict":
137
137
  b[m] = strict(Q)