找回密码
 注册
查看: 407|回复: 0

R语言 seewave包 fpeaks()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 00:14:03 | 显示全部楼层 |阅读模式
fpeaks(seewave)
fpeaks()所属R语言包:seewave

                                        Frequency peak detection
                                         频率峰值检测

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

This function searches for peaks of a frequency spectrum.
此函数搜索的频率谱的峰值。


用法----------Usage----------


fpeaks(spec, f = NULL, nmax = NULL, amp = NULL, freq = NULL,
threshold = NULL, plot = TRUE, title = TRUE,
xlab = "Frequency (kHz)", ylab = "Amplitude",
labels = TRUE, legend = TRUE, collab = "red", ...)



参数----------Arguments----------

参数:spec
a data set resulting of a spectral analysis obtained with spec or meanspec. Can be in dB.
数据集的频谱分析获得spec或meanspec。可以以dB为单位。


参数:f
sampling frequency of spec (in Hz). Not requested if the first column of spec contains the frequency axis.
spec(赫兹)的采样频率。如果没有请求的第一列spec包含在频率轴上。


参数:nmax
maximal number of peaks detected. Overrides amp, freq and threshold. See details.
检测到的峰的最大数目。覆盖amp,freq和threshold。查看详细信息。


参数:amp
amplitude slope parameter, a numeric vector of length 2. Refers to the amplitude slope of the peak. The first value is the left slope and the second value is the right slope. Only peaks with higher slopes than threshold values will be keps. See details.
振幅斜率参数,一个数字矢量长度为2。指的振幅斜率的高峰期。首先看重的是左边的斜坡,第二个值是正确的斜坡。只有峰值超过阈值较高的山坡开普勒轨道根数。查看详细信息。


参数:freq
frequency threshold parameter. If the frequency difference of two successive peaks is less than this threshold, then  the peak of highest amplitude will be kept only. See details.
频率阈值参数。如果两个连续的峰的频率差小于该阈值,然后将只保留最高振幅的峰值。查看详细信息。


参数:threshold
amplitude threshold parameter. Only peaks above this threshold will be considered. See details.
幅度阈值参数。只有超过这个阈值的峰将予以考虑。查看详细信息。


参数:plot
logical, if TRUE, a plot showing the peaks is returned.
逻辑,如果TRUE,峰图,则返回一个图。


参数:title
logical, if TRUE add the number of peaks detected as a plot title.
逻辑,如果TRUE添加图形标题为检测到的峰的数量。


参数:xlab
label of the x-axis.
的x-轴的标签。


参数:ylab
label of the y-axis.
标签的y轴。


参数:labels
logical, if TRUE peak labels are plotted.
逻辑,如果TRUE峰标签绘制。


参数:legend
logical, if TRUE a legend returning the different selection parameters (nmax, amp, freq, threshold, threshold) is added to the plot.
逻辑,如果TRUE传说返回不同的选择参数(nmax,amp,freq,threshold,threshold)被添加到图。


参数:collab
labels color.
标签的颜色。


参数:...
other plot graphical parameters.
其他plot图形参数。


Details

详细信息----------Details----------

Here are some details regarding the different selection parameters:<br>
以下是一些细节方面的不同选择参数:参考

nmax: this parameter is to be used if you wish to get a specific number of peaks. The peaks selected are those with the highest slopes. It then does not work in conjunction with the other parameters.
nmax:此参数是要使用的,如果你想获得一个特定数量的峰值。峰选择的是那些具有最高的斜坡。然后,它不与其他参数结合。

freq: this parameter allows to remove from the selection successive peaks with a small frequency difference. Imagine you have two successive peaks at 1200 Hz and 1210 Hz and at 0.5  and 0.25 in amplitude. If you set freq to 50 Hz, then only the first peak will be kept.
freq:此参数可删除选择连续峰与一个小的频率差。想象一下,你有两个连续的峰在1200赫兹和1210赫兹,0.5和0.25的幅度。如果您设置freq为50 Hz,则只有第一个高峰将被保留。

