loader package
Define objects to load the different formats of electron emission files.
- class DeesseLoader
Bases:
LoaderDefine the loader.
Raise an error for now.
Ideally, this loader should detect correct input and columns. But it is not for now.
- load_emission_angle_distribution(*args)
Load the given electron emission angle distribution file.
- Return type:
- load_emission_energy_distribution(filepath, e_pe=None)
Load and format an emission energy file from DEESSE.
- Parameters:
- Return type:
- Returns:
pandas.DataFrame – Structure holding the data. Has a
Energy [eV]column holding emitted electrons energy. And one or several columnstheta [deg], wherethetais the value of the incidence angle and content is corresponding emission energy distribution.float – Energy of Primary Electrons in \(\mathrm{eV}\). If not found in the file comments, it will be inferred from the position of the EBEs peak.
- load_emission_yield(*filepath)
Load and format the given emission yield files.
- Parameters:
filepath (
str|Path) – Path(s) to file holding data under study.- Returns:
Structure holding the data. Has a
Energy [eV]column holding PEs energy. And one or several columnstheta [deg], wherethetais the value of the incidence angle and content is corresponding emission yield.- Return type:
- class PandasLoader(sep=',', comment='#')
Bases:
LoaderDefine the pandas loader.
Init object.
- load_emission_angle_distribution(*args)
Load the given electron emission angle distribution file.
- Return type:
- load_emission_energy_distribution(filepath, sep=None, comment=None)
Load and format the given emission energy file.
CSVfiles can have comments at the start of the file, starting with a#character. It is expected that the energy of PEs used for the measurements is on the second commented line, in \(\mathrm{eV}\). Column separator must be,. First non-commented line is incidence angle in degrees. First column is emission energy in \(\mathrm{eV}\). Distribution is in the next columns (excluding the first line). Example:# PEs energy in eV # 100 0,0 1.999999999999975131e-01,7.117578753770542783e-03 3.999999999999968026e-01,1.138131444290255145e-02 5.999999999999978684e-01,1.510969903349285159e-02
Files in the
data/example_ag/emission_energyfolder are correctly formatted.Todo
Find a more robust way to handle energy of PEs. Some distributions do not need it.
- Parameters:
- Return type:
- Returns:
pd.DataFrame – Structure holding the data. Has a
Energy [eV]column holding emitted electrons energy. And one or several columnstheta [deg], wherethetais the value of the incidence angle and content is corresponding emission energy distribution.float – Energy of Primary Electrons in \(\mathrm{eV}\). If not found in the file comments, it will be inferred from the position of the EBEs peak.
- load_emission_yield(filepath, sep=None, comment=None)
Load and format the given emission yield file.
CSVfiles can have comments at the start of the file, starting with a#character. Column separator must be,. First non-commented line is incidence angle in degrees. First column is incident energy in \(\mathrm{eV}\). EY is the next columns (excluding the first line). Example:# Cu measurements # Some comments # Energy | 0deg | 20deg | 40deg | 60deg 0,0,20,40,60 0,0.814,0.781,0.866,0.918 10,0.574,0.553,0.637,0.803 20,0.632,0.594,0.671,0.817
Files in the
data/example_copper/files are taken from [PBD20] and are correctly formatted.- Parameters:
- Returns:
Structure holding the data. Has a
Energy [eV]column holding PEs energy. And one or several columnstheta [deg], wherethetais the value of the incidence angle and content is corresponding emission yield.- Return type: