IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 4, 2008, 3:10:25 PM (18 years ago)
Author:
eugene
Message:

merge changes from eam_branch_20080229: better flag definitions, cleanup footprint code (move into psphotFindDetections), push mask selection into called functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotReplaceUnfit.c

    r13900 r16820  
    1818        pmSourceAdd (source, PM_MODEL_OP_FULL, maskVal);
    1919        source->mode &= ~PM_SOURCE_MODE_SUBTRACTED;
    20         source->mode &= ~PM_SOURCE_MODE_TEMPSUB;
    2120    }
    2221    psLogMsg ("psphot.replace", 3, "replace unfitted models: %f sec (%ld objects)\n", psTimerMark ("psphot"), sources->n);
     
    2423}
    2524
    26 bool psphotReplaceAll (psArray *sources, psMaskType maskVal) {
     25bool psphotReplaceAll (psArray *sources, psMetadata *recipe) {
    2726
     27    bool status;
    2828    pmSource *source;
    2929
    3030    psTimerStart ("psphot");
     31
     32    // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)
     33    psMaskType maskVal = psMetadataLookupU8(&status, recipe, "MASK.PSPHOT"); // Mask value for bad pixels
     34    assert (maskVal);
    3135
    3236    for (int i = 0; i < sources->n; i++) {
     
    3943      source->mode &= ~PM_SOURCE_MODE_SUBTRACTED;
    4044    }
    41     psLogMsg ("psphot.replace", PS_LOG_INFO, "replace models for %ld objects: %f sec\n", sources->n, psTimerMark ("psphot"));
     45    psLogMsg ("psphot.replace", PS_LOG_INFO, "replaced models for %ld objects: %f sec\n", sources->n, psTimerMark ("psphot"));
    4246    return true;
    4347}
Note: See TracChangeset for help on using the changeset viewer.