View source: R/aux_stationinfofile.R
aux_stationinfofile | R Documentation |
This function reads GPS tags from Omnirecs/Digos Datacube files and creates a station info file from additional input data. It depends on the gipptools software package (see details).
aux_stationinfofile(
file,
input,
output,
gipptools,
ID,
name,
z,
d,
sensor_type,
logger_type,
sensor_ID,
logger_ID,
gain,
dt,
start,
stop,
n,
order = "margin",
unit = "dd",
quantile = 0.95,
cpu,
write_file = TRUE,
write_raw = FALSE,
write_data = FALSE
)
file |
|
input |
|
output |
|
gipptools |
|
ID |
|
name |
|
z |
|
d |
|
sensor_type |
|
logger_type |
|
sensor_ID |
|
logger_ID |
|
gain |
|
dt |
|
start |
|
stop |
|
n |
|
order |
|
unit |
|
quantile |
|
cpu |
|
write_file |
|
write_raw |
|
write_data |
|
A station info file is an ASCII table that contains all relevant information about the individual stations of a seismic network. The variables contain a station ID (containing not more than 5 characters), station name (an longer description of the station), latitude, longitude, elevation, deployment depth, sensor type, logger type, sensor ID, logger ID, gain (signal preamplification by the logger), dt (sampling interval), start and stop time of the station records.
The start and stop times can be automatically collected from the meta data
stored along in each Cube file. For that, the function has to select the
first and last file in a data record of a station. This is automatically
done if the option order = "margin"
is selected and the number of
files per station to process is two, hence n = 2
.
Automatically, the resulting ASCII file will have all 14 columns as defined above. One has to delete unwanted columns (or add additional ones) from the text file, manually after the file has been generated.
The function requires the software gipptools
(http://www.gfz-potsdam.de/en/section/geophysical-deep-sounding/infrastructure/geophysical-instrument-pool-potsdam-gipp/software/gipptools/
)
is installed. Note that GPS tag extraction may take several minutes per
cube file. Hence, depending on the number of files and utilised CPUs the
processing may take a while.
Specifying an input directory (input
) is mandatory. This input
directory must only contain the subdirectories with the cube files to
process, each set of cube files must be located in a separate subdirectory
and these subdirectories must have the same name as specified by the logger
IDs (logger_ID
). An appropriate structure would be something like:
input
A1A
file1.A1A
file2.A1A
A1B
file1.A1B
file2.A1B
A set of files written to disk and a data frame with seismic station information.
Michael Dietze
## Not run:
## basic example with minimum effort
aux_stationinfofile(file = "stationinfo.txt",
input = "path/to/cube/dirs",
output = "path/to/stationfile/",
gipptools = "software/gipptools-2024.354",
logger_ID = c("A1A", "A1B"))
## example with more adjustments
aux_stationinfofile(file = "stationinfo.txt",
input = "path/to/cube/dirs",
output = "path/to/stationfile/",
gipptools = "software/gipptools-2024.354",
ID = c("STAN", "STAS"),
name = c("Station North", "Station South"),
z = c(1000, 1100),
d = c(0.5, 0.5),
sensor_type = c("TC120s", "TC120s"),
logger_type = c("Cube3extBOB", "Centaur"),
sensor_ID = c("4711", "0815"),
logger_ID = c("A1A", "A1B"),
gain = c(32, 16),
dt = c(1/100, 1/200),
n = 3,
order = "margin",
unit = "utm",
cpu = 0.5,
write_raw = TRUE,
write_data = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.