Changeset 33298
- Timestamp:
- Feb 16, 2012, 5:54:43 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20111122/Ohana/src/relphot
- Files:
-
- 4 edited
-
include/relphot.h (modified) (1 diff)
-
src/args.c (modified) (3 diffs)
-
src/load_catalogs.c (modified) (2 diffs)
-
src/reload_catalogs.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/Ohana/src/relphot/include/relphot.h
r33297 r33298 151 151 double AreaXmin, AreaXmax, AreaYmin, AreaYmax; 152 152 153 int ImagSelect, ImagMin, ImagMax; 153 int ImagSelect; 154 double ImagMin, ImagMax; 154 155 155 156 int DophotSelect, DophotValue; -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/args.c
r33297 r33298 302 302 303 303 int N; 304 double trange; 304 305 305 306 // by definition, the client is not parallel … … 307 308 PARALLEL_MANUAL = FALSE; 308 309 PARALLEL_SERIAL = FALSE; 309 310 if ((N = get_argument (argc, argv, "-v"))) {311 VERBOSE = TRUE;312 remove_argument (N, &argc, argv);313 }314 310 315 311 HOST_ID = 0; … … 382 378 } 383 379 380 VERBOSE = VERBOSE2 = FALSE; 381 if ((N = get_argument (argc, argv, "-v"))) { 382 VERBOSE = TRUE; 383 remove_argument (N, &argc, argv); 384 } 385 if ((N = get_argument (argc, argv, "-vv"))) { 386 VERBOSE2 = VERBOSE = TRUE; 387 remove_argument (N, &argc, argv); 388 } 389 390 RESET = FALSE; 391 if ((N = get_argument (argc, argv, "-reset"))) { 392 remove_argument (N, &argc, argv); 393 RESET = TRUE; 394 } 395 396 /* define time */ 397 TimeSelect = FALSE; 398 if ((N = get_argument (argc, argv, "-time"))) { 399 remove_argument (N, &argc, argv); 400 if (!ohana_str_to_time (argv[N], &TSTART)) { 401 fprintf (stderr, "ERROR: syntax error\n"); 402 return (FALSE); 403 } 404 remove_argument (N, &argc, argv); 405 if (!ohana_str_to_dtime (argv[N], &trange)) { 406 if (!ohana_str_to_time (argv[N], &TSTOP)) { 407 fprintf (stderr, "ERROR: syntax error\n"); 408 return (FALSE); 409 } 410 } else { 411 if (trange < 0) { 412 trange = fabs (trange); 413 TSTOP = TSTART; 414 TSTART -= trange; 415 } else { 416 TSTOP = TSTART + trange; 417 } 418 } 419 remove_argument (N, &argc, argv); 420 TimeSelect = TRUE; 421 } 422 423 424 MIN_ERROR = 0.001; 425 if ((N = get_argument (argc, argv, "-minerror"))) { 426 remove_argument (N, &argc, argv); 427 MIN_ERROR = atof (argv[N]); 428 remove_argument (N, &argc, argv); 429 /* require MIN_ERROR > 0 */ 430 } 431 432 AreaSelect = FALSE; 433 if ((N = get_argument (argc, argv, "-area"))) { 434 remove_argument (N, &argc, argv); 435 AreaXmin = atof (argv[N]); 436 remove_argument (N, &argc, argv); 437 AreaXmax = atof (argv[N]); 438 remove_argument (N, &argc, argv); 439 AreaYmin = atof (argv[N]); 440 remove_argument (N, &argc, argv); 441 AreaYmax = atof (argv[N]); 442 remove_argument (N, &argc, argv); 443 AreaSelect = TRUE; 444 } 445 446 ImagSelect = FALSE; 447 if ((N = get_argument (argc, argv, "-instmag"))) { 448 remove_argument (N, &argc, argv); 449 ImagMin = atof (argv[N]); 450 remove_argument (N, &argc, argv); 451 ImagMax = atof (argv[N]); 452 remove_argument (N, &argc, argv); 453 ImagSelect = TRUE; 454 } 455 456 DophotSelect = FALSE; 457 if ((N = get_argument (argc, argv, "-dophot"))) { 458 remove_argument (N, &argc, argv); 459 DophotValue = atof (argv[N]); 460 remove_argument (N, &argc, argv); 461 DophotSelect = TRUE; 462 } 463 464 MaxDensityUse = FALSE; 465 if ((N = get_argument (argc, argv, "-max-density"))) { 466 remove_argument (N, &argc, argv); 467 MaxDensityValue = atof(argv[N]); 468 remove_argument (N, &argc, argv); 469 MaxDensityUse = TRUE; 470 } 471 384 472 if (argc != 2) relphot_client_usage (); 385 473 -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/load_catalogs.c
r33297 r33298 101 101 // load the list of hosts 102 102 HostTable *table = HostTableLoad (CATDIR, sky->hosts); 103 if (!table) { 104 fprintf (stderr, "ERROR: failure reading Host Table %s for database %s\n", sky->hosts, CATDIR); 105 exit (1); 106 } 103 107 104 108 int i; … … 108 112 snprintf (catalogFile, 512, "%s/relphot.catalog.subset.dat", table->hosts[i].pathname); 109 113 114 // options / arguments that can affect relphot_client -load: 115 // VERBOSE, VERBOSE2 116 // RESET (-reset) 117 // TimeSelect -time 118 // DophotSelect 119 // (note that psfQual is applied rigidly at 0.85, as is the galaxy test) 120 // MAG_LIM 121 // SIGMA_LIM 122 // ImagSelect, ImagMin, ImagMax 123 // MaxDensityUse, MaxDensityValue 124 110 125 char command[1024]; 111 snprintf (command, 1024, "relphot_client %s -load %s -hostID %d -D CATDIR %s -hostdir %s", 112 PhotcodeList, catalogFile, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname); 126 snprintf (command, 1024, "relphot_client %s -load %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -D MAG_LIM %f -D SIGMA_LIM %f", 127 PhotcodeList, catalogFile, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, MAG_LIM, SIGMA_LIM); 128 129 char tmpline[1024]; 130 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 131 if (VERBOSE2) { snprintf (tmpline, 1024, "%s -vv", command); strcpy (command, tmpline); } 132 if (RESET) { snprintf (tmpline, 1024, "%s -reset", command); strcpy (command, tmpline); } 133 if (DophotSelect) { snprintf (tmpline, 1024, "%s -dophot %d", command, DophotValue); strcpy (command, tmpline); } 134 if (ImagSelect) { snprintf (tmpline, 1024, "%s -instmag %f %f", command, ImagMin, ImagMax); strcpy (command, tmpline); } 135 if (MaxDensityUse) { snprintf (tmpline, 1024, "%s -max-density %f", command, MaxDensityValue); strcpy (command, tmpline); } 136 if (TimeSelect) { 137 char *tstart = ohana_sec_to_date (TSTART); 138 char *tstop = ohana_sec_to_date (TSTOP); 139 snprintf (tmpline, 1024, "%s -time %s %s", command, tstart, tstop); 140 free (tstart); 141 free (tstop); 142 strcpy (command, tmpline); 143 } 113 144 114 145 fprintf (stderr, "command: %s\n", command); -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/reload_catalogs.c
r33297 r33298 134 134 135 135 char command[1024]; 136 snprintf (command, 1024, "relphot_client %s -update %s -hostID %d -D CATDIR %s -hostdir %s", 137 PhotcodeList, imageFile, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname); 136 snprintf (command, 1024, "relphot_client %s -update %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -D STAR_TOOFEW %d -minerror %f", 137 PhotcodeList, imageFile, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, STAR_TOOFEW, MIN_ERROR); 138 139 // options & configs which affect relphot_client -update 140 // VERBOSE, VERBOSE2 141 // RESET 142 // TimeSelect 143 // AreaSelect 144 // STATMODE 145 // STAR_TOOFEW 146 // MIN_ERROR 147 148 char tmpline[1024]; 149 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 150 if (VERBOSE2) { snprintf (tmpline, 1024, "%s -vv", command); strcpy (command, tmpline); } 151 if (RESET) { snprintf (tmpline, 1024, "%s -reset", command); strcpy (command, tmpline); } 152 if (AreaSelect) { snprintf (tmpline, 1024, "%s -area %f %f %f %f", command, AreaXmin, AreaXmax, AreaYmin, AreaYmax); strcpy (command, tmpline); } 153 if (TimeSelect) { 154 char *tstart = ohana_sec_to_date (TSTART); 155 char *tstop = ohana_sec_to_date (TSTOP); 156 snprintf (tmpline, 1024, "%s -time %s %s", command, tstart, tstop); 157 free (tstart); 158 free (tstop); 159 strcpy (command, tmpline); 160 } 138 161 139 162 fprintf (stderr, "command: %s\n", command);
Note:
See TracChangeset
for help on using the changeset viewer.
