emission_data package

Define objects to store electron emission data.

class DataMatrix

Bases: object

Store all the input files and corresp data in a single object.

__init__() None

Instantiate the object.

_indexes_to_natures(row: int, col: int) tuple[Literal['SE', 'EBE', 'IBE', 'all'], Literal['Emission Yield', 'Emission Energy', 'Emission Angle']]

Give the desired natures.

_natures_to_indexes(population_type: Literal['SE', 'EBE', 'IBE', 'all'], emission_data_type: Literal['Emission Yield', 'Emission Energy', 'Emission Angle']) tuple[int, int]

Give the desired indexes.

property all_energy_distribution: EmissionEnergyDistribution

Return the energy distribution of all emitted electrons.

get_data(row: int | None = None, col: int | None = None, population: Literal['SE', 'EBE', 'IBE', 'all'] | None = None, emission_data_type: Literal['Emission Yield', 'Emission Energy', 'Emission Angle'] | None = None) None | EmissionData | Collection[EmissionData]

Get the file(s) by index or name.

You can provide row and col directly.

Alternatively, provide population and emission_data_type. If population is not given, return valid data corresponding to all populations. If emission_data_type is not given, return valid data corresponding to all emission data.

Parameters:
  • row – Row index in data matrix.

  • col – Column index in data matrix.

  • population – Population type.

  • emission_data_type – Emission data type.

Returns:

  • Desired data; if the specified data does not exists, a None is

  • returned without any error message.

get_files(row: int | None = None, col: int | None = None, population: Literal['SE', 'EBE', 'IBE', 'all'] | None = None, emission_data_type: Literal['Emission Yield', 'Emission Energy', 'Emission Angle'] | None = None) None | str | Path | Collection[str] | Collection[Path]

Get the file(s) by index or name.

has_all_mandatory_files(model_config: ModelConfig) bool

Tell if files defined by Model.model_config are set.

load_data(loader: Loader) None

Load all filepaths in files_matrix.

Todo

Could be more concise.

plot(plotter: Plotter, population: Literal['SE', 'EBE', 'IBE', 'all'] | Collection[Literal['SE', 'EBE', 'IBE', 'all']], emission_data_type: Literal['Emission Yield', 'Emission Energy', 'Emission Angle'], axes: T | None = None, **kwargs) T | None

Plot desired measured data using plotter.

This method uses DataMatrix.get_data() to get the EmissionData instance matching population and emission_data_type. Then it calls the EmissionData.plot() method.

Parameters:
  • plotter – Object realizing the plot. We transfer it to the EmissionData.plot() method.

  • population – One or several populations to plot. If several are given, we simply recursively call this method.

  • emission_data_type – Type of data to plot.

  • axes – Axes to re-use if given.

  • kwargs – Other keyword arguments passed to the EmissionData.plot() method.

Return type:

Created axes object, or None if no plot was created.

property se_energy_distribution: EmissionEnergyDistribution

Return the energy distribution of SEs.

set_data(emission_data: EmissionData | Collection[EmissionData], row: int | None = None, col: int | None = None, population: Literal['SE', 'EBE', 'IBE', 'all'] | None = None, emission_data_type: Literal['Emission Yield', 'Emission Energy', 'Emission Angle'] | None = None) None

Set the data by index or name.

set_files(files: str | Path | Collection[str] | Collection[Path], row: int | None = None, col: int | None = None, population: Literal['SE', 'EBE', 'IBE', 'all'] | None = None, emission_data_type: Literal['Emission Yield', 'Emission Energy', 'Emission Angle'] | None = None) None

Set the file(s) by index or name.

property teey: EmissionYield

Return the TEEY directly.

Submodules