IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 12, 2015, 9:35:20 PM (11 years ago)
Author:
eugene
Message:

merge from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150419/Ohana/src/relphot/src/relphot_objects.c

    r38317 r38445  
    4242    char hostfile[1024];
    4343    snprintf (hostfile, 1024, "%s/%s.cpt", hostpath, skylist[0].regions[i]->name);
    44     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.catflags  = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;
    48     catalog.Nsecfilt  = GetPhotcodeNsecfilt ();
     44    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
     48    catalog.catflags    = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT;
     49    catalog.Nsecfilt    = GetPhotcodeNsecfilt ();
    4950
    5051    if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE, "w")) {
     
    5253      exit (1);
    5354    }
    54     if (!catalog.Naves_disk) {
     55    if (!catalog.Naverage_disk) {
    5556      if (VERBOSE) fprintf (stderr, "no data in %s, skipping\n", catalog.filename);
    5657      dvo_catalog_unlock (&catalog);
     
    143144    // MaxDensityUse, MaxDensityValue
    144145
    145     char command[1024];
    146     snprintf (command, 1024, "relphot_client -update-objects -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -D CAMERA %s -D STAR_TOOFEW %d -minerror %f",
     146    char *command = NULL;
     147    strextend (&command, "relphot_client -update-objects -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -D CAMERA %s -D STAR_TOOFEW %d -minerror %f",
    147148              table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, CAMERA, STAR_TOOFEW, MIN_ERROR);
    148149
    149     char tmpline[1024];
    150     if (VERBOSE)       { snprintf (tmpline, 1024, "%s -v",              command);                    strcpy (command, tmpline); }
    151     if (VERBOSE2)      { snprintf (tmpline, 1024, "%s -vv",             command);                    strcpy (command, tmpline); }
    152     if (RESET)         { snprintf (tmpline, 1024, "%s -reset",          command);                    strcpy (command, tmpline); }
    153     if (RESET_ZEROPTS) { snprintf (tmpline, 1024, "%s -reset-zpts",     command);                    strcpy (command, tmpline); }
    154     if (UPDATE)        { snprintf (tmpline, 1024, "%s -update",         command);                    strcpy (command, tmpline); }
    155     if (!KEEP_UBERCAL) { snprintf (tmpline, 1024, "%s -reset-ubercal",  command);                    strcpy (command, tmpline); }
    156     if (SET_MREL_VERSION != 1) { snprintf (tmpline, 1024, "%s -set-mrel-version %d", command, SET_MREL_VERSION); strcpy (command, tmpline); }
     150    if (VERBOSE)       { strextend (&command, "-v"); }
     151    if (VERBOSE2)      { strextend (&command, "-vv"); }
     152    if (RESET)         { strextend (&command, "-reset"); }
     153    if (RESET_ZEROPTS) { strextend (&command, "-reset-zpts"); }
     154    if (UPDATE)        { strextend (&command, "-update"); }
     155    if (!KEEP_UBERCAL) { strextend (&command, "-reset-ubercal"); }
    157156    if (SYNTH_ZERO_POINTS) { snprintf (tmpline, 1024, "%s -synthphot-zpts %s", command, SYNTH_ZERO_POINTS); strcpy (command, tmpline); }
     157
     158    // if (SET_MREL_VERSION != 1) { strextend (&command, "-set-mrel-version %d", SET_MREL_VERSION); }
    158159
    159160    fprintf (stderr, "command: %s\n", command);
Note: See TracChangeset for help on using the changeset viewer.