2016-06-01 12 views
-2

RaspbianのRaspberry pi 3でOctaveライブラリを使用してPythonで.wavファイル信号のピーク検出を行いたいが、octave.findpeaks関数に問題がある。 findpeaks:引数 'MeanPeakHeight'がパーサの有効なパラメータと一致しません Octaveに関するすべてのパッケージがインストールされているため、わかりません。 これは私のプログラムの一部である:Octave library - 'MeanPeakHeight'が無効なパラメータ

import matplotlib.pyplot as plt 
import numpy as np 
from scipy.io import wavfile as wav 
from scipy.signal import find_peaks_cwt, butter, lfilter 
from pylab import * 
import os 
from operator import truediv 
from easygui import * 
from oct2py import octave 

"High and Low Frequency for the filter" 

    low = 100 
    high = 50 
    list_file = [] 
    octave.eval("pkg load signal") 

def display_wav(wav_file): 

    samplerate, beat = wav.read('/home/pi/heartbeat_project/heartbeat_songs/%s' %wav_file) 
    beat_resize = np.fromfile(open('/home/pi/heartbeat_project/heartbeat_songs/%s' %wav_file),np.int16)[4*samplerate:float(beat.shape[0])-4*samplerate] 
    beat_resize = beat_resize/(2.**15) 
    timeArray = arange(0,float(beat_resize.shape[0]),1) 
    timeArray = timeArray/samplerate 
    ylow = butter_lowpass_filter(samplerate, 5, low, beat_resize) 
    y = butter_highpass_filter(samplerate, 5, high, ylow) 


    peaks, indexes = octave.findpeaks(np.array(y),'DoubleSided','MeanPeakHeight',np.std(y)) 

答えて

0

findpeaksオクターブ鍛造信号パッケージの一部です:source file

この関数は'MeanPeakHeight 'パラメータを持っていません。あなたが欲しいと思っているのですか?'MinPeakHeight'

+0

ありがとうございました! –

関連する問題