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/relphot/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relphot/src/load_catalogs.c

    r38441 r38471  
    4242    char hostfile[1024];
    4343    snprintf (hostfile, 1024, "%s/%s.cpt", hostpath, skylist[0].regions[i]->name);
     44    dvo_catalog_init (&tcatalog, TRUE);
    4445    tcatalog.filename    = hostID ? hostfile : skylist[0].filename[i];
    4546    tcatalog.catflags    = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_SECFILT;    // don't need to load all data at this point
    4647    tcatalog.Nsecfilt    = GetPhotcodeNsecfilt ();               // set the desired number in case we need to create the catalog
    47 
    48     // tcatalog.catformat   = dvo_catalog_catformat (CATFORMAT);    // set the default catformat from config data
    49     // tcatalog.catmode     = dvo_catalog_catmode (CATMODE);        // set the default catmode from config data
    50     // tcatalog.catcompress = dvo_catalog_catcompress (CATCOMPRESS); // set the default catcompress from config data
    5148
    5249    if (!dvo_catalog_open (&tcatalog, skylist[0].regions[i], VERBOSE2, "r")) {
  • trunk/Ohana/src/relphot/src/reload_catalogs.c

    r38470 r38471  
    4949    char hostfile[1024];
    5050    snprintf (hostfile, 1024, "%s/%s.cpt", hostpath, skylist[0].regions[i]->name);
     51
     52    dvo_catalog_init (&catalog, TRUE);
    5153    catalog.filename = hostID ? hostfile : skylist[0].filename[i];
    5254
     
    5961    TIMESTAMP(time1);
    6062
    61     // catalog.catformat   = dvo_catalog_catformat (CATFORMAT);    // set the default catformat from config data
    62     // catalog.catmode     = dvo_catalog_catmode (CATMODE);        // set the default catmode from config data
    63     // catalog.catcompress = dvo_catalog_catcompress (CATCOMPRESS); // set the default catcompress from config data
    6463    catalog.catflags    = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT;
    6564    catalog.Nsecfilt    = GetPhotcodeNsecfilt ();               // set the desired number in case we need to create the catalog
  • trunk/Ohana/src/relphot/src/relphot_objects.c

    r38470 r38471  
    4242    char hostfile[1024];
    4343    snprintf (hostfile, 1024, "%s/%s.cpt", hostpath, skylist[0].regions[i]->name);
     44
     45    dvo_catalog_init (&catalog, TRUE);
    4446    catalog.filename    = hostID ? hostfile : skylist[0].filename[i];
    45     // catalog.catformat   = dvo_catalog_catformat (CATFORMAT);    // set the default catformat from config data
    46     // catalog.catmode     = dvo_catalog_catmode (CATMODE);        // set the default catmode from config data
    47     // catalog.catcompress = dvo_catalog_catcompress (CATCOMPRESS); // set the default catcompress from config data
    4847    catalog.catflags    = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT;
    4948    catalog.Nsecfilt    = GetPhotcodeNsecfilt ();
  • trunk/Ohana/src/relphot/src/relphot_synthphot.c

    r38466 r38471  
    4141    char hostfile[1024];
    4242    snprintf (hostfile, 1024, "%s/%s.cpt", hostpath, skylist[0].regions[i]->name);
     43
     44    dvo_catalog_init (&catalog, TRUE);
    4345    catalog.filename    = hostID ? hostfile : skylist[0].filename[i];
    44     // catalog.catformat   = dvo_catalog_catformat (CATFORMAT);    // set the default catformat from config data
    45     // catalog.catmode     = dvo_catalog_catmode (CATMODE);        // set the default catmode from config data
    46     // catalog.catcompress = dvo_catalog_catcompress (CATCOMPRESS); // set the default catcompress from config data
    4746    catalog.catflags    = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_SECFILT;
    4847    catalog.Nsecfilt    = GetPhotcodeNsecfilt ();
  • trunk/Ohana/src/relphot/src/setMrelCatalog.c

    r38466 r38471  
    128128
    129129    // these bits should not be set unless we use them in this pass
    130     measure[k].dbFlags &= ~(ID_MEAS_PHOTOM_PSF | ID_MEAS_PHOTOM_APER | ID_MEAS_PHOTOM_KRON);
     130    // (note that we can only un-set them in the final pass when we actually have measure, not just measureT
     131    if (measure) measure[k].dbFlags &= ~(ID_MEAS_PHOTOM_PSF | ID_MEAS_PHOTOM_APER | ID_MEAS_PHOTOM_KRON);
    131132
    132133    // skip measurements that do not have a valid photcode (raise exception?)
Note: See TracChangeset for help on using the changeset viewer.