Skip to contents

Two CESMD variants:

  • Multi-channel V2 (.v2): blocks marked ^Corrected accelerogram, 8f10.6 body, ends at next points of veloc data. 1+ blocks.

  • Single-channel V2c (.V2c): line 1 = Corrected acceleration, 1E15.6 body (1 col/row). Marker acceleration pts carries NPTS. samples/sec (last occurrence – DECIMATE > RESAMPLE) carries dt. Body ends at End-of-data or EOF. OCID from Sta Chan ...: line.

Usage

readV2(file)

Arguments

file

Path to the .v2 / .V2c file.

Value

LONG data.table(t, OCID, s).

Examples

file <- tempfile(fileext = ".V2c")
writeLines(c(
  "Corrected acceleration",
  "Sta Chan 1: HNZ",
  "100 samples/sec",
  "4 acceleration pts approx 0.04 secs",
  "1", "2", "3", "4",
  "End-of-data"
), file)
readV2(file)
#>        t   OCID     s
#>    <num> <char> <num>
#> 1:  0.00    HNZ     1
#> 2:  0.01    HNZ     2
#> 3:  0.02    HNZ     3
#> 4:  0.03    HNZ     4