hv_proc: HVSR-processing main function

View source: R/hv_proc.R

hv_procR Documentation

HVSR-processing main function

Description

This is the main function for HVSR processing (ambient-noise or corrected strong motions)

Usage

hv_proc(
  is_noise = TRUE,
  h1,
  h2,
  v,
  dt,
  eqk_filepath,
  output_dir,
  output_pf_flnm = "Test_",
  distribution = "normal",
  robust_est = FALSE,
  pre_filter_flag = FALSE,
  pre_filter_is_causal = FALSE,
  pre_filter_hpass_fc = 0.1,
  pre_filter_lpass_fc = NA,
  pre_filter_nPole_hp = 5,
  pre_filter_nPole_lp = 4,
  pre_filter_order_zero_padding = 0,
  pre_filter_t_front = 5,
  pre_filter_t_end = 5,
  filter_flag = TRUE,
  is_causal = FALSE,
  hpass_fc = 0.1,
  lpass_fc = NA,
  nPole_hp = 5,
  nPole_lp = 4,
  order_zero_padding = 0,
  detrend = 1,
  taper_flag = TRUE,
  t_front = 5,
  t_end = 5,
  horizontal_comb = "geometric_mean",
  ko_smooth_flag = TRUE,
  ko_smooth_b = 20,
  parzen_flag = FALSE,
  parzen_bwidth = 1.5,
  win_width = 150,
  overlapping = 0,
  sta_lta_flag = FALSE,
  sta_lta_moving_term_len = 1,
  short_term_len = 1,
  long_term_len = 30,
  polar_curves_flag = TRUE,
  deg_increment = 10,
  resample_lin2log = TRUE,
  deci_mean_factor = 10,
  deci_polar_factor = 10,
  output_freq_min = 0.01,
  output_freq_max = 50,
  output_selected_ts = FALSE,
  output_removed_ts = FALSE,
  output_selected_hvsr = TRUE,
  output_removed_hvsr = FALSE,
  output_mean_curve = TRUE,
  output_polar_curves = TRUE,
  output_metadata = TRUE
)

Arguments

is_noise

A binary indicating if the input data is ambient noise. is_noise = TRUE if input is noise; otherwise, if is_noise = FALSE, the input is corrected strong motion. Note when is_noise = TRUE, h1, h2, v, and, dt are needed; when is_noise = FALSE, eqk_filepath is needed.

h1

The first component of horizontal time series

h2

The second component of horizontal time series

v

The vertical component of time series

dt

The time step

eqk_filepath

The file path where it saves the file of corrected strong motions data in standard format

output_dir

The directory of output results

output_pf_flnm

The prefix name of output file names

distribution

The distribution assumption on the HVSR amplitudes. It can take "normal" or "log_normal". We recommend normal for noise data and log_normal for corrected strong motions

pre_filter_flag

The flag indicates if a pre-filter for the entire time series is applied (before windowing).

pre_filter_is_causal

A binary to indicator if causal is applied in pre-filter

pre_filter_hpass_fc

The corner frequency for high-pass in per-filter

pre_filter_lpass_fc

The corner frequency for low-pass in per-filter

pre_filter_nPole_hp

The pole parameter for high-pass in per-filter. Default is 5

pre_filter_nPole_lp

The pole parameter for low-pass in per-filter. Default is 4

pre_filter_order_zero_padding

The order needs in per-filter to be added for zeroes padding at the end of recordings to increase the number of data points to a power of 2. Default is 0 (no zero-padding).

pre_filter_t_front

The percentage of taperring for the beginning of the time series in the pre-filter.

pre_filter_t_end

The percentage of taperring for the end of the time series in the pre-filter.

filter_flag

The flag indicates if filter is applied to noise. The corrected strong motions do not apply

is_causal

A binary to indicator if causal is applied to noise. Apply causal if is_causal = TRUE and apply acausal if is_causal = FALSE

hpass_fc

The corner frequency for high-pass filter

lpass_fc

The corner frequency for low-pass filter

nPole_hp

The pole parameter for high-pass. Default is 5

nPole_lp

The pole parameter for low-pass. Default is 4

order_zero_padding

The order needs to be added for zeroes padding at the end of recordings to increase the number of data points to a power of 2. Default is 0 (no zero-padding).

detrend

The indicator specifies which detrend method is used. 0: no detrend; 1: mean removal; 2: linear trend removal; 6: fifth order polynomial detrend.

taper_flag

The flag indicates if Taper is applied to noise. The corrected strong motions do not apply

t_front

The percentage of taperring for the beginning of the time series.

t_end

The percentage of taperring for the end of the time series.

horizontal_comb

The parameter specifies the combination of two horizontal components. ps_RotD50: rotated combination at the angle where PGA is median; geometric_mean: geometric mean (sqrt(h1(f) * h2(f))); squared_average: squared average (sqrt((h1(f)^2 + h2(f)^2)/2))

ko_smooth_flag

The flag indicates if KO smoothing is applied.

ko_smooth_b

The coefficient of bandwidth. Default is 20. A smaller value will lead to more smoothing

parzen_flag

The flag indicates if Parzen smoothing is applied. Default is FALSE since KO smoothing is applied by default

parzen_bwidth

The bandwidth. A larger value will lead to more smoothing

win_width

The window length for noise data. The unit is second. The win_width equals to one earthquake duration if the input is corrected strong motion

overlapping

Overlapping between two windows, unit is second. Default is 0 without any overlapping

sta_lta_flag

The flag indicates if STA/LTA is calculated

sta_lta_moving_term_len

The length of moving step for STA/LTA, in second

short_term_len

The short term length for STA, in second

long_term_len

The long term length for LTA, in second

polar_curves_flag

The flag indicates if polar curves are calculated

deg_increment

The degree increment for HVSR polar curves

resample_lin2log

The flag indicates if resampling frequency from equal-spaced linear scale to equal-spaced log scale

deci_mean_factor

An integer for decimation factor for HVSR mean curve

deci_polar_factor

An integer for decimation factor for HVSR polar curves

output_freq_min

The minimum output frequency of HVSR

output_freq_max

The maximum output frequency of HVSR

output_selected_ts

The flag indicates if output selected time seriese windows

output_removed_ts

The flag indicates if output rejected time seriese windows

output_selected_hvsr

The flag indicates if output selected HVSR curves

output_removed_hvsr

The flag indicates if output rejected HVSR curves

output_mean_curve

The flag indicates if output HVSR mean curve

output_polar_curves

The flag indicates if output HVSR polar curves

output_metadata

The flag indicates if output HVSR processing meta data

Value

The results are saved and written in files in the specified output_dir


wltcwpf/hvsrProc documentation built on March 25, 2024, 7 p.m.