IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37512


Ignore:
Timestamp:
Oct 21, 2014, 9:17:56 AM (12 years ago)
Author:
eugene
Message:

allow dvomerge to merge into matched tables, keeping outliers in their source table

Location:
branches/eam_branches/ipp-20140904/Ohana/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/include/dvomerge.h

    r37495 r37512  
    4242int    FORCE_MERGE;
    4343
     44int    MATCHED_TABLES;
     45
    4446char *SINGLE_CPT;
    4547SkyRegion UserPatch;  // used by MODE CAT
  • branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/src/args.c

    r35765 r37512  
    3434  if ((N = get_argument (*argc, argv, "-images-only"))) {
    3535    IMAGES_ONLY = TRUE;
     36    remove_argument (N, argc, argv);
     37  }
     38
     39  /* extra error messages */
     40  MATCHED_TABLES = FALSE;
     41  if ((N = get_argument (*argc, argv, "-matched-tables"))) {
     42    MATCHED_TABLES = TRUE;
    3643    remove_argument (N, argc, argv);
    3744  }
  • branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c

    r37511 r37512  
    5858    }
    5959
    60 # if 0
     60# ifdef OLD_CODE
    6161    // NOTE: i was having trouble dropping objects on edges with the option below.  Since an object can move outside the catalog grab the neighbors.
    6262    // SkyListByBounds will return neighbor catalogs if the boundaries exactly match (due to rounding).  Since the regions are not infinitely small,
     
    6464    float dPos = 2.0/3600.0;
    6565    outlist = SkyListByBounds (outsky, -1, inlist[0].regions[i][0].Rmin + dPos, inlist[0].regions[i][0].Rmax - dPos, inlist[0].regions[i][0].Dmin + dPos, inlist[0].regions[i][0].Dmax - dPos);
    66 # else
    67     // Since an object can move outside the catalog grab the neighbors.
    68     float dPos = 2.0/3600.0;
    69     outlist = SkyListByBounds (outsky, -1, inlist[0].regions[i][0].Rmin - dPos, inlist[0].regions[i][0].Rmax + dPos, inlist[0].regions[i][0].Dmin - dPos, inlist[0].regions[i][0].Dmax + dPos);
    7066# endif
     67
     68    if (MATCHED_TABLES) {
     69      // if we know the output will have the same depth / layout as the input, just choose the matched table
     70      outlist = SkyRegionByIndex (outsky, inlist[0].regions[i][0].index);
     71    } else {
     72      // Since an object can move outside the catalog grab the neighbors.
     73      float dPos = 2.0/3600.0;
     74      outlist = SkyListByBounds (outsky, -1, inlist[0].regions[i][0].Rmin - dPos, inlist[0].regions[i][0].Rmax + dPos, inlist[0].regions[i][0].Dmin - dPos, inlist[0].regions[i][0].Dmax + dPos);
     75    }
    7176
    7277    OutputStatus *outstat = OutputStatusInit (outlist->Nregions);
  • branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/src/merge_catalogs_old.c

    r37511 r37512  
    322322
    323323    if (input[0].found_t[N] >= 0) continue;
    324     if (!IN_REGION (input[0].average[N].R, input[0].average[N].D)) continue;
     324
     325    // if we are using MATCHED_TABLES, we are going to leave the edge cases in their
     326    // source catalog, even if they have leaked beyond the edge
     327    if (!MATCHED_TABLES && !IN_REGION (input[0].average[N].R, input[0].average[N].D)) continue;
    325328
    326329    // XXX should we accept the input measurements for these fields?
  • branches/eam_branches/ipp-20140904/Ohana/src/libdvo/include/dvo.h

    r37494 r37512  
    933933SkyTable  *SkyTableLoadOptimal     PROTO((char *catdir, char *SKYFILE, char *GSCFILE, int readwrite, int depth, int VERBOSE));
    934934int        SkyTableSetDepth        PROTO((SkyTable *sky, int depth));
     935SkyList   *SkyRegionByIndex        PROTO((SkyTable *table, int index));
    935936SkyList   *SkyRegionByCPT          PROTO((SkyTable *table, char *filename));
    936937SkyList   *SkyRegionByPoint        PROTO((SkyTable *table, int depth, double ra, double dec));
  • branches/eam_branches/ipp-20140904/Ohana/src/libdvo/src/skyregion_ops.c

    r35102 r37512  
    1616  if (c) return (c+1);
    1717  return name;
     18}
     19
     20/* find region which corresponds to the given index */
     21SkyList *SkyRegionByIndex (SkyTable *table, int index) {
     22 
     23  SkyList *list;
     24
     25  ALLOCATE (list, SkyList, 1);
     26  ALLOCATE (list[0].regions,  SkyRegion *, 1);
     27  ALLOCATE (list[0].filename,  char *, 1);
     28  list[0].Nregions = 0;
     29  list[0].ownElements = FALSE; // this list is only holding a view to the elements
     30  strcpy (list[0].hosts, table[0].hosts);
     31
     32  list[0].regions[0] = &table[0].regions[index];
     33  list[0].filename[0] = table[0].filename[index];
     34  list[0].Nregions = 1;
     35  return (list);
    1836}
    1937
Note: See TracChangeset for help on using the changeset viewer.