regularize_vpts {bioRad}R Documentation

Regularize a time series of vertical profiles (vpts) on a regular time grid

Description

Projects objects of class vpts on a regular time grid

Usage

regularize_vpts(
  ts,
  interval = "auto",
  date_min,
  date_max,
  units = "secs",
  fill = FALSE,
  verbose = TRUE,
  keep_datetime = FALSE
)

Arguments

ts

An object inheriting from class vpts, see vpts for details.

interval

Time interval grid to project on. When 'auto' the median interval in the time series is used.

date_min

Start time of the projected time series, as a POSIXct object. Taken from ts when 'auto'.

date_max

End time of the projected time series, as a POSIXct object. Taken from ts when 'auto'.

units

Optional units of interval, one of 'secs', 'mins', 'hours','days', 'weeks'. Defaults to 'mins'.

fill

Logical, whether to fill missing timesteps with the values of the closest neighboring profile.

verbose

Logical, when TRUE prints text to console.

keep_datetime

Logical, when TRUE keep original radar acquisition timestamps.

Details

Irregular time series of profiles are typically aligned on a regular time grid with the expected time interval at which a radar provides data. Empty profiles with only missing data values will be inserted at time stamps of the regular time grid that have no matching profile in the irregular time series.

In plots of regular time series (see plot.vpts) temporal gaps of missing profiles (e.g. due to radar down time) become visible. In irregular time series data points in the plot are carried through until the time series continues, and temporal data gaps are filled up visually.

Value

An object of class vpts with regular time steps.

Examples

# start form example vpts object:
data(example_vpts)
ts <- example_vpts

# regularize the time series on a 5 minute interval grid
tsRegular <- regularize_vpts(ts, interval = 300)

[Package bioRad version 0.5.2 Index]