IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37090


Ignore:
Timestamp:
Jul 20, 2014, 9:41:03 AM (12 years ago)
Author:
eugene
Message:

lensing values are now correctly merged

Location:
branches/eam_branches/ipp-20140717/Ohana/src/dvomerge/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140717/Ohana/src/dvomerge/src/build_links.c

    r37084 r37090  
    343343Lensing *sort_lensing (Average *average, off_t Naverage, Lensing *lensing, off_t Nlensing, off_t *next_lens) {
    344344
    345   off_t i, k, n, N;
     345  off_t i, k, n, np, N;
    346346  Lensing *tmplensing;
     347
     348  /*
     349  for (i = 0; i < Naverage; i++) {
     350    if (average[i].Nlensing != 4) {
     351      fprintf (stderr, "check %d %d %d\n", (int) i, (int) average[i].Nlensing, (int) average[i].lensingOffset);
     352    }
     353  }
     354  */
    347355
    348356  /* fix order of Lensing (memory intensive, but fast) */
     
    354362    average[i].lensingOffset = N;
    355363    for (k = 0; k < average[i].Nlensing; k++, N++) {
    356       if (n == -1) abort();
     364      if (n == -1) {
     365        fprintf (stderr, "entry after %d has a problem\n", (int) np);
     366        abort();
     367      }
    357368      tmplensing[N] = lensing[n];
    358369      if (lensing[n].averef != i) abort();
    359370      tmplensing[N].averef = i;
     371      np = n;
    360372      n = next_lens[n];
    361373    }
  • branches/eam_branches/ipp-20140717/Ohana/src/dvomerge/src/merge_catalogs_old.c

    r37084 r37090  
    269269        output[0].lensing[Nlens].objID    = output[0].average[n].objID;
    270270        output[0].lensing[Nlens].catID    = output[0].catID;
     271        output[0].average[n].Nlensing ++;
    271272        Nlens ++;
    272273      }
     
    388389    /** add lensing for this input average object **/
    389390    if (output[0].lensing) {
     391      output[0].average[Nave].lensingOffset  = Nlens;
    390392      for (Nin = 0; Nin < input[0].average[N].Nlensing; Nin ++) {
    391393        // supply the lensing values from this detection
Note: See TracChangeset for help on using the changeset viewer.