IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 19, 2007, 3:58:02 PM (19 years ago)
Author:
eugene
Message:

updates to fix mosaic astrometry

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpTransformReadout_Opt.c

    r10958 r12505  
    55
    66    int minX, minY, maxX, maxY;
    7     int gridX, gridY, nextGridX, nextGridY;
     7    int gridXo, gridX, gridY, nextGridX, nextGridY;
    88    pswarpMap *map = NULL;
    99
     
    1919
    2020    // we might want to do the rectangular regions outside of the selection independently
    21     psImageInit (output->image, NAN);
     21    // psImageInit (output->image, NAN);
    2222
    2323    // find the output pixel range
     
    3131
    3232    pswarpMapGridSetGrid (grid, minX, minY, &gridX, &gridY);
    33     pswarpMapGridNextGrid (grid, gridX, gridY, &nextGridX, &nextGridY);
     33    pswarpMapGridNextGrid_Y (grid, gridY, &nextGridY);
    3434    map = grid->maps[gridX][gridY];
    3535
     
    3838        if (y >= nextGridY) {
    3939            gridY ++;
    40             pswarpMapGridNextGrid (grid, gridX, gridY, &nextGridX, &nextGridY);
     40            pswarpMapGridNextGrid_Y (grid, gridY, &nextGridY);
    4141            map = grid->maps[gridX][gridY];
    4242        }
     43
     44        gridXo = gridX;
    4345        for (int x = minX; x < maxX; x++) {
    4446            if (x >= nextGridX) {
    4547                gridX ++;
    46                 pswarpMapGridNextGrid (grid, gridX, gridY, &nextGridX, &nextGridY);
     48                pswarpMapGridNextGrid_X (grid, gridX, &nextGridX);
    4749                map = grid->maps[gridX][gridY];
    4850            }
     
    6062            outData[y][x] = (psF32)psImagePixelInterpolate(inImage, inPix->x, inPix->y, NULL, 1, NAN, PS_INTERPOLATE_BILINEAR);
    6163        }
     64        gridX = gridXo;
     65        pswarpMapGridNextGrid_X (grid, gridX, &nextGridX);
     66        map = grid->maps[gridX][gridY];
    6267    }
    6368
Note: See TracChangeset for help on using the changeset viewer.