Changeset 34819
- Timestamp:
- Dec 14, 2012, 3:03:53 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20121130/Ohana/src/delstar
- Files:
-
- 5 edited
-
include/delstar.h (modified) (2 diffs)
-
src/args.c (modified) (3 diffs)
-
src/delete_photcodes.c (modified) (7 diffs)
-
src/delstar.c (modified) (2 diffs)
-
src/delstar_client.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20121130/Ohana/src/delstar/include/delstar.h
r34749 r34819 27 27 double ALPHA; 28 28 int VERBOSE; 29 int VERBOSE2; 29 30 int ORPHAN; 30 31 int MISSED; … … 38 39 int HOST_ID; 39 40 char *HOSTDIR; 41 42 int SKIP_IMAGES; 40 43 41 44 time_t START; -
branches/eam_branches/ipp-20121130/Ohana/src/delstar/src/args.c
r34749 r34819 44 44 } 45 45 46 VERBOSE2 = FALSE; 47 if ((N = get_argument (argc, argv, "-vv"))) { 48 VERBOSE = TRUE; 49 VERBOSE2 = TRUE; 50 remove_argument (N, &argc, argv); 51 } 52 46 53 // region of interest 47 54 UserPatch.Rmin = 0; … … 58 65 remove_argument (N, &argc, argv); 59 66 UserPatch.Dmax = atof (argv[N]); 67 remove_argument (N, &argc, argv); 68 } 69 70 SKIP_IMAGES = FALSE; 71 if ((N = get_argument (argc, argv, "-skip-images"))) { 72 SKIP_IMAGES = TRUE; 60 73 remove_argument (N, &argc, argv); 61 74 } … … 205 218 } 206 219 220 VERBOSE2 = FALSE; 221 if ((N = get_argument (argc, argv, "-v"))) { 222 VERBOSE = TRUE; 223 VERBOSE2 = TRUE; 224 remove_argument (N, &argc, argv); 225 } 226 207 227 /* specify portion of the sky */ 208 228 UserPatch.Rmin = 0; -
branches/eam_branches/ipp-20121130/Ohana/src/delstar/src/delete_photcodes.c
r34749 r34819 46 46 47 47 // an error exit status here is a significant error 48 if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE , "a")) {48 if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE2, "a")) { 49 49 fprintf (stderr, "ERROR: failure to open catalog file %s\n", catalog.filename); 50 50 exit (2); 51 51 } 52 52 if (!catalog.Naves_disk) { 53 if (VERBOSE ) fprintf (stderr, "no data in %s, skipping\n", catalog.filename);53 if (VERBOSE2) fprintf (stderr, "no data in %s, skipping\n", catalog.filename); 54 54 dvo_catalog_unlock (&catalog); 55 55 dvo_catalog_free (&catalog); … … 58 58 59 59 delete_photcodes_catalog (&catalog, photcodes, Nphotcodes); 60 dvo_catalog_save_complete (&catalog, VERBOSE );60 dvo_catalog_save_complete (&catalog, VERBOSE2); 61 61 dvo_catalog_unlock (&catalog); 62 62 dvo_catalog_free (&catalog); … … 97 97 char tmpline[1024]; 98 98 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 99 if (VERBOSE2) { snprintf (tmpline, 1024, "%s -vv", command); strcpy (command, tmpline); } 99 100 100 101 fprintf (stderr, "command: %s\n", command); … … 287 288 FREE(measure); 288 289 FREE(average); 290 FREE(secfilt); 289 291 catalog[0].measure = measureOut; 290 292 catalog[0].average = averageOut; … … 299 301 for (i = 0; i < NaveOut; i++) { 300 302 NmeasureTotal += catalog[0].average[i].Nmeasure; 301 if (VERBOSE && !(NmeasureTotal <= catalog[0].Nmeasure)) {303 if (VERBOSE2 && !(NmeasureTotal <= catalog[0].Nmeasure)) { 302 304 fprintf (stderr, "too few measurements: %d %d %d\n", (int) i, NmeasureTotal, (int) catalog[0].Nmeasure); 303 305 } 304 306 measureOffsetOK &= (catalog[0].average[i].measureOffset < catalog[0].Nmeasure); 305 if (VERBOSE && !(catalog[0].average[i].measureOffset < catalog[0].Nmeasure)) {307 if (VERBOSE2 && !(catalog[0].average[i].measureOffset < catalog[0].Nmeasure)) { 306 308 fprintf (stderr, "offset too large: %d %d %d\n", (int) i, catalog[0].average[i].Nmeasure, (int) catalog[0].Nmeasure); 307 309 } 308 310 measureOffsetOK &= (catalog[0].average[i].measureOffset + catalog[0].average[i].Nmeasure <= catalog[0].Nmeasure); 309 if (VERBOSE && !(catalog[0].average[i].measureOffset + catalog[0].average[i].Nmeasure <= catalog[0].Nmeasure)) {311 if (VERBOSE2 && !(catalog[0].average[i].measureOffset + catalog[0].average[i].Nmeasure <= catalog[0].Nmeasure)) { 310 312 fprintf (stderr, "orrset + Nmeasure too large: %d + %d > %d %d\n", (int) i, catalog[0].average[i].measureOffset, catalog[0].average[i].Nmeasure, (int) catalog[0].Nmeasure); 311 313 } … … 313 315 for (j = 0; j < catalog[0].average[i].Nmeasure; j++) { 314 316 averefOK &= (catalog[0].measure[m+j].averef == i); 315 if (VERBOSE && !(catalog[0].measure[m+j].averef == i)) {317 if (VERBOSE2 && !(catalog[0].measure[m+j].averef == i)) { 316 318 fprintf (stderr, "averef broken: %d vs %d (measure %d)\n", (int) i, catalog[0].measure[m+j].averef, (int) (m+j)); 317 319 } … … 340 342 FREE (measureSeqRaw); 341 343 FREE (measureSeqOut); 344 FREE (measureRefOut); 342 345 FREE (measureAveRaw); 343 346 FREE (averageNmeas); -
branches/eam_branches/ipp-20121130/Ohana/src/delstar/src/delstar.c
r34749 r34819 10 10 args (argc, argv); 11 11 12 set_db (&db); 13 status = dvo_image_lock (&db, ImageCat, 60.0, LCK_XCLD); /* XCLD */ 14 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename); 15 if (db.dbstate == LCK_EMPTY) Shutdown ("ERROR: No images in catalog %s (1)", db.filename); 16 17 status = dvo_image_load (&db, VERBOSE, FALSE); 18 if (!status) Shutdown ("can't read image catalog %s", db.filename); 12 if (!SKIP_IMAGES) { 13 set_db (&db); 14 status = dvo_image_lock (&db, ImageCat, 60.0, LCK_XCLD); /* XCLD */ 15 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename); 16 if (db.dbstate == LCK_EMPTY) Shutdown ("ERROR: No images in catalog %s (1)", db.filename); 17 status = dvo_image_load (&db, VERBOSE, FALSE); 18 if (!status) Shutdown ("can't read image catalog %s", db.filename); 19 } 19 20 20 21 switch (MODE) { … … 29 30 break; 30 31 case MODE_PHOTCODES: { 31 if (!delete_image_photcodes (&db)) exit (1); 32 if (!SKIP_IMAGES) { 33 if (!delete_image_photcodes (&db)) exit (1); 34 } 32 35 33 36 if (!delete_photcodes (0, NULL)) { -
branches/eam_branches/ipp-20121130/Ohana/src/delstar/src/delstar_client.c
r34749 r34819 32 32 break; 33 33 case MODE_PHOTCODES: 34 delete_photcodes (HOST_ID, HOSTDIR); 35 break; 34 if (!delete_photcodes (HOST_ID, HOSTDIR)) { 35 fprintf (stderr, "failure deleting measurements from %s\n", HOSTDIR); 36 exit (1); 37 } 38 exit (0); 36 39 case MODE_ORPHAN: 37 40 break;
Note:
See TracChangeset
for help on using the changeset viewer.
