Split a time series into fixed-length batches
batching.RdDivides a ts object into equal-length segments (batches) of duration t_bch seconds.
If a dqmask attribute is present and has.DQ = TRUE, it is also split and attached to each batch.
Value
A named list of ts objects, each representing a batch. If has.DQ = TRUE and dqmask exists,
each batch will have its own dqmask and dq.lev attributes.
Details
The function computes the number of batches as round(tl(ts) / t_bch) where tl(ts) is the total duration.
The time series is evenly split based on index, assuming uniform sampling.
If dqmask is present in the input ts, it is divided row-wise or element-wise depending on its structure,
and aligned with the corresponding time range of each batch.