# som.spectral_stats: Statistical analysis of noisy spectral functions

Functions in this module implement the statistical analysis technique for ensembles of spectral functions described in Sections I-II of [GMPPS2017].

som.spectral_stats.spectral_integral()

Signature : (float z_m, float delta_m, configuration c, resolution_function r_func) -> float Evaluate spectral integral

$i_m^{(j)} = \int_{-\infty}^\infty dz \bar K(m, z) A^{(j)}(z)$

for a single energy interval.

Parameters:

Z_m:

float, Center of the energy interval.

Delta_m:

float, Length of the energy interval.

C:

som.Configuration, Spectral function $$A^{(j)}(z)$$.

R_func:

str, Name of the resolution function $$\bar K(m, z)$$, one of rectangle, lorentzian, gaussian.

Returns: float, Value of the integral.

som.spectral_stats.spectral_avg()

Signature : (som_core cont, int i, triqs::mesh::refreq mesh, resolution_function r_func) -> vector<double> Compute spectral averages over a set of accumulated particular solutions

$i_m = \frac{1}{J} \sum_{j=1}^J i_m^{(j)}$

for energy intervals centered around points of a regular energy mesh.

Parameters:

Cont:

Som, Analytic continuation object.

I:

int, Index of the diagonal matrix element of the observable used to construct cont.

Mesh:

triqs.gf.meshes.MeshReFreq, Real energy mesh.

R_func:

str, Name of the resolution function $$\bar K(m, z)$$, one of rectangle, lorentzian, gaussian.

Returns: Real 1D NumPy array of values $$i_m$$.

som.spectral_stats.spectral_disp()

Signature : (som_core cont, int i, triqs::mesh::refreq mesh, vector<double> avg, resolution_function r_func) -> vector<double> Compute spectral dispersions of a set of accumulated particular solutions

$\sigma^2_m = \frac{1}{J} \sum_{j=1}^J (i_m^{(j)} - i_m)^2$

for energy intervals centered around points of a regular energy mesh.

Parameters:

Cont:

Som, Analytic continuation object.

I:

int, Index of the diagonal matrix element of the observable used to construct cont.

Mesh:

triqs.gf.meshes.MeshReFreq, Real energy mesh.

Avg:

Real 1D NumPy array of precomputed averages $$i_m$$.

R_func:

str, Name of the resolution function $$\bar K(m, z)$$, one of rectangle, lorentzian, gaussian.

Returns: Real 1D NumPy array of values $$\sigma_m$$.

som.spectral_stats.spectral_corr()

Signature : (som_core cont, int i, triqs::mesh::refreq mesh, vector<double> avg, resolution_function r_func) -> matrix<double> Compute spectral two-point correlators of a set of accumulated particular solutions

$\sigma_{mm'} = \frac{1}{J} \sum_{j=1}^J (i_m^{(j)} - i_m) (i_{m'}^{(j)} - i_{m'})$

for energy intervals centered around points of a regular energy mesh.

Parameters:

Cont:

Som, Analytic continuation object.

I:

int, Index of the diagonal matrix element of the observable used to construct cont.

Mesh:

triqs.gf.meshes.MeshReFreq, Real energy mesh.

Avg:

Real 1D NumPy array of precomputed averages $$i_m$$.

R_func:

str, Name of the resolution function $$\bar K(m, z)$$, one of rectangle, lorentzian, gaussian.

Returns: Real 2D NumPy array of values $$\sigma_{mm'}$$.