IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 19, 2011, 10:40:50 AM (15 years ago)
Author:
eugene
Message:

remove invalid references to isophot and kron from extended source analysis; use the measured sky stdev instead of the user guess; optionally allow stars as well as galaxies to get petrosians; fix target vs input seeing in psphotStack; allow radial apertures for single-image analysis as well as stack; calculate the radial aperture flux errors; calculate the petrosian parameter errors; turn on threads for ext source fits; save covar matrix for ext source fits; calculate petrosian fill factor

Location:
branches/eam_branches/ipp-20110213/psphot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110213/psphot

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20110213/psphot/src/psphotExtendedSourceFits.c

    r30624 r30707  
    178178            PS_ARRAY_ADD_SCALAR(job->args, 0, PS_TYPE_S32); // this is used as a return value for Nfain
    179179
    180             if (false && !psThreadJobAddPending(job)) {
     180// set this to 0 to run without threading
     181# if (1)           
     182            if (!psThreadJobAddPending(job)) {
    181183                psError(PS_ERR_UNKNOWN, false, "Unable to guess model.");
    182184                psFree(AnalysisRegion);
    183185                return false;
    184             } else {
    185                 if (!psphotExtendedSourceFits_Threaded(job)) {
    186                     psError(PS_ERR_UNKNOWN, false, "Unable to guess model.");
    187                     psFree(AnalysisRegion);
    188                     return false;
    189                 }
    190                 psScalar *scalar = NULL;
    191                 scalar = job->args->data[7];
    192                 Next += scalar->data.S32;
    193                 scalar = job->args->data[8];
    194                 Nconvolve += scalar->data.S32;
    195                 scalar = job->args->data[9];
    196                 NconvolvePass += scalar->data.S32;
    197                 scalar = job->args->data[10];
    198                 Nplain += scalar->data.S32;
    199                 scalar = job->args->data[11];
    200                 NplainPass += scalar->data.S32;
    201                 scalar = job->args->data[12];
    202                 Nfaint += scalar->data.S32;
    203                 psFree(job);
     186            }
     187# else
     188            if (!psphotExtendedSourceFits_Threaded(job)) {
     189                psError(PS_ERR_UNKNOWN, false, "Unable to guess model.");
     190                psFree(AnalysisRegion);
     191                return false;
    204192            }
    205         }
     193            psScalar *scalar = NULL;
     194            scalar = job->args->data[7];
     195            Next += scalar->data.S32;
     196            scalar = job->args->data[8];
     197            Nconvolve += scalar->data.S32;
     198            scalar = job->args->data[9];
     199            NconvolvePass += scalar->data.S32;
     200            scalar = job->args->data[10];
     201            Nplain += scalar->data.S32;
     202            scalar = job->args->data[11];
     203            NplainPass += scalar->data.S32;
     204            scalar = job->args->data[12];
     205            Nfaint += scalar->data.S32;
     206            psFree(job);
     207# endif
     208        }
    206209
    207210        // wait for the threads to finish and manage results
     
    268271    psImageMaskType markVal = PS_SCALAR_VALUE(job->args->data[6],PS_TYPE_IMAGE_MASK_DATA);
    269272
     273    pthread_t tid = pthread_self();     // Thread identifier
     274
    270275    // Define source fitting parameters for extended source fits
    271276    pmSourceFitOptions *fitOptions = pmSourceFitOptionsAlloc();
    272277    fitOptions->mode          = PM_SOURCE_FIT_EXT;
     278    fitOptions->saveCovariance = true;  // XXX make this a user option?
     279
    273280    // XXX for now, use the defaults for the rest:
    274281    // fitOptions->nIter         = fitIter;
     
    296303        // XXX use the parameters guessed from moments
    297304        // if (source->modelEXT == NULL) continue;
     305
     306        fprintf (stderr, "fit %d,%d in thread %d\n", source->peak->x, source->peak->y, (int) tid);
    298307
    299308        // replace object in image
Note: See TracChangeset for help on using the changeset viewer.