IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 27, 2018, 3:31:55 PM (8 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/czw_branch/20170908
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20170908

  • branches/czw_branch/20170908/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm

    r39209 r40483  
    16641664    my ($pointsList, $pointsListName) = tempfile ("/tmp/pointsList.XXXX", UNLINK => !$save_temps);
    16651665    my $npoints = 0;
     1666    ## MEH hack --
     1667    my $pi=3.14159265359;
     1668    my $tra=0.0;
     1669    my $tdec=0.0;
     1670    ##
    16661671    foreach my $row (@$rowList) {
    16671672        print $pointsList "$npoints $row->{CENTER_X} $row->{CENTER_Y}\n";
    1668         $npoints++;
     1673        #$npoints++;
     1674        ## MEH hack -- add width, height corners -- chip gap problem and need to add more points to try
     1675        ## -- need to adjust RA for DEC and check 0/360, 90 boundary (dont assume coord to image lookup will do it)
     1676        if ( ($row->{OPTION_MASK} & $PSTAMP_MULTI_OVERLAP_IMAGE) && !($row->{COORD_MASK} & $PSTAMP_RANGE_IN_PIXELS) ){
     1677            foreach my $f (-1.0, 1.0, -1.5, 1.5, -2.0, 2.0, -2.5, 2.5) {
     1678                ## +/-ra +/-dec corner
     1679                #printf $pointsList "$npoints %f %f\n", $row->{CENTER_X}+$row->{WIDTH}/2.0/3600.0, $row->{CENTER_Y}+$row->{HEIGHT}/2.0/3600.0;
     1680                $tra = $row->{CENTER_X}+$row->{WIDTH}/$f/2.0/3600.0/cos($row->{CENTER_Y}/180.0*$pi);
     1681                $tdec = $row->{CENTER_Y}+$row->{HEIGHT}/$f/2.0/3600.0;
     1682                $tra = ($tra>360.0) ? $tra-360.0 : $tra;
     1683                $tdec = ($tdec>90.0) ? 90.0-($tdec-90.0) : $tdec;
     1684                printf $pointsList "$npoints %f %f\n",$tra,$tdec;
     1685                ## +/-ra -/+dec corner
     1686                $tra = $row->{CENTER_X}+$row->{WIDTH}/$f/2.0/3600.0/cos($row->{CENTER_Y}/180.0*$pi);
     1687                $tdec = $row->{CENTER_Y}-$row->{HEIGHT}/$f/2.0/3600.0;
     1688                $tra = ($tra>360.0) ? $tra-360.0 : $tra;
     1689                $tdec = ($tdec>90.0) ? 90.0-($tdec-90.0) : $tdec;
     1690                printf $pointsList "$npoints %f %f\n",$tra,$tdec;
     1691                ## -/+ra side
     1692                $tra = $row->{CENTER_X}-$row->{WIDTH}/$f/2.0/3600.0/cos($row->{CENTER_Y}/180.0*$pi);
     1693                $tdec = $row->{CENTER_Y};
     1694                $tra = ($tra>360.0) ? $tra-360.0 : $tra;
     1695                $tdec = ($tdec>90.0) ? 90.0-($tdec-90.0) : $tdec;
     1696                printf $pointsList "$npoints %f %f\n",$tra,$tdec;
     1697                ## -/+dec side
     1698                $tra = $row->{CENTER_X};
     1699                $tdec = $row->{CENTER_Y}-$row->{HEIGHT}/$f/2.0/3600.0;
     1700                $tra = ($tra>360.0) ? $tra-360.0 : $tra;
     1701                $tdec = ($tdec>90.0) ? 90.0-($tdec-90.0) : $tdec;
     1702                printf $pointsList "$npoints %f %f\n",$tra,$tdec;
     1703            }
     1704        }
     1705        ####
     1706        $npoints++;
    16691707        # this gets overwitten if an overlapping image is found
    16701708        $row->{error_code} = $PSTAMP_NO_OVERLAP;
     
    17251763                    $ref = $components{$component} = [];
    17261764                }
    1727                 push @$ref, $ptnum;
     1765                #push @$ref, $ptnum;
     1766                ## MEH hack -- only push ptnum if not already, so check if ptnum in list
     1767                push(@$ref, $ptnum) unless grep{$_ == $ptnum} @$ref;
     1768                ##
    17281769                my $row = $rowList->[$ptnum];
    17291770                # this row found a match
Note: See TracChangeset for help on using the changeset viewer.