xrf Package

BindingEnergies Module

PyMca5.PyMcaPhysics.xrf.BindingEnergies.main()[source]

ClassMcaTheory Module

class PyMca5.PyMcaPhysics.xrf.ClassMcaTheory.ClassMcaTheory(initdict=None, filelist=None, **kw)[source]

Bases: PyMca5.PyMcaPhysics.xrf.ClassMcaTheory.McaTheory

class PyMca5.PyMcaPhysics.xrf.ClassMcaTheory.McaTheory(initdict=None, filelist=None, **kw)[source]

Bases: object

analyticalDerivative(self, parameters, index, x)[source]

Internal function to calculate the derivative of the fitting function f(parameters, x) respect to the parameter given by the index at the array of points x.

configure(newdict=None)[source]
continuum(param, x)[source]
detectMissingPeaks(ordata, fitdata, meanfwhm, separation=0.4)[source]
digestresult(outfile=None, info=None)[source]
disableOptimizedLinearFit()[source]
enableOptimizedLinearFit()[source]
estimate()[source]
estimateexppol(x, y, z, xscaling=1.0, yscaling=1.0)[source]
estimatelinpol(x, y, z, xscaling=1.0, yscaling=1.0)[source]
exppol(p0, x)[source]
exppol_deriv(p0, index, x)[source]
getConfiguration()[source]

returns a copy of the current fit configuration parameters

getLastTime()[source]
getPeakMatrixContribution(param0, t0=None, hypermet=None, continuum=None, summing=None)[source]

For the time being a huge copy paste from mcatheory

getStartingConfiguration()[source]
getpeaksw(param, hypermet=None, continuum=None)[source]
imagingDigestResult()[source]

minimalist dictionnary for imaging purposes

linearMcaTheory(param0, t0, hypermet=None, continuum=None, summing=None)[source]
linearMcaTheoryDerivative(param0, index, t0)[source]
linpol(p0, x)[source]
linpol_deriv(p0, index, x)[source]
mcatheory(param0, t0, hypermet=None, continuum=None, summing=None)[source]
myexp(x)[source]
num_deriv(param0, index, t0)[source]
roifit(x, y, background=None, width=None)[source]
setConfiguration(ddict)[source]

The current fit configuration dictionary is updated, but not replaced, by the input dictionary. It returns a copy of the final fit configuration.

setData(*var, **kw)[source]

Method to update the data to be fitted. It accepts several combinations of input arguments, the simplest to take into account is:

setData(x, y sigmay=None, xmin=None, xmax=None)

x corresponds to the spectrum channels y corresponds to the spectrum counts sigmay is the uncertainty associated to the counts. If not given,

Poisson statistics will be assumed. If the fit configuration is set to no weight, it will not be used.
xmin and xmax define the limits to be considered for performing the fit.
If the fit configuration flag self.config[‘fit’][‘use_limit’] is set, they will be ignored. If xmin and xmax are not given, the whole given spectrum will be considered for fitting.
time (seconds) is the factor associated to the flux, only used when using
a strategy based on concentrations
setdata(*var, **kw)[source]
smooth(ydata, ntimes=1)[source]
specfitestimate(x, y, z, xscaling=1.0, yscaling=1.0)[source]
startfit(digest=0, linear=None, currentIteration=None)[source]
PyMca5.PyMcaPhysics.xrf.ClassMcaTheory.test(inputfile=None, scankey=None, pkm=None, continuum=0, stripflag=1, maxiter=10, sumflag=1, hypermetflag=1, plotflag=0, escapeflag=1, attenuatorsflag=1, outfile=None)[source]

CoherentScattering Module

PyMca5.PyMcaPhysics.xrf.CoherentScattering.getElementCoherentDifferentialCrossSection(ele, theta, energy, p1=None)[source]
PyMca5.PyMcaPhysics.xrf.CoherentScattering.getElementFormFactor(ele, theta, energy)[source]
Usage:
getFormFactor(ele,theta, energy):

ele - Element theta - Scattering angle or array of scattering angles in degrees energy- Photon Energy in keV

This routine calculates the atomic form factor in electron units using a four gaussians approximation

ConcentrationsTool Module

class PyMca5.PyMcaPhysics.xrf.ConcentrationsTool.ConcentrationsConversion[source]

Bases: object

getConcentrationsAsAscii(concentrations=None)[source]
getConcentrationsAsHtml(concentrations=None)[source]
class PyMca5.PyMcaPhysics.xrf.ConcentrationsTool.ConcentrationsTool(config=None, fitresult=None)[source]

