IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

if user specifies center of 0,0 in pixel coordinates we do not
make a stamp but instead return the whole image.
Add option to return uncompressed stamp images

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstampparse.pl

    r33455 r33512  
    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;
Note: See TracChangeset for help on using the changeset viewer.