SignalProcessing
LSPeriodogram
plot the Lomb-Scargle periodogram of a signal
Calling Sequence
Parameters
Options
Description
Examples
References
Compatibility
LSPeriodogram(t, f, options)
t
-
rtable ; time
f
rtable ; signal
options
(optional) one or more of the options listed below
detrend : truefalse : indicates if the data should have any trend removed
frequencyscale : anything
powerscale : identical("dB", "absolute")
timeunit : anything
outputdata : posint : specify the number of the output data points
errors : rtable or realcons
precise : truefalse : indicates the methods to use
minimumfrequency : float : indicates minimum frequency
maximumfrequency : float : indicates maximum frequency
normalization : identical('standard', 'model', 'log', 'psd') : indicates the normalization methods
oversamplingfactor : numeric : indicates the oversampling factor
nyquistfactor : numeric : indicates the multiple of the average Nyquist frequency
centerdata : truefalse : indicates whether the data needs to subtract the weighted mean
generalized : truefalse : indicates the methods to use for the Lomb Scargle Fast Approximation
The LSPeriodogram(t, f) command plots the power spectrum for one signal. t and f must be a one-dimensional rtable.
The detrend option specifies if the data should have any linear trend removed before being plotted.
The frequencyscale option controls the scaling used on the frequency axis. The default is Hz.
The powerscale option controls the scaling used on the power axis and can be one of "dB" or "absolute". The default is "dB".
The timeunit option specifies the unit of the input time. The default value is s.
The errors option specifies the expected magnitude of the errors, which is used to get the normalized weight for generalized Lomb Scargle periodogram. It can only be a real number or an one-dimensional array. The default value is NULL.
The outputdata option specifies the number of output data points. These output data points correspond to equally spaced frequencies.
The minimumfrequency option specifies the minimum frequency.
The maximumfrequency option specifies the maximum frequency.
If one of maximumfrequency, minimumfrequency and outputdata is specified, then all of them must be provided. If all of them are not provided, then the frequencies used run from 1T⁢oversamplingfactor to nyquistfactor⁢Nf, where T=max⁡t−min⁡t and Nf=n2⁢T where n is the number of elements in t. Output frequencies are equally spaced.
The nyquistfactor option has a default value 1.
The normalization option controls the normalization used on the power and can be one of standard, model, log or psd. The default value is standard. Standard Normalization : Pstandard⁡f=χref2−χ⁡f2χref2. Model Normalization : Pmodel⁡f=χref2−χ⁡f2χ⁡f2. Logarithmic Normalization: Plog⁡f=log⁡χref2χ⁡f2. PSD Normalization : Ppsd⁡f=χref22−χ⁡f22. In all normalization methods, let fi be the measurement in time ti with errors σi, then χ⁡f2=∑i=1n⁡fi−f⁡ti2σi2 where n is the number of elements in f, and χref2 is the non-varying reference model which is the χ⁡f2 for weighted mean.
The oversamplingfactor option specifies the oversampling factor. The default value is 5.
If the centerdata=false option is provided, then the weighted mean will not be subtracted from signal data. The default value is true.
If the generalized=false option is provided, then the generalized Lomb Scargle Periodogram will not be used. The default value is true.
Additional plotting options as described on the plot/options help page may be included.
with⁡SignalProcessing:
Generate a time vector
t≔sort⁡LinearAlgebra:-RandomVector⁡210,generator=0..12⁢π,datatype=float8
Assume the time unit is second and generate signal using frequencies of 1 Hz and 2 Hz:
f1≔1.0:
f2≔2.0:
s≔Vector⁡210,i↦sin⁡2⋅f1⋅π⋅ti+1.5⋅sin⁡2⋅f2⋅π⋅ti,datatype=float8
LSPeriodogram⁡t,s,frequencyscale=kHz
LSPeriodogram⁡t,s,frequencyscale=Hz
Assume the time unit is day and the frequencies are 1 cycle per day and 2 cycles per day, which are equivalent to 0.000011574 Hz and 0.000023148 Hz
f3≔124.⋅60⋅60
f3≔0.00001157407407
f4≔224.⋅60⋅60
f4≔0.00002314814815
LSPeriodogram⁡t,s,timeunit=d,frequencyscale=Hz
Lomb, Nicholas R. "Least-Squares Frequency Analysis of Unequally Spaced Data." Astrophysics and Space Science. Vol. 39, 1976, pp. 447–462.
Press, William H., and Rybicki, George B. "Fast Algorithm for Spectral Analysis of Unevenly Sampled Data." Astrophysical Journal. Vol. 338, 1989, pp. 277–280.
Zechmeister, M., and Kürster, M. "The generalised Lomb-Scargle periodogram. A new formalism for the floating-mean and Keplerian periodograms." Astronomy & Astrophysics. Vol. 496, 2009, pp. 577-584
The SignalProcessing[LSPeriodogram] command was introduced in Maple 2019.
For more information on Maple 2019 changes, see Updates in Maple 2019.
See Also
Periodogram
SignalPlot
Spectrogram
Statistics:-Detrend
Download Help Document