swig | R Documentation |
Main Interactive Program for plotting and analyzing seismic waveform data.
swig(GH, sel = 1:length(GH$dt), ORD = NULL, WIN = NULL, APIX = NULL,
PHASE = NULL,
STDLAB = NULL, PADDLAB = NULL, TEMPBUT=NULL,
SHOWONLY = FALSE, CHOP = FALSE, TIT = "",
pts = FALSE, forcepix = FALSE, pcex=0.7, SCALE = 1, ilocstyle=1,
velfile = "", stafile = "", LOC = NULL,
prefilt=list(fl=.2, fh=15, type="HP", proto="BU"), filters=NULL,
YAX = 1 , xtickfactor = 1, vertline=NA, destdir='.')
GH |
Seismic data structure |
sel |
selection of traces from structure |
ORD |
order to plot traces |
WIN |
vector c(t1, t2) for window of traces to be shown |
APIX |
structure of arrival time picks |
PHASE |
phase to display, "P", "S", etc |
STDLAB |
label of buttons |
PADDLAB |
label of phase-pick buttons |
TEMPBUT |
temporary, user defined buttons |
SHOWONLY |
logical, TRUE=non-interactive |
CHOP |
whether to chop the signal |
TIT |
title for the top of plot |
pts |
whether to plot specific points on the plot |
forcepix |
logical, force all phase picks to be shown on all traces |
pcex |
Pick label size expansion (cex), default=0.7 |
SCALE |
flag, 1,2= scale according to window or trace (default=1, scale by trace) |
ilocstyle |
integer, style of click graphic, one of -1, 0, 1, 2, 3, indicating: points, abline, segs, segs+abline, segs+long-abline , default=1 |
velfile |
velocity structure or file name |
stafile |
station structure or file name |
LOC |
source location structure (lat, lon, depth) |
prefilt |
default filter definition list(fl=.2, fh=15, type="HP", proto="BU") |
filters |
a list of filters for choosfilt, the list consists of 3 vectors: flo, fhi and type defining the filter choices. |
YAX |
type of Yaxis label, 1,2,3 DEFAULT=1 only one y-axis others scaled; 2=all y-axes are plotted on left; 3=all y-axes plotted, alternating left and right |
xtickfactor |
Factor for multiplying the x-axis tick markers (default=1; for minutes=60, hrs=3600, days=24*3600) |
vertline |
time list (yr, jd, hr, mi sec) for plotting vertical lines on window. Default=NA |
destdir |
Destination directory(folder) for writing output to disk, default = current directory |
This is the main program that drives the other analysis in RSEIS. GH is a list consisting of header (meta-data) and time series information. See documentation on GH to get complete description.
A set of filters can be defined by the user, see choosfilt
Default Buttons, can be created by: STDLAB = c("DONE", "QUIT","zoom out", "zoom in", "Left", "Right", "restore", "Pinfo","WINFO", "XTR", "SPEC", "SGRAM" ,"WLET", "FILT", "UNFILT", "SCALE", "Postscript")
If the user has defined STDLAB.DEFAULT and PADDLAB.DEFAULT in the .Rprofile or .First commands, these will override the default in the function definition.
Various structures are returned based on interactive selections of the user.
Howeverr, the default return list:
but |
last button pushed |
sloc |
location of last set of clicks |
WPX |
set of saved WPIX (window picks |
BRUNINFO |
Brune Model information |
DETLINFO |
Detailed information about traces |
mark |
mark (MARK button was pressed |
PUSHED |
list of all buttons pressed prior to exit |
If using the filters for button FILT, it is useful to have a "None" in case no filter is desired (i.e. user changes mind).
Jonathan M. Lees<jonathan.lees.edu>
PICK.DOC, GH, RPGM, choosfilt
data("GH")
### This loads a structure
STDLAB <- c("DONE", "QUIT","zoom out", "zoom in", "Left",
"Right", "restore", "Pinfo","WINFO",
"XTR", "SPEC", "SGRAM" ,"WLET",
"FILT", "UNFILT", "SCALE", "Postscript")
sel <- GH$COMPS=="V"
if(interactive() ) { p <- swig(GH, sel=sel, STDLAB=STDLAB)
print(p)
}
if(interactive()) {
p <- swig(GH, sel=sel, WIN=c(4,14) , STDLAB=c("DONE", "LAME", "DAME") )
print(p)
}
############ example with filter
data(KH)
thefilts <-
list(flo=
c(0.02, 0.02, 0.02, 0.02, 0.02, 0.02,
0.02, 0.02, 0.02, 0.02, 0.02, 0.02,
0.02,
1/2, 1/50,1/100, 1/100,
1/100,1/100,1/100,1,1,
0.2, 15, 5, 2,1,
100),
fhi=
c(1/10, 1/6, 1/5, 1/4, 1/3, 1/2,
0.2, 0.5, 1.0, 2.0, 3.0, 4.0,
7.0,
8, 1/2.0,1/5.0,1/10.0,
1/20, 1/30,1/40,10,5,
7.0, 100, 100, 100,10,
100),
type =
c("LP","LP", "LP", "LP", "LP", "LP",
"LP","LP", "LP", "LP", "LP", "LP",
"LP",
"BP", "BP","BP","BP","BP","BP",
"BP","BP","BP",
"HP", "HP","HP", "HP","HP",
"None"))
if(interactive()) {
swig(KH, filters=thefilts)
}else{
swig(KH, filters=thefilts, SHOWONLY=TRUE )
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.