xoppylib package

Subpackages

Submodules

xoppylib.fit_gaussian2d module

2D Gaussian fitting utilities using scipy.optimize.

xoppylib.fit_gaussian2d.fit_gaussian2d(data, x0, y0, p0=None)[source]
xoppylib.fit_gaussian2d.info_params(mZ)[source]
xoppylib.fit_gaussian2d.moments(data, x0=None, y0=None)[source]

Returns (height, x, y, width_x, width_y) the gaussian parameters of a 2D distribution by calculating its moments

xoppylib.fit_gaussian2d.twoD_Gaussian(xy, amplitude, xo, yo, sigma_x, sigma_y, theta, offset)[source]

xoppylib.mlayer module

python version of the multilayer code in shadow.

The stack is as follows: Vacuum+[Odd,Even]xn+Substrate

>>> #                  vacuum   ")
>>> #       |------------------------------|  >>> #       |          odd (n)             |  |
>>> #       |------------------------------|  | BILAYER # n
>>> #       |          even (n)            |  |
>>> #       |------------------------------|  /
>>> #       |          .                   |
>>> #       |          .                   |
>>> #       |          .                   |
>>> #       |------------------------------|  >>> #       |          odd (1)             |  |
>>> #       |------------------------------|  | BILAYER # 1
>>> #       |          even (1)            |  |
>>> #       |------------------------------|  /
>>> #       |                              |
>>> #       |///////// substrate //////////|
>>> #       |                              |
>>> #      gamma = thickness_even / (thickness_even + thickness_odd)
class xoppylib.mlayer.MLayer[source]

Bases: object

Constructor.

Several ways of using MLayer: * ml = MLayer.pre_mlayer(<keywords>) * ml = MLayer(); ml.read_preprocessor_file(‘mymlayer.dat’) * ml = MLayer.initialize_from_bilayer_stack(<keywords>)

classmethod initialize_from_bilayer_stack(material_S='Si', density_S=None, roughness_S=0.0, material_E='B4C', density_E=None, roughness_E=0.0, material_O='Ru', density_O=None, roughness_O=0.0, bilayer_pairs=70, bilayer_thickness=33.1, bilayer_gamma=0.483, GRADE_SURFACE=0, AA0=1.0, AA1=0.0, AA2=0.0, AA3=0.0, ell_p=10.0, ell_q=3.0, ell_theta_grazing_deg=0.1, ell_length=0.1, ell_photon_energy=10000.0, GRADE_DEPTH=0, LIST_N_THICK_GAMMA_ROUGHE_ROUGHO_FROM_TOP_TO_BOTTOM=None, use_xraylib_or_dabax=0, dabax=None)[source]

Creates an instance of MLayer with the main parameters of a multilater. In this case, the calculations are done without using the preprocessor data, and the optical constants are supplied by xraylib at run time.

