R/RcppExports.R

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' create_sin_cos
#'
#' fit sin curves to atv data
#'
#' @param n_rows the number of rows in the atv image
#' @param n_curves the number of sin/cos curves to use
#' @param intercept whether to include an intercept
#'
#' @return fitting coefficients
#'
#' @useDynLib atv
#' @importFrom Rcpp evalCpp
#' @importFrom RcppParallel RcppParallelLibs
#'
#' @export
#'
create_sin_cos <- function(n_rows, n_curves, intercept = TRUE) {
    .Call('atv_create_sin_cos', PACKAGE = 'atv', n_rows, n_curves, intercept)
}

#' sin_fit_ols_parallel
#'
#' fit sin curves to atv data.
#'
#' @param y atv matrix of data
#' @param n_curves the number of sin/cos curves to use
#'
#' @return fitting coefficients
#'
#' @export
#'
sin_fit_ols_parallel <- function(y, n_curves) {
    .Call('atv_sin_fit_ols_parallel', PACKAGE = 'atv', y, n_curves)
}

#' convert_to_amplitude_phase
#'
#' convert regression fit to amplitude and phase
#'
#' @param coefs coefficient matrix of data
#'
#' @return phase and amplitude
#'
#' @export
#'
convert_to_amplitude_phase <- function(coefs) {
    .Call('atv_convert_to_amplitude_phase', PACKAGE = 'atv', coefs)
}

#' amplitude_phase_adjust
#'
#' adjust curves based on regression stats
#'
#' @param coefs matrix of data
#' @param n number of values per trace
#' @param intercept whether to include an intercept
#'
#' @return phase and amplitude
#'
#' @export
#'
amplitude_phase_adjust <- function(coefs, n, intercept) {
    .Call('atv_amplitude_phase_adjust', PACKAGE = 'atv', coefs, n, intercept)
}
jkennel/atv documentation built on May 19, 2019, 11:41 a.m.