% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PreprocessingFunctions.R
\name{find.valid.periods}
\alias{find.valid.periods}
\title{Find subsequent periods in a vector with values below a threshold. Used internally by the function suggest_threshold}
\usage{
find.valid.periods(data_in, threshold, min_samples, margin = 0)
}
\arguments{
\item{data_in}{Data to process}

\item{threshold}{Search for values under this threshold}

\item{min_samples}{Minimum length of consecutive run in samples}

\item{margin}{Shrink the period of consecutive runs at both ends with this margin}
}
\description{
This function is used internally by suggest_threshold.
}
