pyEELSMODEL.components.CLedge package

Submodules

pyEELSMODEL.components.CLedge.coreloss_edge module

copyright University of Antwerp 2021 author: Jo Verbeeck and Daen Jannis

class pyEELSMODEL.components.CLedge.coreloss_edge.CoreLossEdge(specshape, A, E0, alpha, beta, element, edge, eshift=0, q_steps=100)

Bases: Component

CoreLossEdge generic component class to derive core loss edge implementations from.

calculate()

This calculates the spectral data of the component. Each derived class from Component will need to implement its own functionality here.

Return type:

None.

calculate_cross_section()
get_convergence_correction_factor(nsamples=100)

Calculates the convergence correction for each different theta values. This depends on the geometry of the setup.

Returns:

get_elements()

Returns a list of allowed element names

get_elements_dir()
getgradient(parameter)

Get a reference to the gradient of this component with respect to parameter, if an analytical gradient is available. This function needs to be overoaded for every specific component

Parameters:

parameter (Parameter) – Reference to an existing parameter in the component.

Returns:

  • A reference to a Spectrum holding the gradient if the parameter was

  • indeed a parameter of this component and has an analytical gradient

  • defined gradient. None in all other cases.

set_Z()

Set the atomic number Z of the element from the CoreLossEdge. Needed for the hydrogenic calculations

set_edge(edge)

Checks if the given edge is valid and adds the directories of the :param edge: :return:

set_element(element)

Sets given element to the CoreLossEdge.

Parameters:

element (string) – The element to which to set it.

set_onset_energy()

pyEELSMODEL.components.CLedge.dummymodel module

class pyEELSMODEL.components.CLedge.dummymodel.DummyEdge(specshape, A, E0=300000.0, alpha=1e-09, beta=0.01, element=None, edge=None, eshift=0, r=3)

Bases: CoreLossEdge

DummyEdge is a first approximation of the edge. This assumes each edge has a different onset energy but the powerlaw value is can be chosen. Note that the parameters E0, alpha, beta do not influence the dummy edge model.

calculate_cross_section()
classmethod edge_by_onset(specshape, A, onset)

Class method to make a dummy edge where the edge onset energy is specified. In the list of elements not every edge is included so it would be of interest to have some freedom if needed.

Parameters:
  • specshape

  • A

  • onset

Returns:

set_edge(edge)

Checks if the given edge is valid and adds the directories of the :param edge: :return:

pyEELSMODEL.components.CLedge.dummymodelcombined module

class pyEELSMODEL.components.CLedge.dummymodelcombined.DummyEdgeCombined(specshape, A, E0, alpha, beta, element, edge, eshift=0)

Bases: CoreLossEdge

DummyEdge is a first approximation of the edge. This assumes each edge has a different onset energy but the powerlaw value is -3. Note that the parameters E0, alpha, beta do not influence the dummyedge model.

calculate()

This calculates the spectral data of the component. Each derived class from Component will need to implement its own functionality here.

Return type:

None.

calculate_cross_section()
manageparameters()
set_edge(edge)

Checks if the given edge is valid and adds the directories of the :param edge: :return:

set_onset_energy()

pyEELSMODEL.components.CLedge.hydrogen_coreloss_edge module

class pyEELSMODEL.components.CLedge.hydrogen_coreloss_edge.HydrogenicCoreLossEdge(specshape, A, E0, alpha, beta, element, edge, eshift=0, q_steps=100)

Bases: CoreLossEdge

Calculates the core loss cross-section using the hydrogenic wave function. The cross-sections can be calculated for the K and L edges.

calculate_cross_section()

Calculates the cross section using the hydrogenic wavefunctions.

Returns:

cross_section – The calculated cross section using the hydrogenic wavefunctions.

Return type:

1d numpy array [barn]

set_edge(edge)

Checks if it is possible to calculate the given edge. If so, then this edge is set as an attribute.

Parameters:

edge (string) – The edge which needs to calculated.

set_onset_energy()

pyEELSMODEL.components.CLedge.kohl_coreloss_edge module

