#! /usr/local/bin/perl -w
foreach $dir (`ls -d [89]???`){		# 
    chop($dir);
#    print $dir;
    chdir($dir);		# 
    foreach $file (`ls FR*fits*`){	# 
	chop($file);
#	print $file;
	$command = "fkeypar \"$file+1\" MAXTDIFF\n";
#	print $command;
	system($command);
	$maxtdiff = `pget fkeypar value`;
	chop($maxtdiff);
#	if(abs($maxtdiff)<0.1||abs($maxtdiff)>1500.0){
	printf("%s %10.5f\n",$file,$maxtdiff);
#	}
    }
    chdir("..");
}


