Changeset 35789 for trunk/ippScripts/scripts
- Timestamp:
- Jul 10, 2013, 12:08:57 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/chip_imfile.pl (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/chip_imfile.pl
r35770 r35789 45 45 # Parse the command-line arguments 46 46 my ( $exp_id, $chip_id, $class_id, $chip_imfile_id, $uri, $camera, $outroot, $dbname, $run_state, $reduction, $threads, $verbose, 47 $no_update, $save_temps, $no_op, $redirect, $magicked, $deburned );47 $no_update, $save_temps, $no_op, $redirect, $magicked, $deburned, $update_mode ); 48 48 49 49 GetOptions( … … 58 58 'reduction=s' => \$reduction, # Reduction class 59 59 'run-state=s' => \$run_state, # current state of the run (new, update) 60 'update-mode=s' => \$update_mode, # update_mode if non-zero do not use configdump 60 61 'magicked=s' => \$magicked, # magicked state of input file 61 62 'deburned=s' => \$deburned, # does deburned image exist? … … 147 148 my $outputBin2; 148 149 my $dump_config = 1; 149 my $do_stats = 1; 150 151 # Note: We currently always do_stats because we need the quality flags 152 # If run_state eq 'update' using the same file name wipes out the stats from the original processing which 153 # is arguably a bug. Since they are already in the database in that case this probably isn't a big 154 # deal 155 my $do_stats = 1; 150 156 $outputStats = prepare_output("PPIMAGE.STATS", $outroot, $class_id, 1); 157 151 158 my $do_binned_images = 1; 152 159 … … 155 162 $configuration = prepare_output("PPIMAGE.CONFIG", $outroot, $class_id, 1); 156 163 } else { 157 $configuration = $ipprc->filename('PPIMAGE.CONFIG', $outroot, $class_id) 164 # If update_mode is non-zero we are going to update with current recipes. 165 # In this case dump the new configuration. 166 if ($update_mode) { 167 $configuration = prepare_output("PPIMAGE.CONFIG", $outroot, $class_id, 1); 168 } else { 169 $configuration = $ipprc->filename('PPIMAGE.CONFIG', $outroot, $class_id) 158 170 or &my_die("Missing entry from camera config: PPIMAGE.CONFIG", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR); 159 if ($ipprc->file_exists($configuration)) { 160 $dump_config = 0; 161 } else { 162 print STDERR "WARNING: Config dump file $configuration is missing. Using current recipes and file rules.\n"; 163 164 # XXX: should we create a new config dump file? 165 # I vote yes but only if we can distingusing between temporarily unavailable and GONE. 166 my $gone = 0; 167 if (storage_object_exists($configuration, \$gone)) { 168 if ($gone) { 169 $configuration = prepare_output('PPIMAGE.CONFIG', $outroot, $class_id, 1); 170 # if we dump the config we need to insure that the config dump represents 171 # the full processing 172 } else { 173 # file is temporarily not available. Don't dump config. 174 $dump_config = 0; 171 if ($ipprc->file_exists($configuration)) { 172 $dump_config = 0; 173 } else { 174 print STDERR "WARNING: Config dump file $configuration is missing. Using current recipes and file rules.\n"; 175 176 # XXX: should we create a new config dump file? 177 # I vote yes but only if we can distingusing between temporarily unavailable and GONE. 178 my $gone = 0; 179 if (storage_object_exists($configuration, \$gone)) { 180 if ($gone) { 181 $configuration = prepare_output('PPIMAGE.CONFIG', $outroot, $class_id, 1); 182 # if we dump the config we need to insure that the config dump represents 183 # the full processing 184 } else { 185 # file is temporarily not available. Don't dump config. 186 $dump_config = 0; 187 } 175 188 } 176 189 } … … 185 198 or &my_die("failed to delete existing destreak backup weight file", $exp_id, $chip_id, $class_id, $PS_EXIT_UNKNOWN_ERROR); 186 199 187 # don't do binned images when updating unless we are starting from scratch.188 $do_binned_images = 0 unless $dump_config;200 # don't do binned images when updating 201 $do_binned_images = 0; 189 202 } 190 203 if ($do_binned_images) { … … 219 232 my $do_photom = metadataLookupBool($recipeData, 'PHOTOM'); 220 233 if ($do_photom and ($run_state eq 'update')) { 221 # If previous p hotometry outputs are ok skip runningphotometry234 # If previous psf file is ok skip photometry 222 235 if ($dump_config || rerun_photometry($outroot, $class_id)) { 223 236 carp "Will rerun photometry\n"; … … 562 575 $command .= " -class_id $class_id"; 563 576 $command .= " -dbname $dbname" if defined $dbname; 577 # XXX: if we had a quality problem on this re-run we are not saving that fact in the DB... 578 # to change this we need to modify chiptool -tofullimfile to supprot -set_quality and then add 579 #$command .= " -set_quality $quality" if $quality; 564 580 } 565 581 … … 600 616 601 617 my $update_sources_if_gone = 0; # set this to regenerate sources if gone. 602 # We no longer do this as of 2012-12 618 # We no longer do this as of 2012-12 since cleanup deletes them 603 619 my $make_sources = 0; 604 620 my $sources_available = 0; … … 635 651 if (storage_object_exists($outputPsf, \$gone)) { 636 652 # object exists, but no instances are available. If they are permanently gone 637 # re name the storage object653 # remake it 638 654 if ($gone) { 639 655 carp "WARNING: PSF storage object exists but all instances are permanently gone"; … … 641 657 } 642 658 } else { 659 # object completely missing remake it 643 660 $make_psf = 1; 644 661 }
Note:
See TracChangeset
for help on using the changeset viewer.
