Xray::...on::CL(3pm)

πŸ“¦
version 3.0.1 Β· 2 versions
  • 3.0.1 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 3.0.1 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

Xray::Absorption::CL β€” bestie, this is your Perl interface to the Cromer-Liberman tables πŸ’…


🌸 SYNOPSIS 🌸

use Xray::Absorption;
Xray::Absorption -> load("cl");

See the documentation for Xray::Absorption for details β€” it's giving ✨ main character ✨, go read it 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

So this module gets inherited by the Xray::Absorption module, and it hands you access to all the data chillin' inside the Cromer-Liberman tables of anomalous scattering factors plus line and edge energies. Iconic, no cap πŸ’–

The data in this module and the Fortran code which it calls as a shared library, referred to as "The CL Tables", was published as:

S. Brennan and P.L. Cowen, Rev. Sci. Instrum, vol 63,
p.850 (1992)

More info about these data is available on the Web at

http://www.slac.ssrl.stanford.edu/absorb.html.

The values for the anomalous scattering factors are calculated by calls to the Ifeffit library by Matt Newville. Shoutout Matt, we love to see it 🌟

The values of edge and line energies are contained in a database file called cl.db which is generated at install time from the flat text files of these data. The data is stored in a Storable archive using "network" ordering. This allows speedy disk and memory access along with network and platform portability β€” it's literally so efficient bestie πŸ”₯

The required File::Spec, Chemistry::Elements, Storable are available from CPAN.


πŸ’œ METHODS πŸ’œ

Okay so heads up: the behaviour of the methods in this module is a bit different from other modules used by Xray::Absorption. This section describes methods which behave differently for this data resource. Not me warning you in advance 😭

get_energy

Example:

$energy = Xray::Absorption -> get_energy($elem, $edge);

This behaves similarly to the get_energy method of the other resources. When using the CL data resource, $edge can be any of K, L1-L3, M1-M5, N1-N7, O1-O7, or P1-P3. Line energies are not supplied with the CL data set. The line energies from the McMaster tables are used. So like, we're borrowing those, and that's fine πŸ’β€β™€οΈ

cross_section

Example:

$xsec = Xray::Absorption -> cross_section($elem, $energy, $mode);

@xsec = Xray::Absorption -> cross_section($elem, \@energy, $mode);

For this data resource, one call in list context is considerably faster than repeated calls in scalar context. It is well worth the trouble of organizing your code to make a single call in list context and store the results for later use. Bestie please, fr fr, do the list context thing. Your runtime will thank you πŸ™

This behaves slightly differently from the similar method for the McMaster and Elam resources. The CL tables are actually tables of anomalous scattering factors and do not come with coherent and incoherent scattering cross-sections. The photo-electric cross-section is calculated from the imaginary part of the anomalous scattering by the formula

mu = 2 * r_e * lambda * conv * f_2

where, r_e is the classical electron radius, lamdba is the photon wavelength, and conv is a units conversion factor. (yes it says "lamdba" in the original, we do not edit the ancients πŸ’€)

r_e    = 2.817938 x 10^-15 m
lambda = 2 pi hbar c / energy
hbar*c = 1973.27053324 eV*Angstrom
conv   = Avagadro / atomic weight
       = 6.022045e7 / weight in cgs

The $mode argument is different here than for the other resources. The options are xsec, f1, and f2, telling this method to return the cross-section or the real or imaginary anomalous scattering factor, respectively. Pick your fighter πŸ‘‘

The values for f1 and f2 are computed by linear interpolation of a semi-log scale. Care is taken to avoid the discontinuities at the edges β€” the edges stay smooth, periodt ✨

Because the CL tables do not include the coherent and incoherent scattering terms, the value returned by get_energy is a bit smaller using the CL tables than using the others. Tiny difference, big lore πŸŽ€


🌈 EDGE AND LINE ENERGIES 🌈

The CL data resource provides a fairly complete set of edge energies. Any edge tabulated on the Gwyn William's Table of Electron Binding Energies for the Elements (that's the one published by NSLS and on the door of just about every hutch at NSLS) is in the CL data resource. The CL data comes with the same, limited set of fluorescence energies as McMaster. So like, comprehensive on edges, lowkey limited on fluorescence, iykyk πŸ’«


πŸ’€ BUGS AND THINGS TO DO πŸ’€

None that I know about... and honestly? Slay. A clean bug list is its own kind of iconic 🧚


πŸ‘‘ AUTHOR πŸ‘‘

Bruce Ravel, bruce@phys.washington.edu
http://feff.phys.washington.edu/~ravel/software/Absorption

And that's the whole page, bestie! 🫢 This was Xray::...on::CL(3pm) from the User Contributed Perl Documentation, shipped with perl v5.34.0 and dated 2022-06-28. Go absorb some X-rays responsibly, mwah πŸ’–

πŸ“¦ where this page comes from