coeff_split: Converts a numerical description of harmonic coefficients to...

View source: R/core-utils.R

coeff_splitR Documentation

Converts a numerical description of harmonic coefficients to a named list.

Description

coeff_split returns a named list of coordinates from a vector of harmonic coefficients. For instance, harmonic coefficients are arranged in the $coe slot of Coe-objects in that way: A_1, \dots, A_n, B_1, \dots, B_n, C_1, \dots, C_n, D_1, \dots, D-n after an elliptical Fourier analysis (see efourier and efourier) while C_n and D_n harmonic are absent for radii variation and tangent angle approaches (see rfourier and tfourier respectively). This function is used internally but might be of interest elwewhere.

Usage

coeff_split(cs, nb.h = 8, cph = 4)

Arguments

cs

A vector of harmonic coefficients.

nb.h

numeric. The maximum harmonic rank.

cph

numeric. Must be set to 2 for rfourier and tfourier were used.

Value

Returns a named list of coordinates.

Examples

coeff_split(1:128, nb.h=32, cph=4) # efourier
coeff_split(1:64, nb.h=32, cph=2)  # t/r fourier

MomX/Momocs documentation built on Nov. 18, 2023, 10:53 p.m.