diff options
author | Thomas White <taw@physics.org> | 2011-11-18 16:36:43 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:41 +0100 |
commit | bd640fa2bbb6bbb219e8dbcdaf88df093cac5c8a (patch) | |
tree | 002c2a6d1d5c010f2c6c74975060a5914eee434b /scripts/eV-to-A | |
parent | d5ddfec8d79c9fc829a32cdf51082f626d3184bb (diff) |
Stuff related to calculating anomalous structure factors
Diffstat (limited to 'scripts/eV-to-A')
-rwxr-xr-x | scripts/eV-to-A | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/eV-to-A b/scripts/eV-to-A new file mode 100755 index 00000000..941e422b --- /dev/null +++ b/scripts/eV-to-A @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +my $eV = $ARGV[0]; + +printf("%5.2f eV\n", $eV); + +my $J = $eV*1.6021773e-19; +my $lambda = (6.62606896e-34 * 299792458)/$J; + +printf("%5.2f eV = %5.5f A\n", $eV, $lambda*1e10); |