Changeset 35096 for branches/eam_branches/ipp-20121219/ippScripts
- Timestamp:
- Feb 6, 2013, 2:34:49 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20121219
- Files:
-
- 6 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/camera_exp.pl (modified) (8 diffs)
-
ippScripts/scripts/destreak_restore_camera.pl (modified) (1 prop)
-
ippScripts/scripts/ipp_apply_burntool_single.pl (modified) (1 prop)
-
ippScripts/scripts/ipp_cleanup.pl (modified) (2 diffs)
-
ippScripts/scripts/magic_destreak.pl (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20121219
-
branches/eam_branches/ipp-20121219/ippScripts/scripts/camera_exp.pl
r33576 r35096 41 41 42 42 my ( $exp_tag, $cam_id, $camera, $outroot, $dbname, $reduction, $dvodb, $verbose, $no_update, 43 $no_op, $redirect, $save_temps, $run_state, $skip_binned, $skip_masks );43 $no_op, $redirect, $save_temps, $run_state, $skip_binned, $skip_masks, $bkg_only); 44 44 GetOptions( 45 45 'exp_tag=s' => \$exp_tag, # Exposure identifier … … 53 53 'skip-binned' => \$skip_binned, # override recipe - don't create binned images 54 54 'skip-refmask' => \$skip_masks, # override recipe - don't create refmask 55 'bkg-only' => \$bkg_only, # override recipe - only do background continuity 55 56 'verbose' => \$verbose, # Print to stdout 56 57 'no-update' => \$no_update, # Update the database? … … 111 112 &my_die("Unrecognised PSASTRO recipe", $cam_id, $PS_EXIT_CONFIG_ERROR) unless defined $recipe_psastro; 112 113 114 my $bkg_recipe = 'PPIMAGE_BKGCONT'; # Add to reduction? 113 115 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files 114 116 … … 215 217 my ($list4File, $list4Name) = tempfile( "/tmp/$exp_tag.cm.$cam_id.b4.list.XXXX", UNLINK => !$save_temps ); # For astrometry 216 218 219 ### Create temp file for background models 220 my ($list5File, $list5Name) = tempfile( "/tmp/$exp_tag.cm.$cam_id.b5.list.XXXX", UNLINK => !$save_temps ); # For background models 221 217 222 # XXX we perform astrometry iff photometry output exists 218 223 my @outMasks; # Names of output masks 224 my @bkg_models; # Names of output background models 219 225 foreach my $file (@$files) { 220 226 next if $file->{quality} != 0; … … 226 232 my $chipObjects = $ipprc->filename("PSPHOT.OUTPUT", $file->{path_base}, $class_id); 227 233 my $chipMask = $ipprc->filename("PPIMAGE.CHIP.MASK", $file->{path_base}, $class_id); 228 234 229 235 print $list1File ($ipprc->filename("PPIMAGE.BIN1", $file->{path_base}, $class_id) . "\n"); 230 236 print $list2File ($ipprc->filename("PPIMAGE.BIN2", $file->{path_base}, $class_id) . "\n"); 231 237 print $list3File ($chipObjects . "\n"); 232 238 print $list4File ($chipMask . "\n"); 239 print $list5File ($ipprc->filename("PSPHOT.BACKMDL", $file->{path_base}, $class_id) . "\n"); 233 240 234 241 push @outMasks, prepare_output("PSASTRO.OUTPUT.MASK", $outroot, $class_id, 1) if $produceMasks; 242 push @bkg_models, prepare_output("PPIMAGE.BACKMDL", $outroot, $class_id, 1); 235 243 } 236 244 close $list1File; … … 238 246 close $list3File; 239 247 close $list4File; 240 248 close $list5File; 241 249 # Output products 242 250 $ipprc->outroot_prepare($outroot); … … 291 299 } 292 300 293 {301 if (!$bkg_only) { 294 302 # run psastro on the chipObjects, producing fpaObjects 295 303 my $command; … … 353 361 } 354 362 } 363 } 364 # Construct FPA continuity corrected background images 365 { 366 my $command; 367 $command = "$ppImage"; 368 $command .= " -list $list5Name $outroot"; 369 $command .= " -recipe PPIMAGE $bkg_recipe"; 370 $command .= " -dbname $dbname" if defined $dbname; 371 372 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 373 run(command => $command, verbose => $verbose); 374 unless ($success) { 375 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 376 &my_die("Unable to perform ppImage to fix background: $error_code", $cam_id, $error_code); 377 } 378 foreach my $bkgModel (@bkg_models) { 379 check_output($bkgModel, $replicateOutputs); 380 } 355 381 } 356 382 } -
branches/eam_branches/ipp-20121219/ippScripts/scripts/destreak_restore_camera.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20121219/ippScripts/scripts/ipp_apply_burntool_single.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20121219/ippScripts/scripts/ipp_cleanup.pl
r34903 r35096 65 65 &my_die("Unable to redirect ouput", $stage, $stage_id, $PS_EXIT_UNKNOWN_ERROR) if $logfile; 66 66 67 68 my $hostname = `hostname`; 69 chomp $hostname; 70 print STDERR "starting cleanup for $stage $stage_id on $hostname\n" ; 71 72 my $nebulous_server; 67 73 68 74 my $bzip2 = can_run('bzip2') or die 'cannot find bzip2\n'; … … 2280 2286 if (my $resolved = $ipprc->file_resolve($filename)) { 2281 2287 my $bzip2_filename = $filename . '.bz2'; 2282 if ($ipprc->file_exists($bzip2_filename)) { 2283 $ipprc->kill_file($bzip2_filename); 2284 } 2288 if (file_scheme($bzip2_filename) eq 'neb') { 2289 # XXX: GRRRR $ipprc->file_exists() returns false if storage object exists but instance has 2290 # size of zero 2291 $nebulous_server = $ipprc->nebulous() if !$nebulous_server; 2292 if ($nebulous_server->storage_object_exists($bzip2_filename)) { 2293 print STDERR "$bzip2_filename exists, killing\n"; 2294 $ipprc->kill_file($bzip2_filename); 2295 } else { 2296 print STDERR "$bzip2_filename does not exist\n" if $very_verbose; 2297 } 2298 } else { 2299 if ($ipprc->file_exists($bzip2_filename)) { 2300 print STDERR "$bzip2_filename exists, killing\n"; 2301 $ipprc->kill_file($bzip2_filename); 2302 } else { 2303 print STDERR "$bzip2_filename does not exist\n" if $very_verbose; 2304 } 2305 } 2285 2306 my $bzip2_file = $ipprc->file_create($bzip2_filename); 2286 my_die("Unable to create $bzip2_filename", $stage_id, $ PS_EXIT_SYS_ERROR) unless $bzip2_file;2307 my_die("Unable to create $bzip2_filename", $stage_id, $stage_id, $PS_EXIT_SYS_ERROR) unless $bzip2_file; 2287 2308 2288 2309 my $command = "$bzip2 < $resolved > $bzip2_file"; -
branches/eam_branches/ipp-20121219/ippScripts/scripts/magic_destreak.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
Note:
See TracChangeset
for help on using the changeset viewer.
