efourier computes Elliptical Fourier Analysis (or Transforms or EFT)
from a matrix (or a list) of (x; y) coordinates.
efourier_norm normalizes Fourier coefficients.
Read Details carefully.
1 2 3 4 5 6 7 8 9 10
whether to normalize the coefficients using efourier_norm
For the maths behind see the paper in JSS.
Normalization of coefficients has long been a matter of trouble,
and not only for newcomers. There are two ways of normalizing outlines: the first,
and by far the most used, is to use a "numerical" alignment, directly on the
matrix of coefficients. The coefficients of the first harmonic are consumed
by this process but harmonics of higher rank are normalized in terms of size
and rotation. This is sometimes referred as using the "first ellipse", as the
harmonics define an ellipse in the plane, and the first one is the mother of all
ellipses, on which all others "roll" along. This approach is really convenient
as it is done easily by most software (if not the only option) and by Momocs too.
It is the default option of
But here is the pitfall: if your shapes are prone to bad aligments among all
the first ellipses, this will result in poorly (or even not at all) "homologous" coefficients.
The shapes particularly prone to this are either (at least roughly) circular and/or with a strong
bilateral symmetry. You can try to use
stack on the
efourier. Also, and perhaps more explicitely, morphospace usually show a mirroring symmetry,
typically visible when calculated in some couple of components (usually the first two).
If you see these upside-down (or 180 degrees rotated) shapes on the morphospace,
you should seriously consider aligning your shapes before the efourier step,
and performing the latter with
norm = FALSE.
Such a pitfall explains the (quite annoying) message when passing
efourier with just the
You have several options to align your shapes, using control points (or landmarks),
by far the most time consuming (and less reproducible) but possibly the best one too
when alignment is too tricky to automate.
You can also try Procrustes alignment (see
fgProcrustes) through their calliper
coo_aligncalliper), etc. You should also make the first
point homologous either with
to minimize any subsequent problems.
I will dedicate (some day) a vignette or a paper to this problem.
efourier, a list with components:
dn harmonic coefficients, plus
The latter should have been named
c0 in Claude (2008) but I (intentionnaly) propagated the error.
efourier_norm, a list with components:
for harmonic coefficients, plus
size, the magnitude of the semi-major axis of the first
theta angle, in radians, between the starting and the semi-major axis
of the first fitting ellipse,
psi orientation of the first fitting ellipse,
do, same as above,
lnef that is the concatenation of coefficients.
Directly borrowed for Claude (2008).
Silent message and progress bars (if any) with
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.
1 2 3 4 5 6 7 8 9 10
This is Momocs 1.1.6 Attaching package: 'Momocs' The following object is masked from 'package:stats': filter The following object is masked from 'package:base': table Warning messages: 1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display 2: 'rgl_init' failed, running with rgl.useNULL = TRUE 3: .onUnload failed in unloadNamespace() for 'rgl', details: call: fun(...) error: object 'rgl_quit' not found $an  -143.1142910 5.2925309 22.9922936 -11.3596452 -14.9412217  -5.4200881 5.7177112 0.4509076 0.3107020 -3.1633079  0.2814646 3.4927761 $bn  -13.8501141 -21.8994092 11.4235084 13.5870435 -12.6401807 2.5050679  5.1968464 -0.5366171 -1.0431706 1.0823659 2.3427969 0.1022387 $cn  64.44753053 -3.15375656 -17.96822626 5.76052596 7.17390949  -2.98410094 -1.20013013 1.18299684 -0.36305436 -0.46782525  0.67134872 0.08954658 $dn  -484.90299209 -1.04774048 42.07408510 3.40654863 -9.19128141  -2.99359284 0.96722479 2.22582484 0.02026172 -2.26134728  -0.04679906 0.80569603 $ao  349.02 $co  1080.921 'nb.h' not provided and set to 10 (99% harmonic power) An OutCoe object [ elliptical Fourier analysis ] -------------------- - $coe: 5 outlines described, 10 harmonics - $fac: 1 classifier: 'type' (factor 1): whisky.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.