#!/usr/bin/perl
#
# 

$debug = 0;
$c = 2.9979e8;

while (<STDIN>) {
 $line = $_;
 if ($line =~ /^#/) {
   next;
 }
 if ($debug > 0) {
   printf "%s", $line;
 }
 $line = " " . $line;

 @words = split(/\s+/, $line);
 $x = $words[1];
 $y = $words[2];

 # convert x to Frequency (GHz)
 $newx = 10.0**($x);
 # convert y to Jansky*Hz
 $newy = 10.0**($y);

 if ($debug > 0) {
   printf " %12.5e %12.5e  \n", $newx, $newy;
 }


 # convert x to wavelength (meters)
 $nu = $newx*1e9;
 $lambda = $c/($nu);

 # convert fluxes to flambda in 2 steps
 # first, flux goes to Jansky
 $fnu = $newy/$nu;
 $flambda = $fnu*($c/($lambda*$lambda));
 printf " %12.5e %12.5e  \n", $lambda, $flambda;

}

exit 0;
