IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 1, 2011, 6:21:28 PM (15 years ago)
Author:
eugene
Message:

fix threading for psphotStack; use standard PS_ARGUMENTS_ macros for ppSub, ppStack, pswarp, ppImage, psphotStack; fix FPA.EXPOSURE in ppImageAddNoise; fix accounting for psf bad and poor weights; added flags for substantial poor masks due to each poor mask bit type; fix the measurement of the fwhm in pmPSFtoFWHM

File:
1 edited

Legend:

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

    r30764 r30772  
    4343    int NplainPass = 0;
    4444    int Nfaint = 0;
     45    int Nfail = 0;
    4546
    4647    psTimerStart ("psphot.extended");
     
    176177            PS_ARRAY_ADD_SCALAR(job->args, 0, PS_TYPE_S32); // this is used as a return value for Nplain
    177178            PS_ARRAY_ADD_SCALAR(job->args, 0, PS_TYPE_S32); // this is used as a return value for NplainPass
    178             PS_ARRAY_ADD_SCALAR(job->args, 0, PS_TYPE_S32); // this is used as a return value for Nfain
     179            PS_ARRAY_ADD_SCALAR(job->args, 0, PS_TYPE_S32); // this is used as a return value for Nfaint
     180            PS_ARRAY_ADD_SCALAR(job->args, 0, PS_TYPE_S32); // this is used as a return value for Nfail
    179181
    180182// set this to 0 to run without threading
     
    204206            scalar = job->args->data[12];
    205207            Nfaint += scalar->data.S32;
     208            scalar = job->args->data[13];
     209            Nfail += scalar->data.S32;
    206210            psFree(job);
    207211# endif
     
    234238                scalar = job->args->data[12];
    235239                Nfaint += scalar->data.S32;
     240                scalar = job->args->data[13];
     241                Nfail += scalar->data.S32;
    236242            }
    237243            psFree(job);
     
    244250    psLogMsg ("psphot", PS_LOG_INFO, "  %d convolved models (%d passed)\n", Nconvolve, NconvolvePass);
    245251    psLogMsg ("psphot", PS_LOG_INFO, "  %d plain models (%d passed)\n", Nplain, NplainPass);
    246     psLogMsg ("psphot", PS_LOG_INFO, "  %d too faint to fit\n", Nfaint);
     252    psLogMsg ("psphot", PS_LOG_INFO, "  %d too faint to fit, %d failed\n", Nfaint, Nfail);
    247253    return true;
    248254}
     
    253259    bool status;
    254260    int Next = 0;
     261    int Nfaint = 0;
     262    int Nfail = 0;
    255263    int Nconvolve = 0;
    256264    int NconvolvePass = 0;
    257265    int Nplain = 0;
    258     int Nfaint = 0;
    259266    int NplainPass = 0;
    260267    bool savePics = false;
     
    271278    psImageMaskType markVal = PS_SCALAR_VALUE(job->args->data[6],PS_TYPE_IMAGE_MASK_DATA);
    272279
    273     pthread_t tid = pthread_self();     // Thread identifier
     280    // pthread_t tid = pthread_self();     // Thread identifier
    274281
    275282    // Define source fitting parameters for extended source fits
     
    305312        // if (source->modelEXT == NULL) continue;
    306313
    307         fprintf (stderr, "fit %d,%d in thread %d\n", source->peak->x, source->peak->y, (int) tid);
     314        // fprintf (stderr, "fit %d,%d in thread %d\n", source->peak->x, source->peak->y, (int) tid);
    308315
    309316        // replace object in image
     
    398405              if (!modelFit) {
    399406                  psTrace ("psphot", 5, "failed to fit psf-conv model for object at %f, %f", source->moments->Mx, source->moments->My);
     407                  Nfail ++;
    400408                  continue;
    401409              }
     
    412420              if (!modelFit) {
    413421                  psTrace ("psphot", 5, "failed to fit plain model for object at %f, %f", source->moments->Mx, source->moments->My);
     422                  Nfail ++;
    414423                  continue;
    415424              }
     
    529538    scalar->data.S32 = Nfaint;
    530539
     540    scalar = job->args->data[13];
     541    scalar->data.S32 = Nfail;
     542
    531543    return true;
    532544}
Note: See TracChangeset for help on using the changeset viewer.