IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31308


Ignore:
Timestamp:
Apr 17, 2011, 10:56:10 AM (15 years ago)
Author:
eugene
Message:

only load the measure table if we need it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110404/Ohana/src/opihi/dvo/avextract.c

    r30612 r31308  
    101101  }
    102102
     103  // check the requested fields : are all average/secfilt entries, or do we need measures?
     104  needMeasures = FALSE;
     105  for (i = 0; !needMeasures && (i < Nfields); i++) {
     106    if (fields[i].magMode == MAG_NONE) continue;
     107    if (fields[i].photcode == NULL) continue; // assert this?
     108    if (fields[i].photcode[0].type == PHOT_REF) needMeasures = TRUE;
     109    if (fields[i].photcode[0].type == PHOT_DEP) needMeasures = TRUE;
     110  }
     111
    103112  // grab data from all selected sky regions
    104113  Signal = signal (SIGINT, handle_interrupt);
     
    107116    /* lock, load, unlock catalog */
    108117    catalog.filename = skylist[0].filename[i];
    109     catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
     118    catalog.catflags = LOAD_AVES | LOAD_SECF;
     119    if (needMeasures) {
     120      catalog.catflags |= LOAD_MEAS;
     121    }
    110122    catalog.Nsecfilt = 0;
    111123
Note: See TracChangeset for help on using the changeset viewer.