Parameters:
  • material_S (str, optional) – The symbol of the SUBSTRATE material.

  • density_S (float, optional) – The density in g/cm3 for the SUBSTRATE layers.

  • roughness_S (float, optional) – The roughness in A for the SUBSTRATE layers.

  • material_E (str, optional) – The symbol of the EVEN layer material.

  • density_E (float, optional) – The density in g/cm3 for the EVEN layers.

  • roughness_E (float, optional) – The roughness in A for the EVEN layers.

  • material_O (str, optional) – The symbol of the ODD layer material.

  • density_O (float, optional) – The density in g/cm3 for the ODD layers.

  • roughness_O (float, optional) – The roughness in A for the ODD layers.

  • bilayer_pairs (int, optional) – The number of bilayers.

  • bilayer_thickness (float, optional) – The thickness in A of the bilayers.

  • bilayer_gamma (float, optional) – The gamma factor of the bilayer thickness(even) / (thichness(odd) + thichness(even)).

  • GRADE_SURFACE (int, optional) –

    Flag for multilayer graded over the surface:
    • 0: No.

    • 1: Not used (for compatibility with SHADOW3).

    • 2: Not used (for compatibility with SHADOW3).

    • 3: t graded over the surface (input quadratic fit to t gradient in meters).

    • 4: t graded over the surface for an elliptical multilayer (quadratic coefficients are calculated from

      the ellipse design parameters).

  • AA0 (float, optional) – Coefficient (constant); used when GRADED_SURFACE=2

  • AA1 (float, optional) – Coefficient (linear) in m^-1; used when GRADED_SURFACE=2

  • AA2 (float, optional) – Coefficient (quadratic) in m^-2; used when GRADED_SURFACE=2

  • AA3 (float, optional) – Coefficient (cubic) in m^-3; used when GRADED_SURFACE=2

  • ell_p (float, optional) – The ellipse design parameters p in m; used when GRADED_SURFACE=3.

  • ell_q (float, optional) – The ellipse design parameters q in m; used when GRADED_SURFACE=3.

  • ell_theta_grazing_deg (float, optional) – The ellipse design grazing angle in deg; used when GRADED_SURFACE=3.

  • ell_length (float, optional) – The ellipse length in m; used when GRADED_SURFACE=3.

  • ell_photon_energy (float, optional) – The photon energy in eV at the center of the ellipse; used when GRADED_SURFACE=3.

  • use_xraylib_or_dabax (int, optional) – 0=use xraylib, 1=use dabax for the optical constabrs.

  • dabax (None or instance of DabaxXraylib,) – The pointer to the dabax library (used for use_xraylib_or_dabax = 1).

Return type:

instance of MLayer

classmethod initialize_from_bilayer_stack_in_compressed_format(structure='[Pd/B4C]x150+Si', density_O=None, roughness_O=0.0, density_E=None, roughness_E=0.0, density_S=None, roughness_S=0.0, bilayer_thickness=33.1, bilayer_gamma=0.483, GRADE_SURFACE=0, AA0=1.0, AA1=0.0, AA2=0.0, AA3=0.0, ell_p=10.0, ell_q=3.0, ell_theta_grazing_deg=0.1, ell_length=0.1, ell_photon_energy=10000.0, GRADE_DEPTH=0, LIST_N_THICK_GAMMA_ROUGHE_ROUGHO_FROM_TOP_TO_BOTTOM=None, use_xraylib_or_dabax=0, dabax=None)[source]

Creates an instance of MLayer with the main parameters of a multilater. In this case, the calculations are done without using the preprocessor data, and the optical constants are supplied by xraylib at run time.

Parameters:
  • material_S (str, optional) – The symbol of the SUBSTRATE material.

  • density_S (float, optional) – The density in g/cm3 for the SUBSTRATE layers.

  • roughness_S (float, optional) – The roughness in A for the SUBSTRATE layers.

  • material_E (str, optional) – The symbol of the EVEN layer material.

  • density_E (float, optional) – The density in g/cm3 for the EVEN layers.

  • roughness_E (float, optional) – The roughness in A for the EVEN layers.

  • material_O (str, optional) – The symbol of the ODD layer material.

  • density_O (float, optional) – The density in g/cm3 for the ODD layers.

  • roughness_O (float, optional) – The roughness in A for the ODD layers.

  • bilayer_pairs (int, optional) – The number of bilayers.

  • bilayer_thickness (float, optional) – The thickness in A of the bilayers.

  • bilayer_gamma (float, optional) – The gamma factor of the bilayer thickness(even) / (thichness(odd) + thichness(even)).

  • GRADE_SURFACE (int, optional) –

    Flag for multilayer graded over the surface:
    • 0: No.

    • 1: Not used (for compatibility with SHADOW3).

    • 2: Not used (for compatibility with SHADOW3).

    • 3: t graded over the surface (input quadratic fit to t gradient in meters).

    • 4: t graded over the surface for an elliptical multilayer (quadratic coefficients are calculated from

      the ellipse design parameters).

  • AA0 (float, optional) – Coefficient (constant); used when GRADED_SURFACE=2

  • AA1 (float, optional) – Coefficient (linear) in m^-1; used when GRADED_SURFACE=2

  • AA2 (float, optional) – Coefficient (quadratic) in m^-2; used when GRADED_SURFACE=2

  • AA3 (float, optional) – Coefficient (cubic) in m^-3; used when GRADED_SURFACE=2

  • ell_p (float, optional) – The ellipse design parameters p in m; used when GRADED_SURFACE=3.

  • ell_q (float, optional) – The ellipse design parameters q in m; used when GRADED_SURFACE=3.

  • ell_theta_grazing_deg (float, optional) – The ellipse design grazing angle in deg; used when GRADED_SURFACE=3.

  • ell_length (float, optional) – The ellipse length in m; used when GRADED_SURFACE=3.

  • ell_photon_energy (float, optional) – The photon energy in eV at the center of the ellipse; used when GRADED_SURFACE=3.

  • use_xraylib_or_dabax (int, optional) – 0=use xraylib, 1=use dabax for the optical constabrs.

  • dabax (None or instance of DabaxXraylib,) – The pointer to the dabax library (used for use_xraylib_or_dabax = 1).

