IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 103


Ignore:
Timestamp:
Oct 7, 2003, 11:51:43 PM (23 years ago)
Author:
eugene
Message:

added entries for PHU keywords, cleaned some old code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/perl/src/dads.keywords

    r17 r103  
    44
    55# get list of image files:
    6 @ilist = <$ARGV[0]/*.fits>;
    7 $name = $ilist[0];
     6@list = <$ARGV[0]/*.fits>;
     7$name = $list[0];
    88
    99# get appropriate run ID
     
    2626}
    2727
    28 foreach $name (@ilist) {
     28foreach $name (@list) {
    2929
    3030    # files have names like /path/654321p/654321p00.fits
     
    5959}
    6060
     61# add data for phu file:
     62@list = <$ARGV[0]/*.phu>;
     63$phufile = $list[0];
     64
     65# generate name of output header file
     66$hdxfile = $name;
     67$hdxfile =~ s/.fits$/.phu/;
     68if ($hdxfile eq $name) {
     69    print STDERR "ERROR in format of filename $name\n";
     70    exit 1;
     71}
     72
     73if (vsystem ("grab.keywords $phufile phu $hdxfile")) {
     74    print STDERR "ERROR: can't get keywords for $name\n";
     75    exit 1;
     76}
     77
     78if (vsystem ("fits_insert $phufile $hdxfile -comment 5 'Fully Characterized and Analysed by Elixir @ CFHT'" )) {
     79    print STDERR "ERROR inserting keywords in $name\n";
     80    exit 1;
     81}
     82
    6183print STDERR "SUCCESS: applied new keywords\n";
    6284exit 0;
     
    7395    die "@_\n";
    7496}
    75 
    76 
    77 
    78 sub junk {
    79 
    80     # create the basic entries for a header
    81     $line = sprintf "SIMPLE  =                    T / Standard FITS \n"; @output = (@output, $line);
    82     $line = sprintf "BITPIX  =                    8 / no actual data in this file\n"; @output = (@output, $line);
    83     $line = sprintf "NAXIS   =                    0 / Number of axes \n"; @output = (@output, $line);                               
    84 
    85 
    86 
    87     # fill in the bottom of the header
    88     $line = sprintf "END"; @output = (@output, $line);                               
    89 }
    90    
Note: See TracChangeset for help on using the changeset viewer.