SPECT.drive {RSEIS}R Documentation

Interactive Spectrogram Driver

Description

Interactive Spectrogram Driver

Usage

SPECT.drive(Xamp, DT = 0.008, NEW = TRUE, STAMP = NULL ,
 freqlim=c(0, 20, 0, 20), winparams=c(4096,256, 204 ))

Arguments

Xamp

signal trace

DT

deltaT sample interval, s

NEW

logical, TRUE=recalculate spectrum

STAMP

character stamp for identification

freqlim

vector of 4 frequency limits: min max for calculations, min max for display. Default=see below

winparams

vector of 3 window parameters: Number of points for FFT, number of time samples for window, number of overlap samples: default=see below

Details

Interactive buttons are set internally. The parameters freqlim and winparams can be changed - these are simply the starting parameters for the initial display.

For winparams, the parameters are set to be appropriate for sample rates of typical seismic data, 100-125 samples per second. The number of points in the FFT are initially set to 4096 and the time window is set to 256. The overlap is calculated by subtracting 20 percent of the time window, so the overlap is 80 percent. Of course, the number of samples in a window must be less than the length of input time series.

Value

Graphical Side Effects

Author(s)

Jonathan M. Lees<jonathan.lees.edu>

See Also

plotevol, RPMG

Examples

data(CE1)

#########  Xamp = CE1$y[CE1$x>5.443754 & CE1$x<5.615951]

Xamp = CE1$y
plot(Xamp, type='l')


DT = CE1$dt

if(interactive() ) SPECT.drive(Xamp, DT = DT, NEW = TRUE, STAMP = NULL)

## Not run: 
data(KH)

Xamp  <-  KH$JSTR[[1]]
DT  <-   KH$dt[1]
SPECT.drive(Xamp, DT = DT, NEW = TRUE, STAMP = NULL)

SPECT.drive(Xamp, DT = DT, NEW = FALSE, STAMP = NULL,
freqlim=c(0, 8,0, 8) , winparams=c(4*1024, 6*250, 6*250-1) )




TWIN  <-  100 # seconds
NWIN  <-  TWIN/DT  # samples
NSKIP  <-  1/DT    ##  samples


SPECT.drive(Xamp, DT = DT, NEW = FALSE,
 STAMP = NULL, freqlim=c(0, 8,0, 8) ,
winparams=c(8*1024, NWIN, NWIN-NSKIP) )





## End(Not run)



[Package RSEIS version 4.2-0 Index]