IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 14, 2015, 10:12:31 AM (11 years ago)
Author:
eugene
Message:

make sure the full catalog structure is initialized before calling dvo_catalog_open

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

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/dvomerge/src/LoadCatalog.c

    r38441 r38471  
    33int LoadCatalog (Catalog *catalog, SkyRegion *region, char *filename, char *mode, int Nsecfilt) {
    44
    5     // set the parameters which guide catalog open/load/create
    6     catalog[0].filename  = filename;
    7     catalog[0].Nsecfilt  = Nsecfilt;
     5  // set the parameters which guide catalog open/load/create
     6  dvo_catalog_init (catalog, TRUE);
     7  catalog[0].filename  = filename;
     8  catalog[0].Nsecfilt  = Nsecfilt;
    89
    9     // always load all of the data (if any exists)
    10     catalog[0].catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT | DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ | DVO_LOAD_STARPAR | DVO_LOAD_GALPHOT;
    11 
    12     catalog[0].catformat = dvo_catalog_catformat (CATFORMAT);  // set the default catformat from config data
    13     catalog[0].catmode   = dvo_catalog_catmode (CATMODE);      // set the default catmode from config data
    14 
    15     if (!dvo_catalog_open (catalog, region, VERBOSE, mode)) {
    16         fprintf (stderr, "ERROR: failure to open catalog file %s\n", filename);
    17         exit (2);
    18     }
    19     return (TRUE);
     10  // always load all of the data (if any exists)
     11  catalog[0].catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT | DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ | DVO_LOAD_STARPAR | DVO_LOAD_GALPHOT;
     12 
     13  catalog[0].catformat = dvo_catalog_catformat (CATFORMAT);  // set the default catformat from config data
     14  catalog[0].catmode   = dvo_catalog_catmode (CATMODE);      // set the default catmode from config data
     15 
     16  if (!dvo_catalog_open (catalog, region, VERBOSE, mode)) {
     17    fprintf (stderr, "ERROR: failure to open catalog file %s\n", filename);
     18    exit (2);
     19  }
     20  return (TRUE);
    2021}
  • trunk/Ohana/src/dvomerge/src/dvosecfilt_catalogs.c

    r38468 r38471  
    3535    char hostfile[1024];
    3636    snprintf (hostfile, 1024, "%s/%s.cpt", HOSTDIR, skylist->regions[i]->name);
     37
     38    dvo_catalog_init (&catalog, TRUE);
    3739    catalog.filename  = HOST_ID ? hostfile : skylist->filename[i];
    3840
  • trunk/Ohana/src/dvomerge/src/dvoverify_utils.c

    r38441 r38471  
    175175
    176176  // set the parameters which guide catalog open/load/create
     177    dvo_catalog_init (&catalog, TRUE);
    177178  catalog.filename  = filename;
    178   catalog.catformat = DVO_FORMAT_UNDEF; // read-only,do not set the catformat
    179   catalog.catmode   = DVO_MODE_UNDEF; // read-only, do not set the catmode
    180179  catalog.catflags  = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ;
    181180  catalog.Nsecfilt  = 0;
Note: See TracChangeset for help on using the changeset viewer.