aboutsummaryrefslogtreecommitdiff
path: root/scripts/eV-to-A
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/eV-to-A')
-rwxr-xr-xscripts/eV-to-A10
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);