Changeset 20369
- Timestamp:
- Oct 24, 2008, 2:56:13 PM (18 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 3 edited
-
chip_imfile.pl (modified) (5 diffs)
-
diff_skycell.pl (modified) (4 diffs)
-
stack_skycell.pl (modified) (4 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 } -
trunk/ippScripts/scripts/diff_skycell.pl
r20338 r20369 27 27 use Pod::Usage qw( pod2usage ); 28 28 29 my ($diff_id, $dbname, $threads, $outroot, $ verbose, $no_update, $no_op, $redirect);29 my ($diff_id, $dbname, $threads, $outroot, $reduction, $verbose, $no_update, $no_op, $redirect); 30 30 GetOptions( 31 31 'diff_id|d=s' => \$diff_id, # Diff identifier … … 33 33 'threads=s' => \$threads, # Number of threads to use 34 34 'outroot=s' => \$outroot, # Output root name 35 'reduction=s' => \$reduction, # Reduction class 35 36 'verbose' => \$verbose, # Print to stdout 36 37 'no-update' => \$no_update, # Don't update the database? … … 60 61 warn("Can't find required tools."); 61 62 exit($PS_EXIT_CONFIG_ERROR); 63 } 64 65 # Recipes to use based on reduction class 66 $reduction = 'DEFAULT' unless defined $reduction; 67 my $recipe_ppSub = $ipprc->reduction($reduction, 'DIFF_PPSUB'); # Recipe to use for ppSub 68 my $recipe_psphot = $ipprc->reduction($reduction, 'DIFF_PSPHOT'); # Recipe to use for psphot 69 unless ($recipe_ppSub and $recipe_psphot) { 70 &my_die("Couldn't find selected reduction for DIFF_PPSUB and DIFF_PSPHOT: $reduction\n", $diff_id, $PS_EXIT_CONFIG_ERROR); 62 71 } 63 72 … … 192 201 $command .= " -stats $outputStats"; 193 202 $command .= " -threads $threads" if defined $threads; 203 $command .= " -recipe PPSUB $recipe_ppSub"; 204 $command .= " -recipe PSPHOT $recipe_psphot"; 194 205 $command .= " -recipe PPSTATS WARPSTATS"; 195 206 $command .= " -F PSPHOT.OUTPUT PSPHOT.OUT.CMF.MEF"; -
trunk/ippScripts/scripts/stack_skycell.pl
r20316 r20369 30 30 use Pod::Usage qw( pod2usage ); 31 31 32 my ($stack_id, $dbname, $outroot, $debug, $run_state, $threads, $ verbose, $no_update, $no_op, $redirect, $save_temps);32 my ($stack_id, $dbname, $outroot, $debug, $run_state, $threads, $reduction, $verbose, $no_update, $no_op, $redirect, $save_temps); 33 33 GetOptions( 34 34 'stack_id|d=s' => \$stack_id, # Stack identifier … … 38 38 'debug' => \$debug, # Print to stdout 39 39 'threads=s' => \$threads, # Number of threads to use for ppStack 40 'reduction=s' => \$reduction, # Reduction class 40 41 'verbose' => \$verbose, # Print to stdout 41 42 'no-update' => \$no_update, # Don't update the database? … … 74 75 warn("Can't find required tools."); 75 76 exit($PS_EXIT_CONFIG_ERROR); 77 } 78 79 # Recipes to use based on reduction class 80 $reduction = 'DEFAULT' unless defined $reduction; 81 my $recipe_ppStack = $ipprc->reduction($reduction, 'STACK_PPSTACK'); # Recipe to use for ppStack 82 my $recipe_ppSub = $ipprc->reduction($reduction, 'STACK_PPSUB'); # Recipe to use for ppSub 83 my $recipe_psphot = $ipprc->reduction($reduction, 'STACK_PSPHOT'); # Recipe to use for psphot 84 unless ($recipe_ppStack and $recipe_ppSub and $recipe_psphot) { 85 &my_die("Couldn't find selected reduction for STACK_PPSTACK, STACK_PPSUB and STACK_PSPHOT: $reduction\n", $stack_id, $PS_EXIT_CONFIG_ERROR); 76 86 } 77 87 … … 188 198 my $command = "$ppStack $listName $outroot"; 189 199 $command .= " -stats $outputStats" if $do_stats;; 190 $command .= " -recipe PPSUB STACK"; 200 $command .= " -recipe PPSTACK $recipe_ppStack"; 201 $command .= " -recipe PPSUB $recipe_ppSub"; 202 $command .= " -recipe PSPHOT $recipe_psphot"; 191 203 $command .= " -recipe PPSTATS WARPSTATS" if $do_stats;; 192 204 $command .= " -F PSPHOT.PSF.SAVE PSPHOT.PSF.SKY.SAVE";
Note:
See TracChangeset
for help on using the changeset viewer.
