Skip to content

Marco-Congedo/FourierAnalysis.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FourierAnalysis.jl

FourierAnalysis gif

Documentation Technical Details
paper

FourierAnalysis is a signal-processing Julia package for performing the analysis of real multivariate data (e.g., multivariate time series) in the frequency domain and in the time-frequency domain. It is based upon the DSP.jl, FFTW.jl and AbstractFFTs.jl packages.

In the frequency domain FourierAnalysis computes spectra, linear and non-linear cross-spectral matrices and several linear and non-linear coherence matrices using the sliding-windows Welch method.

Time-frequency 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

  • mean amplitude
  • mean direction
  • phase concentration (the non-linear version of which is the directional statistic circular mean resultant length)
  • comodulation
  • coherence (the non-linear version of which is known as phase-locking values or phase coherence).

All these measures are provided in a simple and unified fashion.

Installation

Execute the following command in Julia's REPL:

]add FourierAnalysis

About the Author

Marco Congedo is a Research Director of CNRS (Centre National de la Recherche Scientifique), working at UGA (University of Grenoble Alpes), in Grenoble (France), the city where Jean-Baptiste Joseph Fourier has served as a Prefect:).

Contact

first name dot last name at gmail dot com

Examples

using FourierAnalysis, Plots

# Set sampling rate (sr) and FFT window length (wl):
sr, wl = 128, 128

# Generate a sinusoidal wave at 10Hz with peak amplitude 0.5 and add some white noise:
v = sinusoidal(0.5, 10, sr, wl*16) + randn(wl*16)

# Get the power spectrum with a rectangular tapering window:
S = spectra(v, sr, wl; tapering=rectangular)

# Plot the power spectrum:
plot(S; fmax=24)

# The same syntax applies in the case of multivariate data (e.g., 4 time-series):
V = randn(wl*16, 4)
# avoid conflict with DSP.hamming
S = spectra(V, sr, wl; tapering=FourierAnalysis.hamming)
plot(S)

# Get the analytic amplitude in the time-Frequency domain:
A = TFamplitude(v, sr, wl; fmax=24)

# plot the analytic amplitude:
heatmap(A.y)

# et cetera.


Documentation Technical Details
paper

About

A Julia package for the Fourier analysis of Multivariate Data in the Frequency and Time-Frequency Domain

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages