IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39536


Ignore:
Timestamp:
Apr 16, 2016, 7:01:57 AM (10 years ago)
Author:
eugene
Message:

add option to re-ingest just the lensing tables

Location:
trunk/Ohana/src/dvomerge
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/dvomerge/include/dvomerge.h

    r39342 r39536  
    5757int    MATCHED_TABLES;
    5858int    RESET_STARPAR;
     59int    RESET_LENSING;
    5960
    6061int    SKIP_MEASURE;
     
    281282char **load_cptlist (char *filename, int *nlist);
    282283int ResetStarPar (Catalog *catalog);
     284int ResetLensing (Catalog *catalog);
  • trunk/Ohana/src/dvomerge/src/LoadCatalog.c

    r39334 r39536  
    6565  return TRUE;
    6666}
     67
     68int ResetLensing (Catalog *catalog) {
     69
     70  off_t i;
     71
     72  // we are going to delete the lensing values:
     73
     74  catalog[0].Nlensing = 0;
     75  catalog[0].Nlensing_disk = 0;
     76  catalog[0].Nlensing_off = 0;
     77
     78  REALLOCATE (catalog[0].lensing, Lensing, 1);
     79
     80  for (i = 0; i < catalog[0].Naverage; i++) {
     81    catalog[0].average[i].Nlensing = 0;
     82    catalog[0].average[i].lensingOffset = -1;
     83  }
     84  return TRUE;
     85}
  • trunk/Ohana/src/dvomerge/src/args.c

    r39342 r39536  
    6969  }
    7070
    71   /* extra error messages */
     71  /* extra options */
    7272  RESET_STARPAR = FALSE;
    7373  if ((N = get_argument (*argc, argv, "-reset-starpar"))) {
    7474    RESET_STARPAR = TRUE;
     75    remove_argument (N, argc, argv);
     76  }
     77  RESET_LENSING = FALSE;
     78  if ((N = get_argument (*argc, argv, "-reset-lensing"))) {
     79    RESET_LENSING = TRUE;
    7580    remove_argument (N, argc, argv);
    7681  }
     
    119124  if ((N = get_argument (*argc, argv, "-restrict-cpt"))) {
    120125    remove_argument (N, argc, argv);
    121     CPTLIST_FILENAME = strcreate (argv[N]);
     126    char *tmppath = strcreate (argv[N]);
     127    CPTLIST_FILENAME = abspath(tmppath, DVO_MAX_PATH);
     128    free (tmppath);
    122129    CPTLIST = load_cptlist (CPTLIST_FILENAME, &NCPTLIST);
    123130    remove_argument (N, argc, argv);
     
    350357    remove_argument (N, argc, argv);
    351358  }
     359  RESET_LENSING = FALSE;
     360  if ((N = get_argument (*argc, argv, "-reset-lensing"))) {
     361    RESET_LENSING = TRUE;
     362    remove_argument (N, argc, argv);
     363  }
    352364
    353365  /* extra error messages */
  • trunk/Ohana/src/dvomerge/src/build_links.c

    r39457 r39536  
    408408  off_t *next_star;
    409409
     410  if (!starpar) return NULL;
     411  if (SKIP_STARPAR) return NULL;
     412
    410413  N = 0;
    411414
     
    565568  off_t *next_galp;
    566569
     570  if (galphot) return NULL;
     571  if (SKIP_GALPHOT) return NULL;
     572
    567573  N = 0;
    568574
  • trunk/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c

    r39350 r39536  
    184184        myAssert (MATCHED_TABLES, "must use -matched-tables to reset starpar");
    185185        ResetStarPar (&outcatalog);
     186      }
     187      if (RESET_LENSING) {
     188        myAssert (MATCHED_TABLES, "must use -matched-tables to reset lensing");
     189        ResetLensing (&outcatalog);
    186190      }
    187191
     
    328332    if (UPDATE_CATFORMAT)    { strextend (&command, "-update-catformat %s", UPDATE_CATFORMAT); }
    329333    if (UPDATE_CATCOMPRESS)  { strextend (&command, "-update-catcompress %s", UPDATE_CATCOMPRESS); }
    330     if (CPTLIST_FILENAME)    { strextend (&command, "-restrict-cpt %s", CPTLIST_FILENAME); }
    331334    if (REPAIR_BY_OBJID)     { strextend (&command, "-repair-by-objid"); }
    332335
     
    337340
    338341    if (RESET_STARPAR)              { strextend (&command, "-reset-starpar"); }
     342    if (RESET_LENSING)              { strextend (&command, "-reset-lensing"); }
    339343    if (ALLOW_MISSING_INPUT_IMAGES) { strextend (&command, "-allow-missing-input-images"); }
    340344    if (CPTLIST_FILENAME)           { strextend (&command, "-restrict-cpt %s", CPTLIST_FILENAME); }
Note: See TracChangeset for help on using the changeset viewer.