aboutsummaryrefslogtreecommitdiff
path: root/scripts/eV-to-A
blob: 941e422be9501fe7e8563e8db0c45520d63b8d48 (plain)
1
2
3
4
5
6
7
8
9
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);