Skip to contents

Retrieves the central time (`t_cen`) of the last (i.e., most recent) cluster from a processed anomaly dataframe. If no cluster exists, it attempts to retrieve `prev_tcen` from the parent environment.

Usage

get_last_tcen(proc)

Arguments

proc

A dataframe output from the anomaly detection pipeline, containing at least the columns `cluster` and `t_cen`.

Value

A numeric value representing the last cluster's center time (`t_cen`).

Note

Assumes that `prev_tcen` is defined in the parent frame if no clusters are found.