% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scan_cp_multi_sync.R
\name{detect_cp_ecdf}
\alias{detect_cp_ecdf}
\title{ECDF-Based Changepoint Detection for a Detector Statistic}
\usage{
detect_cp_ecdf(
  diff,
  w = 200,
  ma_window = 100,
  right_tail_cutoff = 0.95,
  left_tail_cutoff = 0.6,
  threshold = "auto",
  circular = FALSE
)
}
\arguments{
\item{diff}{Numeric detector vector.}

\item{w}{Integer. Window size used in detector construction.}

\item{ma_window}{Integer. Moving-average window for smoothing.}

\item{right_tail_cutoff}{Numeric. ECDF upper cutoff.}

\item{left_tail_cutoff}{Numeric. ECDF lower cutoff.}

\item{threshold}{"auto" or numeric ECDF threshold.}

\item{circular}{Logical. Whether smoothing wraps around.}
}
\value{
A list containing:
\describe{
\item{changepoints}{Raw changepoint indices.}
\item{ecdf_values}{ECDF values of selected maxima.}
\item{threshold_used}{Final threshold.}
\item{local_maxima}{Matrix of local maxima.}
\item{smoothed_detector}{Smoothed detector.}
\item{ecdf_spacing}{Spacing curve.}
}
}
\description{
Applies the ECDF + spacing-curve thresholding method to a detector vector
and returns raw changepoints (no correction).
}
