IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 5, 2009, 2:17:58 PM (17 years ago)
Author:
bills
Message:

first implementation of REQ_TYPE bycoord
other bug fixes

File:
1 edited

Legend:

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

    r25739 r25776  
    195195    my $mjd_max = $row->{MJD_MAX};
    196196    my $label   = $row->{LABEL};
     197    my $x       = $row->{CENTER_X};
     198    my $y       = $row->{CENTER_Y};
    197199
    198200    my $option_mask= $row->{OPTION_MASK};
     
    205207   
    206208    if (!$skycenter and !$search_component) {
    207         print STDERR "COMPONENT must be specified for pixel coordinate ROI\n" if $verbose;
     209        print STDERR "COMPONENT must be specified for pixel coordinate ROI center\n" if $verbose;
    208210        insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
    209211        $num_jobs++;
     
    213215    $search_component = "" if $search_component eq "all";
    214216
    215     if (($job_type eq "stamp") and ! validROI($row)) {
     217    if ((($job_type eq "stamp") or ($req_type eq "bycoord")) and ! validROI($row)) {
    216218        print STDERR "invalid ROI for row $rownum\n" if $verbose;
    217219        insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
     
    262264            next;
    263265        }
    264         print STDERR "lookup bycoord is not yet implemented" if $verbose;
    265         insertFakeJobForRow($row, 1, $PSTAMP_NOT_IMPLEMENTED);
    266         $num_jobs++;
    267         next;
    268     } else {
    269         # Call PS::IPP::PStamp::Job locate_images subroutine to get the images for this
    270         # request specification. An array reference is returned.
    271         my ($x, $y);
    272 
    273         $imageList = locate_images($ipprc, $image_db, $req_type, $stage, $id, $tess_id, $search_component,
     266        if ($stage eq "stack") {
     267            print STDERR "lookup bycoord is not yet implemented for stage stack" if $verbose;
     268            insertFakeJobForRow($row, 1, $PSTAMP_NOT_IMPLEMENTED);
     269            $num_jobs++;
     270            next;
     271        }
     272    }
     273    # Call PS::IPP::PStamp::Job locate_images subroutine to get the images for this
     274    # request specification. An array reference is returned.
     275    $imageList = locate_images($ipprc, $image_db, $req_type, $stage, $id, $tess_id, $search_component,
    274276                $inverse, $need_magic, $x, $y, $mjd_min, $mjd_max, $filter, $label, $verbose);
    275277
    276         if (!$imageList or !@$imageList) {
    277             print STDERR "no matching images found for row $rownum\n" if $verbose;
    278             # note in this case queueJobs inserts the fake job for these rows
    279         }
    280         $row->{need_magic} = $need_magic;
    281         push @rowList, $row;
    282     }
     278    if (!$imageList or !@$imageList) {
     279        print STDERR "no matching images found for row $rownum\n" if $verbose;
     280        # note in this case queueJobs inserts the fake job for these rows
     281    }
     282    $row->{need_magic} = $need_magic;
     283    push @rowList, $row;
    283284}
    284285
Note: See TracChangeset for help on using the changeset viewer.