funcnodes-span 0.3.6__tar.gz → 0.3.7__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 (52) hide show
  1. {funcnodes_span-0.3.6/src/funcnodes_span.egg-info → funcnodes_span-0.3.7}/PKG-INFO +4 -3
  2. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/pyproject.toml +10 -2
  3. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/__pycache__/__init__.cpython-312.pyc +0 -0
  4. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/__pycache__/_baseline.cpython-312.pyc +0 -0
  5. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/__pycache__/_curves.cpython-312.pyc +0 -0
  6. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/__pycache__/baseline.cpython-312.pyc +0 -0
  7. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/__pycache__/curves.cpython-312.pyc +0 -0
  8. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/__pycache__/fitting.cpython-312.pyc +0 -0
  9. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/__pycache__/normalization.cpython-312.pyc +0 -0
  10. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/__pycache__/peak_analysis.cpython-312.pyc +0 -0
  11. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/__pycache__/peaks.cpython-312.pyc +0 -0
  12. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/__pycache__/smoothing.cpython-312.pyc +0 -0
  13. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/peak_analysis.py +4 -6
  14. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7/src/funcnodes_span.egg-info}/PKG-INFO +4 -3
  15. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span.egg-info/requires.txt +1 -1
  16. funcnodes_span-0.3.7/tests/__pycache__/__init__.cpython-312.pyc +0 -0
  17. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/__pycache__/all_nodes_test_base.cpython-312.pyc +0 -0
  18. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/__pycache__/test_all_nodes.cpython-312-pytest-8.3.4.pyc +0 -0
  19. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/__pycache__/test_baseline.cpython-312-pytest-8.3.4.pyc +0 -0
  20. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/__pycache__/test_curves.cpython-312-pytest-8.3.4.pyc +0 -0
  21. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/__pycache__/test_fit.cpython-312-pytest-8.3.4.pyc +0 -0
  22. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/__pycache__/test_normalization.cpython-312-pytest-8.3.4.pyc +0 -0
  23. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/__pycache__/test_peak_analysis.cpython-312-pytest-8.3.4.pyc +0 -0
  24. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/__pycache__/test_smoothing.cpython-312-pytest-8.3.4.pyc +0 -0
  25. funcnodes_span-0.3.6/tests/__pycache__/__init__.cpython-312.pyc +0 -0
  26. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/LICENSE +0 -0
  27. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/MANIFEST.in +0 -0
  28. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/README.md +0 -0
  29. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/setup.cfg +0 -0
  30. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/__init__.py +0 -0
  31. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/_baseline.py +0 -0
  32. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/_curves.py +0 -0
  33. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/_smoothing.py +0 -0
  34. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/baseline.py +0 -0
  35. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/curves.py +0 -0
  36. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/fitting.py +0 -0
  37. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/normalization.py +0 -0
  38. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/peaks.py +0 -0
  39. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span/smoothing.py +0 -0
  40. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span.egg-info/SOURCES.txt +0 -0
  41. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span.egg-info/dependency_links.txt +0 -0
  42. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span.egg-info/entry_points.txt +0 -0
  43. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/src/funcnodes_span.egg-info/top_level.txt +0 -0
  44. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/__init__.py +0 -0
  45. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/all_nodes_test_base.py +0 -0
  46. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/test_all_nodes.py +0 -0
  47. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/test_baseline.py +0 -0
  48. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/test_curves.py +0 -0
  49. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/test_fit.py +0 -0
  50. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/test_normalization.py +0 -0
  51. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/test_peak_analysis.py +0 -0
  52. {funcnodes_span-0.3.6 → funcnodes_span-0.3.7}/tests/test_smoothing.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: funcnodes-span
3
- Version: 0.3.6
3
+ Version: 0.3.7
4
4
  Summary: SPectral ANalysis (SPAN) for funcnodes
5
5
  Author-email: Kourosh Rezaei <kourosh.rezaei@linkdlab.de>, Julian Kimmig <julian.kimmig@linkdlab.de>
6
6
  License: AGPL-3.0
@@ -23,7 +23,8 @@ Requires-Dist: funcnodes_numpy
23
23
  Requires-Dist: funcnodes_pandas
24
24
  Requires-Dist: funcnodes_plotly
25
25
  Requires-Dist: pybaselines
26
- Requires-Dist: funcnodes-lmfit
26
+ Requires-Dist: funcnodes-lmfit>=0.2.0
27
27
  Requires-Dist: numba<1.0.0,>=0.61.0
28
+ Dynamic: license-file
28
29
 
