IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 1, 2009, 11:48:37 AM (17 years ago)
Author:
eugene
Message:

moved look up of parameters for extended sources fits from psphotReadout to psphotBlendFit

File:
1 edited

Legend:

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

    r21183 r21250  
    2222    }
    2323    // nThreads = 0; // XXX until testing is complete, do not thread this function
     24
     25    // source fitting parameters for extended source fits
     26    int fitIter = psMetadataLookupS32(&status, recipe, "EXT_FIT_ITER"); // Max number of fit iterations
     27    assert (status && fitIter > 0);
     28
     29    float fitTol = psMetadataLookupF32 (&status, recipe, "EXT_FIT_TOL"); // Fit tolerance
     30    assert (status && isfinite(fitTol) && fitTol > 0);
     31
     32    bool poisson = psMetadataLookupBool(&status, recipe, "POISSON.ERRORS.PHOT.LMM"); // Poisson errors?
     33    assert (status);
     34
     35    float skySig = psMetadataLookupF32(&status, recipe, "SKY_SIG");
     36    assert (status && isfinite(skySig) && skySig > 0);
     37
     38    // Define source fitting parameters for extended source fits
     39    pmSourceFitModelInit(fitIter, fitTol, PS_SQR(skySig), poisson);
    2440
    2541    psphotInitLimitsPSF (recipe, readout);
Note: See TracChangeset for help on using the changeset viewer.