- Timestamp:
- Dec 2, 2021, 3:49:09 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20211108/ippScripts/scripts/stack_skycell.pl
r41938 r41950 209 209 my $output_nocomp = metadataLookupBool($recipe, 'OUTPUT.NOCOMP'); # change filerules to produced uncompressed output images 210 210 my $output_logflux = metadataLookupBool($recipe, 'OUTPUT.LOGFLUX'); # change filerules to produce logflux compressed output images. 211 my $output_deepexp = metadataLookupBool($recipe, 'OUTPUT.DEEPEXP'); # change filerules to produce exptime map with more depth 211 212 my $replicate_outputs = (defined($neb) and metadataLookupBool($recipe, 'OUTPUT.REPLICATE')); # replicate output images 212 213 my $skip_missing_inputs = metadataLookupBool($recipe, 'SKIP.MISSING.INPUTS'); # ignore missing inputs 213 214 if ($output_nocomp and $output_logflux) { 214 215 &my_die("Unable to not compress and logflux compress simultaneously. Check config.",$stack_id, $PS_EXIT_CONFIG_ERROR); 216 } 217 if ($output_nocomp and $output_deepexp) { 218 &my_die("Unable to not compress and use deepexp simultaneously. Check config.",$stack_id, $PS_EXIT_CONFIG_ERROR); 215 219 } 216 220 my $stack_type = metadataLookupStr($recipe, 'STACK.TYPE'); … … 225 229 if ($file->{ignored}) { next; } 226 230 227 print $listFile "INPUT$num\tMETADATA\n"; 228 $num++; 229 230 # select the input files 231 # check for the input files 231 232 my $image = $ipprc->filename("PSWARP.OUTPUT", $file->{path_base} ); # Image name 232 233 my $mask = $ipprc->filename( "PSWARP.OUTPUT.MASK", $file->{path_base} ); # Mask name … … 240 241 my $have_weight = $ipprc->file_exists( $weight ); 241 242 my $have_sources = $ipprc->file_exists( $sources ); 242 my $have_psf = $convolve and $ipprc->file_exists( $psf ); 243 my $have_psf; 244 if ($convolve) { $have_psf = $ipprc->file_exists( $psf ); } 243 245 244 246 if ($skip_missing_inputs) { 245 my $missing_inputs = false;246 unless ($have_image) { print "WARNING: MISSING INPUT $i nput \n"; $missing_inputs = true; }247 unless ($have_mask) { print "WARNING: MISSING INPUT $mask \n"; $missing_inputs = true; }248 unless ($have_weight) { print "WARNING: MISSING INPUT $weight \n"; $missing_inputs = true; }249 unless ($have_sources){ print "WARNING: MISSING INPUT $sources\n"; $missing_inputs = true; }250 if ($convolve) { unless ($have_psf) { print "WARNING: MISSING INPUT $psf\n"; $missing_inputs = true;}}251 if ($missing_input ) { next; }247 my $missing_inputs = 0; 248 unless ($have_image) { print "WARNING: MISSING INPUT $image \n"; $missing_inputs = 1; } 249 unless ($have_mask) { print "WARNING: MISSING INPUT $mask \n"; $missing_inputs = 1; } 250 unless ($have_weight) { print "WARNING: MISSING INPUT $weight \n"; $missing_inputs = 1; } 251 unless ($have_sources){ print "WARNING: MISSING INPUT $sources\n"; $missing_inputs = 1; } 252 if ($convolve) { unless ($have_psf) { print "WARNING: MISSING INPUT $psf\n"; $missing_inputs = 1;}} 253 if ($missing_inputs) { next; } 252 254 } else { 253 255 &my_die("Image $image does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $have_image; … … 258 260 } 259 261 262 print $listFile "INPUT$num\tMETADATA\n"; 263 260 264 print $listFile "\tIMAGE\tSTR\t" . $image . "\n"; 261 265 print $listFile "\tMASK\tSTR\t" . $mask . "\n"; … … 266 270 267 271 print $listFile "END\n\n"; 272 $num++; 268 273 } 269 274 close($listFile); … … 327 332 } 328 333 if ($output_logflux) { 329 $command .= " -R PPSTACK.OUTPUT FITS.TYPE COMP_STACK "; # Just this one output component? 330 $command .= " -R PPSTACK.OUTPUT.VARIANCE FITS.TYPE COMP_STACK "; 331 # $command .= " -R PPSTACK.OUTPUT.EXPWT FITS.TYPE COMP_STACK "; 332 $command .= " -R PPSTACK.UNCONV FITS.TYPE COMP_STACK "; 333 $command .= " -R PPSTACK.UNCONV.VARIANCE FITS.TYPE COMP_STACK "; 334 # $command .= " -R PPSTACK.UNCONV.EXPWT FITS.TYPE COMP_STACK "; 334 $command .= " -R PPSTACK.OUTPUT FITS.TYPE STK_UNIONS "; # Just this one output component? 335 $command .= " -R PPSTACK.OUTPUT.VARIANCE FITS.TYPE STK_UNIONS "; 336 $command .= " -R PPSTACK.UNCONV FITS.TYPE STK_UNIONS"; 337 $command .= " -R PPSTACK.UNCONV.VARIANCE FITS.TYPE STK_UNIONS "; 338 } 339 # if the total exposure time is long (> 6500 sec), need to use 340 # a different compression options. 341 if ($output_deepexp) { 342 $command .= " -R PPSTACK.OUTPUT.EXP FITS.TYPE EXP_UNIONS "; 343 $command .= " -R PPSTACK.UNCONV.EXP FITS.TYPE EXP_UNIONS "; 335 344 } 336 345 $command .= " -threads $threads" if defined $threads;
Note:
See TracChangeset
for help on using the changeset viewer.