class pyEELSMODEL.components.CLedge.kohl_coreloss_edge.KohlLossEdge(specshape, A, E0, alpha, beta, element, edge, eshift=0, q_steps=100, dir_path=None)

Bases: CoreLossEdge

Coreloss edges which are calculated by Leonhard Segger, Giulio Guzzinati and Helmut Kohl https://zenodo.org/record/6599071#.Y3I1cnbMKUk

calculate_cross_section()

Calculates the cross section in barns (1e-28 m^2)

set_dir_path(path)
set_edge(edge)

Checks if the given edge is valid and adds the directories of the :param edge: :return:

set_element(element)

Sets given element to the CoreLossEdge.

Parameters:

element (string) – The element to which to set it.

set_gos_energy_q()

pyEELSMODEL.components.CLedge.kohl_coreloss_edgecombined module

class pyEELSMODEL.components.CLedge.kohl_coreloss_edgecombined.KohlLossEdgeCombined(specshape, A, E0, alpha, beta, element, edge, eshift=0, q_steps=100, dir_path=None)

Bases: CoreLossEdge

Calculates the coreloss edges for a group of edges using the GOS from Kohl. For instance, the L edge calculates the L3, L2 and L1 edges and puts them

together with the appropriate prefactors.

calculate()

This calculates the spectral data of the component. Each derived class from Component will need to implement its own functionality here.

Return type:

None.

calculate_cross_section()

Calculates the cross section of the combined edge

check_maximum_edge(element, edge)

Check which is the lowest energy loss edge (the highest number) available. Some elements only have a L1 but do not have a L3 edge. This function can tell which number is the highest for the given element and edge.

Parameters:
  • element (string) – The element from which the information should be retrieved.

  • edge (string) – The edge from which the information should be retrieved.

Returns:

max_value – The integer from the edge having the lowest energy onset.

Return type:

uint > 0

manageparameters()
set_edge(edge)

Checks if the given edge is valid and adds the directories of the :param edge: :return:

set_onset_energy()

Sets the onset energy of the grouped edge.

pyEELSMODEL.components.CLedge.zezhong_coreloss_edge module

class pyEELSMODEL.components.CLedge.zezhong_coreloss_edge.ZezhongCoreLossEdge(specshape, A, E0, alpha, beta, element, edge, eshift=0, q_steps=100, dir_path=None)

Bases: CoreLossEdge

Coreloss edges which are calculated by Zezhong Zhang. https://zenodo.org/records/11199911

calculate_cross_section()
set_dir_path(path)
set_edge(edge)

Checks if the given edge is valid and adds the directories of the :param edge: :return:

set_element(element)

Sets given element to the CoreLossEdge.

Parameters:

element (string) – The element to which to set it.

set_gos_energy_q()

pyEELSMODEL.components.CLedge.zezhong_coreloss_edgecombined module

class pyEELSMODEL.components.CLedge.zezhong_coreloss_edgecombined.ZezhongCoreLossEdgeCombined(specshape, A, E0, alpha, beta, element, edge, eshift=0, q_steps=100, dir_path=None)

Bases: CoreLossEdge

Calculates the coreloss edges for a group of edges using the GOS from Zezhong Zang. For instance, the L edge calculates the L3, L2 and L1 edges and puts them together with the appropriate prefactors.

calculate()

This calculates the spectral data of the component. Each derived class from Component will need to implement its own functionality here.

Return type:

None.

calculate_cross_section()

Calculates the cross section of the combined edge

check_maximum_edge(specshape, element, edge)

Check which is the lowest energy loss edge (the highest number) available. Some elements only have a L1 but do not have a L3 edge. This function can tell which number is the highest for the given element and edge.

Parameters:
  • element (string) – The element from which the information should be retrieved.

  • edge (string) – The edge from which the information should be retrieved.

Returns:

max_value – The integer from the edge having the lowest energy onset.

Return type:

uint > 0

manageparameters()
set_edge(edge)

Checks if the given edge is valid and adds the directories of the :param edge: :return:

set_onset_energy()

Sets the onset energy of the grouped edge.

Module contents