IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 13, 2009, 12:41:28 PM (17 years ago)
Author:
giebink
Message:

Account for weight(s) to variance(s) change

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/test/objects/tap_pmSource.c

    r21223 r21471  
    4848    readout->image = psImageAlloc(TEST_NUM_COLS, TEST_NUM_ROWS, PS_TYPE_F32);
    4949    readout->mask = psImageAlloc(TEST_NUM_COLS, TEST_NUM_ROWS, PS_TYPE_U8);
    50     readout->weight = psImageAlloc(TEST_NUM_COLS, TEST_NUM_ROWS, PS_TYPE_F32);
     50    readout->variance = psImageAlloc(TEST_NUM_COLS, TEST_NUM_ROWS, PS_TYPE_F32);
    5151    for (psS32 i = 0 ; i < NUM_BIAS_DATA ; i++) {
    5252        psImage *tmpImage = psImageAlloc(TEST_NUM_COLS, TEST_NUM_ROWS, PS_TYPE_F32);
     
    7777        ok(src->peak == NULL, "pmSourceAlloc() pmSource->peak correctly");
    7878        ok(src->pixels == NULL, "pmSourceAlloc() pmSource->pixels correctly");
    79         ok(src->weight == NULL, "pmSourceAlloc() pmSource->weight correctly");
     79        ok(src->variance == NULL, "pmSourceAlloc() pmSource->variance correctly");
    8080        ok(src->maskObj == NULL, "pmSourceAlloc() pmSource->maskObj correctly");
    8181        ok(src->maskView == NULL, "pmSourceAlloc() pmSource->maskView correctly");
     
    169169
    170170        src->pixels = psImageAlloc(2, 4, PS_TYPE_F32);
    171         src->weight = psImageAlloc(6, 8, PS_TYPE_F32);
     171        src->variance = psImageAlloc(6, 8, PS_TYPE_F32);
    172172        src->maskView  = psImageAlloc(10, 12, PS_TYPE_U8);
    173173        pmSource *dst = pmSourceCopy(src);
     
    207207        ok(dst->pixels->numCols == src->pixels->numCols && dst->pixels->numRows == src->pixels->numRows,
    208208           "pmSourceCopy() generated correct size pmSource->pixels");
    209         ok(dst->weight != NULL, "pmSourceCopy() allocated a new pmSource->weight");
    210         ok(dst->weight->numCols == src->weight->numCols && dst->weight->numRows == src->weight->numRows,
    211            "pmSourceCopy() generated correct size pmSource->weight");
     209        ok(dst->variance != NULL, "pmSourceCopy() allocated a new pmSource->variance");
     210        ok(dst->variance->numCols == src->variance->numCols && dst->variance->numRows == src->variance->numRows,
     211           "pmSourceCopy() generated correct size pmSource->variance");
    212212        ok(dst->maskView != NULL, "pmSourceCopy() allocated a new pmSource->maskView");
    213213        ok(dst->maskView->numCols == src->maskView->numCols && dst->maskView->numRows == src->maskView->numRows,
     
    290290        int expectedNumCols = 1 + (TEST_NUM_COLS/2);
    291291        int expectedNumRows = 1 + (TEST_NUM_COLS/2);
    292         // XX: We only verify the size of the pixels, weight, maskView, and maskObj
     292        // XX: We only verify the size of the pixels, variance, maskView, and maskObj
    293293        // images.  A better test would verify that the actual data is set correctly.
    294294        // We don't do that here since it basically duplicated psLib function tests.
    295295        ok(src->pixels->numCols == expectedNumCols && src->pixels->numRows == expectedNumRows,
    296296               "pmSourceDefinePixels() set the size of pmSource->pixels correctly");
    297         ok(src->weight->numCols == expectedNumCols && src->weight->numRows == expectedNumRows,
    298                "pmSourceDefinePixels() set the size of pmSource->weight correctly");
     297        ok(src->variance->numCols == expectedNumCols && src->variance->numRows == expectedNumRows,
     298               "pmSourceDefinePixels() set the size of pmSource->variance correctly");
    299299        ok(src->maskView->numCols == expectedNumCols && src->maskView->numRows == expectedNumRows,
    300300               "pmSourceDefinePixels() set the size of pmSource->maskView correctly");
     
    396396        int expectedNumCols = 1 + (TEST_NUM_COLS/2);
    397397        int expectedNumRows = 1 + (TEST_NUM_COLS/2);
    398         // XX: We only verify the size of the pixels, weight, maskView, and maskObj
     398        // XX: We only verify the size of the pixels, variance, maskView, and maskObj
    399399        // images.  A better test would verify that the actual data is set correctly.
    400400        // We don't do that here since it basically duplicated psLib function tests.
    401401        ok(src->pixels->numCols == expectedNumCols && src->pixels->numRows == expectedNumRows,
    402402               "pmSourceRedefinePixels() set the size of pmSource->pixels correctly");
    403         ok(src->weight->numCols == expectedNumCols && src->weight->numRows == expectedNumRows,
    404                "pmSourceRedefinePixels() set the size of pmSource->weight correctly");
     403        ok(src->variance->numCols == expectedNumCols && src->variance->numRows == expectedNumRows,
     404               "pmSourceRedefinePixels() set the size of pmSource->variance correctly");
    405405        ok(src->maskView->numCols == expectedNumCols && src->maskView->numRows == expectedNumRows,
    406406               "pmSourceRedefinePixels() set the size of pmSource->maskView correctly");
     
    584584    // We only test with a single Gaussian model, with no residuals or masks.
    585585    // For completeness, additional tests should be added.
    586         // We should also set mode &= PM_MODEL_OP_NOISE to test that the src->weights are added.
     586        // We should also set mode &= PM_MODEL_OP_NOISE to test that the src->variances are added.
    587587    {
    588588        psMemId id = psMemGetId();
     
    632632    // call pmSourceOp() with acceptable parameters
    633633    // Test source->modelFlux
    634         // We should also set mode &= PM_MODEL_OP_NOISE to test that the src->weights are added.
     634        // We should also set mode &= PM_MODEL_OP_NOISE to test that the src->variances are added.
    635635    {
    636636        psMemId id = psMemGetId();
Note: See TracChangeset for help on using the changeset viewer.