Return type:

instance of MLayer

is_depth_graded()[source]

Returns True if the multilayes is depth-graded.

Return type:

bool

is_laterally_graded()[source]

Returns True if the multilayes is laterally-graded.

Return type:

bool

classmethod pre_mlayer(FILE='pre_mlayer.dat', E_MIN=5000.0, E_MAX=20000.0, S_DENSITY=2.33, S_MATERIAL='Si', E_DENSITY=2.4, E_MATERIAL='B4C', O_DENSITY=9.4, O_MATERIAL='Ru', N_PAIRS=70, THICKNESS=33.1, GAMMA=0.483, ROUGHNESS_EVEN=3.3, ROUGHNESS_ODD=3.1, GRADE_SURFACE=0, AA0=1.0, AA1=0.0, AA2=0.0, AA3=0.0, ell_p=10.0, ell_q=3.0, ell_theta_grazing_deg=0.1, ell_length=0.1, ell_photon_energy=10000.0, GRADE_DEPTH=0, LIST_N_THICK_GAMMA_ROUGHE_ROUGHO_FROM_TOP_TO_BOTTOM=None, use_xraylib_or_dabax=0, dabax=None)[source]

Creates an instance of MLayer with parameters initialized from the keyword parameters and the pre_mlayer preprocessor file. It uses xraylib for accessing the optical constants.

