http://jvo.nao.ac.jp/~eguchi/
some perl and C programs.
2013年3月27日水曜日
decrypt_data.pl with Mac GPG
this script gave the error,
GPG is unavailable.
even I have
gpg --version
gpg (GnuPG/MacGPG2) 2.0.18
libgcrypt 1.5.0
GPG is unavailable.
even I have
gpg --version
gpg (GnuPG/MacGPG2) 2.0.18
libgcrypt 1.5.0
This can be avoid by putting
$gpgworks = 1;
into decrypt_data.pl.
Cheers...
2012年5月10日木曜日
2010年7月15日木曜日
getImageFItsKey1.pl
a perl script to output some keywords from a image fits header.
This is for suzaku/XIS image fits.
I hope this to help your job.
#!/usr/local/bin/perl -w
$image="$ARGV[0]+0";
# print $image;
#$dbg=1;
$dbg=0;
sub getKey {
my $fits = $_[0];
my $key = $_[1];
system("fkeypar $fits $key ") && return -1;
my $value = `pget fkeypar value`;
chomp($value);
return $value;
}
my $object = &getKey($image, "OBJECT");
printf("#1 object = %12s¥n", $object) if ($dbg);
my $exposure = &getKey($image, "EXPOSURE");
my $cts = &getKey($image, "TOTCTS");
my $rate=0;
if ($exposure >= 0){
$rate = $cts/$exposure;
}
printf("%12s |%-28s |%6.1f (ks) |%6.1f (kcts) |%6.1f (c/s) ¥n",
$image, $object, $exposure/1000, $cts/1000, $rate);
exit;
This is for suzaku/XIS image fits.
I hope this to help your job.
#!/usr/local/bin/perl -w
$image="$ARGV[0]+0";
# print $image;
#$dbg=1;
$dbg=0;
sub getKey {
my $fits = $_[0];
my $key = $_[1];
system("fkeypar $fits $key ") && return -1;
my $value = `pget fkeypar value`;
chomp($value);
return $value;
}
my $object = &getKey($image, "OBJECT");
printf("#1 object = %12s¥n", $object) if ($dbg);
my $exposure = &getKey($image, "EXPOSURE");
my $cts = &getKey($image, "TOTCTS");
my $rate=0;
if ($exposure >= 0){
$rate = $cts/$exposure;
}
printf("%12s |%-28s |%6.1f (ks) |%6.1f (kcts) |%6.1f (c/s) ¥n",
$image, $object, $exposure/1000, $cts/1000, $rate);
exit;
登録:
投稿 (Atom)