IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29182


Ignore:
Timestamp:
Sep 21, 2010, 1:52:03 PM (16 years ago)
Author:
bills
Message:

fix incorrect mapping of secfilt photcodes in dvomerge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libdvo/src/dvo_photcode_ops.c

    r28855 r29182  
    539539// Create a map between the secfilt values from one photcode table to another
    540540int *GetSecFiltMap(PhotCodeData *output, PhotCodeData *input) {
    541   int i;
     541  int i, j;
    542542  int NsecfiltIn  = input[0].Nsecfilt;
     543  int NsecfiltOut = output[0].Nsecfilt;
    543544  int *map;
    544545  ALLOCATE(map, int, NsecfiltIn);
    545546
    546   // loop over entries
     547  // loop over entries in the input table
    547548  for (i = 0; i < NsecfiltIn; i++) {
    548549    int code  = input[0].codeNsec[i];
    549     int entry = output[0].hashcode[code];
     550    int entry = -1;
     551    // find the matching entry in the output table
     552    for (j = 0; j < NsecfiltOut; j++) {
     553      int outcode = output[0].codeNsec[j];
     554      if (code == outcode) {
     555         entry = j;
     556         break;
     557      }
     558    }
    550559    if (entry == -1) {
    551       // entry is missing
     560      // entry is missing fail (no printfs in this file)
    552561      free(map);
    553562      return(FALSE);
Note: See TracChangeset for help on using the changeset viewer.