IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 12, 2015, 6:18:23 PM (11 years ago)
Author:
eugene
Message:

merge changes from EAM dev branch ohana.20150429

Location:
trunk/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/relphot/src/relphot_synthphot.c

    r38062 r38441  
    4040    char hostfile[1024];
    4141    snprintf (hostfile, 1024, "%s/%s.cpt", hostpath, skylist[0].regions[i]->name);
    42     catalog.filename  = hostID ? hostfile : skylist[0].filename[i];
    43     catalog.catformat = dvo_catalog_catformat (CATFORMAT);    // set the default catformat from config data
    44     catalog.catmode   = dvo_catalog_catmode (CATMODE);        // set the default catmode from config data
    45     catalog.catflags  = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
    46     catalog.Nsecfilt  = GetPhotcodeNsecfilt ();
     42    catalog.filename    = hostID ? hostfile : skylist[0].filename[i];
     43    // catalog.catformat   = dvo_catalog_catformat (CATFORMAT);    // set the default catformat from config data
     44    // catalog.catmode     = dvo_catalog_catmode (CATMODE);        // set the default catmode from config data
     45    // catalog.catcompress = dvo_catalog_catcompress (CATCOMPRESS); // set the default catcompress from config data
     46    catalog.catflags    = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_SECFILT;
     47    catalog.Nsecfilt    = GetPhotcodeNsecfilt ();
    4748
    4849    if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE, "w")) {
     
    5051      exit (1);
    5152    }
    52     if (!catalog.Naves_disk) {
     53    if (!catalog.Naverage_disk) {
    5354      if (VERBOSE) fprintf (stderr, "no data in %s, skipping\n", catalog.filename);
    5455      dvo_catalog_unlock (&catalog);
     
    109110    // VERBOSE, VERBOSE2
    110111
    111     char command[1024];
    112     snprintf (command, 1024, "relphot_client -synthphot_means %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f",
    113               SYNTH_ZERO_POINTS, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
     112    char *command = NULL;
     113    strextend (&command, "relphot_client -synthphot_means %s", SYNTH_ZERO_POINTS);
     114    strextend (&command, "-hostID %d -D CATDIR %s -hostdir %s", table->hosts[i].hostID, CATDIR, table->hosts[i].pathname);
     115    strextend (&command, "-region %f %f %f %f", UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
    114116
    115     char tmpline[1024];
    116     if (VERBOSE)       { snprintf (tmpline, 1024, "%s -v",              command);                    strcpy (command, tmpline); }
    117     if (VERBOSE2)      { snprintf (tmpline, 1024, "%s -vv",             command);                    strcpy (command, tmpline); }
    118     if (UPDATE)        { snprintf (tmpline, 1024, "%s -update",         command);                    strcpy (command, tmpline); }
     117    if (VERBOSE)       { strextend (&command, "-v");      }
     118    if (VERBOSE2)      { strextend (&command, "-vv");     }
     119    if (UPDATE)        { strextend (&command, "-update"); }
    119120
    120121    fprintf (stderr, "command: %s\n", command);
Note: See TracChangeset for help on using the changeset viewer.