IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 19, 2007, 4:40:44 PM (19 years ago)
Author:
Paul Price
Message:

Extensive changes to APIs to allow use of a nominated value to mask
against (the maskVal). Previously, the mask values were either
hard-coded (e.g., PM_MASK_SAT) or taken as anything non-zero. The
code is tested with psModules (which has similar changes) and does not
crash, but neither is it successful in marking all bad pixels. For
this reason, I have left the "gutter" pixels (cell gaps) set to 0
instead of NAN in pmFPAMosaic.

File:
1 edited

Legend:

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

    r13374 r13900  
    22
    33// 2006.02.02 : no leaks
    4 bool psphotRoughClass (psArray *sources, psMetadata *recipe, const bool findPsfClump) {
     4bool psphotRoughClass (psArray *sources, psMetadata *recipe, const bool findPsfClump, psMaskType maskSat) {
    55
    66    static pmPSFClump   psfClump;
     
    1010
    1111    if (findPsfClump) {
    12         psfClump = pmSourcePSFClump (sources, recipe);
     12        psfClump = pmSourcePSFClump (sources, recipe);
    1313    } else if (!havePsfClump) {
    14         psError(PSPHOT_ERR_PROG, false, "You must find the PSF clump before reusing it");
     14        psError(PSPHOT_ERR_PROG, false, "You must find the PSF clump before reusing it");
    1515    } else {
    16         ;
     16        ;
    1717    }
    18    
    19     havePsfClump = false;               // we don't know if it's valid
     18
     19    havePsfClump = false;               // we don't know if it's valid
    2020    if (psfClump.X < 0) {
    21         psError(PSPHOT_ERR_PROG, false, "programming error calling pmSourcePSFClump");
    22         return false;
     21        psError(PSPHOT_ERR_PROG, false, "programming error calling pmSourcePSFClump");
     22        return false;
    2323    }
    2424    if (!psfClump.X || !psfClump.Y) {
    25         psError(PSPHOT_ERR_DATA, true, "Failed to find a valid PSF clump");
    26         return false;
     25        psError(PSPHOT_ERR_DATA, true, "Failed to find a valid PSF clump");
     26        return false;
    2727    }
    2828    psLogMsg ("psphot", 3, "psf clump  X,  Y: %f, %f\n", psfClump.X, psfClump.Y);
     
    3030
    3131    // group into STAR, COSMIC, EXTENDED, SATURATED, etc.
    32     if (!pmSourceRoughClass (sources, recipe, psfClump)) {
    33         psError(PSPHOT_ERR_PROG, false, "programming error calling pmSourceRoughClass");
    34         return false;
     32    if (!pmSourceRoughClass (sources, recipe, psfClump, maskSat)) {
     33        psError(PSPHOT_ERR_PROG, false, "programming error calling pmSourceRoughClass");
     34        return false;
    3535    }
    3636
     
    4040    psLogMsg ("psphot.roughclass", PS_LOG_INFO, "rough classification: %f sec\n", psTimerMark ("psphot"));
    4141
    42     havePsfClump = true;                        // we have set psfClump
    43    
     42    havePsfClump = true;                        // we have set psfClump
     43
    4444    return true;
    4545}
Note: See TracChangeset for help on using the changeset viewer.