IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27122


Ignore:
Timestamp:
Mar 1, 2010, 1:37:06 PM (16 years ago)
Author:
bills
Message:

remove incorrect range checking of roi handle invalid job_type

File:
1 edited

Legend:

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

    r27118 r27122  
    318318    my $roi_string;
    319319
    320     # note values were insured to be numbers in validROI()
     320    # note values were checked by the function validROI()
    321321    my $x = $row->{CENTER_X};
    322322    my $y = $row->{CENTER_Y};
     
    324324    my $h = $row->{HEIGHT};
    325325    my $coord_mask = $row->{COORD_MASK};
    326     if ($x && ($x ne "null") && $y && ($y ne "null") && $w && ($w ne "null") && $h && ($h ne "null")) {
    327         if ($coord_mask & $PSTAMP_CENTER_IN_PIXELS) {
    328             $roi_string = "-pixcenter $x $y";
    329         } else {
    330             $roi_string = "-skycenter $x $y";
    331         }
    332         if ($coord_mask & $PSTAMP_RANGE_IN_PIXELS) {
    333             $roi_string .= " -pixrange $w $h";
    334         } else {
    335             $roi_string .= " -arcrange $w $h";
    336         }
     326    if ($coord_mask & $PSTAMP_CENTER_IN_PIXELS) {
     327        $roi_string = "-pixcenter $x $y";
     328    } else {
     329        $roi_string = "-skycenter $x $y";
     330    }
     331    if ($coord_mask & $PSTAMP_RANGE_IN_PIXELS) {
     332        $roi_string .= " -pixrange $w $h";
     333    } else {
     334        $roi_string .= " -arcrange $w $h";
    337335    }
    338336
     
    725723        $job_type = $row->{JOB_TYPE};
    726724        $rownum = $row->{ROWNUM};
     725        $rownum = 0 if !defined $rownum;
     726        if ($job_type) {
     727            if (($job_type ne "stamp") and ($job_type ne "get_image")) {
     728                print STDERR "invalid job type: $job_type found in row $rownum\n";
     729                $job_type = "none";
     730            }
     731        } else {
     732            print STDERR "undefined job type found in row $rownum\n";
     733            $job_type = "none";
     734        }
    727735    } else {
    728736        $job_type = "none";
Note: See TracChangeset for help on using the changeset viewer.