gftool.fermi_fct

gftool.fermi_fct(eps, beta)[source]

Return the Fermi function 1/(exp(βϵ)+1).

For complex inputs the function is not as accurate as for real inputs.

Parameters:
epscomplex or float or np.ndarray

The energy at which the Fermi function is evaluated.

betafloat

The inverse temperature \(beta = 1/k_B T\).

Returns:
complex of float or np.ndarray

The Fermi function, same type as eps.

See also

fermi_fct_inv

The inverse of the Fermi function for real arguments.

Examples

>>> eps = np.linspace(-15, 15, num=501)
>>> fermi = gt.fermi_fct(eps, beta=1.0)
>>> import matplotlib.pyplot as plt
>>> _ = plt.plot(eps, fermi)
>>> _ = plt.xlabel(r"$\epsilon/\beta$")
>>> _ = plt.axvline(0, color='black', linewidth=0.8)
>>> _ = plt.xlim(left=eps.min(), right=eps.max())
>>> _ = plt.ylim(bottom=0)
>>> plt.show()

(png, pdf)

../_images/gftool-fermi_fct-1.png