Parameters:
  • FILE (str, optional) – File name to be created (preprocessor pre_mlayer file).

  • E_MIN (float, optional) – The minimum photon energy in eV (for creating the tabulated refraction index).

  • E_MAX (float, optional) – The maximum photon energy in eV (for creating the tabulated refraction index).

  • S_DENSITY (float, optional) – Density (in g/cm3) for the SUBSTRATE material.

  • S_MATERIAL (float, optional) – Material formula for the SUBSTRATE material.

  • E_DENSITY (float, optional) – Density (in g/cm3) for the EVEN material.

  • E_MATERIAL (float, optional) – Material formula for the EVEN material.

  • O_DENSITY (float, optional) – Density (in g/cm3) for the ODD material.

  • O_MATERIAL (float, optional) – Material formula for the ODD material.

  • N_PAIRS (int, optional) – The number of bilayers of the multilayer. Not used if GRADE_DEPTH=1.

  • THICKNESS (float, optional) – The thickness of a bilayer in Angstroms. Not used if GRADE_DEPTH=1.

  • GAMMA (float, optional) – The gamma factor thickness(even) / (thickness(odd) + thickness(even)) for the multilayer. Not used if GRADE_DEPTH=1.

  • ROUGHNESS_EVEN (float, optional) – The rounghness of the EVEN layers in A. Not used if GRADE_DEPTH=1.

  • ROUGHNESS_ODD (float, optional) – The rounghness of the ODD layers in A. Not used if GRADE_DEPTH=1.

  • GRADE_SURFACE (int, optional) –

    Flag for multilayer graded over the surface:
    • 0: No.

    • 1: Not used (for compatibility with SHADOW3).

    • 2: Not used (for compatibility with SHADOW3).

    • 3: t graded over the surface (input quadratic fit to t gradient in meters).

    • 4: t graded over the surface for an elliptical multilayer (quadratic coefficients are calculated from

      the ellipse design parameters).

  • AA0 (float, optional) – Coefficient (constant); used when GRADED_SURFACE=2

  • AA1 (float, optional) – Coefficient (linear) in m^-1; used when GRADED_SURFACE=2

  • AA2 (float, optional) – Coefficient (quadratic) in m^-2; used when GRADED_SURFACE=2

  • AA3 (float, optional) – Coefficient (cubic) in m^-3; used when GRADED_SURFACE=2

  • ell_p (float, optional) – The ellipse design parameters p in m; used when GRADED_SURFACE=3.

  • ell_q (float, optional) – The ellipse design parameters q in m; used when GRADED_SURFACE=3.

  • ell_theta_grazing_deg (float, optional) – The ellipse design grazing angle in deg; used when GRADED_SURFACE=3.

  • ell_length (float, optional) – The ellipse length in m; used when GRADED_SURFACE=3.

  • ell_photon_energy (float, optional) – The photon energy in eV at the center of the ellipse; used when GRADED_SURFACE=3.

  • GRADE_DEPTH (int, optional) – Flag to indicate if the multilayes has a graded thickness (1) or not (0).

  • LIST_N_THICK_GAMMA_ROUGHE_ROUGHO_FROM_TOP_TO_BOTTOM (None or str) – A str with a list definition of multilayers blocks in the form: [block1, block2, …] with each block defined as [Nbilayers, BilayerThickness, BilayerGamma, roughnessEven, roughnessOdd].

  • use_xraylib_or_dabax (int, optional) – 0=use xraylib, 1=use dabax for the optical constabrs.

  • dabax (None or instance of DabaxXraylib,) – The pointer to the dabax library (used for use_xraylib_or_dabax = 1).

Returns:

It contains a dictionary in MLayer.pre_mlayer_dict with the data in the following keys:

  • np : number of photon energy points,

  • energy : numpy array with photon energy,

  • delta_s : numpy array with refraction index (delta) for substrate,

  • beta_s : numpy array with refraction index (beta) for substrate,

  • delta_e : numpy array with refraction index (delta) for even sublayer,

  • beta_e : numpy array with refraction index (beta) for even sublayer,

  • delta_o : numpy array with refraction index (delta) for odd sublayer,

  • beta_o : numpy array with refraction index (beta) for odd sublayer,

  • npair : number of bilayer paits,

  • thick : numpy array with bilayer thicknesses,

  • gamma1 : numpy array with bilayer gamma,

  • mlroughness1 : numpy array with roughness for even sublayer,

  • mlroughness2 : numpy array with roughness for odd sublayer,

  • igrade : GRADE_SURFACE flag,

  • a0, a1, a2, a3 : polynomial coefficients for laterally graded multilayers (GRADE_SURFACE=3),

  • ell_p, ell_q, ell_theta_grazing_deg, ell_length, ell_photon_energyellipse settings for laterally

    graded multilayers (GRADE_SURFACE=4).

Return type:

instance of MLayer

Notes

This method requires xraylib to access to the optical constants.

read_preprocessor_file(filename)[source]

Reads a preprocessor (pre_mlayer) file. It has the same file format as in shadow3.

Parameters:

filename (str) – The name of the filename.

reflectivity(grazing_angle_deg, photon_energy_ev, Y=0.0)[source]

Computes the reflectivity (in amplitude) as a function of the incident angle and photon energy.

Parameters:
  • grazing_angle_deg (numpy array) – The array with the incident gracing angle in deg.

  • photon_energy_ev (numpy array) – The array with the photon energy in eV.

  • Y (numpy array) – The array of coordinates along the Y direction (tangential). This is used only in the case of laterally graded multilayers.

