Skip to contents

Adds data quality (DQ) mask information to a `proc` data frame, based on the DQ information stored in the current batch (`curr_batch`). The function aligns DQ values by flooring the GPS timestamp and performs sampling rate adjustments if necessary.

Usage

add_DQ(proc, curr_batch)

Arguments

proc

A data frame containing the processed anomaly or signal data, which must include a `GPS` column.

curr_batch

A `ts` object with `dqmask` and `dq.lev` attributes, representing the DQ mask and level.

Value

A `data.frame` with additional columns corresponding to DQ flags. If dq.lev = "all", all available DQ channels are appended. Otherwise, only the specified level is added.