visualdynamics.core.kurtosis¶
kurtosis
¶
Kurtosis, channel by channel: how close a record is to Gaussian.
A random vibration test is specified as a spectrum, and a spectrum says nothing about the shape of the distribution that produced it. Two records with the same PSD can be Gaussian noise or a series of rare, large peaks, and the second does more fatigue damage to a test article than the first. Kurtosis is the number that separates them, and computing it per channel shows a rattling fixture or a clipping amplifier while the spectrum still looks correct.
The kurtosis here is Pearson's, not Fisher's. The Pearson kurtosis of a
Gaussian is 3; Fisher's excess kurtosis subtracts 3, so a Gaussian is
0. Both are in use and they differ by exactly three, so the nominal
value is defined once as NOMINAL, and every plot and label of it says
which convention it is.
Within TOLERANCE of nominal a value is unremarkable, and beyond it in
either direction it is worth looking at. High values are the more
common concern, because they mean peaks the spectrum did not predict.
Low values matter too: a record well under three has usually been
clipped or is not random.
References
The fourth standardized moment is standard; these are where it and its use in vibration testing are set out.
- Bendat, J. S., & Piersol, A. G. (2010). Random Data: Analysis and Measurement Procedures, 4th ed. Wiley. The moments of a distribution.
- Joanes, D. N., & Gill, C. A. (1998). "Comparing measures of sample skewness and kurtosis." Journal of the Royal Statistical Society: Series D. The sample estimators and their bias; this reports the plain moment ratio, which is what a vibration specification means by the word.
- Steinwolf, A. (2006). "Shaker simulation of random vibrations with a high kurtosis value." Journal of the IEST. Why a record reading above three fatigues an article that a Gaussian one of the same spectrum does not.
Functions:
| Name | Description |
|---|---|
kurtosis |
The Pearson kurtosis of one record: 3 for a Gaussian. |
kurtosis_of_centered |
|
frame_kurtosis |
The Pearson kurtosis of each row of |
analyzed_span |
The part of a record the kurtosis is computed over, and its name. |
channel_kurtosis |
[(channel label, Pearson kurtosis)] for a time history. |
Functions:¶
kurtosis
¶
The Pearson kurtosis of one record: 3 for a Gaussian.
The population (biased) estimator, m4 / m2**2, which is the
value vibration-test practice quotes and the value
scipy.stats.kurtosis(fisher=False, bias=True) returns; the tests
compare this function against scipy. Non-finite samples are
dropped first.
A record with no variance, or fewer than two finite samples, has no distribution shape to describe, so the result is NaN rather than a division by zero: a dead channel is not a Gaussian one.
Source code in src/visualdynamics/core/kurtosis.py
kurtosis_of_centered
¶
kurtosis of samples already centered on their mean, with their
second moment m2 already taken: the time statistics have both in
hand, and centering a five-minute record twice was a fifth of its
reading. NaN for no variance.
Source code in src/visualdynamics/core/kurtosis.py
frame_kurtosis
¶
The Pearson kurtosis of each row of frames: kurtosis row by
row, with the rows that are all finite read at once. A record's
frames number in the thousands, and one call apiece was half the
time the time statistics took.
Source code in src/visualdynamics/core/kurtosis.py
analyzed_span
¶
The part of a record the kurtosis is computed over, and its name.
It is the same part the spectra shown with it are computed from. A record with a quiet lead-in and tail is, taken whole, a mixture of a loud distribution and a quiet one, and that mixture is not Gaussian even when the excitation is, so a kurtosis of the whole record would disagree with the PSD shown beside it.
Returns ([(first, last), ...], phrase): sample ranges, and the
phrase a caption uses for them. A record with averaging frames set
gives its analysis span, one with shocks found gives the shock
windows (order does not matter to a distribution, so separate
windows are read together), and one with neither is read whole.
Source code in src/visualdynamics/core/kurtosis.py
channel_kurtosis
¶
[(channel label, Pearson kurtosis)] for a time history.
Computed over analyzed_span, the part of the record the spectra
shown with it are computed from, so the two describe the same data.
Every channel goes on one chart, whatever it measures: kurtosis is dimensionless, so accelerations, forces and volts can share an axis. A channel whose record is dead gives NaN and is drawn as a gap, because a zero would look like an impossibly flat distribution.