% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dm_sea.R
\name{dm_event_times}
\alias{dm_event_times}
\title{Extract event times from phase.zg() or phase.sc() output}
\usage{
dm_event_times(
  x,
  event = "all",
  phase = NULL,
  min_duration = NULL,
  min_magnitude = NULL,
  min_max_twd = NULL,
  remove_na_times = TRUE
)
}
\arguments{
\item{x}{Object of class \code{"ZG_output"} or \code{"SC_output"}.}

\item{event}{Event type to extract. Use \code{"all"} to return all supported
events. For ZG output, supported events are \code{"TWD_start"},
\code{"TWD_end"}, \code{"GRO_start"}, \code{"GRO_end"},
\code{"MaxTWD"}, \code{"phase_start"}, and \code{"phase_end"}.
For SC output, supported events are \code{"Shrinkage_start"},
\code{"Shrinkage_end"}, \code{"Expansion_start"}, \code{"Expansion_end"},
\code{"Increment_start"}, \code{"Increment_end"}, \code{"phase_start"},
and \code{"phase_end"}.}

\item{phase}{Optional phase filter for generic events \code{"phase_start"}
or \code{"phase_end"}. For ZG output, use \code{"TWD"} or \code{"GRO"}.
For SC output, use \code{"Shrinkage"}, \code{"Expansion"}, or
\code{"Increment"}.}

\item{min_duration}{Optional minimum \code{Duration_h} filter.}

\item{min_magnitude}{Optional minimum \code{Magnitude} filter.}

\item{min_max_twd}{Optional minimum \code{max.twd} filter for ZG output.}

\item{remove_na_times}{Logical. If \code{TRUE}, rows with missing
\code{event_time} are removed.}
}
\value{
A tibble of events with class \code{c("dm_events", ...)}.
}
\description{
Extracts event times from objects returned by \code{phase.zg()} or
\code{phase.sc()}. The resulting table can be passed directly to
[dm_epoch_extract()] for superposed epoch analysis.
}
