IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38389


Ignore:
Timestamp:
Jun 5, 2015, 12:42:15 PM (11 years ago)
Author:
bills
Message:

change psphotLoadExtSources to loop over all readouts.
Note used in any programs that work on more than one readout (i.e. psphotStack)
but I implmented it for an early incarnation of -updatemode.

File:
1 edited

Legend:

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

    r36375 r38389  
    6464// only expect a single entry for PSPHOT.INPUT.CMF and PSPHOT.SOURCES.TEXT, so we can only
    6565// associate input sources with a single entry for the filerule
    66 bool psphotLoadExtSources (pmConfig *config, const pmFPAview *view, const char *filerule) {
     66bool psphotLoadExtSourcesReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index) {
    6767
    6868    bool status;
     
    7070    pmDetections *extCFF = NULL;
    7171    psArray *extSourcesTXT = NULL;
    72     int index = 0;
    7372
    7473    // find the currently selected readout
     
    197196    psLogMsg ("psphot", 3, "%d external sources (%d cmf, %d cff, %d text) merged to yield %ld total sources",
    198197              nCMF + nCFF + nTXT, nCMF, nCFF, nTXT, sources->n);
     198    return true;
     199}
     200bool psphotLoadExtSources(pmConfig *config, const pmFPAview *view, const char *filerule) {
     201    int num = psphotFileruleCount(config, filerule);
     202
     203    // loop over the available readouts
     204    for (int i = 0; i < num; i++) {
     205        if (!psphotLoadExtSourcesReadout (config, view, filerule, i)) {
     206            psError (PSPHOT_ERR_CONFIG, false, "failed to load sources for %s entry %d", filerule, i);
     207            return false;
     208        }
     209    }
    199210    return true;
    200211}
Note: See TracChangeset for help on using the changeset viewer.