IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 9, 2013, 4:06:09 PM (13 years ago)
Author:
eugene
Message:

merge from trunk

Location:
branches/eam_branches/ipp-20130904/pstamp/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130904/pstamp/scripts

  • branches/eam_branches/ipp-20130904/pstamp/scripts/pstamp_job_run.pl

    r36059 r36192  
    236236                           $PSTAMP_SELECT_JPEG     => 'jpg',
    237237                           $PSTAMP_SELECT_EXP      => 'exp.fits',
    238                            $PSTAMP_SELECT_NUM      => 'num.fits');
     238                           $PSTAMP_SELECT_NUM      => 'num.fits',
     239                           $PSTAMP_SELECT_EXPJPEG  => 'exp.jpg',
     240                           $PSTAMP_SELECT_NUMJPEG  => 'num.jpg');
    239241
    240242        my $output_mask = $options & ($PSTAMP_SELECT_IMAGE | $PSTAMP_SELECT_MASK | $PSTAMP_SELECT_VARIANCE
    241             | $PSTAMP_SELECT_JPEG | $PSTAMP_SELECT_SOURCES | $PSTAMP_SELECT_EXP | $PSTAMP_SELECT_NUM);
     243            | $PSTAMP_SELECT_JPEG | $PSTAMP_SELECT_SOURCES
     244            | $PSTAMP_SELECT_EXP | $PSTAMP_SELECT_NUM
     245            | $PSTAMP_SELECT_EXPJPEG | $PSTAMP_SELECT_NUMJPEG);
     246
    242247
    243248        foreach my $key (keys (%extensions)) {
     
    261266        close $F;
    262267        $jobStatus = $PS_EXIT_SUCCESS;
    263     } elsif ($exitStatus == $PSTAMP_NO_OVERLAP) {
    264         $jobStatus = $PSTAMP_NO_OVERLAP;
     268    } elsif ($exitStatus == $PSTAMP_NO_OVERLAP || $exitStatus == $PSTAMP_NO_VALID_PIXELS) {
     269        $jobStatus = $exitStatus;
    265270    } else {
    266271        my_die( "ppstamp failed with error code: $exitStatus", $job_id, $exitStatus);
     
    382387        my $backmdl_file = $params->{backmdl} if ($options & $PSTAMP_SELECT_BACKMDL);
    383388        my $pattern_file = $params->{pattern} if ($options & $PSTAMP_SELECT_BACKMDL);
     389        my $filter = $params->{filter};
     390        $filter = ' ' if !$filter;
     391        $filter = substr $filter, 0, 1;
    384392        my $cmf_file;
    385393#        if ($stage ne 'chip') {
     
    394402            if (!$therest or !$rownum or !$jobnum);
    395403
    396         my $prefix = "${rownum}_${jobnum}_";
     404        # XXX: Here we are assuming the form of the output file names
     405        # if we change this in pstampparse we'll need to remember ....
     406        # (the last time I forgot)
     407        my $prefix = "${rownum}_${jobnum}_${filter}_";
    397408
    398409        if ($cmf_file) {
     
    573584    $params->{exp}    = $path_base . ".exp.b1.fits";
    574585    $params->{num}    = $path_base . ".num.b1.fits";
     586    $params->{expjpeg} = $path_base . ".exp.0.b1.jpeg";
     587    $params->{numjpeg} = $path_base . ".num.0.b1.jpeg";
    575588}
    576589
     
    632645        if (!myCopy("$outputBase.num.fits", $params->{num}, 'num', 0)) {
    633646            $options &= ~$PSTAMP_SELECT_NUM;
     647        }
     648    }
     649    if ($options & $PSTAMP_SELECT_EXPJPEG) {
     650        if (!myCopy("$outputBase.exp.jpg", $params->{expjpeg}, 'exp', 0)) {
     651            $options &= ~$PSTAMP_SELECT_EXPJPEG;
     652        }
     653    }
     654    if ($options & $PSTAMP_SELECT_NUMJPEG) {
     655        if (!myCopy("$outputBase.num.jpg", $params->{numjpeg}, 'num', 0)) {
     656            $options &= ~$PSTAMP_SELECT_NUMJPEG;
    634657        }
    635658    }
Note: See TracChangeset for help on using the changeset viewer.