freealg.AlgebraicForm.hilbert#
- AlgebraicForm.hilbert(x=None, plot=False, latex=False, save=False)#
Compute Hilbert transform of the spectral density.
- Parameters:
- xnumpy.array, default=None
The locations where Hilbert transform is evaluated at. If None, an interval slightly larger than the support interval of the spectral density is used.
- plotbool, default=False
If True, density is plotted.
- latexbool, default=False
If True, the plot is rendered using LaTeX. This option is relevant only if
plot=True.- savebool, default=False
If not False, the plot is saved. If a string is given, it is assumed to the save filename (with the file extension). This option is relevant only if
plot=True.
- Returns:
- hilbnumpy.array
The Hilbert transform on the locations x.
Notes
The Hilbert transform of s spectral density is
\[H(x) = \mathcal{H}[\rho](x) = \frac{1}{\pi} \mathrm{p.v.} \int_{\mathbb{R}} \frac{\rho(y)}{x - y}\, \mathrm{d}y.\]It can be directly computed from the non-tangential limit of the Stieltjes transform by
\[H(x) = -\pi \, \lim_{\epsilon \to 0^{+}} \Re(m(x + i \epsilon)).\]Examples
>>> # Create a distribution with two bulks >>> from freealg.distributions import CompoundFreePoisson >>> cfp = CompoundFreePoisson(t=[2.0, 5.5], w=[0.75, 0.25], ... lam=0.1) >>> # Create AlgebraicForm and fit the distribution >>> from freealg import AlgebraicForm >>> af = AlgebraicForm(cfp) >>> af.fit(deg_m=3, deg_z=1) >>> # Plot the density of the fitted spectral curve >>> import numpy >>> x = numpy.linspace(0, 8, 1000) >>> hilb = af.hilbert(x, plot=True)