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.

Instantiate the object.

_indexes_to_natures(row, col)

Give the desired natures.

Return type:

tuple[Literal['SE', 'EBE', 'IBE', 'all'], Literal['Emission Yield', 'Emission Energy', 'Emission Angle']]

_natures_to_indexes(population_type, emission_data_type)

Give the desired indexes.

Return type:

tuple[int, int]

property all_energy_distribution: EmissionEnergyDistribution

Return the energy distribution of all emitted electrons.

get_data(row=None, col=None, population=None, emission_data_type=None)

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 (int | None, default: None) – Row index in data matrix.

  • col (int | None, default: None) – Column index in data matrix.

  • population (Literal['SE', 'EBE', 'IBE', 'all'] | None, default: None) – Population type.

  • emission_data_type (Literal['Emission Yield', 'Emission Energy', 'Emission Angle'] | None, default: None) – Emission data type.

Return type:

None | EmissionData | Collection[EmissionData]

Returns:

Desired data; if the specified data does not exists, a None is returned without any error message.

get_files(row=None, col=None, population=None, emission_data_type=None)

Get the file(s) by index or name.

Return type:

None | str | Path | Collection[str] | Collection[Path]

has_all_mandatory_files(model_config)

Tell if files defined by Model.model_config are set.

Return type:

bool

load_data(loader)

Load all filepaths in files_matrix.

Todo

Could be more concise.

Return type:

None

plot(plotter, population, emission_data_type, axes=None, **kwargs)

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 (Plotter) – Object realizing the plot. We transfer it to the EmissionData.plot() method.

  • population (Literal['SE', 'EBE', 'IBE', 'all'] | Collection[Literal['SE', 'EBE', 'IBE', 'all']]) – One or several populations to plot. If several are given, we simply recursively call this method.

  • emission_data_type (Literal['Emission Yield', 'Emission Energy', 'Emission Angle']) – Type of data to plot.

  • axes (TypeVar(T) | None, default: None) – Axes to re-use if given.

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

Return type:

TypeVar(T) | None

Returns:

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

property se_energy_distribution: EmissionEnergyDistribution

Return the energy distribution of SEs.

property seey: EmissionYield

Return the SEEY directly.

set_data(emission_data, row=None, col=None, population=None, emission_data_type=None)

Set the data by index or name.

Return type:

None

set_files(files, row=None, col=None, population=None, emission_data_type=None)

Set the file(s) by index or name.

Return type:

None

property teey: EmissionYield

Return the TEEY directly.

Submodules