FourierAnalysis Documentation

Requirements & Installation

Julia version ≥ 1.3

Packages: see the dependencies of the main module.

To install the package, execute the following command in Julia's REPL:

]add FourierAnalysis

Contributions

Independent testing and reviewers for both the code and the documentation are welcome.

About the Author

Marco Congedo is a research scientist of CNRS (Centre National de la Recherche Scientifique), working in UGA (University of Grenoble Alpes), in Grenoble, France, the city where Jean-Baptiste Joseph Fourier has served as a Governor. Contact: first name dot last name at gmail dot com

Overview

FourierAnalysis allows the analysis of

  • sets of real multivariate time-series in the frequency domain,
  • sets of real univariate time-series in the time-frequency domain.

The implemented tools may suit also other kind of data.

Frequency-domain representations include spectra, linear and non-linear cross-spectral matrices and several linear and non-linear coherence matrices, which are all estimated using the sliding-windows (Welch) method.

For those estimations, keep in mind that given sampling rate $sr$ and window length $wl$, the discrete Fourier frequencies are $0, 1r, 2r,..., qr$, where $r=sr/wl$ is the frequency resolution and $q=wl÷2$ (integer division). The 0 (zero) frequency corresponds to the DC level, which estimation in FourierAnalysis is always given as an option.

Time-frequency (TF) representations are obtained applying a filter-bank and the Hilbert transform. This way FourierAnalysis computes the analytic signal, from which the instantaneous amplitude (envelope) and instantaneous phase are obtained, along with several popular linear and non-linear, weighted, univariate and bivariate statistics, such as the mean amplitude, mean direction, phase concentration, the non-linear version of which is a directional statistic known as circular mean resultant length, amplitude co-modulation, coherence, the non-linear version of which is a synchronization measure known as phase-locking values or phase coherence, etc.

Such a large panel of measures is provided in a simple and unified fashion, following the approach illustrated in Congedo(2018) in the context of electroencephalography (EEG), for which all default settings have been tailored. The package has been written with the do-it-with-one-line spirit and with the aim of allowing full control over relevant options for the Fourier analysis of multivariate time-series.

For starting using this package, browse the code units listed here below and execute the many code examples you will find therein or execute the 'example.jl' units collected in the "example" folder distributed in the github repository.

Code units

FourierAnalysis includes fourteen code units (.jl files):

Main API UnitsDescription
MainModule(FourierAnalysis.jl) constants, types, some structs, tips & tricks
tapers.jltapering windows for spectral, cross-spectral and coherence analysis
spectra.jlspectra of a time-series (set) or of a multivariate time series (set)
crossspectra.jlcross-spectral matrices of a multivariate time series (set)
coherence.jlcoherence matrices of a multivariate time series (set)
goertzel.jlGoertzel's algorithms for estimating a single DFT coefficient
timefrequency.jlanalytic signal, instantaneous amplitude and phase of a time-series set
timefrequencyuni.jlunivariate measures of a time-series set
timefrequencybi.jlbivariate measures of a time-series set
recipes.jlplot recipes and tips to plot data created by Fourier Analysis
tools.jlcollection of useful functions
Other API UnitsDescription
fftw.jlinterface to FFTW.jl to obtain forward and backward FFT planners
filters.jlinterface to DSP.jl to apply filter-banks
hilbert.jlcomputation of the analytic signal via Hilbert transform

Contents

Index