gabor.fun: Gabor function implementation

View source: R/gabor.fun.R

gabor.funR Documentation

Gabor function implementation

Description

Gabor function is a sinusoidal wave localized by a Gaussian envelope. In signal processing it is widely used as a basic building block for representing signals that are localized in both time and frequency. Matching Pursuit algorithm uses a redundant dictionary of the so called Gabor atoms. Gabor atoms are ideal for Matching Pursuit because they: 1) provide optimal time–frequency localization, 2) represent oscillatory signals well, 3) enable adaptive time-frequency decomposition.

Usage

gabor.fun(
  number.of.samples,
  sampling.frequency,
  mean,
  phase,
  sigma,
  frequency,
  normalization = TRUE
)

Arguments

number.of.samples

How many samples should the generated atom consist of?

sampling.frequency

Sampling frequency.

mean

Time position.

phase

Phase.

sigma

Scale / width of the Gaussian window.

frequency

Frequency of the sinusoid.

normalization

If TRUE, norm of the generated atom equals 1.

Value

List of 4 vectors with cosine, gauss, gabor and time waveforms of size number.of.samples.

Examples

number.of.samples <- 512
sampling.frequency <- 256.0
mean <- 1
phase <- pi
sigma <- 0.5
frequency <- 5.0
normalization = TRUE

out <- gabor.fun(
  number.of.samples,
  sampling.frequency,
  mean,
  phase,
  sigma,
  frequency,
  normalization
)

# If normalization = TRUE, norm of atom = 1, we can check it
crossprod(out$gabor)

plot(out$t, out$gabor, type = "l", xlab = "t", ylab = "gabor", panel.first = grid())


MatchingPursuit documentation built on April 9, 2026, 9:08 a.m.