Changeset 35154 for trunk/ippScripts/scripts/background_chip.pl
- Timestamp:
- Feb 12, 2013, 4:24:02 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/background_chip.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/background_chip.pl
r35118 r35154 43 43 # Parse the command-line arguments 44 44 my ( $chip_bg_id, $class_id, $camera, $outroot, $dbname, $reduction, $verbose, 45 $threads, $no_update, $save_temps, $no_op, $redirect, $chip_path_base, $ magicked );45 $threads, $no_update, $save_temps, $no_op, $redirect, $chip_path_base, $cam_path_base, $magicked ); 46 46 GetOptions( 47 47 'chip_bg_id=s' => \$chip_bg_id, # chipBackgroundRun identifier … … 53 53 'threads=s' => \$threads, # Number of threads to use 54 54 'chip_path_base=s' => \$chip_path_base, # optional chip_path_base 55 'cam_path_base=s' => \$cam_path_base, # optional camera stage path_base 55 56 'magicked=s' => \$magicked, # magicked status of input 56 57 'verbose' => \$verbose, # Print to stdout … … 94 95 my $dump_config; 95 96 if ($chip_path_base and $no_update) { 97 # XXX: this path through the code has not been excercized in awhile and probably does not work 98 96 99 # we are running outside of a chip_bg_run (perhaps by the postage stamp server) don't dump config 97 100 # or do stats. Get path to input from command line. … … 119 122 my $input = $$inputs[0]; # Input of interest 120 123 $in_path = $input->{path_base}; 124 $cam_path_base = $input->{cam_path_base}; 121 125 $magicked = $input->{magicked}; 122 126 } 123 127 124 128 my $in_image = $ipprc->filename("PPIMAGE.CHIP", $in_path, $class_id); 125 my $in_mask = $ipprc->filename("PPIMAGE.CHIP.MASK", $in_path, $class_id); 129 my $in_mask; 130 if ($cam_path_base) { 131 $in_mask = $ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $class_id); 132 } else { 133 $in_mask = $ipprc->filename("PPIMAGE.CHIP.MASK", $in_path, $class_id); 134 } 126 135 my $in_wt = $ipprc->filename("PPIMAGE.CHIP.VARIANCE", $in_path, $class_id); 127 136 my $in_bg = $ipprc->filename("PSPHOT.BACKMDL", $in_path, $class_id); … … 177 186 178 187 my $apply_auxiliary_mask = 1; 188 # XXX Temporary lookup of auxiliary mask file from static location. 189 # At some point I'll convert this to register the masks in the database and use detselect 179 190 if ($apply_auxiliary_mask) { 180 191 my @auxmask_start_date = qw( … … 238 249 print "Auxililary mask file is $auxmask\n"; 239 250 } 240 241 251 242 252 … … 272 282 &my_die("Couldn't find expected output file: $out_stats", $chip_bg_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($out_stats); 273 283 274 my $command = "$ppStatsFromMetadata $out_stats - BACKGROUND_CHIP"; 284 my $resolved_stats = $ipprc->file_resolve($out_stats); 285 my $command = "$ppStatsFromMetadata $resolved_stats - BACKGROUND_CHIP"; 275 286 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 276 287 run(command => $command, verbose => $verbose);
Note:
See TracChangeset
for help on using the changeset viewer.
