Omega Meshes
The following plot shows how a subset of those behaves. Typically, all other meshes aim to be denser around 0 than a linear mesh.
import matplotlib.pyplot as plt
import numpy as np
from triqs_maxent.omega_meshes import *
for mesh in [LinearOmegaMesh, LorentzianOmegaMesh,
LorentzianSmallerOmegaMesh, HyperbolicOmegaMesh]:
m = mesh(omega_min=-10,omega_max=10,n_points=100)
plt.plot(list(m),label=mesh.__name__)
plt.xlabel('Data point number $i$')
plt.ylabel('Value of $\\omega_i$')
plt.legend()

import matplotlib.pyplot as plt
import numpy as np
from triqs_maxent.omega_meshes import *
N = 100000
gauge = None
for mesh in [LinearOmegaMesh, LorentzianOmegaMesh,
LorentzianSmallerOmegaMesh, HyperbolicOmegaMesh]:
m = mesh(omega_min=-10,omega_max=10,n_points=N)
h,b=np.histogram(list(m),bins=np.linspace(-10,10,100))
if gauge is None:
gauge = h[0]
plt.semilogy((b[:-1]+b[1:])/2.0,np.array(h)/float(gauge),label=mesh.__name__)
plt.xlabel('$\\omega$')
plt.ylabel('density of points (arb. u.)')
plt.legend(loc='lower right')

- class triqs_maxent.omega_meshes.BaseOmegaMesh(omega_min=-10, omega_max=10, n_points=100, *args, **kwargs)[source]
Bases:
ndarray
Base class for omega meshes. All meshes inherit from this class.
- class triqs_maxent.omega_meshes.LinearOmegaMesh(omega_min=-10, omega_max=10, n_points=100, *args, **kwargs)[source]
Bases:
BaseOmegaMesh
Omega mesh with linear spacing
The \(i\)-th \(\omega\)-point is given by
\[\omega_i = \omega_{min} + i \frac{\omega_{max}-\omega_{min}}{n_{max}-1},\]where \(i\) runs from \(0\) to \(n_{max}-1\).
- Parameters:
- omega_minfloat
the minimal omega
- omega_maxfloat
the maximal omega
- n_pointsint
the number of omega points
- class triqs_maxent.omega_meshes.DataOmegaMesh(data)[source]
Bases:
BaseOmegaMesh
Omega mesh from data array
The \(\omega\)-points are picked from a user-supplied array.
- Parameters:
- dataarray
an array giving the omega points
- class triqs_maxent.omega_meshes.LorentzianOmegaMesh(omega_min=-10, omega_max=10, n_points=100, *args, **kwargs)[source]
Bases:
BaseOmegaMesh
Omega mesh with Lorentzian spacing
This mesh is a lot denser than the linear mesh around \(\\omega=0\) and far less denser for high \(|\omega|\). The lowest value is at \(\omega_{min}\), the largest at \(\omega_{max}\).
- Parameters:
- omega_minfloat
the minimal omega
- omega_maxfloat
the maximal omega
- n_pointsint
the number of omega points
- cutfloat
a parameter influencing the relative density between the middle and the edge of the interval
- class triqs_maxent.omega_meshes.LorentzianSmallerOmegaMesh(omega_min=-10, omega_max=10, n_points=100, *args, **kwargs)[source]
Bases:
BaseOmegaMesh
Omega mesh with Lorentzian spacing
This mesh is a lot denser than the linear mesh around \(\\omega=0\) and far less denser for high \(|\omega|\). The lowest value is not at \(\omega_{min}\), the largest at \(\omega_{max}\); this is the main difference related to
LorentzianOmegaMesh
.- Parameters:
- omega_minfloat
the minimal omega
- omega_maxfloat
the maximal omega
- n_pointsint
the number of omega points
- cutfloat
a parameter influencing the relative density between the middle and the edge of the interval
- class triqs_maxent.omega_meshes.HyperbolicOmegaMesh(omega_min=-10, omega_max=10, n_points=100, *args, **kwargs)[source]
Bases:
BaseOmegaMesh
Omega mesh with hyperbolic spacing
This mesh is denser than the linear mesh around \(\omega=0\) and behaves like a sparser variant of a linear mesh at \(|\omega|\to\infty\).
- Parameters:
- omega_minfloat
the minimal omega
- omega_maxfloat
the maximal omega
- n_pointsint
the number of omega points