IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 29, 2018, 1:29:46 PM (8 years ago)
Author:
eugene
Message:

update dvosplit to handle all catalog tables

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/dvosplit/src/split_averages.subset.c

    r40560 r40561  
    22# define NROWS 1000000 /* ~10MB per block for measures */
    33# define DNOUT 1000
     4
     5/* used in find_matches, find_matches_refstars */
     6# define IN_REGION(REG,R,D) (                        \
     7((D) >= REG[0].Dmin) && ((D) < REG[0].Dmax) && \
     8((R) >= REG[0].Rmin) && ((R) < REG[0].Rmax))
     9
    410
    511AveLinks *split_averages (Catalog *incatalog, SkyList *outlist, Catalog *outcatalogs) {
     
    5359      inD = incatalog[0].average[ave].D;
    5460
     61      // XXX do not skip : galphot dvo has Nmeasure == 0
    5562      if (incatalog[0].average[ave].Nmeasure == 0) {
    5663        fprintf (stderr, "WARNING: object with no measurements, skipping %d (%f, %f)\n", averef, inR, inD);
    57         continue;
    5864      }
     65
    5966      // which of the outcatalogs contains this coordinate?
    60 
    6167      Ncat = -1;
    6268      for (cat = 0; cat < outlist[0].Nregions; cat++) {
    63         if (inR < outlist[0].regions[cat][0].Rmin) continue;
    64         if (inR > outlist[0].regions[cat][0].Rmax) continue;
    65         if (inD < outlist[0].regions[cat][0].Dmin) continue;
    66         if (inD > outlist[0].regions[cat][0].Dmax) continue;
     69        if (!IN_REGION(outlist[0].regions[cat], inR, inD)) continue;
    6770        Ncat = cat;
    6871        break;
    6972      }
    7073
     74      // NO outcatalogs contains this coordinate?
    7175      if (Ncat == -1) {
    7276        fprintf (stderr, "WARNING: missed %d (%f, %f)\n", averef, inR, inD);
Note: See TracChangeset for help on using the changeset viewer.