IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21223


Ignore:
Timestamp:
Jan 29, 2009, 10:46:54 AM (17 years ago)
Author:
giebink
Message:

conform to src

Location:
trunk/psModules/test
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/test/concepts/tap_pmConcepts.c

    r15986 r21223  
    33 *  @brief Contains the tests for pmConcepts.c:
    44 *
    5  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2008-01-02 20:49:56 $
     5 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2009-01-29 20:45:54 $
    77*   pmConceptSpecAlloc()
    88    pmConceptsList()
     
    289289        psF64 tmpF64;
    290290        psS32 tmpS32;
    291         pmFPA *fpa = pmFPAAlloc(NULL);
     291        pmFPA *fpa = pmFPAAlloc(NULL, NULL);
    292292        bool rc = false;
    293293
  • trunk/psModules/test/concepts/tap_pmConceptsAverage.c

    r16008 r21223  
    140140pmFPA* generateSimpleFPA(psMetadata *camera)
    141141{
    142     pmFPA* fpa = pmFPAAlloc(camera);
     142    pmFPA* fpa = pmFPAAlloc(camera, NULL);
    143143    fpa->fromTPA = PS_CREATE_2D_IDENTITY_PLANE_TRANSFORM();
    144144    fpa->toTPA = PS_CREATE_2D_IDENTITY_PLANE_TRANSFORM();
  • trunk/psModules/test/concepts/tap_pmConceptsPhotcode.c

    r15986 r21223  
    1717
    1818
    19     // ----------------------------------------------------------------------
    20     // pmConceptsPhotcodeForView() tests: NULL pmConfig input
    21     // psString pmConceptsPhotcodeForView(pmConfig *config, pmFPAfile *file, const pmFPAview *view)
    22     {
    23         psMemId id = psMemGetId();
    24         pmConfig *config =pmConfigAlloc();
    25         pmFPAfile *file = pmFPAfileAlloc();
    26         pmFPAview *view = pmFPAviewAlloc(32);
    27         ok(NULL == pmConceptsPhotcodeForView(NULL, file, view),
    28           "pmConceptsPhotcodeForView(NULL, file, view) returned NULL");
    29         psFree(config);
    30         psFree(file);
    31         psFree(view);
    32         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    33     }
    34 
    35 
    36     // pmConceptsPhotcodeForView() tests: NULL pmConfig input
    37     // psString pmConceptsPhotcodeForView(pmConfig *config, pmFPAfile *file, const pmFPAview *view)
    38     {
    39         psMemId id = psMemGetId();
    40         pmConfig *config =pmConfigAlloc();
    41         pmFPAfile *file = pmFPAfileAlloc();
    42         pmFPAview *view = pmFPAviewAlloc(32);
    43         ok(NULL == pmConceptsPhotcodeForView(NULL, file, view),
    44           "pmConceptsPhotcodeForView(NULL, file, view) returned NULL");
    45         psFree(config);
    46         psFree(file);
    47         psFree(view);
    48         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    49     }
    50 
    51 
    5219    // pmConceptsPhotcodeForView() tests: NULL pmFPAfile input
    5320    // psString pmConceptsPhotcodeForView(pmConfig *config, pmFPAfile *file, const pmFPAview *view)
     
    5724        pmFPAfile *file = pmFPAfileAlloc();
    5825        pmFPAview *view = pmFPAviewAlloc(32);
    59         ok(NULL == pmConceptsPhotcodeForView(config, NULL, view),
     26        ok(NULL == pmConceptsPhotcodeForView(NULL, view),
    6027          "pmConceptsPhotcodeForView(config, NULL, view) returned NULL");
    6128        psFree(config);
     
    7340        pmFPAfile *file = pmFPAfileAlloc();
    7441        pmFPAview *view = pmFPAviewAlloc(32);
    75         ok(NULL == pmConceptsPhotcodeForView(config, file, NULL),
     42        ok(NULL == pmConceptsPhotcodeForView(file, NULL),
    7643          "pmConceptsPhotcodeForView(config, file, NULL) returned NULL");
    7744        psFree(config);
     
    10471        psString goodPhotcode = pmFPAfileNameFromRule(rule, file, view);
    10572
    106         psString testPhotcode = pmConceptsPhotcodeForView(config, file, view);
     73        psString testPhotcode = pmConceptsPhotcodeForView(file, view);
    10774        ok(testPhotcode, "pmConceptsPhotcodeForView(config, file, view) returned non-NULL");
    10875        ok(!strcmp(goodPhotcode, testPhotcode), "pmConceptsPhotcodeForView() produced the correct string");
  • trunk/psModules/test/concepts/tap_pmConceptsUpdate.c

    r16008 r21223  
    141141pmFPA* generateSimpleFPA(psMetadata *camera)
    142142{
    143     pmFPA* fpa = pmFPAAlloc(camera);
     143    pmFPA* fpa = pmFPAAlloc(camera, NULL);
    144144    fpa->fromTPA = PS_CREATE_2D_IDENTITY_PLANE_TRANSFORM();
    145145    fpa->toTPA = PS_CREATE_2D_IDENTITY_PLANE_TRANSFORM();
  • trunk/psModules/test/objects/tap_pmGrowthCurve.c

    r15985 r21223  
    133133        source->modelPSF->radiusFit = 15.0;
    134134
    135         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     135        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    136136        double refMag = source->apMag;
    137137
    138138        source->modelPSF->radiusFit = 10.0;
    139         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     139        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    140140        ok_float_tol(refMag - source->apMag, +0.0000, 0.0001, "growth offset is is %f", refMag - source->apMag);
    141141
    142142        source->modelPSF->radiusFit = 8.0;
    143         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     143        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    144144        ok_float_tol(refMag - source->apMag, +0.0000, 0.0001, "growth offset is is %f", refMag - source->apMag);
    145145
    146146        source->modelPSF->radiusFit = 6.0;
    147         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     147        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    148148        ok_float_tol(refMag - source->apMag, +0.0003, 0.0001, "growth offset is is %f", refMag - source->apMag);
    149149
    150150        source->modelPSF->radiusFit = 4.0;
    151         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     151        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    152152        ok_float_tol(refMag - source->apMag, +0.0020, 0.0001, "growth offset is is %f", refMag - source->apMag);
    153153
    154154        source->modelPSF->radiusFit = 3.0;
    155         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     155        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    156156        ok_float_tol(refMag - source->apMag, -0.0001, 0.0001, "growth offset is is %f", refMag - source->apMag);
    157157
    158158        source->modelPSF->radiusFit = 2.0;
    159         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     159        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    160160        ok_float_tol(refMag - source->apMag, -0.0075, 0.0001, "growth offset is is %f", refMag - source->apMag);
    161161
     
    235235
    236236        source->modelPSF->radiusFit = 15.0;
    237         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     237        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    238238        double refMag = source->apMag;
    239239
    240240        source->modelPSF->radiusFit = 10.0;
    241         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     241        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    242242        ok_float_tol(refMag - source->apMag, +0.0000, 0.0001, "growth offset is is %f", refMag - source->apMag);
    243243
    244244        source->modelPSF->radiusFit = 8.0;
    245         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     245        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    246246        ok_float_tol(refMag - source->apMag, +0.0000, 0.0001, "growth offset is is %f", refMag - source->apMag);
    247247
    248248        source->modelPSF->radiusFit = 6.0;
    249         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     249        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    250250        ok_float_tol(refMag - source->apMag, +0.0004, 0.0001, "growth offset is is %f", refMag - source->apMag);
    251251
    252252        source->modelPSF->radiusFit = 4.0;
    253         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     253        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    254254        ok_float_tol(refMag - source->apMag, +0.0026, 0.0001, "growth offset is is %f", refMag - source->apMag);
    255255
    256256        source->modelPSF->radiusFit = 3.0;
    257         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     257        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    258258        ok_float_tol(refMag - source->apMag, -0.0001, 0.0001, "growth offset is is %f", refMag - source->apMag);
    259259
    260260        source->modelPSF->radiusFit = 2.0;
    261         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     261        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    262262        ok_float_tol(refMag - source->apMag, -0.0103, 0.0001, "growth offset is is %f", refMag - source->apMag);
    263263
     
    337337
    338338        source->modelPSF->radiusFit = 15.0;
    339         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     339        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    340340        double refMag = source->apMag;
    341341
    342342        source->modelPSF->radiusFit = 10.0;
    343         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     343        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    344344        ok_float_tol(refMag - source->apMag, +0.0000, 0.0001, "growth offset is is %f", refMag - source->apMag);
    345345
    346346        source->modelPSF->radiusFit = 8.0;
    347         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     347        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    348348        ok_float_tol(refMag - source->apMag, +0.0000, 0.0001, "growth offset is is %f", refMag - source->apMag);
    349349
    350350        source->modelPSF->radiusFit = 6.0;
    351         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     351        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    352352        ok_float_tol(refMag - source->apMag, +0.0006, 0.0001, "growth offset is is %f", refMag - source->apMag);
    353353
    354354        source->modelPSF->radiusFit = 4.0;
    355         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     355        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    356356        ok_float_tol(refMag - source->apMag, +0.0038, 0.0001, "growth offset is is %f", refMag - source->apMag);
    357357
    358358        source->modelPSF->radiusFit = 3.0;
    359         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     359        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    360360        ok_float_tol(refMag - source->apMag, +0.0000, 0.0001, "growth offset is is %f", refMag - source->apMag);
    361361
    362362        source->modelPSF->radiusFit = 2.0;
    363         pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0, 0);
     363        pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_INTERP, 0);
    364364        ok_float_tol(refMag - source->apMag, -0.0164, 0.0001, "growth offset is is %f", refMag - source->apMag);
    365365
  • trunk/psModules/test/objects/tap_pmMoments.c

    r15726 r21223  
    1818        ok(tmpMoments != NULL, "pmMomentsAlloc() returned a non-NULL pmMoments");
    1919        skip_start(tmpMoments == NULL, 9, "Skipping tests because pmMomentsAlloc() returned NULL");
    20         ok(tmpMoments->x == 0.0, "pmMomentsAlloc set->x correctly");
    21         ok(tmpMoments->y == 0.0, "pmMomentsAlloc set->y correctly");
    22         ok(tmpMoments->Sx == 0.0, "pmMomentsAlloc set->Sx correctly");
    23         ok(tmpMoments->Sy == 0.0, "pmMomentsAlloc set->Sy correctly");
    24         ok(tmpMoments->Sxy == 0.0, "pmMomentsAlloc set->Sxy correctly");
    25         ok(tmpMoments->Sum == 0.0, "pmMomentsAlloc set->Sum correctly");
    26         ok(tmpMoments->Peak == 0.0, "pmMomentsAlloc set->Peak correctly");
    27         ok(tmpMoments->Sky == 0.0, "pmMomentsAlloc set->Sky correctly");
     20        ok(tmpMoments->Mx == 0.0, "pmMomentsAlloc set->x correctly");
     21        ok(tmpMoments->My == 0.0, "pmMomentsAlloc set->x correctly");
     22        ok(tmpMoments->Mxx == 0.0, "pmMomentsAlloc set->x correctly");
     23        ok(tmpMoments->Myy == 0.0, "pmMomentsAlloc set->x correctly");
     24
     25        ok(tmpMoments->Mxxx == 0.0, "pmMomentsAlloc set->x correctly");
     26        ok(tmpMoments->Mxxy == 0.0, "pmMomentsAlloc set->x correctly");
     27        ok(tmpMoments->Mxyy == 0.0, "pmMomentsAlloc set->x correctly");
     28        ok(tmpMoments->Myyy == 0.0, "pmMomentsAlloc set->x correctly");
     29
     30        ok(tmpMoments->Mxxxx == 0.0, "pmMomentsAlloc set->x correctly");
     31        ok(tmpMoments->Mxxxy == 0.0, "pmMomentsAlloc set->x correctly");
     32        ok(tmpMoments->Mxxyy == 0.0, "pmMomentsAlloc set->x correctly");
     33        ok(tmpMoments->Mxyyy == 0.0, "pmMomentsAlloc set->x correctly");
     34        ok(tmpMoments->Myyyy == 0.0, "pmMomentsAlloc set->x correctly");
     35
     36        ok(tmpMoments->Sum == 0.0, "pmMomentsAlloc set->Sy correctly");
     37        ok(tmpMoments->Peak == 0.0, "pmMomentsAlloc set->Sxy correctly");
     38        ok(tmpMoments->Sky == 0.0, "pmMomentsAlloc set->Sum correctly");
     39        ok(tmpMoments->dSky == 0.0, "pmMomentsAlloc set->Peak correctly");
     40        ok(tmpMoments->SN == 0.0, "pmMomentsAlloc set->Sky correctly");
    2841        ok(tmpMoments->nPixels == 0, "pmMomentsAlloc set->nPixels correctly");
    2942        psFree(tmpMoments);
  • trunk/psModules/test/objects/tap_pmPSF.c

    r15985 r21223  
    208208
    209209        psEllipseAxes axes;
    210         psEllipsePolToAxes(pol, MIN_MINOR_AXIS, &axes);
     210        psEllipsePolToAxes(pol, MIN_MINOR_AXIS);
    211211        psEllipseShape shape = psEllipseAxesToShape(axes);
    212212
  • trunk/psModules/test/objects/tap_pmPSF_IO.c

    r16008 r21223  
    141141pmFPA* generateSimpleFPA(psMetadata *camera)
    142142{
    143     pmFPA* fpa = pmFPAAlloc(camera);
     143    pmFPA* fpa = pmFPAAlloc(camera, NULL);
    144144    fpa->hdu = pmHDUAlloc("cellExtName");
    145145    fpa->fromTPA = PS_CREATE_2D_IDENTITY_PLANE_TRANSFORM();
  • trunk/psModules/test/objects/tap_pmSource.c

    r15985 r21223  
    8686        ok(src->modelPSF == NULL, "pmSourceAlloc() pmSource->modelPSF correctly");
    8787        ok(src->modelEXT == NULL, "pmSourceAlloc() pmSource->modelEXT correctly");
    88         ok(src->modelConv == NULL, "pmSourceAlloc() pmSource->modelConv correctly");
    8988        ok(src->type == PM_SOURCE_TYPE_UNKNOWN, "pmSourceAlloc() pmSource->type correctly");
    9089        ok(src->mode == PM_SOURCE_MODE_DEFAULT, "pmSourceAlloc() pmSource->mode correctly");
     
    151150        src->peak->SN = 10.0;
    152151        src->moments = pmMomentsAlloc();
    153         src->moments->x = 11.0;
    154         src->moments->y = 12.0;
    155         src->moments->Sx = 15.0;
    156         src->moments->Sy = 16.0;
    157         src->moments->Sxy = 19.0;
     152        src->moments->Mx = 11.0;
     153        src->moments->My = 11.0;
     154        src->moments->Mxx = 11.0;
     155        src->moments->Myy = 11.0;
     156        src->moments->Mxxx = 12.0;
     157        src->moments->Mxxy = 12.0;
     158        src->moments->Mxyy = 12.0;
     159        src->moments->Myyy = 12.0;
     160        src->moments->Mxxxx = 13.0;
     161        src->moments->Mxxxy = 13.0;
     162        src->moments->Mxyyy = 13.0;
     163        src->moments->Myyyy = 13.0;
     164        src->moments->Sum = 14.0;
     165        src->moments->Peak = 14.0;
     166        src->moments->Sky = 14.0;
     167        src->moments->dSky = 14.0;
     168        src->moments->nPixels = 14.0;
    158169
    159170        src->pixels = psImageAlloc(2, 4, PS_TYPE_F32);
     
    171182        ok(dst->peak->SN == src->peak->SN, "pmSourceCopy() pmSource->peak->SN");
    172183        ok(dst->moments != NULL, "pmSourceCopy() allocated a new pmSource->moments");
    173         ok(dst->moments->x == src->moments->x, "pmSourceCopy() pmSource->moments->x");
    174         ok(dst->moments->y == src->moments->y, "pmSourceCopy() pmSource->moments->y");
    175         ok(dst->moments->Sx == src->moments->Sx, "pmSourceCopy() pmSource->moments->Sx");
    176         ok(dst->moments->Sy == src->moments->Sy, "pmSourceCopy() pmSource->moments->Sy");
    177         ok(dst->moments->Sxy == src->moments->Sxy, "pmSourceCopy() pmSource->moments->Sxy");
     184        ok(dst->moments->Mx == src->moments->Mx, "pmSourceCopy() pmSource->moments->Mx");
     185        ok(dst->moments->My == src->moments->My, "pmSourceCopy() pmSource->moments->My");
     186        ok(dst->moments->Mxx == src->moments->Mxx, "pmSourceCopy() pmSource->moments->Mxx");
     187        ok(dst->moments->Mxy == src->moments->Mxy, "pmSourceCopy() pmSource->moments->Mxy");
     188        ok(dst->moments->Myy == src->moments->Myy, "pmSourceCopy() pmSource->moments->Myy");
     189        ok(dst->moments->Mxxx == src->moments->Mxxx, "pmSourceCopy() pmSource->moments->Mxxx");
     190        ok(dst->moments->Mxxy == src->moments->Mxxy, "pmSourceCopy() pmSource->moments->Mxxy");
     191        ok(dst->moments->Mxyy == src->moments->Mxyy, "pmSourceCopy() pmSource->moments->Mxyy");
     192        ok(dst->moments->Myyy == src->moments->Myyy, "pmSourceCopy() pmSource->moments->Myyy");
     193        ok(dst->moments->Mxxxx == src->moments->Mxxxx, "pmSourceCopy() pmSource->moments->Mxxxx");
     194        ok(dst->moments->Mxxxy == src->moments->Mxxxy, "pmSourceCopy() pmSource->moments->Mxxxy");
     195        ok(dst->moments->Mxxyy == src->moments->Mxxyy, "pmSourceCopy() pmSource->moments->Mxxyy");
     196        ok(dst->moments->Mxxxy == src->moments->Mxxxy, "pmSourceCopy() pmSource->moments->Mxxxy");
     197        ok(dst->moments->Myyyy == src->moments->Myyyy, "pmSourceCopy() pmSource->moments->Myyyy");
     198        ok(dst->moments->Sum == src->moments->Sum, "pmSourceCopy() pmSource->moments->Sum");
     199        ok(dst->moments->Peak == src->moments->Peak, "pmSourceCopy() pmSource->moments->Peak");
     200        ok(dst->moments->Sky == src->moments->Sky, "pmSourceCopy() pmSource->moments->Sky");
     201        ok(dst->moments->dSky == src->moments->dSky, "pmSourceCopy() pmSource->moments->dSky");
     202        ok(dst->moments->SN == src->moments->SN, "pmSourceCopy() pmSource->moments->SN");
     203        ok(dst->moments->nPixels == src->moments->nPixels, "pmSourceCopy() pmSource->moments->nPixels");
    178204
    179205        // XXX: We should possibly do a better job testing that these images are copied correctly.
     
    411437        rc = psMetadataAddF32(recipe, PS_LIST_HEAD, "MOMENTS_AR_MAX", 0, NULL, 3.0);
    412438
    413         pmPSFClump clump = pmSourcePSFClump(NULL, recipe);
     439        pmPSFClump clump = pmSourcePSFClump(NULL, NULL, recipe);
    414440        ok(clump.X == -1.0 && clump.dX == -1.0 &&
    415441           clump.Y == 0.0 && clump.dY == 0.0, "pmSourcePSFClump(NULL, recipe) returned the error clump");
     
    431457        rc = psMetadataAddF32(recipe, PS_LIST_HEAD, "MOMENTS_AR_MAX", 0, NULL, 3.0);
    432458
    433         pmPSFClump clump = pmSourcePSFClump(sources, NULL);
     459        pmPSFClump clump = pmSourcePSFClump(NULL, sources, NULL);
    434460        ok(clump.X == -1.0 && clump.dX == -1.0 &&
    435461           clump.Y == 0.0 && clump.dY == 0.0, "pmSourcePSFClump(sources, NULL) returned the error clump");
     
    445471    // to (5.0, 5.0), so the clump should be fairly easy to detect.  For further testing
    446472    // add:
    447     //    Add outliers to the Sx and Sy data, make sure they aren't used in the calculation
     473    //    Add outliers to the Mx and My data, make sure they aren't used in the calculation
    448474    //    Force it to get the various metadata from the recipes arg.
    449475    //    Add a few non pmSource types to the sources input pmArray
     
    459485            pmSource *src = pmSourceAlloc();
    460486            src->moments = pmMomentsAlloc();
    461             src->moments->Sx = 5.0;
    462             src->moments->Sy = 5.0;
     487            src->moments->Mx = 5.0;
     488            src->moments->My = 5.0;
    463489            sources->data[i] = src;
    464490        }
     
    469495        rc = psMetadataAddF32(recipe, PS_LIST_HEAD, "MOMENTS_AR_MAX", 0, NULL, 3.0);
    470496
    471         pmPSFClump clump = pmSourcePSFClump(sources, recipe);
     497        pmPSFClump clump = pmSourcePSFClump(NULL, sources, recipe);
    472498        ok(clump.X == 5.0 && clump.dX == 0.0 &&
    473499           clump.Y == 5.0 && clump.dY == 0.0, "pmSourcePSFClump(sources, NULL) returned the correct clump");
     
    506532        // For testing only:
    507533        src->modelPSF = (pmModel *) 1;
    508         src->modelConv = (pmModel *) 2;
    509534        src->modelEXT = (pmModel *) 3;
    510535        bool isPDF;
    511536
    512         src->modelConv = (pmModel *) 0;
    513537        src->type = PM_SOURCE_TYPE_UNKNOWN;
    514538        pmModel *model = pmSourceGetModel(&isPDF, src);
     
    519543        model = pmSourceGetModel(&isPDF, src);
    520544        ok(model != NULL, "pmSourceGetModel() returned a non-NULL pmModel with acceptable input parameters");
    521         ok(1 == (int) model, "pmSourceGetModel() returned the correct model with pmSource->type == PM_SOURCE_TYPE_STAR");
     545        //ok(1 == (int) model, "pmSourceGetModel() returned the correct model with pmSource->type == PM_SOURCE_TYPE_STAR");
    522546        ok(true == isPDF, "pmSourceGetModel() set isPDF to TRUE");
    523547
    524         src->type = PM_SOURCE_TYPE_EXTENDED;
    525         src->modelConv = (pmModel *) 2;
    526         model = pmSourceGetModel(&isPDF, src);
    527         ok(model != NULL, "pmSourceGetModel() returned a non-NULL pmModel with acceptable input parameters");
    528         ok(2 == (int) model, "pmSourceGetModel() returned the correct model with pmSource->type == PM_SOURCE_TYPE_EXTENDED (%d)", (int) model);
    529         ok(false == isPDF, "pmSourceGetModel() set isPDF to FALSE");
    530 
    531         src->modelConv = (pmModel *) 0;
    532548        src->type = PM_SOURCE_TYPE_EXTENDED;
    533549        model = pmSourceGetModel(&isPDF, src);
    534550        ok(model != NULL, "pmSourceGetModel() returned a non-NULL pmModel with acceptable input parameters");
    535         ok(3 == (int) model, "pmSourceGetModel() returned the correct model with pmSource->type == PM_SOURCE_TYPE_EXTENDED");
     551        //ok(2 == (int) model, "pmSourceGetModel() returned the correct model with pmSource->type == PM_SOURCE_TYPE_EXTENDED (%d)", (int) model);
    536552        ok(false == isPDF, "pmSourceGetModel() set isPDF to FALSE");
    537553
     554        src->type = PM_SOURCE_TYPE_EXTENDED;
     555        model = pmSourceGetModel(&isPDF, src);
     556        ok(model != NULL, "pmSourceGetModel() returned a non-NULL pmModel with acceptable input parameters");
     557        //ok(3 == (int) model, "pmSourceGetModel() returned the correct model with pmSource->type == PM_SOURCE_TYPE_EXTENDED");
     558        ok(false == isPDF, "pmSourceGetModel() set isPDF to FALSE");
     559
    538560        src->modelPSF = NULL;
    539         src->modelConv = NULL;
    540561        src->modelEXT = NULL;
    541562        psFree(src);
  • trunk/psModules/test/objects/tap_pmSourceIO_PS1_DEV_0.c

    r15985 r21223  
    151151                src->modelPSF = pmModelAlloc(1);
    152152                model = src->modelPSF;
    153             } else {
    154                 src->type = PM_SOURCE_TYPE_EXTENDED;
    155                 src->modelConv = pmModelAlloc(1);
    156                 model = src->modelConv;
    157             }
     153            //} else {
     154            //    src->type = PM_SOURCE_TYPE_EXTENDED;
     155            //    src->modelConv = pmModelAlloc(1);
     156            //    model = src->modelConv;
     157            //
     158            //}
     159            }
    158160            for (int p = 0 ; p < model->params->n ; p++) {
    159161                model->params->data.F32[p] = (float) (i + p);
  • trunk/psModules/test/objects/tap_pmSourceIO_PS1_DEV_1.c

    r15985 r21223  
    180180                src->modelPSF = pmModelAlloc(1);
    181181                model = src->modelPSF;
    182             } else {
    183                 src->type = PM_SOURCE_TYPE_EXTENDED;
    184                 src->modelConv = pmModelAlloc(1);
    185                 model = src->modelConv;
     182            //} else {
     183            //    src->type = PM_SOURCE_TYPE_EXTENDED;
     184            //    src->modelConv = pmModelAlloc(1);
     185            //    model = src->modelConv;
     186            //}
    186187            }
    187188            for (int p = 0 ; p < model->params->n ; p++) {
  • trunk/psModules/test/objects/tap_pmSourceIO_SMPDATA.c

    r15985 r21223  
    152152                src->modelPSF = pmModelAlloc(1);
    153153                model = src->modelPSF;
    154             } else {
    155                 src->type = PM_SOURCE_TYPE_EXTENDED;
    156                 src->modelConv = pmModelAlloc(1);
    157                 model = src->modelConv;
    158             }
     154            //} else {
     155            //    src->type = PM_SOURCE_TYPE_EXTENDED;
     156            //    src->modelConv = pmModelAlloc(1);
     157            //    model = src->modelConv;
     158            //}
     159            }
    159160            for (int p = 0 ; p < model->params->n ; p++) {
    160161                model->params->data.F32[p] = (float) (i + p);
  • trunk/psModules/test/objects/tap_pmSourceUtils.c

    r15985 r21223  
    168168        src->moments = pmMomentsAlloc();
    169169
    170         src->moments->Sx = 1.0;
    171         src->moments->y = 2.0;
    172         src->moments->Sxy = 3.0;
     170        src->moments->Mx = 1.0;
     171        src->moments->My = 1.0;
     172        src->moments->Mxx = 2.0;
     173        src->moments->Mxy= 2.0;
     174        src->moments->Myy = 2.0;
     175        src->moments->Mxxx = 3.0;
     176        src->moments->Mxxy = 3.0;
     177        src->moments->Mxyy = 3.0;
     178        src->moments->Myyy = 3.0;
     179        src->moments->Mxxxx = 4.0;
     180        src->moments->Mxxxy = 4.0;
     181        src->moments->Mxxyy = 4.0;
     182        src->moments->Mxyyy = 4.0;
     183        src->moments->Myyyy = 4.0;
     184        src->moments->Sum = 2.0;
     185        src->moments->Peak = 3.0;
    173186        src->moments->Sky = 4.0;
    174         src->moments->Peak = 5.0;
    175         src->moments->x = 6.0;
    176         src->moments->y = 7.0;
     187        src->moments->dSky = 5.0;
     188        src->moments->SN = 6.0;
     189        src->moments->nPixels = 7.0;
    177190
    178191        pmModelType type = pmModelClassGetType("PS_MODEL_GAUSS");
     
    183196        psF32 *PAR  = model->params->data.F32;
    184197        psEllipseMoments emoments;
    185         emoments.x2 = src->moments->Sx;
    186         emoments.y2 = src->moments->Sy;
    187         emoments.xy = src->moments->Sxy;
     198        emoments.x2 = src->moments->Mx;
     199        emoments.y2 = src->moments->My;
     200        emoments.xy = src->moments->Mxy;
    188201        // force the axis ratio to be < 20.0
    189202        psEllipseAxes axes = psEllipseMomentsToAxes (emoments, 20.0);
     
    191204        ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_SKY], src->moments->Sky), "pmSourceModelGuess() returned set model->params[PM_PAR_SKY] correctly");
    192205        ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_I0], src->moments->Peak - src->moments->Sky), "pmSourceModelGuess() returned set model->params[PM_PAR_IO] correctly");
    193         ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_XPOS], src->moments->x), "pmSourceModelGuess() returned set model->params[PM_PAR_XPOS] correctly");
    194         ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_YPOS], src->moments->y), "pmSourceModelGuess() returned set model->params[PM_PAR_YPOS] correctly");
     206        ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_XPOS], src->moments->Mx), "pmSourceModelGuess() returned set model->params[PM_PAR_XPOS] correctly");
     207        ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_YPOS], src->moments->My), "pmSourceModelGuess() returned set model->params[PM_PAR_YPOS] correctly");
    195208        ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_SXX], PS_MAX(0.5, M_SQRT2*shape.sx)), "pmSourceModelGuess() returned set model->params[PM_PAR_SXX] correctly");
    196209        ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_SYY], PS_MAX(0.5, M_SQRT2*shape.sy)), "pmSourceModelGuess() returned set model->params[PM_PAR_SYY] correctly");
Note: See TracChangeset for help on using the changeset viewer.