Bases: penelopetools.api.result.penepma.photonspectra._PhotonSpectra
Bases: penelopetools.api.result.penepma.photonspectra.PhotonSpectrum
Bases: penelopetools.api.result.penepma.photonspectra._PhotonSpectra
Loads and stores all the characteristic photon spectra in the results path. Characteristic spectra are spectra with only the X-ray peaks. This background is removed. The files of these spectra starts with pe-charact-.
Loads and stores all the spectra matching a specific pattern. The pattern is specified by three class attributes:
- MATCH_PREFIX: prefix
- MATCH_SUFFIX: suffix
- MATCH_PATTERN: pattern
All the spectra matching the pattern in the specified path are loaded as PhotonSpectrum. This class is a dictionary where the keys are the index of the detector which value is the spectrum. The first detector as a key of 1.
When this class is instantiated, the spectra are not loaded. As any other _Result, the method load() must be called. This method loads all the spectra.
Parameters: | path – folder containing the simulation results |
---|
Bases: penelopetools.api.result.penepma.photonspectra.PhotonSpectrum
Extends PhotonSpectrum by adding methods to deal with the fluorescence results.
The fluorescence contribution on the characteristic X-ray intensity is stored and can be retrieved for a given energy using the method fluorescence_intensity. The characteristic intensity without the fluorescence contribution can also be obtained with the method no_fluorescence_intensity.
Special kind of result file consisting of two, three or five columns of data. The order of the columns goes as follows:
- Independent variable, typically energy
- First probability
- Error on the probability
- Second probability
- Error on the second probability
The values of the columns are saved in list; one list for each column. After the data is read (using the method load) the lists can be access with the attributes:
- first_column
- probability_density
- probability_density_error
- probability_density2
- probability_density_error2
The complete data can also be access with the attribute data. It is a dictionary where the keys are the label of the columns and the value is the list of values.
Parameters: |
|
---|
Returns the fluorescence contribution to the intensity and its error at a given energy.
Parameters: | energy – energy of interest (in eV). |
---|---|
Return type: | Magnitude |
Values in the fourth column. The fourth column contains the second probability. It may be an empty list if the data doesn’t have a fourth column.
Values in the fifth column. The fifth column contains the error on the second probability. It may be an empty list if the data doesn’t have a fifth column.
Returns the intensity and its error at a given energy with the fluorescence.
Parameters: | energy – energy of interest (in eV). |
---|---|
Return type: | Magnitude |
Probability density without the fluorescence contribution.
Error on the probability density without the fluorescence contribution.
Bases: penelopetools.api.result.penepma.photonspectra._PhotonSpectra
Loads and stores all the convoluted photon spectra in the results path. Convoluted spectra are full photon spectra where the X-ray peaks are convoluted to simulate real spectra collected by an EDS detector. The files of these spectra starts with pe-spect- and ends with convol.
Loads and stores all the spectra matching a specific pattern. The pattern is specified by three class attributes:
- MATCH_PREFIX: prefix
- MATCH_SUFFIX: suffix
- MATCH_PATTERN: pattern
All the spectra matching the pattern in the specified path are loaded as PhotonSpectrum. This class is a dictionary where the keys are the index of the detector which value is the spectrum. The first detector as a key of 1.
When this class is instantiated, the spectra are not loaded. As any other _Result, the method load() must be called. This method loads all the spectra.
Parameters: | path – folder containing the simulation results |
---|
Bases: penelopetools.api.result.penepma.photonspectra.PhotonSpectrum
Special kind of result file consisting of two, three or five columns of data. The order of the columns goes as follows:
- Independent variable, typically energy
- First probability
- Error on the probability
- Second probability
- Error on the second probability
The values of the columns are saved in list; one list for each column. After the data is read (using the method load) the lists can be access with the attributes:
- first_column
- probability_density
- probability_density_error
- probability_density2
- probability_density_error2
The complete data can also be access with the attribute data. It is a dictionary where the keys are the label of the columns and the value is the list of values.
Parameters: |
|
---|
Bases: penelopetools.api.result.penepma.photonspectra._PhotonSpectra
Loads and stores all the full photon spectra in the results path. Full spectra are spectra with the X-ray peaks and background. The files of these spectra starts with pe-spectra-.
Loads and stores all the spectra matching a specific pattern. The pattern is specified by three class attributes:
- MATCH_PREFIX: prefix
- MATCH_SUFFIX: suffix
- MATCH_PATTERN: pattern
All the spectra matching the pattern in the specified path are loaded as PhotonSpectrum. This class is a dictionary where the keys are the index of the detector which value is the spectrum. The first detector as a key of 1.
When this class is instantiated, the spectra are not loaded. As any other _Result, the method load() must be called. This method loads all the spectra.
Parameters: | path – folder containing the simulation results |
---|
Bases: penelopetools.api.result._ProbabilityResult
This class stores the data of a photon spectrum collected by a detector. This class is designed to accommodate the different spectrums collected by PENEPMA (characteristic, full and convoluted).
When this class is instantiated, the spectrum is not loaded. As any other _Result, the method load() must be called.
For all types of spectrum, the intensity at a given energy can be retrieved using the method intensity. The method takes care of finding the energy bin closes to the desired energy and returns the intensity (probability density) and its error if given. The real intensity in a number of counts can be obtained with the method real_intensity if the user knows the beam current, solid angle, detector efficiency and live time.
Special kind of result file consisting of two, three or five columns of data. The order of the columns goes as follows:
- Independent variable, typically energy
- First probability
- Error on the probability
- Second probability
- Error on the second probability
The values of the columns are saved in list; one list for each column. After the data is read (using the method load) the lists can be access with the attributes:
- first_column
- probability_density
- probability_density_error
- probability_density2
- probability_density_error2
The complete data can also be access with the attribute data. It is a dictionary where the keys are the label of the columns and the value is the list of values.
Parameters: |
|
---|
Values in the first column. The first column contains the independent variable.
Energy channel width (the energy between two channels).
Return type: | Magnitude |
---|
Returns the intensity and its error at a given energy.
Parameters: | energy – energy of interest (in eV). |
---|---|
Return type: | Magnitude |
Returns the sum of the intensities over an energy range [lowerEnergy_eV, upperEnergy_eV]. The energy range spans from energy_low - channel_width/2.0 to energy_high + channel_width/2.0.
Parameters: |
|
---|---|
Return type: | Magnitude |
Returns the real intensity and its error at a given energy.
Parameters: |
|
---|---|
Return type: | Magnitude |