Learn R Programming

Momocs (version 0.2-6)

efourier.norm: Normalizes harmonic coefficients.

Description

efourier.norm normalizes Fourier coefficients for rotation, tranlation, size and orientation of the first ellipse.

Usage

efourier.norm(ef, start = FALSE)

Arguments

ef
list. A list containing $a_n$, $b_n$, $c_n$ and $d_n$ Fourier coefficients, such as returned by efourier.
start
logical. Whether to conserve the position of the first point of the outline.

Value

  • A list with following components:
  • Avector of numeric $A_{1->n}$ normalized harmonic coefficients.
  • Bvector of numeric $B_{1->n}$ normalized harmonic coefficients.
  • Cvector of numeric $C_{1->n}$ normalized harmonic coefficients.
  • Dvector of numeric $D_{1->n}$ normalized harmonic coefficients.
  • sizeMagnitude of the semi-major axis of the first fitting ellipse.
  • thetaAngle, in radians, between the starting point and the semi-major axis of the first fitting ellipse.
  • psiOrientation of the first fitting ellipse.
  • aoao Harmonic coefficient.
  • coco Harmonic coefficient.
  • lnefA list with A, B, C and D concatenated in a vector that may be convenient for some uses.

Details

See efourier for the mathematical background of the normalization. Other approaches implemented in SHAPE are possible such as manually editing or using the longest radius. They will be implemented in further Momocs versions.

References

Claude, J. (2008) Morphometrics with R, Use R! series, Springer 316 pp. Ferson S, Rohlf FJ, Koehn RK. 1985. Measuring shape variation of two-dimensional outlines. Systematic Biology 34: 59-68.

See Also

efourier and efourier.i. Also eFourier for normalizing harmonic coefficients when calculating it for Coo objects.

Examples

Run this code
data(bot)
q <- efourier(bot@coo[[1]], 24)
efourier.i(q) # equivalent to efourier.shape(q$an, q$bn, q$cn, q$dn)
efourier.norm(q)
efourier.shape(nb.h=5, alpha=1.2)
efourier.shape(nb.h=12, alpha=0.9)

Run the code above in your browser using DataLab