Returns:

(R_S_array, R_P_array, phase_S, phase_P) arrays with reflectivities (in amplitude) and phases.

Return type:

tuple

scan(h5file='', energyN=51, energy1=5000.0, energy2=20000.0, thetaN=1, theta1=0.75, theta2=0.75, verbose=0)[source]

this method computes the multilayer reflectivity vs photon energy and/or angle. The reflectivity values are for amplitude.

Parameters:
  • energyN (int, optional) – Number of points in photon energy.

  • energy1 (float, optional) – The minimum photon energy in eV.

  • energy2 (float, optional) – The maximum photon energy in eV.

  • thetaN (int, optional) – Number of points in incident grazing angle.

  • theta1 (float, optional) – The minimum value of the incident grazing angle in deg.

  • theta2 (float, optional) – The minimum value of the incident grazing angle in deg.

  • h5file (str, optional) – Name of the h5 file to dump calculated data. Set to “” to avoid creating file.

  • verbose (int, optional) – if verbose=1, and thetaN=angleN=1 a text with results is printed .

Returns:

(R_S_array, R_P_array, energy_array, theta_array) numpy arrays for the sigma reflectivity (energyN, thetaN), pi reflectivity (energyN, thetaN), photon energy (energyN) and incident grazing angle (thetaN).

Return type:

tuple

scan_arrays(energy_array, theta_array_deg)[source]

this method computes the multilayer reflectivity vs photon energy and/or angle. The reflectivity values are for amplitude.

Parameters:
  • energy_array (array) – Array with energy in eV.

  • theta_array_deg (array) – Array with grazing angles in deg.

Returns:

(R_S_array, R_P_array).

Return type:

tuple

scan_energy(energy_array, theta_deg)[source]

Compute multilayer reflectivity for an energy array of arbitrary shape at a single fixed grazing angle.

Unlike scan / scan_arrays, the output arrays have exactly the same shape as energy_array, so callers that work with 2-D or 3-D energy grids (e.g. angle-dependent resonant energies from undulator harmonics) can use the result directly without reshaping.

Parameters:
  • energy_array (array_like) – Photon energies in eV. Any shape is accepted.

  • theta_deg (float) – Grazing angle in degrees (single value).

Returns:

  • R_S (numpy.ndarray) – S-polarisation reflectivity amplitude, same shape as energy_array.

  • R_P (numpy.ndarray) – P-polarisation reflectivity amplitude, same shape as energy_array.

xoppylib.xoppy_run_binaries module

Utilities for running XOPPY external Fortran/C binaries (URGENT, US, SRW wrappers).

