IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 18, 2011, 2:09:39 PM (15 years ago)
Author:
eugene
Message:

we had 3 items conceptually equivalent to the brightness of a peak: "value", "flux", and "SN"; Ive modified pmPeak to carry explicitly named elements "rawFlux", "smoothFlux", and "detValue". Ive also added the corresponding variance values for rawFlux and smoothFlux. This lets us choose independently of the peak detection process whether flux comparisons are done relative to the smoothed or unsmoothed image. It also simplifies tests of the peak flux compared to something else

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110213/psModules/test/objects/tap_pmSource.c

    r24580 r30974  
    2121        pmSourceCacheModel()
    2222        pmSourceCachePSF()
    23         pmSourceSortBySN()      (COMPILER ERRORS)
     23        pmSourceSortByFlux()    (COMPILER ERRORS)
    2424        pmSourceSortByY()       (COMPILER ERRORS)
    2525    Must test
     
    801801
    802802    // ----------------------------------------
    803     // pmSourceSortBySN() tests
    804     // int pmSourceSortBySN (const void **a, const void **b)
    805     // Call pmSourceSortBySN() with acceptable input parameters.
     803    // pmSourceSortByFlux() tests
     804    // int pmSourceSortByFlux (const void **a, const void **b)
     805    // Call pmSourceSortByFlux() with acceptable input parameters.
    806806    // XXX: We don't test with NULL input parameters since this function has no PS_ASSERTS to protect
    807807    // against that.
     
    816816        src2->peak->SN = 20.0;
    817817
    818         int rc = pmSourceSortBySN((const void **) &src1, (const void **) &src2);
    819         ok(rc == 1, "pmSourceSortBySN() returned correct result (source1 < source2) (%d)", rc);
    820         rc = pmSourceSortBySN((const void **) &src2, (const void **) &src1);
    821         ok(rc == -1, "pmSourceSortBySN() returned correct result (source2 < source1) (%d)", rc);
    822         rc = pmSourceSortBySN((const void **) &src1, (const void **) &src1);
    823         ok(rc == 0, "pmSourceSortBySN() returned correct result (source1 == source2) (%d)", rc);
     818        int rc = pmSourceSortByFlux((const void **) &src1, (const void **) &src2);
     819        ok(rc == 1, "pmSourceSortByFlux() returned correct result (source1 < source2) (%d)", rc);
     820        rc = pmSourceSortByFlux((const void **) &src2, (const void **) &src1);
     821        ok(rc == -1, "pmSourceSortByFlux() returned correct result (source2 < source1) (%d)", rc);
     822        rc = pmSourceSortByFlux((const void **) &src1, (const void **) &src1);
     823        ok(rc == 0, "pmSourceSortByFlux() returned correct result (source1 == source2) (%d)", rc);
    824824
    825825        psFree(src1);
Note: See TracChangeset for help on using the changeset viewer.