IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 27, 2013, 3:47:04 PM (13 years ago)
Author:
eugene
Message:

updates for psphotFullForce I/O

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130904/psphot/src/psphotMergeSources.c

    r36146 r36154  
    105105    {
    106106        pmReadout *readoutCMF = pmFPAfileThisReadout (config->files, view, "PSPHOT.INPUT.CMF");
    107         if (!readoutCMF) goto loadTXT;
     107        if (!readoutCMF) goto loadCFF;
    108108
    109109        extCMF = psMetadataLookupPtr (NULL, readoutCMF->analysis, "PSPHOT.DETECTIONS");
     
    111111            for (int i = 0; i < extCMF->allSources->n; i++) {
    112112                pmSource *source = extCMF->allSources->data[i];
     113                source->mode |= PM_SOURCE_MODE_EXTERNAL;
     114
     115                // the supplied peak flux needs to be re-normalized
     116                source->peak->rawFlux = 1.0;
     117                source->peak->smoothFlux = 1.0;
     118                source->peak->detValue = 1.0;
     119
     120                // drop the loaded source modelPSF
     121                psFree (source->modelPSF);
     122                source->modelPSF = NULL;
     123                source->imageID = index;
     124
     125                psArrayAdd (detections->newSources, 100, source);
     126            }
     127        }
     128    }
     129
     130loadCFF:
     131    // load data from input CFF file:
     132    {
     133        pmReadout *readoutCFF = pmFPAfileThisReadout (config->files, view, "PSPHOT.INPUT.CFF");
     134        if (!readoutCFF) goto loadTXT;
     135
     136        extCFF = psMetadataLookupPtr (NULL, readoutCFF->analysis, "PSPHOT.DETECTIONS");
     137        if (extCFF) {
     138            for (int i = 0; i < extCFF->allSources->n; i++) {
     139                pmSource *source = extCFF->allSources->data[i];
    113140                source->mode |= PM_SOURCE_MODE_EXTERNAL;
    114141
Note: See TracChangeset for help on using the changeset viewer.