IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 24, 2012, 3:56:18 PM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20120905/psphot
Files:
3 edited

Legend:

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

  • branches/eam_branches/ipp-20120905/psphot/src

  • branches/eam_branches/ipp-20120905/psphot/src/psphotDeblendSatstars.c

    r34416 r34570  
    544544    float logRdel = 0.1;
    545545
    546     float Xc = source->satstar->Xo - source->pixels->col0 - 0.5;
    547     float Yc = source->satstar->Yo - source->pixels->row0 - 0.5;
    548     psVector *logRmodel = source->satstar->logRmodel;
    549     psVector *logFmodel = source->satstar->logFmodel;
     546    pmSourceSatstar *satstar = source->satstar ? source->satstar : (source->parent ? source->parent->satstar : NULL);
     547    psAssert (satstar, "null satstar");
     548    float Xc = satstar->Xo - source->pixels->col0 - 0.5;
     549    float Yc = satstar->Yo - source->pixels->row0 - 0.5;
     550    psVector *logRmodel = satstar->logRmodel;
     551    psVector *logFmodel = satstar->logFmodel;
    550552
    551553    for (int iy = 0; iy < source->pixels->numRows; iy++) {
     
    10481050}
    10491051
     1052// the return state indicates if any sources were actually subtracted
    10501053bool psphotAddOrSubSatstarsReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int fileIndex, psMetadata *recipe, bool add) {
    10511054
    10521055    bool status;
     1056    bool modified = false;
    10531057
    10541058    psTimerStart ("psphot.deblend.sat");
     
    10651069
    10661070    psArray *sources = detections->allSources;
    1067     psAssert (sources, "missing sources?");
     1071    // if no work to do, should just return false
     1072    if (!sources) return false;
    10681073
    10691074    if (!sources->n) {
    10701075        psLogMsg ("psphot", PS_LOG_INFO, "no sources, skipping satstar blend");
    1071         return true;
     1076        return false;
    10721077    }
    10731078
     
    10821087        if (!(source->mode2 & PM_SOURCE_MODE2_SATSTAR_PROFILE)) continue;
    10831088
     1089        // tell the calling function that we modified the image
     1090        modified = true;
     1091
    10841092        if (!psphotSatstarProfileOp (source, maskVal, 1.0, 0, add)) continue;
    10851093    }
    10861094
    10871095    psLogMsg ("psphot", PS_LOG_DETAIL, "satstar op: %f sec\n", psTimerMark ("psphot.deblend.sat"));
    1088     return true;
     1096    return modified;
    10891097}
    10901098
Note: See TracChangeset for help on using the changeset viewer.