IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 14, 2009, 3:58:07 PM (17 years ago)
Author:
Paul Price
Message:

Fix streaksremove so that output CMF files have PHU called ext.hdr and table called ext.psf. Turned on -Wall -Werror and fixed a host of little problems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/magic/remove/src/warpedpixels.c

    r21438 r25082  
    2323
    2424    psRegion     *bounds = pmChipPixels(sf->chip);
    25    
     25
    2626    int width  = bounds->x1 - bounds->x0;
    2727    int height = bounds->y1 - bounds->y0;
     
    8383
    8484    /* now set up our wrapper to the chip astrometry to apply to the whole chip */
    85     sf->astrom = streakSetAstrometry(sf->astrom, sf->stage, sf->inAstrom->fpa, sf->chip, false, NULL, 
     85    sf->astrom = streakSetAstrometry(sf->astrom, sf->stage, sf->inAstrom->fpa, sf->chip, false, NULL,
    8686        sf->warpedPixels->numCols, sf->warpedPixels->numRows);
    8787
     
    106106        // convert corner of skycell to sky coordinates
    107107        if (!pmAstromWCStoSky(&sky, wcs, &pt[i])) {
    108             psError(PS_ERR_IO, false, "failed to convert pt %d of %s to sky coords: %s", fileName);
     108            psErrorStackPrint(stderr, "failed to convert pt %d of %s to sky coords", i, fileName);
    109109            streaksExit("", PS_EXIT_DATA_ERROR);
    110110        }
     
    112112        // convert to chip coordinates
    113113        if (!skyToCell(&p, sf->astrom, sky.r, sky.d)) {
    114             psError(PS_ERR_IO, false, "failed to convert pt %d of %s to sky coords: %s", fileName);
     114            psErrorStackPrint(stderr, "failed to convert pt %d of %s to sky coords", i, fileName);
    115115            streaksExit("", PS_EXIT_DATA_ERROR);
    116116        }
     
    171171}
    172172
    173 // x as a function of y for the line between two points 
     173// x as a function of y for the line between two points
    174174// Note: the caller guarentees that the y's of the two points are different
    175175static double xOfY(psPlane *pI, psPlane *pJ, int y)
     
    212212 * To compute the overlap of a quadrilateral with a set of
    213213 * points we transform the 4 corners to image coordinates
    214  * and name the 4 points of the quad 
     214 * and name the 4 points of the quad
    215215            pt 0 is left most (bottom most corner)
    216216            pt 1 is bottom most (right most corner)
     
    238238
    239239                3
    240                  C       
     240                 C
    241241         ---------------2           left boundary:  line 0_1 y < pt0.y
    242242                 B                                  line 0_3 y >= pt0.y
     
    249249              C
    250250        0----------------
    251               B     
     251              B
    252252      ----------------2
    253253              A
     
    258258
    259259        3       2
    260            
     260
    261261            B
    262262
     
    265265(region A and C are empty in the case where the points form a rectangle)
    266266*/
    267            
     267
    268268/*
    269269    Name the corners
    270     The following algorithm works for points that form a quadrilateral 
     270    The following algorithm works for points that form a quadrilateral
    271271    I think it also works for the situation where 3 points are co-linear
    272272    and we have a triangle, but that isn't important for our purposes
     
    313313        pt[i] = pt[i+1];
    314314    }
    315            
     315
    316316    // now find the right most (top most) of the remaining 2 points
    317317    if ((pt[0].x > pt[1].x) ||
Note: See TracChangeset for help on using the changeset viewer.