IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 27, 2016, 3:21:04 PM (10 years ago)
Author:
eugene
Message:

adding option to repair the lensing.imageID based on the warp measure.imageID values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/dvolens/src/update_objects.c

    r39484 r39487  
    3737
    3838  if (VERBOSE) fprintf (stderr, "re-loading catalog data\n");
     39
     40  // XXX I need to load enough of the images to load the warp groups
     41
     42  if (REPAIR_LENSING_IDS) {
     43    load_images (skylist);
     44    FindWarpGroups();
     45  }
    3946
    4047  /* load data from each region file */
     
    150157    table->hosts[i].pathname = tmppath;
    151158
    152     char command[1024];
    153     snprintf (command, 1024, "dvolens_client -update-objects -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f",
    154               table->hosts[i].hostID, CATDIR, table->hosts[i].pathname,
    155               UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
    156 
    157     // options & configs which affect dvolens_client -update-catalogs
     159    char *command = NULL;
     160    strextend (&command, "dvolens_client -update-objects");
     161    strextend (&command, "-hostID %d", table->hosts[i].hostID);
     162    strextend (&command, "-D CATDIR %s", CATDIR);
     163    strextend (&command, "-hostdir %s", table->hosts[i].pathname);
     164    strextend (&command, "-region %f %f %f %f", UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
     165
     166    // options & configs which affect dvolens_client -update-catalogs:
    158167    // VERBOSE, VERBOSE2, UPDATE
    159    
    160     char tmpline[1024];
    161     if (VERBOSE)          { snprintf (tmpline, 1024, "%s -v",                   command);                                         strcpy (command, tmpline); }
    162     if (VERBOSE2)         { snprintf (tmpline, 1024, "%s -vv",                  command);                                         strcpy (command, tmpline); }
    163     if (UPDATE)           { snprintf (tmpline, 1024, "%s -update",              command);                                         strcpy (command, tmpline); }
     168
     169    if (VERBOSE)            strextend (&command, "-v");
     170    if (VERBOSE2)           strextend (&command, "-vv");
     171    if (UPDATE)             strextend (&command, "-update");
     172    if (REPAIR_LENSING_IDS) strextend (&command, "-repair-lensing-ids");
    164173
    165174    fprintf (stderr, "command: %s\n", command);
    166175
    167176    if (PARALLEL_MANUAL) {
     177      free (command);
    168178      continue;
    169179    }
     
    185195      table->hosts[i].pid = pid; // save for future reference
    186196    }
     197    free (command);
    187198  }
    188199
     
    198209    }
    199210  }
     211
     212  FreeHostTable (table);
    200213  return (TRUE);
    201214}     
Note: See TracChangeset for help on using the changeset viewer.