IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 20, 2012, 4:25:06 PM (14 years ago)
Author:
watersc1
Message:

Fixed ordering bug. Still have a "first input needs to be lower left" issue I need to fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20120906/ppSkycell/src/ppSkycellLoop.c

    r34454 r34456  
    133133    psArray *imageRegions = psArrayAlloc(data->numInputs); // Region for image
    134134    psArray *regionHDUs = psArrayAlloc(data->numInputs);
     135    // Determine which projection cells we have to deal with.
    135136    for (int i = 0; i < data->numInputs; i++) {
    136137        pmFPAfile *file = pmFPAfileSelectSingle(data->config->files, "PPSKYCELL.IMAGE", i); // File to examine
     
    184185
    185186    pmFPAfileActivate(data->config->files, false, NULL);
    186 
     187    // Loop over projections
    187188    for (int i = 0; i < numProj; i++) {
    188189        psRegion *projRegion = projRegions->data[i]; // Region for skycell projection
     
    211212        int modify_wcs1 = 1;
    212213        int modify_wcs2 = 1;
     214        // Loop over inputs to this projection.
    213215        for (int j = 0; j < data->numInputs; j++) {
    214216            if (target->data.S32[j] != i) {
     
    249251            // Offsets for image on skycell
    250252            int xOffset1 = (-imageRegion->x0 + projRegion->x0) / (float)data->bin1;
    251             int yOffset1 = (imageRegion->y0 - projRegion->y0) / (float)data->bin1;
     253            int yOffset1 = (-imageRegion->y1 + projRegion->y1) / (float)data->bin1;
    252254            int xOffset2 = xOffset1 / (float)data->bin2, yOffset2 = yOffset1 / (float)data->bin2;
    253 
     255            fprintf(stderr,"OFF: %d %d %d %g %g %g %g %g %g %g %g\n",j,xOffset1,yOffset1,
     256                    imageRegion->x0,imageRegion->y0,
     257                    imageRegion->x1,imageRegion->y1,
     258                    projRegion->x0,projRegion->y0,
     259                    projRegion->x1,projRegion->y1);
    254260            // XXX Completely neglecting rotations
    255261            // The skycells are divided up neatly with them all having the same orientation
Note: See TracChangeset for help on using the changeset viewer.