Changeset 33963 for trunk/Ohana/src/opihi/dvo/avextract.c
- Timestamp:
- May 30, 2012, 1:46:12 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
Ohana/src/opihi/dvo/avextract.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
trunk/Ohana/src/opihi/dvo/avextract.c
r33662 r33963 37 37 } 38 38 39 int VERBOSE2 = FALSE; 40 if ((N = get_argument (argc, argv, "-vv"))) { 41 remove_argument (N, &argc, argv); 42 VERBOSE = TRUE; 43 VERBOSE2 = TRUE; 44 } 45 39 46 int PARALLEL = FALSE; 40 47 if ((N = get_argument (argc, argv, "-parallel"))) { … … 65 72 return FALSE; 66 73 } 74 } 75 76 // this is used to NOT save the results in the results file 77 // use this option when mextract is used in a script which does its 78 // own job of packaging the results 79 int SKIP_RESULTS = FALSE; 80 if ((N = get_argument (argc, argv, "-skip-results"))) { 81 remove_argument (N, &argc, argv); 82 SKIP_RESULTS = TRUE; 67 83 } 68 84 … … 80 96 goto escape; 81 97 } 98 99 // init locally static variables (time refs) 100 dbExtractAveragesInit (); 82 101 83 102 // command-line is of the form: avextract field,field, field [where (field op value)...] … … 173 192 catalog.filename = (HOST_ID || PARALLEL_LOCAL) ? hostfile : skylist[0].filename[i]; 174 193 catalog.catflags = LOAD_AVES | LOAD_SECF; 175 if (needMeasures) { 176 catalog.catflags |= LOAD_MEAS; 177 } 194 catalog.catflags |= needMeasures ? LOAD_MEAS : SKIP_MEAS; 178 195 catalog.Nsecfilt = 0; 179 196 … … 181 198 182 199 // an error exit status here is a significant error 183 if (!dvo_catalog_open (&catalog, NULL, FALSE, "r")) {200 if (!dvo_catalog_open (&catalog, NULL, VERBOSE2, "r")) { 184 201 gprint (GP_ERR, "ERROR: failure to open catalog file %s\n", catalog.filename); 185 202 exit (2); … … 193 210 m = catalog.average[j].measureOffset; 194 211 195 // reset counters for saved fields, extract fields196 dbExtractAveragesInit (); 212 dbExtractAveragesInitAve (); // reset counters for saved fields (costs very little) 213 197 214 for (n = 0; n < Nfields; n++) { 198 215 values[n] = dbExtractAverages (&catalog.average[j], &catalog.secfilt[j*Nsecfilt], &catalog.measure[m], &fields[n]); … … 229 246 230 247 // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere) 231 if (RESULT_FILE ) {248 if (RESULT_FILE && !SKIP_RESULTS) { 232 249 int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nreturn, FALSE, NULL); 233 if (!status) goto escape; 250 if (!status) { 251 goto escape; 252 } 234 253 } 235 254
Note:
See TracChangeset
for help on using the changeset viewer.