Bases: object

configure(ddict=None)[source]
processFitResult(config=None, fitresult=None, elementsfrommatrix=False, fluorates=None, addinfo=False)[source]
PyMca5.PyMcaPhysics.xrf.ConcentrationsTool.main()[source]

ElementHtml Module

class PyMca5.PyMcaPhysics.xrf.ElementHtml.ElementHtml(element=None)[source]

Bases: object

gethtml(element=None)[source]

Elements Module

class PyMca5.PyMcaPhysics.xrf.Elements.BoundMethodWeakref(bound_method, onDelete=None)[source]

Helper class to get a weakref to a bound method

PyMca5.PyMcaPhysics.xrf.Elements.getCosterKronig(ele)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getElementCoherentDifferentialCrossSection(ele, theta, energy, p1=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getElementComptonDifferentialCrossSection(ele, theta, energy, p1=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getElementFormFactor(ele, theta, energy)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getElementIncoherentScatteringFunction(ele, theta, energy)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getElementLShellRates(symbol, energy=None, photoweights = None)[source]

gives LShell branching ratios at a given energy weights due to photoeffect, fluorescence and Coster-Kronig transitions are calculated and used unless photoweights is False, in that case weights = [1.0, 1.0, 1.0, 1.0, 1.0]

PyMca5.PyMcaPhysics.xrf.Elements.getElementMShellRates(symbol, energy=None, photoweights = None)[source]

gives MShell branching ratios at a given energy weights due to photoeffect, fluorescence and Coster-Kronig transitions are calculated and used unless photoweights is False, in that case weights = [1.0, 1.0, 1.0, 1.0, 1.0]

PyMca5.PyMcaPhysics.xrf.Elements.getEscape(matrix, energy, ethreshold=None, ithreshold=None, nthreshold=None, alphain=None, cascade=None, fluorescencemode=None)[source]
getEscape(matrixlist, energy,
ethreshold=None, ithreshold=None, nthreshold = None, alphain = None)

matrixlist is a list of the form [material, density, thickness] energy is the incident beam energy ethreshold is the difference in keV between two peaks to be considered the same ithreshold is the minimum absolute peak intensity to consider nthreshold is maximum number of escape peaks to consider alphain is the incoming beam angle with detector surface It gives back a list of the form [[energy0, intensity0, label0],

[energyn, intensityn, labeln]]

with the escape energies, intensities and labels

PyMca5.PyMcaPhysics.xrf.Elements.getFluorescence(matrix, energy, attenuators=None, alphain=None, alphaout=None, elementsList=None, cascade=None, detector=None, funnyfilters=None, userElementDict=None, matrixmutotalfluorescence=None, matrixmutotalexcitation=None)[source]
getFluorescence(matrixlist, energy, attenuators = None, alphain = None, alphaout = None,
elementsList = None, cascade=None, detector=None)

matrixlist is a list of the form [material, density, thickness] energy is the incident beam energy attenuators is a list of the form [[material1, density1, thickness1],....] alphain is the incoming beam angle with sample surface alphaout is the outgoing beam angle with sample surface if a given elements list is given, the fluorescence rate will be calculated for ONLY for those elements without taking into account if they are present in the matrix and considering a mass fraction of 1 to all of them. This should allow a program to fit directly concentrations. cascade is a flag to consider vacancy propagation (it is a crude approximation) detector is just one attenuator more but treated as (1 - Transmission)

[material, density, thickness]

These formulae are strictly valid only for parallel beams. Needs to be corrected for detector efficiency (at least solid angle) and incoming intensity. Secondary transitions are neglected.

PyMca5.PyMcaPhysics.xrf.Elements.getLJumpWeight(ele, excitedshells=[1.0, 1.0, 1.0])[source]

wjump represents the probability for a vacancy to be created on the respective L-Shell by direct photoeffect on that shell

PyMca5.PyMcaPhysics.xrf.Elements.getLWeights(ele, energy=None, normalize=None, shellist=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getMJumpWeight(ele, excitedshells=[1.0, 1.0, 1.0, 1.0, 1.0])[source]

wjump represents the probability for a vacancy to be created on the respective M-Shell by direct photoeffect on that shell

PyMca5.PyMcaPhysics.xrf.Elements.getMWeights(ele, energy=None, normalize=None, shellist=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getMaterialKey(compound)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getMaterialMassAttenuationCoefficients(compoundList0, fractionList0, energy0=None, massfractions=False)[source]
Usage:
getMaterialMassAttenuationCoefficients(compoundList, fractionList,
energy = None,massfractions=False)

compoundList - List of compounds into the material fractionList - List of masses of each compound energy - Energy at which the values are desired massfractions- Flag to supply mass fractions on output

PyMca5.PyMcaPhysics.xrf.Elements.getMaterialMassFractions(compoundList0, fractionList0)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getMaterialTransmission(compoundList0, fractionList0, energy0=None, density=None, thickness=None, listoutput=True)[source]

Usage: getMaterialTransmission(compoundList, fractionList, energy = None,

density=None, thickness=None):

Input

compoundlist - List of elements, compounds or materials fractionlist - List of floats indicating the amount of respective material energy - Photon energy (it can be a list) density - Density in g/cm3 (default is 1.0) thickness - Thickness in cm (default is 1.0)

The product density * thickness has to be in g/cm2

Output

Detailed dictionary.

PyMca5.PyMcaPhysics.xrf.Elements.getMultilayerFluorescence(multilayer0, energyList, layerList=None, weightList=None, flagList=None, fulloutput=None, beamfilters=None, elementsList=None, attenuators=None, alphain=None, alphaout=None, cascade=None, detector=None, funnyfilters=None, forcepresent=None, secondary=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getPhotoWeight(ele, shelllist, energy, normalize=None, totals=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getScattering(matrix, energy, attenuators=None, alphain=None, alphaout=None, elementsList=None, cascade=None, detector=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getcandidates(energy, threshold=None, targetrays=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getelementmassattcoef(ele, energy=None)[source]
Usage: getelementmassattcoef(element symbol, energy in kev)

It gets the info from files generated by XCOM If energy is not given, it gives back a dictionary with the form:

dict[‘energy’] = [energies] dict[‘coherent’] = [coherent scattering cross section(energies)] dict[‘compton’] = [incoherent scattering cross section(energies)] dict[‘photo’] = [photoelectic effect cross section(energies)] dict[‘pair’] = [pair production cross section(energies)] dict[‘total’] = [total cross section]
PyMca5.PyMcaPhysics.xrf.Elements.getjk(z, veigele=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjkVeigele(z)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjl1(z, veigele=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjl1Veigele(z)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjl2(z, veigele=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjl2Veigele(z)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjl3(z, veigele=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjl3Veigele(z)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjm1(z, veigele=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjm1Veigele(z)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjm2(z, veigele=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjm2Veigele(z)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjm3(z, veigele=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjm3Veigele(z)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjm4(z, veigele=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjm4Veigele(z)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjm5(z, veigele=None)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getjm5Veigele(z)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getmassattcoef(compound, energy=None)[source]
Usage: getmassattcoef(element symbol/composite, energy in kev)
Computes mass attenuation coefficients for a single element or a compound.

It gets the info from files generated by XCOM If energy is not given, it gives back a dictionary with the form:

dict[‘energy’] = [energies] dict[‘coherent’] = [coherent scattering cross section(energies)] dict[‘compton’] = [incoherent scattering cross section(energies)] dict[‘photo’] = [photoelectic effect cross section(energies)] dict[‘pair’] = [pair production cross section(energies)] dict[‘total’] = [total cross section]

A compound is defined with a string as follow:

‘C22H10N2O5’ means 22 * C, 10 * H, 2 * N, 5 * O

xsection = SUM(xsection(zi)*ni*ai) / SUM(ai*ni)

zi = Z of each element ni = number of element zi ai = atomic weight of element zi

Result in cm2/g

PyMca5.PyMcaPhysics.xrf.Elements.getname(z)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getomegak(ele)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getomegal1(ele)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getomegal2(ele)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getomegal3(ele)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getomegam1(ele)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getomegam2(ele)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getomegam3(ele)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getomegam4(ele)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getomegam5(ele)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getsymbol(z)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getxrayenergy(symbol, transition)[source]
PyMca5.PyMcaPhysics.xrf.Elements.getz(ele)[source]
PyMca5.PyMcaPhysics.xrf.Elements.isValidFormula(compound)[source]
PyMca5.PyMcaPhysics.xrf.Elements.isValidMaterial(compound)[source]
PyMca5.PyMcaPhysics.xrf.Elements.registerUpdate(callback)[source]
PyMca5.PyMcaPhysics.xrf.Elements.updateDict(energy=None, minenergy=0.175, minrate=0.001, cb=True)[source]

FastXRFLinearFit Module

class PyMca5.PyMcaPhysics.xrf.FastXRFLinearFit.FastXRFLinearFit(mcafit=None)[source]

Bases: object

fitMultipleSpectra(x=None, y=None, xmin=None, xmax=None, configuration=None, concentrations=False, ysum=None, weight=None)[source]
setFitConfiguration(configuration)[source]
setFitConfigurationFile(ffile)[source]

FisxHelper Module

PyMca5.PyMcaPhysics.xrf.FisxHelper.getElementsInstance(dataDir=None, bindingEnergies=None, xcomFile=None)[source]
PyMca5.PyMcaPhysics.xrf.FisxHelper.getFisxCorrectionFactors(*var, **kw)[source]
PyMca5.PyMcaPhysics.xrf.FisxHelper.getFisxCorrectionFactorsFromFitConfiguration(fitConfiguration, elementsFromMatrix=False, secondaryCalculationLimit=0.0)[source]
PyMca5.PyMcaPhysics.xrf.FisxHelper.getFisxCorrectionFactorsFromFitConfigurationFile(fileName, elementsFromMatrix=False, secondaryCalculationLimit=0.0)[source]
PyMca5.PyMcaPhysics.xrf.FisxHelper.getMultilayerFluorescence(multilayerSample, energyList, layerList=None, weightList=None, flagList=None, fulloutput=None, beamFilters=None, elementsList=None, attenuatorList=None, alphaIn=None, alphaOut=None, cascade=None, detector=None, elementsFromMatrix=False, secondary=None, materials=None, secondaryCalculationLimit=0.0)[source]
PyMca5.PyMcaPhysics.xrf.FisxHelper.getMultilayerFluorescenceFromFitConfiguration(fitConfiguration, elementsFromMatrix=False, secondaryCalculationLimit=0.0)[source]

GenerateXCOMCrossSections Module

Generate specfile from XCOM generated files

PyMca5.PyMcaPhysics.xrf.GenerateXCOMCrossSections.getHeader(filename)[source]

IncoherentScattering Module

PyMca5.PyMcaPhysics.xrf.IncoherentScattering.getComptonScatteringEnergy(energy, theta)[source]
PyMca5.PyMcaPhysics.xrf.IncoherentScattering.getElementComptonDifferentialCrossSection(ele, theta, energy, p1=None)[source]
PyMca5.PyMcaPhysics.xrf.IncoherentScattering.getElementComptonFormFactor(ele, theta, energy)[source]
PyMca5.PyMcaPhysics.xrf.IncoherentScattering.getElementIncoherentDifferentialCrossSection(ele, theta, energy, p1=None)
PyMca5.PyMcaPhysics.xrf.IncoherentScattering.getElementIncoherentScatteringFunction(ele, theta, energy)[source]
Usage:
getIncoherentScatteringFunction(ele,theta, energy):

ele - Element theta - Scattering angle in degrees energy- Photon Energy in keV

This routine calculates the incoherent scattering function in electron units an interpolation to EGS4 tabulation of S(x,Z)/Z

PyMca5.PyMcaPhysics.xrf.IncoherentScattering.getZ(ele)[source]

KShell Module

PyMca5.PyMcaPhysics.xrf.KShell.getjk(z)[source]
PyMca5.PyMcaPhysics.xrf.KShell.getomegak(ele)[source]
PyMca5.PyMcaPhysics.xrf.KShell.getsymbol(z)[source]
PyMca5.PyMcaPhysics.xrf.KShell.getz(ele)[source]

LShell Module

PyMca5.PyMcaPhysics.xrf.LShell.getCosterKronig(ele)[source]
PyMca5.PyMcaPhysics.xrf.LShell.getjl1(z)[source]
PyMca5.PyMcaPhysics.xrf.LShell.getjl2(z)[source]
PyMca5.PyMcaPhysics.xrf.LShell.getjl3(z)[source]
PyMca5.PyMcaPhysics.xrf.LShell.getomegal1(ele)[source]
PyMca5.PyMcaPhysics.xrf.LShell.getomegal2(ele)[source]
PyMca5.PyMcaPhysics.xrf.LShell.getomegal3(ele)[source]
PyMca5.PyMcaPhysics.xrf.LShell.getsymbol(z)[source]
PyMca5.PyMcaPhysics.xrf.LShell.getweights(ele, excitedshells=None)[source]
PyMca5.PyMcaPhysics.xrf.LShell.getwjump(ele, excitedshells=[1.0, 1.0, 1.0])[source]

wjump represents the probability for a vacancy to be created on the respective L-Shell by direct photoeffect on that shell

PyMca5.PyMcaPhysics.xrf.LShell.getz(ele)[source]

MShell Module

PyMca5.PyMcaPhysics.xrf.MShell.getCosterKronig(ele)[source]
PyMca5.PyMcaPhysics.xrf.MShell.getjm1(z)[source]
PyMca5.PyMcaPhysics.xrf.MShell.getjm2(z)[source]
PyMca5.PyMcaPhysics.xrf.MShell.getjm3(z)[source]
PyMca5.PyMcaPhysics.xrf.MShell.getjm4(z)[source]
PyMca5.PyMcaPhysics.xrf.MShell.getjm5(z)[source]
PyMca5.PyMcaPhysics.xrf.MShell.getomegam1(ele)[source]
PyMca5.PyMcaPhysics.xrf.MShell.getomegam2(ele)[source]
PyMca5.PyMcaPhysics.xrf.MShell.getomegam3(ele)[source]
PyMca5.PyMcaPhysics.xrf.MShell.getomegam4(ele)[source]
PyMca5.PyMcaPhysics.xrf.MShell.getomegam5(ele)[source]
PyMca5.PyMcaPhysics.xrf.MShell.getsymbol(z)[source]
PyMca5.PyMcaPhysics.xrf.MShell.getweights(ele, excitedshells=None)[source]
PyMca5.PyMcaPhysics.xrf.MShell.getwjump(ele, excitedshells=[1.0, 1.0, 1.0, 1.0, 1.0])[source]

wjump represents the probability for a vacancy to be created on the respective M-Shell by direct photoeffect on that shell

PyMca5.PyMcaPhysics.xrf.MShell.getz(ele)[source]

McaAdvancedFitBatch Module

class PyMca5.PyMcaPhysics.xrf.McaAdvancedFitBatch.McaAdvancedFitBatch(initdict, filelist=None, outputdir=None, roifit=None, roiwidth=None, overwrite=1, filestep=1, mcastep=1, concentrations=0, fitfiles=1, fitimages=1, filebeginoffset=0, fileendoffset=0, mcaoffset=0, chunk=None, selection=None, lock=None)[source]

Bases: object

getFileHandle(inputfile)[source]
getRootName(filelist=None)[source]
onEnd()[source]
onImage(image, imagelist)[source]
onMca(mca, nmca, filename=None, key=None, info=None)[source]
onNewFile(ffile, filelist)[source]
os_path_join(a, b)[source]
processList()[source]
saveImage(ffile=None)[source]
setFileList(filelist=None)[source]
setOutputDir(outputdir=None)[source]

PyMcaEPDL97 Module

Interface to the PyMca EPDL97 description

PyMca5.PyMcaPhysics.xrf.PyMcaEPDL97.getElementCrossSections(element, energy, forced_shells=None)[source]

Returns total and partial cross sections of element at the specified energies. If forced_shells are not specified, it uses the internal binding energies of EPDL97 for all shells. If forced_shells is specified, it enforces excitation of the relevant shells via log-log extrapolation if needed.

PyMca5.PyMcaPhysics.xrf.PyMcaEPDL97.getPhotoelectricWeights(element, shelllist, energy, normalize=None, totals=None)[source]

Given a certain list of shells and one excitation energy, gives back the ratio mu(shell, energy)/mu(energy) where mu refers to the photoelectric mass attenuation coefficient. The special shell “all others” refers to all the shells not in the K, L or M groups. Therefore, valid values for the items in the shellist are:

‘K’, ‘L1’, ‘L2’, ‘L3’, ‘M1’, ‘M2’, ‘M3’, ‘M4’, ‘M5’, ‘all other’

For instance, for the K shell, it is the equivalent of (Jk-1)/Jk where Jk is the k jump. If normalize is None or True, normalizes the output to the shells given in shelllist. If totals is True, gives back the a dictionnary with all the mass attenuation coefficients used in the calculations.

PyMca5.PyMcaPhysics.xrf.PyMcaEPDL97.setElementBindingEnergies(element, ddict)[source]

Allows replacement of the element internal binding energies by a different set of energies. This is made to force this implementaticon of EPDL97 to respect other programs absorption edges. Data will be extrapolated when needed. WARNING: Coherent resonances are not replaced.

Scofield1973 Module

SingleLayerStrategy Module

class PyMca5.PyMcaPhysics.xrf.SingleLayerStrategy.SingleLayerStrategy[source]

Bases: object

applyStrategy(fitResult, fluorescenceRates, currentIteration=None)[source]

Provided a fit result, it returns an new fit configuration and a positive integer to indicate the strategy procedure has not finished.

Returning an empty fit configuration, or a number of iterations equal 0 will indicate the process is over.

Strategies Module

XRayTubeEbel Module

PyMca5.PyMcaPhysics.xrf.XRayTubeEbel.characteristicEbel(target, e0, window=None, alphae=None, alphax=None, transmission=None, targetthickness=None, filterlist=None)[source]

Calculation of target characteritic lines and intensities

target : list [Symbol, density (g/cm2), thickness(cm)] or atomic ymbol
If set to atomic symbol, the program sets density and thickness of 0.1 cm
e0 : float
Tube Voltage in kV
e : float
Energy of interest
window : list
Tube window [Formula, density, thickness]
alphae : float
Angle, in degrees, between electron beam and tube target. Normal incidence is 90.
alphax : float
Angle, in degrees, of X-ray exit beam. Normal exit is 90.
transmission : Boolean, default is False
If True the X-ray come out of the tube target by the side opposite to the one receiving the exciting electron beam.
targetthickness : Target thickness in cm
Only considered in transmission case. If not given, the program uses as target thickness the maximal penetration depth of the incident electron beam.
filterlist : [list]
Additional filters [[Formula, density, thickness], ...]
Result: list
Characteristic lines and intensities in the form [[energy0, intensity0, name0], [energy1, intensity1, name1], ...] Energies in keV Intensities in photons/sr/mA/keV/s
PyMca5.PyMcaPhysics.xrf.XRayTubeEbel.continuumEbel(target, e0, e=None, window=None, alphae=None, alphax=None, transmission=None, targetthickness=None, filterlist=None)[source]

Calculation of X-ray Tube continuum emission spectrum

target : list [Symbol, density (g/cm2), thickness(cm)] or atomic ymbol
If set to atomic symbol, the program sets density and thickness of 0.1 cm
e0 : float
Tube Voltage in kV
e : float or array of floats
Energy of interest. If not given, the program will generate an array of energies from 1 to the given tube voltage minus 1 kV in keV.
window : list
Tube window [Formula, density, thickness]
alphae : float
Angle, in degrees, between electron beam and tube target. Normal incidence is 90.
alphax : float
Angle, in degrees, of X-ray exit beam. Normal exit is 90.
transmission : Boolean, default is False
If True the X-ray come out of the tube target by the side opposite to the one receiving the exciting electron beam.
targetthickness : Target thickness in cm
Only considered in transmission case. If not given, the program uses as target thickness the maximal penetration depth of the incident electron beam.
filterlist : [list]
Additional filters [[Formula, density, thickness], ...]
result : Array
Spectral flux density. Flux of photons at the given energies in photons/sr/mA/keV/s
Reference:
H. Ebel, X-Ray Spectrometry 28 (1999) 255-266 Tube voltage from 5 to 50 kV Electron incident angle from 50 to 90 deg. X-Ray take off angle from 90 to 5 deg.
PyMca5.PyMcaPhysics.xrf.XRayTubeEbel.generateLists(target, e0, window=None, alphae=None, alphax=None, transmission=None, targetthickness=None, filterlist=None)[source]

Generate a theoretical X-Ray Tube emission profile

target : list [Symbol, density (g/cm2), thickness(cm)] or atomic ymbol
If set to atomic symbol, the program sets density and thickness of 0.1 cm
e0 : float
Tube Voltage in kV
window : list
Tube window [Formula, density, thickness]
alphae : float
Angle, in degrees, between electron beam and tube target. Normal incidence is 90.
alphax : float
Angle, in degrees, of X-ray exit beam. Normal exit is 90.
transmission : Boolean, default is False
If True the X-ray come out of the tube target by the side opposite to the one receiving the exciting electron beam.
targetthickness : Target thickness in cm
Only considered in transmission case. If not given, the program uses as target thickness the maximal penetration depth of the incident electron beam.
filterlist : [list]
Additional filters [[Formula, density, thickness], ...]
result : Tuple
[Array of Energies, Array of relative intensities, Array of flags] Flag set to 1 means it is a target characteristic energy Flag set to 0 means it corresponds to a continuum energy