Changeset 34746
- Timestamp:
- Nov 29, 2012, 6:24:46 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20120906/ippScripts/scripts/regenerate_background.pl
r34680 r34746 20 20 'camera|i=s' => \$camera, # user-supplied camera name 21 21 'stage_id=s' => \$stage_id, # id for this stage 22 'skycell_id=s' => \$skycell_id, # skycell_id 22 23 'verbose' => \$verbose, # verbose commands 23 24 'logfile=s' => \$logfile # destination for stdout and stderr … … 33 34 defined $stage_id; 34 35 36 pod2usage( -msg => "Required options: --camera (name) --stage (stage) --stage_id (stage_id) --skycell_id (skycell_id)", 37 -exitval => 3) if (($stage eq 'warp')&&(!defined($skycell_id))); 38 39 35 40 my $ipprc = PS::IPP::Config->new ( $camera ) or 36 41 &my_die("Unable to set up", $stage, $stage_id, $PS_EXIT_CONFIG_ERROR); # used for path/neb info … … 51 56 my $warp_id = $stage_id; # Because I think I used the wrong id in places. 52 57 &my_die("--stage_id required for stage warp", $stage, $stage_id, $PS_EXIT_CONFIG_ERROR) if !$stage_id; 58 &my_die("--skycell_id required for stage warp", $stage, $stage_id, $PS_EXIT_CONFIG_ERROR) if !$skycell_id; 53 59 54 60 # Configuration stuff … … 74 80 75 81 my $imfiles; # Array of component files 76 my $command = "$warptool -warped -warp_id $stage_id ";82 my $command = "$warptool -warped -warp_id $stage_id -skycell_id $skycell_id"; 77 83 my $command .= " -dbname $dbname " if defined $dbname; 78 84 … … 104 110 my $poor_quality = $imfile->{quality} > 0; 105 111 106 my $bkg_file = $ipprc->filename("PSWARP.OUTPUT.BKGMODEL",$path_base,$skycell_id); 107 my $bkg_exists = $ipprc->file_exists($bkg_file); 112 # my $bkg_file = $ipprc->filename("PSWARP.OUTPUT.BKGMODEL",$path_base,$skycell_id); 113 # my $bkg_exists = $ipprc->file_exists($bkg_file); 114 my $bkg_exists = $imfile->{background_model}; 108 115 if ($bkg_exists) { $status = 0; } # We do not need to remake this. 109 116 … … 218 225 foreach my $imfile (@$imfiles) { 219 226 if ($imfile->{ignored}) {next; } 227 unless ($imfile->{background_model}) { 228 &my_die("Not all inputs have valid background models", 229 $stage,$stage_id,$PS_EXIT_PROG_ERROR); 230 } 220 231 print $inputMDC_file "INPUT${num}\tMETADATA\n"; 221 232
Note:
See TracChangeset
for help on using the changeset viewer.
