% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Luminescence-generics.R,
%   R/RLum.Analysis-class.R, R/RLum.Data.Curve-class.R,
%   R/RLum.Data.Image-class.R, R/RLum.Data.Spectrum-class.R
\name{normalise_RLum}
\alias{normalise_RLum}
\alias{normalise_RLum,list-method}
\alias{normalise_RLum,RLum.Analysis-method}
\alias{normalise_RLum,RLum.Data.Curve-method}
\alias{normalise_RLum,RLum.Data.Image-method}
\alias{normalise_RLum,RLum.Data.Spectrum-method}
\title{Normalisation of RLum-class objects}
\usage{
normalise_RLum(object, norm = TRUE, ...)

\S4method{normalise_RLum}{list}(object, norm = TRUE, ...)

\S4method{normalise_RLum}{RLum.Analysis}(object, norm = TRUE, ...)

\S4method{normalise_RLum}{RLum.Data.Curve}(object, norm)

\S4method{normalise_RLum}{RLum.Data.Image}(object, norm = TRUE, global = TRUE)

\S4method{normalise_RLum}{RLum.Data.Spectrum}(object, norm = TRUE)
}
\arguments{
\item{object}{\linkS4class{RLum} (\strong{required}):
S4 object of class \code{RLum}}

\item{norm}{\link{logical} \link{character} (\strong{required}):
if logical, whether curve normalisation should occur; alternatively, one
of \code{"max"} (used with \code{TRUE}), \code{"min"}, \code{"first"}, \code{"last"}, \code{"huot"},
\code{"intensity"} or a positive number (e.g., 2.2).}

\item{...}{further arguments passed to the specific class method}

\item{global}{\link{logical} (*with default): this defines whether the normalisation
is applied globally (same to all) or locally, in which case each frame has its
own normalisation. If \code{global = TRUE} the arguments for \code{norm  = 'first'} and
\code{norm = 'last'} work as expected and consider either the first or the last
frame for the normalisation.

Normalise \linkS4class{RLum.Data.Image} objects to value set via
the argument \code{norm}}
}
\value{
An object of the same type as the input object provided.
}
\description{
The function provides a generalised access point for specific
\linkS4class{RLum} objects. Depending on the input object, the corresponding
function will be selected. The normalisation is performed in the internal
function \code{.normalise_curve()}.
}
\details{
The \code{norm} argument normalises all count values. The following options are
supported:

\code{norm = TRUE} or \code{norm = "max"}: Curve values are normalised to the highest
count value in the curve

\code{norm = "min"}: Curve values are normalised to the smallest count value
in the curve

\code{norm = "first"}: Curve values are normalised to the first count value.

\code{norm = "last"}: Curve values are normalised to the last count value
(this can be useful in particular for radiofluorescence curves)

\code{norm = "huot"}: Curve values are normalised as suggested by Sébastien Huot
via GitHub:
\deqn{
y = (observed - median(background)) / (\max(observed) - median(background))
}

The background of the curve is defined as the last 20\% of the count values
of a curve.

\code{norm = "intensity"}: Curve values are normalised to the channel length.

\code{norm = 2.2}: Curve values are normalised to a positive number (e.g., 2.2).
}
\section{Functions}{
\itemize{
\item \code{normalise_RLum(list)}: Returns a list of \linkS4class{RLum.Data} objects that had been passed to
\link{normalise_RLum}

\item \code{normalise_RLum(RLum.Analysis)}: Normalisation of \code{RLum.Data} records contained in the input object.

\item \code{normalise_RLum(RLum.Data.Curve)}: Normalise \linkS4class{RLum.Data.Curve} objects to value set via
the argument \code{norm}

\item \code{normalise_RLum(RLum.Data.Image)}: Normalise \linkS4class{RLum.Data.Image} objects to value set via
the argument \code{norm}.

\item \code{normalise_RLum(RLum.Data.Spectrum)}: Normalise \linkS4class{RLum.Data.Spectrum} objects to value set via
the argument \code{norm}

}}
\section{Function version}{
 0.1.3
}

\examples{

## load example data
data(ExampleData.CW_OSL_Curve, envir = environment())

## create RLum.Data.Curve object from this example
curve <-
  set_RLum(
      class = "RLum.Data.Curve",
      recordType = "OSL",
      data = as.matrix(ExampleData.CW_OSL_Curve)
  )

## plot data without and with smoothing
plot_RLum(curve)
plot_RLum(normalise_RLum(curve))

}
\seealso{
\linkS4class{RLum.Data.Curve}, \linkS4class{RLum.Analysis},
\linkS4class{RLum.Data.Spectrum},  \linkS4class{RLum.Data.Image}
}
\author{
Sebastian Kreutzer, F2.1 Geophysical Parametrisation/Regionalisation, LIAG - Institute for Applied Geophysics (Germany)
, RLum Developer Team} 

\section{How to cite}{
Kreutzer, S., 2026. normalise_RLum(): Normalisation of RLum-class objects. Function version 0.1.3. In: Kreutzer, S., Burow, C., Dietze, M., Fuchs, M.C., Schmidt, C., Fischer, M., Friedrich, J., Mercier, N., Philippe, A., Riedesel, S., Autzen, M., Mittelstrass, D., Gray, H.J., Galharret, J., Colombo, M., Steinbuch, L., Boer, A.d., Bluszcz, A., 2026. Luminescence: Comprehensive Luminescence Dating Data Analysis. R package version 1.2.1. https://r-lum.github.io/Luminescence/
}

\keyword{utilities}
