- Timestamp:
- May 3, 2010, 8:41:49 AM (16 years ago)
- Location:
- branches/tap_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/stack_skycell.pl (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/tap_branches
- Property svn:mergeinfo changed
-
branches/tap_branches/ippScripts/scripts/stack_skycell.pl
r25835 r27838 8 8 use Sys::Hostname; 9 9 my $host = hostname(); 10 my $date = `date`; 10 11 print "\n\n"; 11 print "Starting script $0 on $host \n\n";12 print "Starting script $0 on $host at $date\n\n"; 12 13 13 14 use DateTime; … … 107 108 } 108 109 109 &my_die("Stack list contains less than two elements", $stack_id, $PS_EXIT_ SYS_ERROR) unless110 &my_die("Stack list contains less than two elements", $stack_id, $PS_EXIT_DATA_ERROR) unless 110 111 scalar @$files >= 2; 111 112 … … 120 121 if ($file->{ignored}) { next; } 121 122 if (defined $tess_id) { 122 &my_die("Tesselation identifiers don't match", $stack_id, $PS_EXIT_ SYS_ERROR) unless123 &my_die("Tesselation identifiers don't match", $stack_id, $PS_EXIT_DATA_ERROR) unless 123 124 $file->{tess_id} eq $tess_id; 124 125 } else { … … 126 127 } 127 128 if (defined $skycell_id) { 128 &my_die("Skycell identifiers don't match", $stack_id, $PS_EXIT_ SYS_ERROR) unless129 &my_die("Skycell identifiers don't match", $stack_id, $PS_EXIT_DATA_ERROR) unless 129 130 $file->{skycell_id} eq $skycell_id; 130 131 } else { … … 132 133 } 133 134 if (defined $camera) { 134 &my_die("Cameras don't match", $stack_id, $PS_EXIT_ SYS_ERROR) unless $file->{camera} eq $camera;135 &my_die("Cameras don't match", $stack_id, $PS_EXIT_DATA_ERROR) unless $file->{camera} eq $camera; 135 136 } else { 136 137 $camera = $file->{camera}; … … 165 166 } 166 167 my $convolve = metadataLookupBool($recipe, 'CONVOLVE'); # Convolve inputs? 168 my $photometry = metadataLookupBool($recipe, 'PHOTOMETRY'); # perform photometry? 167 169 168 170 … … 205 207 my $outputMask = $ipprc->filename("PPSTACK.OUTPUT.MASK", $outroot); 206 208 my $outputWeight = $ipprc->filename("PPSTACK.OUTPUT.VARIANCE", $outroot); 207 my $outputSources = $ipprc->filename("PSPHOT.OUT.CMF.MEF", $outroot); ## this must be consistent with the value in diff_skycell.pl:101 209 my $outputSources = $photometry ? $ipprc->filename("PSPHOT.OUT.CMF.MEF", $outroot) : undef; ## this must be consistent with the value in diff_skycell.pl:101 210 208 211 ## use an explicit stack name for psphot output objects 209 212 #my $bin1Name = $ipprc->filename("PPSTACK.BIN1", $outroot); … … 236 239 $command .= " -F SOURCE.PLOT.PSFMODEL SOURCE.PLOT.SKY.PSFMODEL"; 237 240 $command .= " -F SOURCE.PLOT.APRESID SOURCE.PLOT.SKY.APRESID"; 238 $command .= " -photometry";239 241 $command .= " -threads $threads" if defined $threads; 240 242 $command .= " -debug-stack" if defined $debug; … … 260 262 if ($do_stats) { 261 263 my $outputStatsReal = $ipprc->file_resolve($outputStats); 262 &my_die("Couldn't find expected output file: $outputStats", $stack_id, $PS_EXIT_SYS_ERROR) unless -f $outputStatsReal;264 &my_die("Couldn't find expected output file: $outputStats", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStatsReal); 263 265 264 266 # measure stats … … 282 284 &my_die("Couldn't find expected output file: $outputMask", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask); 283 285 &my_die("Couldn't find expected output file: $outputWeight", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight); 284 &my_die("Couldn't find expected output file: $outputSources", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources); 286 if ($photometry) { 287 &my_die("Couldn't find expected output file: $outputSources", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources); 288 } 289 if ($run_state eq 'new') { 290 &my_die("Couldn't find expected output file: $configuration", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($configuration); 291 } 285 292 # &my_die("Couldn't find expected output file: $bin1Name", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name); 286 293 # &my_die("Couldn't find expected output file: $bin2Name", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name); … … 367 374 my $temp_delete = defined($recipe) and metadataLookupBool($recipe, 'TEMP.DELETE'); # Delete temp files? 368 375 if ($temp_delete) { 369 my $temp_dir = metadataLookupStr($ recipe, 'TEMP.DIR'); # Directory with temporary files376 my $temp_dir = metadataLookupStr($ipprc->{_siteConfig}, 'TEMP.DIR') or &my_die("Unable to find temporary directory in site configuration", $stack_id, $PS_EXIT_CONFIG_ERROR); # Directory with temporary files 370 377 my $temp_image = metadataLookupStr($recipe, 'TEMP.IMAGE'); # Suffix for image 371 378 my $temp_mask = metadataLookupStr($recipe, 'TEMP.MASK'); # Suffix for mask
Note:
See TracChangeset
for help on using the changeset viewer.
