plot_spectrum

edrixs.plot_spectrum.get_spectra_from_poles(poles_dict, omega_mesh, gamma_mesh, temperature)[source]

Given the dict of poles, calculate XAS or RIXS spectra using continued fraction formula,

\[I(\omega_{i}) =-\frac{1}{\pi}\text{Im} \left[ \frac{1}{x - \alpha_{0} - \frac{\beta_{1}^2}{x-\alpha_{1} - \frac{\beta_{2}^2}{x-\alpha_{2} - ...}} }\right],\]

where, \(x = \omega_{i}+i\Gamma_{i} + E_{g}\).

Parameters
poles_dict: dict

Dict containing information of poles, which are calculated from xas_fsolver and rixs_fsolver. This dict is constructed by iostream.read_poles_from_file().

omega_mesh: 1d float array

Energy grid.

gamma_mesh: 1d float array

Life-time broadening.

temperature: float number

Temperature (K) for boltzmann distribution.

Returns
spectra: 1d float array

The calculated XAS or RIXS spectra.

See also

iostream.read_poles_from_file

read XAS or RIXS poles files.

edrixs.plot_spectrum.merge_pole_dicts(list_pole_dict)[source]

Given a list of dict of poles, merge them into one dict of poles

Parameters
list_pole_dict: list of dict

Dict containing information of poles, which are calculated from xas_fsolver and rixs_fsolver.

Returns
new_pole_dict: dict of poles

New dict of poles.

edrixs.plot_spectrum.plot_rixs_map(rixs_data, ominc_mesh, eloss_mesh, fname='rixsmap.pdf')[source]

Given 2d RIXS data, plot a RIXS map and save it to a pdf file.

Parameters
rixs_data: 2d float array

Calculated RIXS data as a function of incident energy and energy loss.

ominc_mesh: 1d float array

Incident energy mesh.

eloss_mesh: 1d float array

Energy loss mesh.

fname: string

File name to save RIXS map.

edrixs.plot_spectrum.plot_spectrum(file_list, omega_mesh, gamma_mesh, T=1.0, fname='spectrum.dat', om_shift=0.0, fmt_float='{:.15f}')[source]

Reading poles \(\alpha\) and \(\beta\), and calculate the spectrum using continued fraction formula,

\[I(\omega_{i}) =-\frac{1}{\pi}\text{Im} \left[ \frac{1}{x - \alpha_{0} - \frac{\beta_{1}^2}{x-\alpha_{1} - \frac{\beta_{2}^2}{x-\alpha_{2} - ...}} }\right],\]

where, \(x = \omega_{i}+i\Gamma_{i} + E_{g}\).

Parameters
file_list: list of string

Name of poles file.

omega_mesh: 1d float array

The frequency mesh.

gamma_mesh: 1d float array

The broadening factor, in general, it is frequency dependent.

T: float (default: 1.0K)

Temperature (K).

fname: str (default: ‘spectrum.dat’)

File name to store spectrum.

om_shift: float (default: 0.0)

Energy shift.

fmt_float: str (default: ‘{:.15f}’)

Format for printing float numbers.