IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 4, 2008, 2:10:40 PM (18 years ago)
Author:
eugene
Message:

some efficiency improvements and cleanups to the footprint code

File:
1 edited

Legend:

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

    r16820 r17516  
    158158    // set the sky, sky_x, sky_y components of border matrix
    159159    SetBorderMatrixElements (border, readout, fitSources, CONSTANT_PHOTOMETRIC_WEIGHTS, SKY_FIT_ORDER);
     160    psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "set border: %f (%d elements)\n", psTimerMark ("psphot"), sparse->Nelem);
    160161
    161162    psSparseConstraint constraint;
     
    174175        skyfit = NULL;
    175176    }
     177    psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "solve matrix: %f (%d elements)\n", psTimerMark ("psphot"), sparse->Nelem);
    176178
    177179    // adjust I0 for fitSources and subtract
     
    192194        source->mode |= PM_SOURCE_MODE_SUBTRACTED;
    193195    }
     196    psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "sub models: %f (%d elements)\n", psTimerMark ("psphot"), sparse->Nelem);
    194197
    195198    // measure chisq for each source
     
    199202        pmSourceChisq (model, source->pixels, source->maskObj, source->weight, maskVal);
    200203    }
     204    psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "get chisqs: %f (%d elements)\n", psTimerMark ("psphot"), sparse->Nelem);
    201205
    202206    // psFree (index);
     
    212216}
    213217
     218// XXX do we need this?
     219
    214220// Calculate the weight terms for the sky fit component of the matrix.  This function operates
    215221// on the pixels which correspond to all of the sources of interest.  These elements fill in
     
    222228    fullArray = psRegionForImage (readout->mask, fullArray);
    223229    psImageMaskRegion (readout->mask, fullArray, "OR", PM_MASK_MARK);
     230    psLogMsg ("psphot.ensemble", PS_LOG_INFO, "step 1: %f sec\n", psTimerMark ("psphot"));
    224231
    225232    // turn off MARK for all object pixels
     
    232239        psImageMaskCircle (source->maskView, x, y, model->radiusFit, "AND", PS_NOT_U8(PM_MASK_MARK));
    233240    }
     241    psLogMsg ("psphot.ensemble", PS_LOG_INFO, "step 2: %f sec\n", psTimerMark ("psphot"));
    234242
    235243    // accumulate the image statistics from the masked regions
     
    268276        }
    269277    }
     278    psLogMsg ("psphot.ensemble", PS_LOG_INFO, "step 3: %f sec\n", psTimerMark ("psphot"));
    270279
    271280    // turn off MARK for all image pixels
    272281    psImageMaskRegion (readout->mask, fullArray, "AND", PS_NOT_U8(PM_MASK_MARK));
     282    psLogMsg ("psphot.ensemble", PS_LOG_INFO, "step 4: %f sec\n", psTimerMark ("psphot"));
    273283
    274284    // set the Border T elements
     
    287297        psSparseBorderElementT (border, 2, 2, y2);
    288298    }
     299    psLogMsg ("psphot.ensemble", PS_LOG_INFO, "step 5: %f sec\n", psTimerMark ("psphot"));
     300
    289301    return true;
    290302}
Note: See TracChangeset for help on using the changeset viewer.