IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3387


Ignore:
Timestamp:
Mar 7, 2005, 6:03:09 PM (21 years ago)
Author:
Paul Price
Message:

Fixed half-pixel problem. Reassessed default parameters.

Location:
trunk/stac/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/stac/src/Makefile

    r3375 r3387  
    1212
    1313FITTRANS = fitTrans.o fitTransConfig.o fitTransRead.o stacCheckMemory.o fitTransSolve.o
     14
     15TEST_SHIFT = testShift.o stacConfig.o stacRead.o stacErrorImages.o stacTransform.o stacCheckMemory.o \
     16        stacInvertMaps.o
    1417
    1518.PHONY: tags clean empty test profile optimise
     
    3639                $(CC) $(CFLAGS) -o $@ $(FITTRANS) $(LDFLAGS) $(OPTFLAGS)
    3740
     41testShift:      $(TEST_SHIFT)
     42                $(CC) $(CFLAGS) -o $@ $(TEST_SHIFT) $(LDFLAGS) $(OPTFLAGS)
     43
    3844clean:
    3945                -$(RM) *.o gmon.* profile.txt
     
    5157                -$(RM) test_[0-3].fits.shiftrej
    5258                -$(RM) test_[0-3].fits.shifterr.*
     59                -$(RM) test_[0-3].fits.grad
     60                -$(RM) test_[0-3].fits.region
     61                -$(RM) test_[0-3].fits.rejmap
    5362                -$(RM) leaks.dat
    54                 ./stac -v -k 2.5 -f 0.5 -G 0.96 testout.fits test_0.fits test_1.fits test_2.fits test_3.fits
     63#               ./stac -v -k 2.5 -f 0.5 -G 0.96 testout.fits test_0.fits test_1.fits test_2.fits test_3.fits
     64                ./stac -v testout.fits test_0.fits test_1.fits test_2.fits test_3.fits
    5565
    5666# Run profiling.
  • trunk/stac/src/stacConfig.c

    r2783 r3387  
    4141    config->outnx = 512;
    4242    config->outny = 512;
    43     config->saturated = 65536.0;
     43    config->saturated = 65535.0;
    4444    config->bad = 0.0;
    45     config->reject = 3.5;
     45    config->reject = 3.0;
    4646    config->frac = 0.5;
    47     config->grad = 0.4;
     47    config->grad = 0.6;
    4848    config->nReject = 2;
    4949
  • trunk/stac/src/stacRejection.c

    r3375 r3387  
    110110                if (region->data.U8[y][x]) {
    111111
    112                     inCoords->x = (double)x;
    113                     inCoords->y = (double)y;
     112                    inCoords->x = (double)x + 0.5;
     113                    inCoords->y = (double)y + 0.5;
    114114                    (void)psPlaneTransformApply(outCoords, map, inCoords);
    115115                    float maskVal = (float)psImagePixelInterpolate(reject, outCoords->x, outCoords->y,
  • trunk/stac/src/stacTransform.c

    r3375 r3387  
    190190        for (int y = 0; y < ny; y++) {
    191191            for (int x = 0; x < nx; x++) {
    192 
    193192                // Only transform those pixels requested
    194193                if (!region || (region && region->data.U8[y][x])) {
     
    199198                   
    200199                    // Change PS_INTERPOLATE_BILINEAR to best available technique.
    201                     outImage->data.F32[y][x] = (psF32)psImagePixelInterpolate(image, detector->x + 0.5,
    202                                                                               detector->y + 0.5, mask, 1, 0.0,
     200                    outImage->data.F32[y][x] = (psF32)psImagePixelInterpolate(image, detector->x,
     201                                                                              detector->y, mask, 1, 0.0,
    203202                                                                              PS_INTERPOLATE_BILINEAR);
    204203                    // Error is actually the variance
    205204                    outError->data.F32[y][x] = (psF32)p_psImageErrorInterpolateBILINEAR_F32(error,
    206                                                                                             detector->x + 0.5,
    207                                                                                             detector->y + 0.5,
     205                                                                                            detector->x,
     206                                                                                            detector->y,
    208207                                                                                            mask, 1, 0.0);
    209208                } // Pixels of interest
Note: See TracChangeset for help on using the changeset viewer.