Skip to content
Extraits de code Groupes Projets
mfft_real.Rd 1,83 ko
Newer Older
  • Learn to ignore specific revisions
  • Michel Crucifix's avatar
    Michel Crucifix a validé
    % Generated by roxygen2: do not edit by hand
    % Please edit documentation in R/mfft_real.R
    \name{mfft_real}
    \alias{mfft_real}
    
    Michel Crucifix's avatar
    Michel Crucifix a validé
    \title{Frequency Modified Fourier transform  for real series}
    
    Michel Crucifix's avatar
    Michel Crucifix a validé
    \usage{
    
    Michel Crucifix's avatar
    Michel Crucifix a validé
    mfft_real(
      xdata,
      nfreq = 5,
      minfreq = NULL,
      maxfreq = NULL,
      correction = 1,
      fast = TRUE
    )
    
    Michel Crucifix's avatar
    Michel Crucifix a validé
    }
    \arguments{
    \item{xdata}{The data provided either as a time series (advised), or as a vector.}
    
    \item{nfreq}{is the number of frequencies returned, must be smaller that the length of  xdata.}
    
    Michel Crucifix's avatar
    Michel Crucifix a validé
    
    \item{minfreq, maxfreq}{If provided, bracket the frequencies to be probed. Note this are
    more precisely angular velocities (2\pi / period), expressed in time-inverse units
    with the time resolution encoded in `xdata` if the latter is a time series.}
    
    \item{fast}{(default = TRUE) uses analytical formulations for the crossproducts involving sines and cosines. 
    note: this is not really faster because the bottleneck is actually the goden section search. But more elegant.}
    
    
    Michel Crucifix's avatar
    Michel Crucifix a validé
    \item{correction:}{0: no frequency correction (equivalent to Laskar); 1 : frequency correction using linear approximation ; 2: frequency correction using sythetic data; 
    3: second order-correction using synthetic data (all documented in the Sidlichovsky and Nesvorny reference)}
    
    Michel Crucifix's avatar
    Michel Crucifix a validé
    }
    \value{
    a `mfft_deco` object, based on a data.frame with columns "Freq", "Ampl" and "Phases".
    
    Michel Crucifix's avatar
    Michel Crucifix a validé
    }
    \description{
    R-coded version of the Modified Fourier Transform
    with frequency  correction, adapted to R. 
    much slower than mfft (for complex numbers) as the latter is
    mainly written in C, but is physically
    more interpretable if signal is real, because
    it is designed to have no imaginary part in the residual
    A C-version should be supplied one day.
    }
    \examples{
    
    
    Michel Crucifix's avatar
    Michel Crucifix a validé
    data(harmonic_sample)
    spectrum <- mfft_real(harmonic_sample$data)
    print(spectrum)
    
    Michel Crucifix's avatar
    Michel Crucifix a validé
    
    }
    \references{
    \insertRef{sidlichovsky97aa}{gtseries}
    }
    \author{
    Michel Crucifix
    }