Run a gmsp batch pipeline
pipelineRunners.Rdgmsp helpers such as AT2TS(), TSL2PS(), TS2IMF() and
getIntensity() work directly on R objects. The run*() functions are
optional batch runners for the same kind of work when the inputs and outputs
are files controlled by a project JSON file.
Usage
runSelect(file = file.path("gmsp", "select.json"), root = getwd())
runGMSP(file = file.path("gmsp", "gmsp.json"), root = getwd())
runTrim(file = file.path("gmsp", "trim.json"), root = getwd())
runIMF(file = file.path("gmsp", "imf.json"), root = getwd())
runPSA(file = file.path("gmsp", "psa.json"), root = getwd())
runProcess(file = file.path("gmsp", "process.json"), root = getwd())
runStage0(file = file.path("gmsp", "match.json"), root = getwd())
runMatch(file = file.path("gmsp", "match.json"), root = getwd())
runPlot(file = file.path("gmsp", "plot.json"), root = getwd())
runExport(file = file.path("gmsp", "export.json"), root = getwd())Details
Use the direct helpers for one record, one table, or interactive analysis. Use a runner when the same operation must be repeated over a declared selection of records and the output must be reproducible from a saved JSON contract.
Runner map
runSelect()Builds a record selection table. The helper-level contract is
selectRecords()plus project-owned metadata.runStage0()Builds a spectrally compatible record selection from the processed candidate pool: scores PSA against the target compatibility band declared in the match JSON, applies optional seismological screens (
candidate.pool,candidate.filter,candidate.exclude,candidate.oneRecordPerEvent), and writes the top-stage0.Nselection topath.selectiontogether with the score table and a reusable spectra cache.runGMSP()Processes raw acceleration, velocity, or displacement records into canonical time histories. The helper-level contracts are
AT2TS(),VT2TS()andDT2TS().runTrim()Applies an approved time-windowing contract to existing time histories.
runIMF()Builds intrinsic-mode-function products from processed time histories. The helper-level contract is
TS2IMF().runPSA()Builds elastic response spectra from processed time histories. The helper-level contract is
TSL2PS().runProcess()Runs an approved composed processing contract for a project record set.
runMatch()Runs an approved spectral-match contract for a selected record set. This is an advanced batch workflow, not a replacement for the response-spectrum helpers.
runPlot()Builds optional raw QA/debug HTML widgets from existing products. It is not an SRK publication renderer.
runExport()Packages existing products, metadata, and approved audit files into a delivery folder.
JSON and paths
Each runner reads one JSON file. Paths inside that JSON are resolved relative
to root, normally the project root. The JSON file is a project input, not a
global package option.
Installed template JSON files live under
system.file("scripts", package = "gmsp"). A project may keep simpler
names such as gmsp/select.json or pass an explicit template-style path such
as gmsp/runSelect.json.
Plotting and SRK reports
runPlot() writes raw self-contained QA/debug widgets. SRK client plots are
rendered outside gmsp by the report layer from materialized gmsp CSV
products. Do not use runPlot() output as final SRK report output.
Examples
if (FALSE) { # \dontrun{
# Direct helper use for one in-memory table:
TSL <- AT2TS(DT, units.source = "mm", Fmax = 25, output = "TSL")
# Batch equivalent for a project-controlled record set:
runGMSP(file = "gmsp/gmsp.json", root = ".")
# Compute spectra for an existing batch product:
runPSA(file = "gmsp/psa.json", root = ".")
} # }