New Upstream Snapshot - python-peakutils

Ready changes

Summary

Merged new upstream version: 1.3.4+git20221026.1.83f8f03+ds (was: 1.3.4+ds).

Resulting package

Built on 2022-12-18T19:19 (took 8m18s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots python3-peakutils

Diff

diff --git a/PeakUtils.egg-info/PKG-INFO b/PeakUtils.egg-info/PKG-INFO
new file mode 100644
index 0000000..b33c20c
--- /dev/null
+++ b/PeakUtils.egg-info/PKG-INFO
@@ -0,0 +1,53 @@
+Metadata-Version: 2.1
+Name: PeakUtils
+Version: 1.3.4
+Summary: Peak detection utilities for 1D data
+Home-page: https://bitbucket.org/lucashnegri/peakutils
+Author: Lucas Hermann Negri
+Author-email: lucashnegri@gmail.com
+License: MIT
+Keywords: peak detection search gaussian centroid baseline maximum
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Classifier: Topic :: Scientific/Engineering
+Description-Content-Type: text/x-rst
+License-File: LICENSE.txt
+
+PeakUtils
+=========
+
+.. image:: https://zenodo.org/badge/102883046.svg
+   :target: https://zenodo.org/badge/latestdoi/102883046
+
+This package provides utilities related to the detection of peaks on 1D data.
+Includes functions to estimate baselines, finding the indexes of peaks in the data
+and performing Gaussian fitting or centroid computation to further increase the
+resolution of the peak detection.
+
+The documentation is available at http://peakutils.readthedocs.io/en/latest .
+
+Installation
+------------
+
+To install PeakUtils from the source package, run:
+
+.. code-block:: bash
+
+    python setup.py install
+
+PeakUtils targets Python 2.7+ and depends on numpy, scipy, and optionally on
+matplotlib.
+
+Contribute
+----------
+
+- Source Code: https://bitbucket.org/lucashnegri/peakutils
+- Issues: https://bitbucket.org/lucashnegri/peakutils/issues
+- Direct contact: Lucas Hermann Negri - lucashnegri <at> gmail.com
+
+License
+-------
+
+The project is licensed under the MIT license.
diff --git a/PeakUtils.egg-info/SOURCES.txt b/PeakUtils.egg-info/SOURCES.txt
new file mode 100644
index 0000000..d0e88b6
--- /dev/null
+++ b/PeakUtils.egg-info/SOURCES.txt
@@ -0,0 +1,28 @@
+LICENSE.txt
+MANIFEST.in
+README.rst
+setup.py
+PeakUtils.egg-info/PKG-INFO
+PeakUtils.egg-info/SOURCES.txt
+PeakUtils.egg-info/dependency_links.txt
+PeakUtils.egg-info/requires.txt
+PeakUtils.egg-info/top_level.txt
+docs/Makefile
+docs/conf.py
+docs/index.rst
+docs/make.bat
+docs/reference.rst
+docs/requirements.txt
+docs/tutorial_a.rst
+peakutils/__init__.py
+peakutils/baseline.py
+peakutils/peak.py
+peakutils/plot.py
+peakutils/prepare.py
+tests/__init__.py
+tests/baseline
+tests/exp
+tests/noise
+tests/peakutils_test.py
+tests/perf.py
+tests/tutorial.ipynb
\ No newline at end of file
diff --git a/PeakUtils.egg-info/dependency_links.txt b/PeakUtils.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/PeakUtils.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/PeakUtils.egg-info/requires.txt b/PeakUtils.egg-info/requires.txt
new file mode 100644
index 0000000..6bad103
--- /dev/null
+++ b/PeakUtils.egg-info/requires.txt
@@ -0,0 +1,2 @@
+numpy
+scipy
diff --git a/PeakUtils.egg-info/top_level.txt b/PeakUtils.egg-info/top_level.txt
new file mode 100644
index 0000000..3bb73ab
--- /dev/null
+++ b/PeakUtils.egg-info/top_level.txt
@@ -0,0 +1 @@
+peakutils
diff --git a/debian/changelog b/debian/changelog
index 08643aa..2081775 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-peakutils (1.3.4+git20221026.1.83f8f03+ds-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Sun, 18 Dec 2022 19:14:16 -0000
+
 python-peakutils (1.3.4+ds-2) unstable; urgency=medium
 
   * Team upload.
diff --git a/peakutils/peak.py b/peakutils/peak.py
index b330519..855d9a4 100644
--- a/peakutils/peak.py
+++ b/peakutils/peak.py
@@ -52,7 +52,7 @@ def indexes(y, thres=0.3, min_dist=1, thres_abs=False):
 
     # check if the signal is totally flat
     if len(zeros) == len(y) - 1:
-        return np.array([])
+        return np.array([], dtype=np.int64)
 
     if len(zeros):
         # compute first order difference of zero indexes
diff --git a/tests/peakutils_test.py b/tests/peakutils_test.py
index 765dcea..b74afaa 100644
--- a/tests/peakutils_test.py
+++ b/tests/peakutils_test.py
@@ -14,7 +14,6 @@ def load(name):
     p = os.path.join(os.path.dirname(__file__), name)
     return numpy.loadtxt(p)
 
-
 class LPGPeaks(unittest.TestCase):
 
     """Tests with experimental data from long period gratings"""
@@ -131,6 +130,19 @@ class SimulatedData(unittest.TestCase):
         out6 = peakutils.indexes(x, thres=16, thres_abs=True)
         assert_array_almost_equal(out6, [])
 
+class TypesTest(unittest.TestCase):
+    
+    def test_indexes_types(self):
+        """Verifies the return types"""
+        x1 = [1.0, 2.0, 3.0, 2.0, 1.0]
+        x2 = [5, 5, 5]
+
+        out1 = peakutils.indexes(x1)
+        self.assertEqual(out1.dtype, np.int64)
+
+        out2 = peakutils.indexes(x2)
+        self.assertEqual(out2.dtype, np.int64)
+
 class Baseline(unittest.TestCase):
 
     """Tests the conditioning of the lsqreg in the implementation"""

Debdiff

File lists identical (after any substitutions)

No differences were encountered in the control files

More details

Full run details