Distributions
The distributions used throughout the code.
- class xarpes.distributions.distribution(name)[source]
Parent class for distributions. The class cannot be used on its own, but is used to instantiate unique and non-unique distributions.
- Parameters:
- namestr
Non-unique name for instances, not to be modified after instantiation.
- property name
Returns the name of the class instance.
- Returns:
- namestr
Non-unique name for instances, not to be modified after instantiation.
- class xarpes.distributions.unique_distribution(name)[source]
Parent class for unique distributions, to be used one at a time, e.g., during the background of an MDC fit or the Fermi-Dirac distribution.
- Parameters:
- labelstr
Unique label for instances, identical to the name for unique distributions. Not to be modified after instantiation.
- property label
Returns the unique class label.
- Returns:
- labelstr
Unique label for instances, identical to the name for unique distributions. Not to be modified after instantiation.
- class xarpes.distributions.constant(offset)[source]
Child class for constant distributions, used e.g., during MDC fitting. The constant class is unique, only one instance should be used per task.
- Parameters:
- offsetfloat
The value of the distribution for the abscissa equal to 0.
- property offset
Returns the offset of the constant distribution.
- Returns:
- offsetfloat
The value of the distribution for the abscissa equal to 0.
- property set_offset
Returns the offset of the constant distribution.
- Returns:
- offsetfloat
The value of the distribution for the abscissa equal to 0.
- class xarpes.distributions.linear(slope, offset)[source]
Child cass for for linear distributions, used e.g., during MDC fitting. The constant class is unique, only one instance should be used per task.
- Parameters:
- offsetfloat
The value of the distribution for the abscissa equal to 0.
- slopefloat
The linear slope of the distribution w.r.t. the abscissa.
- property offset
Returns the offset of the linear distribution.
- Returns:
- offsetfloat
The value of the distribution for the abscissa equal to 0.
- property set_offset
Returns the offset of the linear distribution.
- Returns:
- offsetfloat
The value of the distribution for the abscissa equal to 0.
- property slope
Returns the slope of the linear distribution.
- Returns:
- slopefloat
The linear slope of the distribution w.r.t. the abscissa.
- property set_slope
Returns the slope of the linear distribution.
- Returns:
- slopefloat
The linear slope of the distribution w.r.t. the abscissa.
- class xarpes.distributions.fermi_dirac(temperature, hnuminphi, background=0, integrated_weight=1, name='fermi_dirac')[source]
Child class for Fermi-Dirac (FD) distributions, used e.g., during Fermi edge fitting. The FD class is unique, only one instance should be used per task.
The Fermi-Dirac distribution is described by the following formula:
\[\frac{A}{\rm{e}^{\beta(E_{\rm{kin}}-(h\nu-\Phi))}+1} + B\]with \(A\) as
integrated_weight
, \(B\) asbackground
, \(h\nu-\Phi\) ashnuminphi
, and \(\beta=1/(k_{\rm{B}}T)\) with \(T\) astemperature
.- Parameters:
- temperaturefloat
Temperature of the sample [K]
- hnuminphifloat
Kinetic energy minus the work function [eV]
- backgroundfloat
Background spectral weight [counts]
- integrated_weightfloat
Integrated weight on top of the background [counts]
- evaluate(energy_range)[source]
Evaluates the FD distribution for a given class instance. No energy convolution is performed with evaluate.
- Parameters:
- energy_rangendarray
1D array on which to evaluate the FD distribution [eV]
- Returns:
- evalfndarray
1D array of the evaluated FD distribution [counts]
- convolve(energy_range, energy_resolution)[source]
Evaluates the FD distribution for a given class instance and performs the energy convolution with the given resolution. The convolution is performed with an expanded abscissa range of 5 times the standard deviation.
- Parameters:
- energy_rangendarray
1D array on which to evaluate and convolve FD distribution [eV]
- energy_resolutionfloat
Energy resolution of the detector for the convolution [eV]
- Returns:
- evalfndarray
1D array of the energy-convolved FD distribution [counts]