evolfft {RSEIS}R Documentation

Spectrogram fft

Description

Spectrogram using simple fft (Gabor Transform)

Usage

evolfft(a, dt = 0, Nfft = 0, Ns = 0, Nov = 0, fl = 0, fh = 10, pcttap =
0.05, adjust=TRUE )

Arguments

a

signal

dt

sample rate interval (s)

Nfft

Number of points in fft

Ns

NUmber of sample in sub-window

Nov

number of sample to overlap

fl

low frequency to display

fh

high frequency to display

pcttap

Percent cosine taper for each window

adjust

logical, if TRUE adjust the parameters so the plot looks good (DEFAULT). If FALSE, keep user parameters.

Details

This is a duplication of the spectrogram function in matlab which applies Welsh's Method. Each mini-window is tapered with a cosine window.

Value

List

sig

input signal

dt

deltat

wpars

input parameters

DSPEC

spectrum image

freqs

output frequencies (y axis)

tims

output times (x-axis)

Note

Parameter adjust is by default TRUE so that the choice of Ns, Nov, and kcol will be optimized, more or less. Set this logical to FALSE to force the function to use user input parameters.

Author(s)

Jonathan M. Lees<jonathan.lees.edu>

See Also

evolMTM, evolAR, MTM.drive

Examples



data(CE1)

####  plot signals
plot(CE1$x, CE1$y, type='l')

###  set parameters
Nfft<-1024   ###  fft length
Ns<-250      ###  number of samples in a window
Nov<-240     ###  number of samples of overlap per window
fl<-0        ###  low frequency to return
fh<-1/(2*CE1$dt)     ###  high frequency to return

########  calculate the evolutive fft (Gabor Transform)
EV <- evolfft(CE1$y, dt =CE1$dt , Nfft = Nfft, Ns =Ns , Nov =Nov , fl =fl
, fh = 25)

### plot image, but it does not look too interesting
image(EV$DSPEC)


### plot Gabor transform with special function
PE <- plotevol(EV, log=0, fl=0.01, fh=100, col=rainbow(100), ygrid=FALSE,
STAMP="", STYLE="fft")



[Package RSEIS version 4.2-0 Index]