Changeset 20369 for trunk/ippScripts/scripts/chip_imfile.pl
- Timestamp:
- Oct 24, 2008, 2:56:13 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/chip_imfile.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/chip_imfile.pl
r20099 r20369 64 64 $ipprc->redirect_output($logDest) if $redirect; 65 65 66 # Recipes to use based on reduction class67 # the CHIP recipe should not perform astrometry anymore (2008.04.08)68 69 $reduction = 'DEFAULT' unless defined $reduction;70 my $recipe = $ipprc->reduction($reduction, 'CHIP'); # Recipe to use71 unless ($recipe) {72 &my_die("Couldn't find selected reduction for CHIP: $reduction\n", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);73 }74 75 66 # Look for programs we need 76 67 my $missing_tools; … … 84 75 } 85 76 77 # Recipes to use based on reduction class 78 $reduction = 'DEFAULT' unless defined $reduction; 79 my $recipe_ppImage = $ipprc->reduction($reduction, 'CHIP_PPIMAGE'); # Recipe to use for ppImage 80 my $recipe_psphot = $ipprc->reduction($reduction, 'CHIP_PSPHOT'); # Recipe to use for psphot 81 unless ($recipe_ppImage and $recipe_psphot) { 82 &my_die("Couldn't find selected reduction for CHIP_PPIMAGE and CHIP_PSPHOT: $reduction\n", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR); 83 } 84 86 85 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files 87 86 … … 120 119 if ($run_state eq "new") { 121 120 $command = "$ppImage -file $uri $outroot"; 122 $command .= " -recipe PPIMAGE $recipe"; 121 $command .= " -recipe PPIMAGE $recipe_ppImage"; 122 $command .= " -recipe PSPHOT $recipe_psphot"; 123 123 $command .= " -threads $threads" if defined $threads; 124 124 $command .= " -dbname $dbname" if defined $dbname; … … 147 147 148 148 ## get the ppImage recipe for this camera and CHIP reduction 149 $command = "$ppConfigDump -camera $camera -dump-recipe PPIMAGE -recipe PPIMAGE $recipe -";149 $command = "$ppConfigDump -camera $camera -dump-recipe PPIMAGE -recipe PPIMAGE $recipe_ppImage -"; 150 150 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 151 151 run(command => $command, verbose => $verbose); … … 177 177 178 178 if ($do_stats) { 179 my $outputStatsReal = $ipprc->file_resolve($outputStats);180 &my_die("Couldn't find expected output file: $outputStats", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless -f $outputStatsReal;181 182 # measure chip stats183 $command = "$ppStatsFromMetadata $outputStatsReal - CHIP_IMFILE";184 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =185 run(command => $command, verbose => $verbose);186 unless ($success) {187 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);188 &my_die("Unable to perform ppStatsFromMetadata: $error_code", $exp_id, $chip_id, $class_id, $error_code);189 }190 foreach my $line (@$stdout_buf) {191 $cmdflags .= " $line";192 }193 chomp $cmdflags;179 my $outputStatsReal = $ipprc->file_resolve($outputStats); 180 &my_die("Couldn't find expected output file: $outputStats", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless -f $outputStatsReal; 181 182 # measure chip stats 183 $command = "$ppStatsFromMetadata $outputStatsReal - CHIP_IMFILE"; 184 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 185 run(command => $command, verbose => $verbose); 186 unless ($success) { 187 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 188 &my_die("Unable to perform ppStatsFromMetadata: $error_code", $exp_id, $chip_id, $class_id, $error_code); 189 } 190 foreach my $line (@$stdout_buf) { 191 $cmdflags .= " $line"; 192 } 193 chomp $cmdflags; 194 194 } 195 195 }
Note:
See TracChangeset
for help on using the changeset viewer.