xoppylib.xoppy_run_binaries.run_external_binary(binary='ls', post_command='', info='')[source]
xoppylib.xoppy_run_binaries.xoppy_calc_inpro(CRYSTAL_MATERIAL=0, MODE=0, ENERGY=8000.0, MILLER_INDEX_H=1, MILLER_INDEX_K=1, MILLER_INDEX_L=1, ASYMMETRY_ANGLE=0.0, THICKNESS=500.0, TEMPERATURE=300.0, NPOINTS=100, SCALE=0, XFROM=-50.0, XTO=50.0)[source]
xoppylib.xoppy_run_binaries.xoppy_calc_powder_fml(FILE='/home/docs/checkouts/readthedocs.org/user_builds/xoppylib/checkouts/latest/xoppylib/data/cif/icsd_31142_sepiolite_BraunerPreisinger.cif', TITLE='powder pattern using crysFML', LAMBDA=1.54056, JOB=0, U=0.0002, V=-0.0002, W=0.012, X=0.0019, LS=1900.0, THMIN=1.0, STEP=0.05, THMAX=135.0)[source]
xoppylib.xoppy_run_binaries.xoppy_calc_ws(ENERGY=7.0, CUR=100.0, PERIOD=8.5, N=28.0, KX=0.0, KY=8.739999771118164, EMIN=1000.0, EMAX=100000.0, NEE=2000, D=30.0, XPC=0.0, YPC=0.0, XPS=2.0, YPS=2.0, NXP=10, NYP=10)[source]
xoppylib.xoppy_run_binaries.xoppy_calc_xcom(NAME='Pyrex Glass', SUBSTANCE=3, DESCRIPTION='SiO2:B2O3:Na2O:Al2O3:K2O', FRACTION='0.807:0.129:0.038:0.022:0.004', GRID=1, GRIDINPUT=0, GRIDDATA='0.0804:0.2790:0.6616:1.3685:2.7541', ELEMENTOUTPUT=0)[source]
xoppylib.xoppy_run_binaries.xoppy_calc_xtc(ENERGY=7.0, CURRENT=100.0, ENERGY_SPREAD=0.00096, SIGX=0.274, SIGY=0.011, SIGX1=0.0113, SIGY1=0.0036, PERIOD=3.23, NP=70, EMIN=2950.0, EMAX=13500.0, N=40, HARMONIC_FROM=1, HARMONIC_TO=15, HARMONIC_STEP=2, HELICAL=0, METHOD=1, NEKS=100)[source]
xoppylib.xoppy_run_binaries.xoppy_calc_xtcap(ENERGY=6.0, CURRENT=200.0, ENERGY_SPREAD=0.00138, SIGX=0.0148, SIGY=0.0037, SIGX1=0.0029, SIGY1=0.0015, PERIOD=2.8, NP=84, EMIN=3217.0, EMAX=11975.0, N=50, DISTANCE=30.0, XPS=1.0, YPS=1.0, XPC=0.0, YPC=0.0, HARMONIC_FROM=1, HARMONIC_TO=7, HARMONIC_STEP=2, HRED=0, HELICAL=0, NEKS=100, METHOD=0, BSL=0)[source]
xoppylib.xoppy_run_binaries.xoppy_calc_xtube_w(VOLTAGE=100.0, RIPPLE=0.0, AL_FILTER=0.0)[source]
xoppylib.xoppy_run_binaries.xoppy_calc_xtubes(ITUBE=0, VOLTAGE=30.0)[source]
xoppylib.xoppy_run_binaries.xoppy_calc_yaup(TITLE='YAUP EXAMPLE (ESRF BL-8)', PERIOD=4.0, NPER=42, NPTS=40, EMIN=3000.0, EMAX=30000.0, NENERGY=100, ENERGY=6.04, CUR=0.1, SIGX=0.426, SIGY=0.085, SIGX1=0.017, SIGY1=0.0085, D=30.0, XPC=0.0, YPC=0.0, XPS=2.0, YPS=2.0, NXP=69, NYP=69, MODE=4, NSIG=2, TRAJECTORY='new+keep', XSYM='yes', HANNING=0, BFILE='undul.bf', TFILE='undul.traj', BFIELD_FLAG=1, BFIELD_ASCIIFILE='', PERIOD_BFIELD=4.0, NPER_BFIELD=42, NPTS_BFIELD=40, IMAGNET=0, ITYPE=0, K=1.38, GAP=2.0, GAPTAP=10.0, FILE='undul.bf', I2TYPE=0, A1=0.5, A2=1.0)[source]

xoppylib.xoppy_util module

General utility functions for XOPPY: file locations, plotting helpers, and data I/O.

class xoppylib.xoppy_util.XoppyPhysics[source]

Bases: object

A2EV = 12398.419843320025
K2EV = 50677.30716156396
codata_c = 299792458.0
codata_ec = 1.602176634e-19
codata_h = 6.62607015e-34
classmethod getEnergyFromWavelength(wavelength)[source]
classmethod getMaterialDensity(material_formula)[source]
classmethod getWavelengthFromEnergy(energy)[source]
class xoppylib.xoppy_util.locations[source]

Bases: object

classmethod home_bin()[source]
classmethod home_bin_run()[source]
classmethod home_data()[source]
classmethod home_doc()[source]
xoppylib.xoppy_util.package_dirname(package)[source]

