Softanza
StartFrançais
Softanza
The library documents itself · Numeric & optimization

stzFourier

14 own methods · 1 forms written with extensions, listed under their method

the source: base/number/stzFourier.ring(opens in a new tab) · All classes · The area reference: Numeric & optimization

Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean

Examples: 0 come from the library's tests; 11 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzFourier([3,3,3,3,3,3,3,3]). 3 methods have none yet. Examples run on 2026-10-03 12:54 inside the library at commit 0e72e2e2c.

Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
Content
(no comment in the source: the name reads as a sentence) contentno extension
Real
(no comment in the source: the name reads as a sentence) realno extension
Imaginary
(no comment in the source: the name reads as a sentence) imaginary
composed example
o1 = new stzFourier([3,3,3,3,3,3,3,3])
? @@( o1.Imaginary() )
#--> [ 0, 0, 0, 0, 0, 0, 0, 0 ]
composed from the signature, run for this page
no extension
Count
(no comment in the source: the name reads as a sentence) count
composed example
o1 = new stzFourier([3,3,3,3,3,3,3,3])
? o1.Count()
#--> 8
composed from the signature, run for this page
no extension
IsRadix2Length
TRUE when the length is a power of two, i.e. when the plain radix-2 path applies. Informational only -- Transform() works either way.
composed example
o1 = new stzFourier([3,3,3,3,3,3,3,3])
? o1.IsRadix2Length()
#--> 1
composed from the signature, run for this page
no extension
Transform
The spectrum, as a list of [re, im] pairs, one per frequency bin.also written: DFT · Spectrum
composed example
o1 = new stzFourier([3,3,3,3,3,3,3,3])
? @@( o1.Transform() )
#--> [ [ 24, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ]
composed from the signature, run for this page
no extension
InverseTransform
Back to the time domain. InverseTransform(Transform()) is the identity.also written: InverseDFT
composed example
o1 = new stzFourier([3,3,3,3,3,3,3,3])
? @@( o1.InverseTransform() )
#--> [ [ 3, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ]
composed from the signature, run for this page
no extension
Magnitudes
EACH OF THESE IS ONE ENGINE CALL, not a transform this class then walks. The readings are what callers actually want -- raw complex bins are rarely the answer -- so they belong to the engine and every language over it, not to a loop written once per binding. |X_k| per bin: "how much of this frequency is present". Phase-blind, which is what you want when looking for a periodicity.
composed example
o1 = new stzFourier([3,3,3,3,3,3,3,3])
? @@( o1.Magnitudes() )
#--> [ 24, 0, 0, 0, 0, 0, 0, 0 ]
composed from the signature, run for this page
no extension
Phases
The phase angle of each bin, in radians.
composed example
o1 = new stzFourier([3,3,3,3,3,3,3,3])
? @@( o1.Phases() )
#--> [ 0, 0, 0, 0, 0, 0, 0, 0 ]
composed from the signature, run for this page
no extension
PowerSpectrum
|X_k|^2 -- energy per bin, the quantity Parseval's theorem is about.
composed example
o1 = new stzFourier([3,3,3,3,3,3,3,3])
? @@( o1.PowerSpectrum() )
#--> [ 576, 0, 0, 0, 0, 0, 0, 0 ]
composed from the signature, run for this page
no extension
DominantBin
The engine excludes bin 0 and searches only the first half, and both matter: bin 0 holds the mean rather than a frequency and usually dominates, while a real signal's spectrum is conjugate-symmetric so the second half is a mirror. Getting either wrong names the wrong frequency; neither is a caller's problem.
composed example
o1 = new stzFourier([3,3,3,3,3,3,3,3])
? o1.DominantBin()
#--> 2
composed from the signature, run for this page
no extension
DominantFrequency
The dominant frequency in cycles per sample-interval; multiply by a sample rate to get Hz.
composed example
o1 = new stzFourier([3,3,3,3,3,3,3,3])
? o1.DominantFrequency()
#--> 0.13
composed from the signature, run for this page
no extension
ConvolvedWith
This is also POLYNOMIAL MULTIPLICATION -- the coefficients of a product are the convolution of the coefficients -- which is why stzPolynomial uses it.
composed example
o1 = new stzFourier([3,3,3,3,3,3,3,3])
? @@( o1.ConvolvedWith([ 2, 3 ]) )
#--> [ 6.00, 15, 15.00, 15.00, 15, 15.00, 15, 15, 9.00 ]
composed from the signature, run for this page
QCSXTZZZIBWU