Skip to content

Commit

Permalink
Merge pull request #118 from guaix-ucm/#115
Browse files Browse the repository at this point in the history
Warning on both findPeaks_spectrum and refinePeaks_spectrum functions
  • Loading branch information
sergiopasra committed Jan 27, 2016
2 parents 7b29b54 + 403b16a commit 56ecc0c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion numina/array/peaks/findpeaks1D.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from __future__ import division

import numpy as np

import warnings
#------------------------------------------------------------------------------

def findPeaks_spectrum(sx, nwinwidth, data_threshold=0):
Expand Down Expand Up @@ -51,6 +51,8 @@ def findPeaks_spectrum(sx, nwinwidth, data_threshold=0):
zero.
"""
warnings.simplefilter("once")
warnings.warn("Deprecated. Use numina.array.peaks.peakdet.find_peaks_indexes instead", DeprecationWarning)

sx_shape = sx.shape
nmed = nwinwidth//2
Expand Down Expand Up @@ -117,6 +119,9 @@ def refinePeaks_spectrum(sx, ipeaks, nwinwidth, method=2):
X-coordinates in which the refined peaks have been found.
"""
warnings.simplefilter("once")
warnings.warn("Deprecated. Use numina.array.peaks.peakdet.refine_peaks instead", DeprecationWarning)

nmed = nwinwidth//2

xfpeaks = np.zeros(len(ipeaks))
Expand Down

0 comments on commit 56ecc0c

Please sign in to comment.