plot_pdf - cchandre/HamLorenz GitHub Wiki
plot_pdf
(function)
Purpose
Plots the probability density function (PDF) of the system state X
and its transformed version Y = φ(X)
, comparing them with a Gaussian fit.
Parameters
sol
: AOdeSolution
solution object (such as returned bysolve_ivp
orsolve_ivp_symp
) containing the time evolution of the system.
Description
This function performs the following steps:
- Flattens and standardizes the state
X(t)
and its transformed counterpartY(t) = φ(X)
using z-scores. - Estimates their PDFs using Gaussian kernel density estimation (KDE).
- Computes a Gaussian fit (mean and standard deviation) for
X(t)
. - Plots the PDFs of
X
,Y
, and the Gaussian fit on a logarithmic y-axis for better visibility of tails.
Plot Details
- KDE estimates for
X
andY
. - Dashed red line for the Gaussian fit of
X
. - Log-scaled y-axis ranging from
1e-4
to1
.
Notes
- Useful for checking non-Gaussian features or symmetry properties of the system's state distribution.