Return the directory path where a package or module is located.

Works with regular and namespace packages.

xoppylib.xoppy_xraylib_util module

XOPPY utility functions wrapping dabax/xraylib for material constants, densities, and scattering factors.

xoppylib.xoppy_xraylib_util.Refractive_Index_Im_Extended_NIST(descriptor, energy_in_keV, density, material_constants_library=None)[source]
xoppylib.xoppy_xraylib_util.Refractive_Index_Re_Extended_NIST(descriptor, energy_in_keV, density, material_constants_library=None)[source]
xoppylib.xoppy_xraylib_util.density(descriptor, material_constants_library=None)[source]
xoppylib.xoppy_xraylib_util.density_element(DESCRIPTOR, verbose=False, material_constants_library=None)[source]
xoppylib.xoppy_xraylib_util.density_nist(DESCRIPTOR, verbose=False, material_constants_library=None)[source]
xoppylib.xoppy_xraylib_util.descriptor_kind_index(descriptor, material_constants_library=None)[source]
xoppylib.xoppy_xraylib_util.f0_xop(Z)[source]

Returns the f0 value as stired in the f0_xop DABAX file:

Parametrization of f0 (the non-dispersive part of the atomic scttering factor) vs sin(theta/lambda). This file contains a Waasmaier&Kirfel-like parametrization for the f0 data evaluated by Kissel using modified relativistic form factor [1]. For the fitting, model and the data error as in [2] are used. The parametrization was calculating by fitting the original data in the RTAB database [1] (also in the DABAX file f0_mf_Kissel.dat) using the MPFIT IDL procedure of Markwardt (http://cow.physics.wisc.edu/~craigm/idl/idl.html) usind the function [2]:

f0[k] = c + [SUM a_i*EXP(-b_i*(k^2)) ]

i=1,5

where k = sin(theta) / lambda and c, a_i and b_i are the coefficients tabulated in this file (in columns: a1 a2 a3 a4 a5 c b1 b2 b3 b4 b5

References [1] L. Kissel, Radiation physics and chemistry 59 (2000) 185-200

[2] D. Waasmaier & A. Kirfel (Acta Cryst. (1995). A51, 416-413)

Remarks: 1) This file contains data for only neutral atoms. For ionic states

other DABAX files (like f0_WaasKirf.dat) could be used.

  1. The coefficients in this file are prepared for xop2.1 and are unpublished.

  2. We created this file for being used as a default for XOP2.1. The reasons were two: i) It is more practical to use a parametrization rather than to use

    the direct data in file f0_mf.dat because of spped and storage reasons.

    1. The previous defaulty file for XOP 2.0 was f0_WaasKirf.dat, which

    contained a published parametrization [2], but the original data is from the International Tables for X-ray Crystallography, vol C, (1995) Edited by AJC Wilson, Kluwer Academic Press, table 6.1.1.3 which contains data from multiple origins (and references). We prefer to use evaluated data in the same conditions for all elements to keep some consistency in their origin. Additionally, Kissel data for f1f2 and CrossSec are also used in XOP.

Column description: a1 a2 a3 a4 a5 c b1 b2 b3 b4 b5

Parameters:

Z – the atomic number

Returns:

the 11 coefficients for buiding f0

xoppylib.xoppy_xraylib_util.nist_compound_list(material_constants_library=None)[source]
xoppylib.xoppy_xraylib_util.parse_formula(formula, material_constants_library=None)[source]
Parameters:

formula – a formule (e.g. H2O)

Returns:

a dictionary with tags: “Symbols”,”Elements”,”n”,”atomicWeight”,”massFractions”,”molecularWeight”

xoppylib.xoppy_xraylib_util.write_spec_file(file_out, data, titles, scan_title='')[source]

Writes a spec-formatted file :param file_out: Name of output file :param data: the numpy.array with data (ncolumns, npoints) :param titles: a list with labels of the columns :param scan_title: a scan title :return:

Module contents