IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33616


Ignore:
Timestamp:
Mar 28, 2012, 8:49:26 AM (14 years ago)
Author:
eugene
Message:

cleanups for parallel ops

Location:
branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/mextract.c

    r33615 r33616  
    2525  selection = NULL;
    2626
    27   fprintf (stderr, "start...");
     27  // fprintf (stderr, "start...");
    2828  if ((N = get_argument (argc, argv, "-h"))) goto help;
    2929  if ((N = get_argument (argc, argv, "--help"))) goto help;
     
    3939    remove_argument (N, &argc, argv);
    4040    PARALLEL = TRUE;
     41  }
     42
     43  // this is used to NOT save the results in the results file
     44  // use this option when mextract is used in a script which does its
     45  // own job of packaging the results
     46  int SKIP_RESULTS = FALSE;
     47  if ((N = get_argument (argc, argv, "-skip-results"))) {
     48    remove_argument (N, &argc, argv);
     49    SKIP_RESULTS = TRUE;
    4150  }
    4251
     
    146155  interrupt = FALSE;
    147156
    148   fprintf (stderr, "done setup...");
     157  // fprintf (stderr, "done setup...");
    149158
    150159  for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
     
    171180    /* XXX need to call dvo_catalog_chipcoords here passing the loaded images */
    172181
    173     fprintf (stderr, "done read...");
     182    // fprintf (stderr, "done read...");
    174183
    175184    for (j = 0; (j < catalog.Naverage) && !interrupt; j++) {
     
    223232  interrupt = FALSE;
    224233
    225   fprintf (stderr, "done load...");
     234  // fprintf (stderr, "done load...");
    226235
    227236  for (n = 0; n < Nreturn; n++) {
     
    230239
    231240  // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere)
    232   if (RESULT_FILE) {
     241  if (RESULT_FILE && !SKIP_RESULTS) {
    233242    int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nreturn, FALSE, NULL);
    234243    if (!status) goto escape;
     
    244253  FreeSkyRegionSelection (selection);
    245254
    246   fprintf (stderr, "done extr...\n");
     255  // fprintf (stderr, "done extr...\n");
    247256  return (TRUE);
    248257
  • branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/region_list.c

    r33615 r33616  
    183183  /* determine region-file names */
    184184  if (selection->name != NULL) {
    185     char filename[256];
    186     char *CATDIR = dvo_get_catdir();
    187 
    188     ALLOCATE (skylist, SkyList, 1);
    189     ALLOCATE (skylist[0].regions, SkyRegion *, 1);
    190     ALLOCATE (skylist[0].regions[0], SkyRegion, 1);
    191     ALLOCATE (skylist[0].filename, char *, 1);
    192     skylist[0].ownElements = TRUE; // free these elements when freeing the list
    193    
    194     strcpy (skylist[0].regions[0][0].name, selection->name);
    195     sprintf (filename, "%s/%s.cpt", CATDIR, selection->name);
    196     skylist[0].filename[0] = strcreate (filename);
    197     skylist[0].Nregions = 1;
     185    skylist = SkyListByName (sky, selection->name);
    198186    return (skylist);
    199187  }
Note: See TracChangeset for help on using the changeset viewer.