Xray::Scattering(3pm)
π Xray::Scattering π
okay bestie, so this is the manual page for Xray::Scattering β it's a Perl module (that's the (3pm) situation, we love a lil library moment) and it ships you all the X-ray scattering data for the elements. User contributed Perl documentation, and it ate. π«Ά
β¨ NAME β¨
Xray::Scattering β X-ray scattering data for the elements π
πΈ SYNOPSIS πΈ
use Xray::Scattering;
Xray::Scattering->load('CroMann');
$fnot = Xray::Scattering->get_f($symb, $d);
Xray::Scattering->load('WaasKirt');
$fnot = Xray::Scattering->get_f($symb, $d);
π¦ DESCRIPTION π¦
So this module gives you access to X-ray scattering data for atoms and ions. It's designed to be a transparent interface to scattering data from a bunch of different sources β like, you don't gotta care where the numbers came from, you just ask and it delivers. β¨
Currently the only data sources are:
- the Cromer-Mann tables from the International Tables of Crystallography π
- the 1995 Waasmaier-Kirfel tables ποΈ
More resources can be added easily, so this is very much giving expandable, main character energy.
π METHODS π
available
This one returns a list of the data resources that are available to this module. Right now it hands you back an array consisting of these strings:
Cromer-Mann Waasmaier-Kirfel None
The first two are functional interfaces to those databases β actual working vibes. The third, None, is a fallback subclass which returns default values for all methods. It's the friend who shows up and contributes nothing but is still invited. π
get_valence
This returns the element/valence symbol in the proper form for use with the other methods. $elem is a two-letter atomic symbol, and $valence is the valence of the ion. And $valence can be an integer, a float, a dot, or the string "va" β versatile, we stan. π
$symbol = Xray::Scattering->get_valence($elem, $valence)
Unless the valence is a dot or the string "va", the nearest integer to $valence is used with the element symbol to construct the element/valence symbol. For example, $symbol eq "Cu2+" if $elem eq "Cu" and $valence == 2. Simple as that, no cap. π
π§ SUBCLASS METHODS π§
All the available subclasses corresponding to the data resources provide their own versions of the following methods. Same function names, different table behind the curtain, iykyk.
get_f
This function calculates the Thomson scattering for a given symbol and d-spacing. The Thomson scattering depends only on the momentum transfer. The d-spacing of the scattering planes is a closely related quantity and is easily calculated from the crystal structure β see Xtal.pm for that whole situation. π₯
$symb = "Ce3+";
$fnot = Xray::Scattering->get_f($symb, $d);
Here's the tea on the edge cases, bestie, listen up:
- If the symbol cannot be found in the table,
get_freturns0. - It also returns
0when$symbolconsists of whitespace or is"null"or"nu". - If
$symbolis a number or the name of an element, then it assumes you want the Thomson scattering for the neutral element. - The absolute value of
$d_spacingis used by this function.
The None subclass always returns 0. Iconic in its commitment to nothing. π
If you ask for a valence state that is not in the table but for an element whose 0+ state is in the table, this method returns the scattering factor for the 0 valent atom. It's got your back like that. π«Ά
get_coefficients
This returns the 9 (Cromer-Mann) or 11 (Waasmaier-Kirfel) element list containing the coefficients for the given symbol. Nine or eleven, depending on which table you're living in. π
@coefs = Xray::Scattering->get_coefficients($symb)
See the documents for the subclasses for the order of the coefficients β the ordering matters, don't just vibe-check it.
The None subclass always returns a list of 11 zeros. Eleven beautiful zeros. π
If you ask for a valence state that is not in the table but for an element whose 0+ state is in the table, this method returns the coefficients for the 0 valent atom. Same energy as get_f, consistent queen. π
has
This is a test of whether a given symbol is tabulated in the selected data resource table. It returns the symbol itself if it's found in the table, or 0 if it's not in the table. Basically "do I know her?" π
$symb = "Ce3+";
$has = Xray::Scattering->has($symb);
The None subclass returns the symbol itself. No matter what. Chaos, but consistent chaos. π¦
π AUTHOR π
Bruce Ravel, bravel AT bnl DOT gov
http://cars9.uchicago.edu/~ravel/software/exafs/
π LICENCE AND COPYRIGHT π
Copyright (c) 2006-2008 Bruce Ravel (bravel AT bnl DOT gov). All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. Free software, we love to see it. π
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Fr fr, no promises, use at your own risk bestie. π
and that's the whole page!! this doc came from perl v5.34.0 and it's dated 2022-06-28 β so yes, she's a lil vintage but she still serves. mwah, go scatter some X-rays π β¨
π¦ where this page comes from
- debian bookworm: libxray-scattering-perl 3.0.1-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libxray-scattering-perl 3.0.1-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libxray-scattering-perl 3.0.1-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libxray-scattering-perl 3.0.1-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libxray-scattering-perl 3.0.1-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms