Smoother
- wannierberri.smoother.get_smoother(energy: ndarray, smear: float, mode: str | None = None)[source]
Return a smoother that applies for the given energy range. The smoother can be used a function that applies to an array. The axis of the array to be smoothed can be controlled with an argument
axis
, whose default is 0.If you calculated some quantity
data
over a range ofefermi
and want to apply the Fermi-Dirac smoother at 300 K, run the following code:smoother = wannierberri.get_smoother(efermi, 300, "Fermi-Dirac") data_smooth = smoother(data)
- Parameters:
energy (1D array of float) – The energies on which the data are calculated at. Must be evenly spaced.
smear (float) –
mode == None
: not used.mode == "Fermi-Dirac"
: Smearing parameter in Kelvin units.mode == "Gaussian"
: Smearing parameter in eV units.
mode (str or None) – Smoother mode. Default:
None
. Avaliable options:None
,"Fermi-Dirac"
, and"Gaussian"
.
- class wannierberri.smoother.FermiDiracSmoother(E: ndarray, T_Kelvin: float, maxdE: int | float = 8)[source]
Bases:
AbstractSmoother
Smoother that uses the derivative of Fermi-Dirac function.
- Parameters:
E (1D array) – The energies on which the data are calculated at.
T_Kelvin (float) – Temperature in Kelvin. Transformed into self.smear, which is in eV.
maxdE (flaot) – Determines the width of the convoluting function as (-T * maxdE, T * maxdE)
- class wannierberri.smoother.GaussianSmoother(E: ndarray, smear: float, maxdE: int | float = 8)[source]
Bases:
AbstractSmoother
Smoother that uses Gaussian function.
- Parameters:
E (1D array) – The energies on which the data are calculated at.
smear (float) – Smearing parameter in eV.
maxdE (int) – Determines the width of the convoluting function as (-smear * maxdE, smear * maxdE)
- class wannierberri.smoother.VoidSmoother[source]
Bases:
AbstractSmoother
Void smoother. When called, do nothing and return the original array.
- class wannierberri.smoother.AbstractSmoother(E: ndarray, smear: int | float, maxdE: int | float)[source]
Bases:
ABC
Smoother for smoothing an array by convolution. This is an abstract class which cannot by instantiated. Only the specific child classes can be instantiated. Each child class should implement its own version of
_params
,__init__
, and_broaden
.- Parameters:
E (1D array) – The energies on which the data are calculated at.
smear (float) – Smearing parameter in eV.
maxdE (int) – Determines the width of the convoluting function as (-smear * maxdE, smear * maxdE).
- abstract __init__(E: ndarray, smear: int | float, maxdE: int | float)[source]
initialize Smoother parameters
- abstract property _params
list of parameters that uniquely define the smoother.