IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 17, 2010, 9:10:35 AM (16 years ago)
Author:
eugene
Message:

generate a weight window based on the fwhms; pass around fwhm to ensure the window can be calculated; plug some leaks; better test outputs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100823/psModules/src/imcombine/pmSubtractionEquation.c

    r29170 r29449  
    1919
    2020//#define USE_WEIGHT                      // Include weight (1/variance) in equation?
    21 //#define USE_WINDOW                      // Include weight (1/variance) in equation?
     21
     22// XXX TEST:
     23# define USE_WINDOW                      // window to avoid neighbor contamination
    2224
    2325# define PENALTY false
     
    752754    stamps->normValue2 = stats->robustMedian;
    753755
    754     fprintf (stderr, "norm (1): %f (%f)\n", stamps->normValue, stamps->normValue2);
     756    psLogMsg ("psModules.imcombine", PS_LOG_INFO, "norm (1): %f (%f)\n", stamps->normValue, stamps->normValue2);
    755757
    756758    psFree(stats);
     
    797799    stamp->normSquare2 = normSquare2;
    798800
    799     fprintf (stderr, "normValue: %f %f %f  (%f %f)\n", normI1, normI2, stamp->norm, normSquare1, normSquare2);
     801    psLogMsg ("psModules.imcombine", PS_LOG_DETAIL, "normValue: %f %f %f  (%f %f)\n", normI1, normI2, stamp->norm, normSquare1, normSquare2);
    800802
    801803    return true;
     
    10891091        }
    10901092
     1093#if 1
     1094        psImage *save = psImageCopy(NULL, sumMatrix, PS_TYPE_F32);
     1095        psFitsWriteImageSimple ("sumMatrix.fits", save, NULL);
     1096        psVectorWriteFile("sumVector.dat", sumVector);
     1097        psFree (save);
     1098#endif
     1099
    10911100        psVector *solution = NULL;                       // Solution to equation!
    10921101        solution = psVectorAlloc(numParams, PS_TYPE_F64);
    10931102        psVectorInit(solution, 0);
    10941103
     1104        // XXX TEST: try some constraint on the svd solution
     1105        // solution = psMatrixSolveSVD(solution, sumMatrix, sumVector, NAN);
    10951106        solution = psMatrixSolveSVD(solution, sumMatrix, sumVector, NAN);
    10961107
     
    11491160        }
    11501161
    1151 #if 0
     1162#if 1
    11521163        psImage *save = psImageCopy(NULL, sumMatrix, PS_TYPE_F32);
    11531164        psFitsWriteImageSimple ("sumMatrix.fits", save, NULL);
     
    12641275    if (!isfinite(dTotal)) return false;
    12651276
    1266     fprintf (stderr, "sum: %f, peak: %f, sigma: %f, fsigma: %f, fmax: %f, fmin: %f\n", sum, peak, sigma, sigma/sum, dOuter/sum, dTotal/sum);
     1277    // fprintf (stderr, "sum: %f, peak: %f, sigma: %f, fsigma: %f, fmax: %f, fmin: %f\n", sum, peak, sigma, sigma/sum, dOuter/sum, dTotal/sum);
    12671278    psVectorAppend(fResSigma, sigma/sum);
    12681279    psVectorAppend(fResOuter, dOuter/sum);
Note: See TracChangeset for help on using the changeset viewer.