29
30
  SPectral ANalysis (SPAN) for funcnodes
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "funcnodes-span"
3
- version = "0.3.6"
3
+ version = "0.3.7"
4
4
  description = "SPectral ANalysis (SPAN) for funcnodes"
5
5
  readme = "README.md"
6
6
  classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",]
@@ -13,7 +13,7 @@ dependencies = [
13
13
  "funcnodes_pandas",
14
14
  "funcnodes_plotly",
15
15
  "pybaselines",
16
- "funcnodes-lmfit",
16
+ "funcnodes-lmfit>=0.2.0",
17
17
  "numba (>=0.61.0,<1.0.0)",
18
18
  ]
19
19
  [[project.authors]]
@@ -26,6 +26,7 @@ email = "julian.kimmig@linkdlab.de"
26
26
 
27
27
  [dependency-groups]
28
28
  dev = [
29
+ "commitizen>=4.8.3",
29
30
  "funcnodes-module>=0.1.22",
30
31
  "pooch>=1.8.2",
31
32
  "pre-commit>=4.1.0",
@@ -50,3 +51,10 @@ shelf = "funcnodes_span:NODE_SHELF"
50
51
 
51
52
  [tool.setuptools.packages.find]
52
53
  where = [ "src",]
54
+
55
+ [tool.commitizen]
56
+ name = "cz_conventional_commits"
57
+ tag_format = "$version"
58
+ version_scheme = "pep440"
59
+ version_provider = "uv"
60
+ update_changelog_on_bump = true
@@ -1,10 +1,10 @@
1
1
  from funcnodes import NodeDecorator, Shelf
2
2
  import funcnodes as fn
3
+ from funcnodes_span._curves import estimate_noise
3
4
  import numpy as np
4
5
  from exposedfunctionality import controlled_wrapper
5
6
  from typing import Optional, List, Tuple
6
7
  from scipy.signal import find_peaks
7
- from scipy.stats import norm
8
8
  from scipy import signal, interpolate
9
9
  from scipy.ndimage import gaussian_filter1d
10
10
  from tqdm import tqdm
@@ -119,12 +119,11 @@ def peak_finder(
119
119
  # Calculate the standard deviation of peak prominences
120
120
  rnd = np.random.RandomState(42)
121
121
  # Fit a normal distribution to the input array
122
- mu, std = norm.fit(y)
122
+ noise = estimate_noise(x=x, y=_y) / noise_level
123
123
  if peaks is not None:
124
124
  try:
125
125
  # Add noise to the input array
126
- noise = rnd.normal(mu / noise_level, std / noise_level, np.shape(y))
127
- y = y + noise
126
+ y = y + rnd.normal(0, noise, np.shape(y))
128
127
 
129
128
  # Find the minimums in the copy of the input array
130
129
  mins, _ = find_peaks(-1 * y)
@@ -155,8 +154,7 @@ def peak_finder(
155
154
 
156
155
  except ValueError:
157
156
  # If an error occurs when adding noise to the input array, add stronger noise and try again
158
- noise = rnd.normal(mu / 100, std / 100, np.shape(y))
159
- y = y + noise
157
+ y = y + rnd.normal(0, noise * 100, np.shape(y))
160
158
  mins, _ = find_peaks(-1 * y)
161
159
  for peak in peaks:
162
160
  right_min = mins[np.argmax(mins > peak)]
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: funcnodes-span
3
- Version: 0.3.6
3
+ Version: 0.3.7
4
4
  Summary: SPectral ANalysis (SPAN) for funcnodes
5
5
  Author-email: Kourosh Rezaei <kourosh.rezaei@linkdlab.de>, Julian Kimmig <julian.kimmig@linkdlab.de>
6
6
  License: AGPL-3.0
@@ -23,7 +23,8 @@ Requires-Dist: funcnodes_numpy
23
23
  Requires-Dist: funcnodes_pandas
24
24
  Requires-Dist: funcnodes_plotly
25
25
  Requires-Dist: pybaselines
26
- Requires-Dist: funcnodes-lmfit
26
+ Requires-Dist: funcnodes-lmfit>=0.2.0
27
27
  Requires-Dist: numba<1.0.0,>=0.61.0
28
+ Dynamic: license-file
28
29
 
29
30
  SPectral ANalysis (SPAN) for funcnodes
@@ -5,5 +5,5 @@ funcnodes_numpy
5
5
  funcnodes_pandas
6
6
  funcnodes_plotly
7
7
  pybaselines
8
- funcnodes-lmfit
8
+ funcnodes-lmfit>=0.2.0
9
9
  numba<1.0.0,>=0.61.0
File without changes
File without changes
File without changes