galore.cross_sections module

galore.cross_sections.cross_sections_info(cross_sections, logging=None)[source]

Log basic info from cross-sections dict.

Parameters
  • cross_sections (dict) – The keys ‘energy’, ‘citation’, ‘link’ and ‘warning’ are checked for relevant information

  • logging (module) – Active logging module from Python standard library. If None, logging will be set up.

Returns

Active logging module from Python standard library

Return type

module

galore.cross_sections.get_cross_sections(weighting, elements=None)[source]

Get photoionization cross-section weighting data.

For known sources, data is based on tabulation of Yeh/Lindau (1985).[1] Otherwise, energies in keV from 1-1500 are used with log-log polynomial parametrisation of data from Scofield.[2]

References

  1. Yeh, J.J. and Lindau, I. (1985) Atomic Data and Nuclear Data Tables 32 pp 1-155

  2. J. H. Scofield (1973) Lawrence Livermore National Laboratory Report No. UCRL-51326

Parameters
  • weighting (str or float) – Data source for photoionization cross-sections. If the string is a known keyword then data will be drawn from files included with Galore. Otherwise, the string will be interpreted as a path to a JSON file containing data arranged in the same way as the output of this function.

  • elements (iterable or None) – Collection of element symbols to include in the data set. If None, a full set of available elements will be included. When using a JSON dataset (including the inbuilt Yeh/Lindau) this parameter will be ignored as the entire dataset has already been loaded into memory.

Returns

Photoionization cross-section weightings arranged by element and orbital as nested dictionaries of floats, i.e.:

{el1: {orb1: cs11, orb2: cs12, ...},
 el2: {orb1: cs21, orb2: cs22, ...}, ... }

In addition the keys “reference”, “link”, “energy” and “warning” may be used to store metadata.

Return type

dict

galore.cross_sections.get_cross_sections_json(path)[source]

Get valence-band cross-sections from JSON file

Read photoionization data from a JSON file. File is expected to contain data for multiple elements and orbitals in the form {El1: {orb1: c1, orb2: c2, ...}, ...}. While it is expected that Galore will be used to examine valence-band orbitals labelled (s, p, d, f) it may be helpful in some cases to prepare a file with alternative orbital labels corresponding to the pDOS labels.

The labels ‘citation’, ‘energy’ and ‘link’ are reserved for metadata which may be displayed in the program log. The label ‘comment’ may be used for additional material in the JSON file; it is recommended to use this repeatedly for line-breaks, e.g.:

{"comment": "First line of text",
 "comment": "which is continued.",
 ...}
Parameters

path (str) – Path to JSON file

Returns

Weighted photoionization cross-sections for each element and orbital in form:

{el1: {'s': c11, 'p': c12, ... },
 el2: {'s': c21, 'p': c22, ... }, ... }

in tabulated units.

Return type

dict

galore.cross_sections.get_cross_sections_scofield(energy, elements=None)[source]

Get valence-band cross-sections from fitted data

Energy-dependent cross-sections have been averaged and weighted for the uppermost s, p, d, f orbitals from data tabulated by Scofield. The energy/cross-section relationship was fitted to an order-8 polynomial on a log-log scale.

Multiple energy values can be evaluated simultaneously by passing an array-like group of energies as energy. In this case the cross-section values will be arrays with the same shape as the energy arrays.

Parameters
  • energy (float or array-like) – Incident energy in keV

  • element (iterable or None) – Iterable (e.g. list) of element symbols. If None, include all available elements (1 <= Z <= 100).

Returns

Weighted photoionization cross-sections in Barns/electron for each orbital in form:

{el1: {'s': c11, 'p': c12, ... },
 el2: {'s': c21, 'p': c22, ... }, ... }

Return type

dict

Raises

ValueError – Energy values must lie within interpolation range 1–1500keV

galore.cross_sections.get_cross_sections_yeh(source)[source]

Get valence-band cross-sections from tabulated data

Tabulated values of photoionization cross-sections were drawn from ref [1] for energy values corresponding to relevant radiation sources: - 1486.6 eV, corresponding to Al k-alpha (laboratory XPS) - 40.8 eV, corresponding to He II (laboratory UPS) - 8047.8 eV, corresponding to a possible HAXPES source

References

  1. Yeh, J.J. and Lindau, I. (1985) Atomic Data and Nuclear Data Tables 32 pp 1-155

Parameters

source (str) – Label corresponding to radiation source. Accepted values ‘alka’ (1486.6 eV), ‘he2’ (40.8 eV), ‘yeh_haxpes’ (8047.8). These keys are not case-sensitive and correspond to Al k-alpha, He(II) and hard x-ray sources.

Returns

Weighted photoionization cross-sections in megaBarns/electron for each orbital in form:

{el1: {'s': c11, 'p': c12, ... },
 el2: {'s': c21, 'p': c22, ... }, ... }

Return type

dict