IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 5, 2013, 2:24:05 PM (13 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20130207
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130207

  • branches/eam_branches/ipp-20130207/ippScripts/scripts/background_warp.pl

    r35118 r35236  
    119119my $tempOutRoot = "/tmp/background.warp.$warp_bg_id.$skycell_id";
    120120
    121 # XXX: get this from recipe
    122 my $alternate_astrometry_label = 'M31.test.20130206.bgsub';
    123 # XXX: get exp_id from command line
    124 my $exp_id = 196758;
    125 
    126121if (!defined $imageName) {
    127122    # go find our inputs
    128     my $astrom_path_base;
    129     if (defined $alternate_astrometry_label) {
    130         my $command = "$camtool -processedexp -exp_id $exp_id -label $alternate_astrometry_label";
    131         $command .= " -dbname $dbname" if $dbname;
    132         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    133             run(command => $command, verbose => $verbose);
    134         unless ($success) {
    135             $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    136             &my_die("Unable to perform camtool -processedexp: $error_code", $warp_bg_id, $error_code);
    137         }
    138         my $entries = $mdcParser->parse_list(join "", @$stdout_buf) or
    139             &my_die("Unable to parse metadata config doc", $warp_bg_id, $PS_EXIT_PROG_ERROR);
    140         my $entry = $entries->[0];
    141         $astrom_path_base = $entry->{path_base};
    142     }
    143 
    144123    my ($imageFile, $maskFile, $weightFile);
    145124    ($imageFile, $imageName) = tempfile( "$tempOutRoot.image.list.XXXX",  UNLINK => !$save_temps);
     
    174153        $magicked = $file->{magicked};
    175154
    176         if (!$astrom_path_base) {
    177             my $cam_path = $file->{cam_path_base};
    178             my $astrom = $ipprc->filename($astromSource, $cam_path);
    179             &my_die("Astrometry files don't match: $astrom vs $astrometry", $warp_bg_id, $skycell_id, $PS_EXIT_PROG_ERROR) if defined $astrometry and $astrom ne $astrometry;
    180             $astrometry = $astrom;
    181         } elsif (!$astrometry) {
    182             # using alternate astrometry
    183             $astrometry = $ipprc->filename($astromSource, $astrom_path_base);
    184         }
     155        my $cam_path = $file->{cam_path_base};
     156        my $astrom = $ipprc->filename($astromSource, $cam_path);
     157        &my_die("Astrometry files don't match: $astrom vs $astrometry", $warp_bg_id, $skycell_id, $PS_EXIT_PROG_ERROR) if defined $astrometry and $astrom ne $astrometry;
     158        $astrometry = $astrom;
    185159    }
    186160    close $imageFile;
     
    238212    &my_die("Couldn't find expected output file: $out_stats", $warp_bg_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($out_stats);
    239213
    240     my $command = "$ppStatsFromMetadata $out_stats - BACKGROUND_WARP";
     214    my $real_stats = $ipprc->file_resolve($out_stats);
     215
     216    my $command = "$ppStatsFromMetadata $real_stats - BACKGROUND_WARP";
    241217    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    242218        run(command => $command, verbose => $verbose);
Note: See TracChangeset for help on using the changeset viewer.