Changeset 23548
- Timestamp:
- Mar 26, 2009, 9:01:47 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/chip_imfile.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/chip_imfile.pl
r23395 r23548 35 35 } 36 36 37 my @ARGS = @ARGV; 38 37 39 # Parse the command-line arguments 38 40 my ( $exp_id, $chip_id, $class_id, $chip_imfile_id, $uri, $camera, $outroot, $dbname, $run_state, $reduction, $threads, $verbose, 39 $no_update, $no_op, $redirect, $magicked );41 $no_update, $no_op, $redirect, $magicked, $deburned ); 40 42 GetOptions( 41 43 'exp_id=s' => \$exp_id, # Exposure identifier … … 49 51 'reduction=s' => \$reduction, # Reduction class 50 52 'run-state=s' => \$run_state, # current state of the run (new, update) 51 'magicked' => \$magicked, # magicked state of intput file 53 'magicked' => \$magicked, # magicked state of input file 54 'deburned=s' => \$deburned, # does deburned image exist? 52 55 'threads=s' => \$threads, # Number of threads to use for ppImage 53 56 'verbose' => \$verbose, # Print to stdout … … 78 81 print STDOUT "\n\n"; 79 82 print STDOUT "Starting script $0 on $host\n\n"; 80 print STDOUT " COMMAND IS: @ARGV\n\n";83 print STDOUT "FULL COMMAND: $0 @ARGS\n\n"; 81 84 } 82 85 … … 124 127 my $command; 125 128 my $do_stats; 129 130 ## get the ppImage recipe for this camera and CHIP reduction 131 $command = "$ppConfigDump -camera $camera -dump-recipe PPIMAGE -recipe PPIMAGE $recipe_ppImage -"; 132 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 133 run(command => $command, verbose => $verbose); 134 unless ($success) { 135 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 136 &my_die("Unable to perform ppConfigDump: $error_code", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR); 137 } 138 my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or 139 &my_die("Unable to parse metadata config doc", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR); 140 141 ## XXX make the feature more general? 142 my $useDeburnedImage = metadataLookupBool($recipeData, 'USE.DEBURNED.IMAGE'); 143 if ($useDeburnedImage && $deburned) { 144 $uri =~ s/fits$/burn.tbl/; 145 &my_die("Couldn't find deburned input file: $uri\n", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($uri); 146 } 126 147 127 148 if ($run_state eq "new") { … … 151 172 } 152 173 153 my( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =174 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 154 175 run(command => $command, verbose => $verbose); 155 176 unless ($success) { … … 157 178 &my_die("Unable to perform ppImage: $error_code", $exp_id, $chip_id, $class_id, $error_code); 158 179 } 159 160 ## get the ppImage recipe for this camera and CHIP reduction161 $command = "$ppConfigDump -camera $camera -dump-recipe PPIMAGE -recipe PPIMAGE $recipe_ppImage -";162 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =163 run(command => $command, verbose => $verbose);164 unless ($success) {165 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);166 &my_die("Unable to perform ppConfigDump: $error_code", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);167 }168 my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or169 &my_die("Unable to parse metadata config doc", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);170 180 171 181 ## allow the output images to be optional, depending on the recipe / reduction class
Note:
See TracChangeset
for help on using the changeset viewer.
