% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mrs_data_proc.R
\name{auto_phase}
\alias{auto_phase}
\title{Perform zeroth-order phase correction based on the minimisation of the
squared difference between the real and magnitude components of the
spectrum.}
\usage{
auto_phase(mrs_data, xlim = NULL, ret_phase = FALSE)
}
\arguments{
\item{mrs_data}{an object of class \code{mrs_data}.}

\item{xlim}{frequency range (default units of PPM) to including in the phase.}

\item{ret_phase}{return phase values (logical).}
}
\value{
MRS data object and phase values (optional).
}
\description{
Perform zeroth-order phase correction based on the minimisation of the
squared difference between the real and magnitude components of the
spectrum.
}
