`spectrogram` resamples signal and use the `specgram` function from the `signal` library to compute the spectrogram. Results resolution can be then reduced to quickly plot large signals.
spectrogram( signal, sRate, maxFreq = 25, n = 1024, window = n, overlap = 0, cols = c(rep("#3B9AB2", 9), "#78B7C5", "#EBCC2A", "#E1AF00", rep("#F21A00", 6)), freq = 4, plot = TRUE, startTime = as.POSIXct("1970/01/01 00:00:00") )
Numerical vector of the signal.
Signal sample rate in Hertz.
Maximal frequency to plot in Hertz. Signal will be resampled at maxFreq*2 sample rate.
The size of the Fourier transform window.
Shape of the fourier transform window, defaults to n.
Overlap with previous window, defaults to 0.
Color scale used for the underlying plot function.
Aggregate frequency used to lower spectrogram resolution. Defaults to 4.
Boolean, plot or not the spectrogram.
Posixct of the signal start. Adjust the x axis labels accordingly.