IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33514


Ignore:
Timestamp:
Mar 13, 2012, 3:46:07 PM (14 years ago)
Author:
bills
Message:

Add option to return uncompressed stamps and interpret pixel coordinate center
of 0,0 to mean return the entire image instead of an ROI

Location:
tags/ipp-20120216
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20120216/PS-IPP-PStamp

  • tags/ipp-20120216/PS-IPP-PStamp/lib/PS/IPP/PStamp/RequestFile.pm

    r33383 r33514  
    2828                    $PSTAMP_SELECT_BACKMDL
    2929                    $PSTAMP_SELECT_JPEG
     30                    $PSTAMP_SELECT_UNCOMPRESSED
    3031                    $PSTAMP_SELECT_INVERSE
    3132                    $PSTAMP_SELECT_UNCONV
     
    6667our $PSTAMP_SELECT_BACKMDL   = 32;
    6768our $PSTAMP_SELECT_JPEG      = 64;
     69our $PSTAMP_SELECT_UNCOMPRESSED = 512;
    6870our $PSTAMP_SELECT_INVERSE   = 1024;
    6971our $PSTAMP_SELECT_UNCONV    = 2048;
  • tags/ipp-20120216/pstamp

  • tags/ipp-20120216/pstamp/scripts/pstamp_job_run.pl

    r33383 r33514  
    226226    my $command = "$ppstamp $outputBase $argString $fileArgs";
    227227    $command .= " -write_jpeg" if ($options & $PSTAMP_SELECT_JPEG);
     228    $command .= " -nocompress" if ($options & $PSTAMP_SELECT_UNCOMPRESSED);
     229    $command .= " -stage $stage";
     230    $command .= " -censor_masked" if $nan_masked;
    228231    $command .= " -dbname $dbname" if $dbname;
    229232    $command .= " -dbserver $dbserver" if $dbserver;
    230     $command .= " -stage $stage";
    231     $command .= " -no_censor_masked" unless $nan_masked;
    232233    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    233234        run(command => $command, verbose => $verbose);
  • tags/ipp-20120216/pstamp/scripts/pstampparse.pl

    r33456 r33514  
    333333    my $skycenter = $row->{skycenter} = ! ($row->{COORD_MASK} & $PSTAMP_CENTER_IN_PIXELS);
    334334
    335     if (!$skycenter and !$component) {
     335    if (!$skycenter and !$component and $stage ne 'stack' and !($option_mask & $PSTAMP_USE_IMFILE_ID)){
    336336        print STDERR "COMPONENT must be specified for pixel coordinate ROI center\n";
    337337        insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
     
    525525    my $h = $row->{HEIGHT};
    526526    my $coord_mask = $row->{COORD_MASK};
     527    my $wholeFile = 0;
    527528    if ($coord_mask & $PSTAMP_CENTER_IN_PIXELS) {
    528         $roi_string = "-pixcenter $x $y";
     529        # Center of 0, 0 in pixel coordinates is interpreted to mean
     530        # return the entire file
     531        if ($x == 0 && $y == 0) {
     532            $roi_string = "-wholefile";
     533            $wholeFile = 1;
     534        } else {
     535            $roi_string = "-pixcenter $x $y";
     536        }
    529537    } else {
    530538        $roi_string = "-skycenter $x $y";
    531539    }
    532     if ($coord_mask & $PSTAMP_RANGE_IN_PIXELS) {
    533         $roi_string .= " -pixrange $w $h";
    534     } else {
    535         $roi_string .= " -arcrange $w $h";
     540    if (!$wholeFile) {
     541        if ($coord_mask & $PSTAMP_RANGE_IN_PIXELS) {
     542            $roi_string .= " -pixrange $w $h";
     543        } else {
     544            $roi_string .= " -arcrange $w $h";
     545        }
    536546    }
    537547
     
    570580        $args .= " -class_id $component" if $component;
    571581    }
    572 
    573 if (0) {
    574     # add astrometry file for raw and chip images if one is available
    575     if (($stage eq "chip") || ($stage eq "raw")) {
    576         $args .= " -astrom $image->{astrom}" if $image->{astrom};
    577     }
    578 }
    579582
    580583    $image->{job_args} = $args;
  • tags/ipp-20120216/pstamp/src

    • Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset for help on using the changeset viewer.