funcnodes-span 0.1.8__tar.gz → 0.1.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: funcnodes-span
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary:
5
5
  Author: Kourosh Rezaei
6
6
  Author-email: kouroshrezaei90@gmail.com
@@ -4,7 +4,7 @@ from .normalization import NORM_NODE_SHELF as NORM
4
4
  from .smoothing import SMOOTH_NODE_SHELF as SMOOTH
5
5
  from .peak_analysis import PEAKS_NODE_SHELF as PEAK
6
6
 
7
- __version__ = "0.1.8"
7
+ __version__ = "0.1.9"
8
8
 
9
9
  NODE_SHELF = fn.Shelf(
10
10
  name="Spectral Analysis",
@@ -499,7 +499,7 @@ def fit_1D(
499
499
  def force_peak_finder(
500
500
  x: np.array,
501
501
  y: np.array,
502
- basic_peaks: PeakProperties,
502
+ basic_peaks: List[PeakProperties],
503
503
  ) -> List[PeakProperties]:
504
504
  # """
505
505
  # Identify and return the two peaks around the main peak in the given peaks dictionary.
@@ -513,6 +513,10 @@ def force_peak_finder(
513
513
  # Returns:
514
514
  # - dict: A dictionary containing information about the two identified peaks.
515
515
  # """
516
+ if len(basic_peaks) != 1:
517
+ raise ValueError("This method accepts only one main peak as an input.")
518
+ elif len(basic_peaks) == 0:
519
+ raise ValueError("No peaks found.")
516
520
  peaks = copy.deepcopy(basic_peaks)
517
521
 
518
522
  main_peak_i_index = peaks["i_index"]
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "funcnodes-span"
3
- version = "0.1.8"
3
+ version = "0.1.9"
4
4
  description = ""
5
5
  authors = ["Kourosh Rezaei <kouroshrezaei90@gmail.com>"]
6
6
  readme = "README.md"
File without changes