IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 5, 2011, 10:43:45 AM (15 years ago)
Author:
eugene
Message:

various improvements to relphot, related support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/avextract.c

    r30612 r31450  
    55  off_t i, j, n, m;
    66  int N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack;
    7   int Nsecfilt, mode, VERBOSE;
     7  int Nsecfilt, mode, VERBOSE, needMeasures;
    88  char **cstack, name[1024];
    99  void *Signal;
     
    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.