Learn R Programming

RSEIS (version 3.7-4)

setupDB: Set up a seismic data base

Description

Set up a data base storing the location and times for a set of seismic data.

Usage

setupDB(DB, token = TRUE, split = "\\.")

Arguments

DB

fn

full path to file

yr

year

jd

julian day

hr

hour

mi

minute

sec

second

dur

duration, seconds

origyr

origin time for epoch calculations

token

logical, use tokens in the file names of the fn's to extract station and component names for selection. default=TRUE

split

character string to split if using token, default is a period.

Value

DB with epoch time and station information appended,

t1

epoch start time

t2

expoch end time = t1+nsamps*sample rate n seconds

sta

station

comp

component

Details

If token is FALSE, then the station name and component are selected using substr, i.e. by column number.

See Also

EPOCHday, T12.pix, Mine.seis

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
###  location of data base file
datadir1  <-  '/home/lees/Site/Santiaguito/SG09'
d1  <-  'segyDB'
#### scan in the data base file
DB  <-  scan(file=paste(sep="/", datadir1, d1), list(fn="", yr=0, jd=0,
hr=0, mi=0, sec=0, dur=0))
#### interactively fix the DB list
DB  <-  setupDB(DB)


# }
# NOT RUN {



# }

Run the code above in your browser using DataLab