IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 9, 2010, 10:56:32 AM (16 years ago)
Author:
eugene
Message:

changed pmSourceFitModel and related APIs to pass a structure of fit options; this lets us change the options between soruces within the multithreaded context; also re-organized the include orders to avoid conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100621/psphot/src/psphotExtendedSourceFits.c

    r28013 r28643  
    129129    sources = psArraySort (sources, pmSourceSortBySN);
    130130
     131    // Define source fitting parameters for extended source fits
     132    pmSourceFitOptions *fitOptions = pmSourceFitOptionsAlloc();
     133    fitOptions->mode          = PM_SOURCE_FIT_EXT;
     134    // XXX for now, use the defaults for the rest:
     135    // fitOptions->nIter         = fitIter;
     136    // fitOptions->tol           = fitTol;
     137    // fitOptions->poissonErrors = poisson;
     138    // fitOptions->weight        = PS_SQR(skySig);
     139
    131140    // choose the sources of interest
    132141    for (int i = 0; i < sources->n; i++) {
     
    215224              psFree (source->modelFlux);
    216225              source->modelFlux = NULL;
    217               modelFit = psphotFitEXT (readout, source, modelType, maskVal, markVal);
     226              modelFit = psphotFitEXT (readout, source, fitOptions, modelType, maskVal, markVal);
    218227              if (!modelFit) {
    219228                  psTrace ("psphot", 5, "failed to fit plain model for object at %f, %f", source->moments->Mx, source->moments->My);
     
    311320        }
    312321    }
     322    psFree (fitOptions);
    313323
    314324    psLogMsg ("psphot", PS_LOG_INFO, "extended source analysis: %f sec for %d objects\n", psTimerMark ("psphot"), Next);
Note: See TracChangeset for help on using the changeset viewer.