Changeset 33979 for trunk/ippScripts/scripts/staticsky.pl
- Timestamp:
- Jun 1, 2012, 1:34:15 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/staticsky.pl (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/staticsky.pl
r33957 r33979 81 81 -msg => "Required options: --sky_id --outroot --camera", 82 82 -exitval => 3, 83 ) unless 83 ) unless 84 84 defined $sky_id and 85 85 defined $outroot and … … 120 120 121 121 122 # generate the input 122 # generate the input 123 123 print $listFile "INPUT MULTI\n"; 124 124 my $nInputs = @$files; … … 194 194 # Perform stack photometry analysis 195 195 { 196 my $command = "$psphotStack $outroot .stk";196 my $command = "$psphotStack $outroot"; 197 197 $command .= " -input $listName"; 198 198 $command .= " -threads $threads" if defined $threads; … … 235 235 # we have one set of output files per input file set 236 236 for (my $i = 0; $i < @$files; $i++) { 237 my $outputName = $ipprc->filename("PSPHOT.STACK.OUTPUT.IMAGE", $outroot, $i); 238 my $outputMask = $ipprc->filename("PSPHOT.STACK.OUTPUT.MASK", $outroot, $i); 239 my $outputVariance = $ipprc->filename("PSPHOT.STACK.OUTPUT.VARIANCE", $outroot, $i); 240 my $outputSources = $ipprc->filename("PSPHOT.STACK.OUTPUT", $outroot, $i); 237 my $stack_id = @$files[$i]->{stack_id}; 238 my $outputName = $ipprc->filename("PSPHOT.STACK.OUTPUT.IMAGE", $outroot, $stack_id); 239 my $outputMask = $ipprc->filename("PSPHOT.STACK.OUTPUT.MASK", $outroot, $stack_id); 240 my $outputVariance = $ipprc->filename("PSPHOT.STACK.OUTPUT.VARIANCE", $outroot, $stack_id); 241 my $outputSources = $ipprc->filename("PSPHOT.STACK.OUTPUT", $outroot, $stack_id); 241 242 242 243 # XXX these are optional and not generated by default … … 256 257 257 258 # XXX check the recipe -- should we expect these to exist? 258 # &my_die("Couldn't find expected output file: $chisqName", $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($chisqName);259 # &my_die("Couldn't find expected output file: $chisqMask", $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($chisqMask);259 # &my_die("Couldn't find expected output file: $chisqName", $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($chisqName); 260 # &my_die("Couldn't find expected output file: $chisqMask", $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($chisqMask); 260 261 # &my_die("Couldn't find expected output file: $chisqVariance", $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($chisqVariance); 261 262 } … … 346 347 } 347 348 348 &my_die("Couldn't find expected output file: $configuration", $sky_id, $PS_EXIT_SYS_ERROR) 349 &my_die("Couldn't find expected output file: $configuration", $sky_id, $PS_EXIT_SYS_ERROR) 349 350 unless $ipprc->file_exists($configuration); 350 351 } else { … … 359 360 { 360 361 my $command = "$staticskytool -sky_id $sky_id"; 361 $command .= " -addresult -path_base $outroot";362 $command .= " -num_inputs $nInputs";363 # $command .= " $cmdflags";364 $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));365 $command .= " -hostname $host" if defined $host;362 $command .= " -addresult -path_base $outroot"; 363 $command .= " -num_inputs $nInputs"; 364 # $command .= " $cmdflags"; 365 $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400)); 366 $command .= " -hostname $host" if defined $host; 366 367 $command .= " -dbname $dbname" if defined $dbname; 367 368 … … 371 372 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 372 373 my $err_message = "Unable to perform staticskytool -addresult"; 373 warn($err_message);374 exit $error_code;374 warn($err_message); 375 exit $error_code; 375 376 } 376 377 } … … 389 390 if (defined $sky_id and not $no_update) { 390 391 my $command = "$staticskytool -sky_id $sky_id -fault $exit_code"; 391 $command .= " -addresult";392 $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));393 $command .= " -hostname $host" if defined $host;394 $command .= " -path_base $outroot" if defined $outroot;395 $command .= " -dbname $dbname" if defined $dbname;392 $command .= " -addresult"; 393 $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400)); 394 $command .= " -hostname $host" if defined $host; 395 $command .= " -path_base $outroot" if defined $outroot; 396 $command .= " -dbname $dbname" if defined $dbname; 396 397 run(command => $command, verbose => $verbose); 397 398 }
Note:
See TracChangeset
for help on using the changeset viewer.
