freealg.AlgebraicForm.stieltjes#
- AlgebraicForm.stieltjes(x=None, y=None, plot=False, latex=False, save=False)#
Compute Stieltjes transform of the spectral density
- Parameters:
- xnumpy.array, default=None
The x axis of the grid where the Stieltjes transform is evaluated. If None, an interval slightly larger than the support interval of the spectral density is used.
- ynumpy.array, default=None
The y axis of the grid where the Stieltjes transform is evaluated. If None, a grid on the interval
[-1, 1]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:
- mnumpy.ndarray
The Stieltjes transform on the principal branch.
See also
Notes
The Stieltjes transform is defined by
\[m(z) = \int_{\mathbf{R}} \frac{\rho(x)}{x - z} \, \mathrm{d}x.\]The Stieltjes transform is a Herglotz function, meaning
\[\Im(m(z)) > 0, \quad z \in \mathbb{C}^{+}.\]Also, it satisfies normalization at infinity:
\[m(z) = -\frac{1}{z}, \qquad \vert z \vert \to \infty.\]This function evaluates Stieltjes transform on an array of points, or over a 2D Cartesian grid on the complex plane.
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, 100) >>> y = numpy.linspace(-2, 2, 100) >>> m = af.stieltjes(x, y, plot=True)