IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 30, 2013, 4:52:14 PM (13 years ago)
Author:
eugene
Message:

updates from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130711/ippScripts/scripts/background_chip.pl

    r35681 r36072  
    3434my $ppConfigDump = can_run('ppConfigDump') or (warn "Can't find ppConfigDump" and $missing_tools = 1);
    3535my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1);
     36my $ppImage = can_run('ppImage') or (warn "Can't find ppImage" and $missing_tools = 1);
    3637if ($missing_tools) {
    3738    warn("Can't find required tools.");
     
    134135}
    135136my $in_wt = $ipprc->filename("PPIMAGE.CHIP.VARIANCE", $in_path, $class_id);
    136 my $in_bg = $ipprc->filename("PSPHOT.BACKMDL", $in_path, $class_id);
     137my $in_bg;
     138if (1) {
     139    $in_bg = $ipprc->filename("PPIMAGE.BACKMDL", $cam_path_base, $class_id);
     140}
     141else {
     142    $in_bg = $ipprc->filename("PSPHOT.BACKMDL", $in_path, $class_id);
     143}
    137144my $in_pattern = $ipprc->filename("PPIMAGE.PATTERN", $in_path, $class_id);
    138145my $in_config = $ipprc->filename("PPIMAGE.CONFIG", $in_path, $class_id);
     
    220227}
    221228
     229my $do_binned_images = 1;   # Generate the binned images that are useful for making JPEGs
     230if ($do_binned_images) {
     231    my $command = "$ppImage -file $out_image -mask $out_mask $outroot -recipe PPIMAGE PPIMAGE_PA -Db PHOTOM F";
     232    my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     233        run(command => $command, verbose => $verbose);
     234    unless ($success) {
     235        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     236        &my_die("Unable to perform ppImage: $error_code", $chip_bg_id, $class_id, $error_code);
     237    }
     238}
     239
     240
    222241if (!$quality and !$no_op) {
    223242    &my_die("Couldn't find expected output file: $out_image", $chip_bg_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($out_image);
Note: See TracChangeset for help on using the changeset viewer.