Xray::Scattering(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

πŸ’– 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_f returns 0.
  • It also returns 0 when $symbol consists of whitespace or is "null" or "nu".
  • If $symbol is 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_spacing is 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/


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