#! /usr/bin/perl $version ="1.00"; $date ="2002-11-19"; $author = "kaa"; # This script makes the ROSAT HRI rsp. It is run by the xselect # routine xsl_rspsav. # Check that we were given an input filename if(@ARGV != 1) { print "\n usage : xsl_rosat_hri_makeresp infile\n"; exit(0); } $infile = $ARGV[0]; # copy the rsp from the caldb. There is only one so this is really easy. $rmffile = "hri_90dec01.rsp"; # if the rsp file doesn't already exist in this directory then copy it # from the caldb. if ( !-e $rmffile ) { $caldb = $ENV{'CALDB'}; if($caldb !~/\S/) { print "The CALDB environment variable is not set.\n"; exit(2); } $calfile = $caldb . "/data/rosat/hri/cpf/" . $rmffile; $command = "cp $calfile $rmffile"; print "\n",$command,"\n\n"; system($command); } # set the RESPFILE keyword in the spectrum to point to the file that has # been created $command = "fparkey value=$rmffile fitsfile=$infile\[SPECTRUM\] keyword=RESPFILE"; system($command);