Changeset 103
- Timestamp:
- Oct 7, 2003, 11:51:43 PM (23 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/perl/src/dads.keywords (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/perl/src/dads.keywords
r17 r103 4 4 5 5 # get list of image files: 6 @ ilist = <$ARGV[0]/*.fits>;7 $name = $ ilist[0];6 @list = <$ARGV[0]/*.fits>; 7 $name = $list[0]; 8 8 9 9 # get appropriate run ID … … 26 26 } 27 27 28 foreach $name (@ ilist) {28 foreach $name (@list) { 29 29 30 30 # files have names like /path/654321p/654321p00.fits … … 59 59 } 60 60 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/; 68 if ($hdxfile eq $name) { 69 print STDERR "ERROR in format of filename $name\n"; 70 exit 1; 71 } 72 73 if (vsystem ("grab.keywords $phufile phu $hdxfile")) { 74 print STDERR "ERROR: can't get keywords for $name\n"; 75 exit 1; 76 } 77 78 if (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 61 83 print STDERR "SUCCESS: applied new keywords\n"; 62 84 exit 0; … … 73 95 die "@_\n"; 74 96 } 75 76 77 78 sub junk {79 80 # create the basic entries for a header81 $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 header88 $line = sprintf "END"; @output = (@output, $line);89 }90
Note:
See TracChangeset
for help on using the changeset viewer.