amp: this parameter allows to remove from the selection peaks with low slopes. You can make the selection on both slopes or on a single one. Imagine you have an asymetric peak with a 0.01 left slope and a 0.02 right slope. The peak will be discarded for the following settings: both values higher than 0.02 (e.g. amp =     c(0.03,0.04)), the first value higher than 0.01 (e.g. amp =     c(0.02,0.001)), the second value higher than 0.02 (e.g. amp =     c(0.001,0.03)). If you do not want apply the selection on one of the slope use 0. For instance, a selection on the left slope only will be achieved with: amp = c(0.02,0).
amp:此参数可删除选择峰低的斜坡。您可以选择两个斜坡或在一台单。试想一下,你有一个不对称的峰,左坡度为0.01和0.02右边坡。以下设置:这两个值将被丢弃的峰值高于0.02(如:amp =     c(0.03,0.04)),高于0.01(如:amp =     c(0.02,0.001)),第二个值高于0.02的第一个值(例如<X >)。如果你不希望申请1的坝坡0的选择上。比如,左边的斜坡上的选择只将被实现的:amp =     c(0.001,0.03)。

threshold: this parameter can be used to do a rough selection on the spectrum. Peaks with an amplitude value (not a slope) lower than this threshold will be automatically discarded. This can be useful when you want to remove peaks of a low-amplitude background noise.
threshold:这个参数可以用来做一个粗略的频谱选择。峰的幅度值(而不是一个斜坡),低于此阈值将被自动删除。这可能是有用的,当你要删除的峰值低振幅的背景噪音。


值----------Value----------

A two-column matrix, the first column corresponding to the frequency values (x-axis) and the second column corresponding to the
两列的矩阵,对应的频率值(x-轴)和第二列的第一列对应于所述


注意----------Note----------

You can also use fpeaks with other kind of spectrum, for
您还可以使用fpeaks与其他类型的光谱,


(作者)----------Author(s)----------


Jerome Sueur and Amandine Gasc



参见----------See Also----------

localpeaks, meanspec, spec
localpeaks,meanspec,spec


实例----------Examples----------


data(tico)
spec <- meanspec(tico, f=22050, plot=FALSE)
specdB <- meanspec(tico, f=22050, dB="max0", plot=FALSE)
# all peaks[所有的峰]
fpeaks(spec)
# 10 highest peaks[10最高的山峰]
fpeaks(spec, nmax=10)
# highest peak (ie dominant frequency)[最高的山峰(即主频率)]
fpeaks(spec, nmax=1)
# peaks that are separated by more than 500 Hz[超过500赫兹的峰分开]
fpeaks(spec, freq=500)
# peaks with a left slope higher than 0.1[高于0.1左斜率的峰值]
fpeaks(spec, amp=c(0.1,0))
# peaks with a right slope higher than 0.1[峰的权利斜率大于0.1]
fpeaks(spec, amp=c(0,0.1))
# peaks with left and right slopes higher than 0.1[高于0.1的峰具有左和右的斜坡]
fpeaks(spec, amp=c(0.1,0.1))
# peaks above a 0.5 threshold[以上的山峰了0.5阈值]
fpeaks(spec, threshold=0.5)
# peaks of a dB spectrum with peaks showing slopes higher than 3 dB[dB谱峰的峰显示斜坡超过3 dB高]
fpeaks(specdB, amp=c(3,3))
# comparing different parameter settings[比较不同的参数设置]
meanspec(tico, f=22050)
col &lt;- c("#ff000090","#0000ff75","#00ff00")[ff000090“,”#0000ff75“,”#00FF00“)]
cex <- c(2,1.25,1.5)
pch <- c(19,17,4)
title(main="Peak detection \n (spectrum with values between 0 and 1)")
res1 <- fpeaks(spec, plot = FALSE)
res2 <- fpeaks(spec, amp=c(0.02,0.02), plot =FALSE)
res3 <- fpeaks(spec, amp=c(0.02,0.02), freq=200, plot = FALSE)
points(res1, pch=pch[1], col=col[1], cex=cex[1])
points(res2, pch=pch[2], col=col[2], cex=cex[2])
points(res3, pch=pch[3], col=col[3], cex=cex[3])
legend("topright", legend=c("all peaks","amp", "amp &amp; freq"), pch=pch,
pt.cex=cex, col=col, bty="n")
# example with a cepstral spectrum[例如具有倒频谱的频谱]
data(sheep)
res <- ceps(sheep,f=8000,at=0.4,wl=1024,plot=FALSE)
fpeaks(res, nmax=4, xlab="Quefrency (s)")

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-30 14:41 , Processed in 0.031608 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表