Changeset 28184
- Timestamp:
- Jun 1, 2010, 4:40:37 PM (16 years ago)
- Location:
- trunk/Ohana/src/relastro
- Files:
-
- 3 added
- 5 edited
-
Makefile (modified) (1 diff)
-
doc/high-speed.txt (added)
-
include/relastro.h (modified) (4 diffs)
-
src/args.c (modified) (3 diffs)
-
src/high_speed_catalogs.c (added)
-
src/high_speed_objects.c (added)
-
src/initialize.c (modified) (1 diff)
-
src/relastro.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/relastro/Makefile
r27581 r28184 56 56 $(SRC)/save_catalogs.$(ARCH).o \ 57 57 $(SRC)/write_coords.$(ARCH).o \ 58 $(SRC)/CoordOps.$(ARCH).o \ 59 $(SRC)/FixProblemImages.$(ARCH).o \ 58 $(SRC)/CoordOps.$(ARCH).o \ 59 $(SRC)/FixProblemImages.$(ARCH).o \ 60 $(SRC)/high_speed_catalogs.$(ARCH).o \ 61 $(SRC)/high_speed_objects.$(ARCH).o \ 60 62 $(SRC)/relastroVisual.$(ARCH).o 61 63 -
trunk/Ohana/src/relastro/include/relastro.h
r27581 r28184 14 14 typedef enum {FIT_NONE, FIT_AVERAGE, FIT_PM_ONLY, FIT_PAR_ONLY, FIT_PM_AND_PAR} FitMode; 15 15 16 typedef enum {TARGET_NONE, TARGET_OBJECTS, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS } FitTarget;16 typedef enum {TARGET_NONE, TARGET_OBJECTS, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS, TARGET_HIGH_SPEED} FitTarget; 17 17 18 18 typedef struct { … … 89 89 int SRC_MEAS_TOOFEW; //catalog objects wich fewer detections then this are ignored 90 90 double MIN_ERROR; 91 92 double RADIUS; // match radius for high-speed objects 91 93 92 94 int VERBOSE; … … 112 114 int NphotcodesKeep, NphotcodesSkip; 113 115 PhotCode **photcodesKeep, **photcodesSkip; 116 117 char *PHOTCODE_A_LIST, *PHOTCODE_B_LIST; 118 int NphotcodesGroupA, NphotcodesGroupB; 119 PhotCode **photcodesGroupA, **photcodesGroupB; 114 120 115 121 int AreaSelect; … … 321 327 int saveCoords (Coords *coords, off_t N); 322 328 void resetImageRaw (Catalog *catalog, int Ncatalog, off_t im); 329 330 int high_speed_catalogs (); 331 int high_speed_objects (SkyRegion *region, Catalog *catalog); 332 int MeasMatchesPhotcode(Measure *measure, PhotCode **photcodeSet, int Nset); -
trunk/Ohana/src/relastro/src/args.c
r27581 r28184 28 28 } 29 29 } 30 if ((N = get_argument (argc, argv, "-high-speed"))) { 31 // XXX include a parallax / no-parallax option 32 if (N >= argc - 3) usage(); 33 FIT_TARGET = TARGET_HIGH_SPEED; 34 remove_argument (N, &argc, argv); 35 PHOTCODE_A_LIST = strcreate(argv[N]); 36 remove_argument (N, &argc, argv); 37 PHOTCODE_B_LIST = strcreate(argv[N]); 38 remove_argument (N, &argc, argv); 39 RADIUS = atof(argv[N]); 40 remove_argument (N, &argc, argv); 41 } 42 30 43 if ((N = get_argument (argc, argv, "-update-simple"))) { 31 44 remove_argument (N, &argc, argv); … … 271 284 void usage () { 272 285 fprintf (stderr, "ERROR: USAGE: relastro -region RA RA DEC DEC\n"); 273 fprintf (stderr, " OR: relastro -catalog (ra) (dec)\n ");274 fprintf (stderr, " working options: \n");286 fprintf (stderr, " OR: relastro -catalog (ra) (dec)\n\n"); 287 fprintf (stderr, " specify one of the following modes: \n"); 275 288 fprintf (stderr, " -update-objects\n"); 276 289 fprintf (stderr, " -pm\n"); … … 280 293 fprintf (stderr, " -update-chips\n"); 281 294 fprintf (stderr, " -update-mosaics\n"); 295 fprintf (stderr, " -high-speed (code[,code,code]) (code[,code,code]) (radius)\n\n"); 296 fprintf (stderr, " additional options: \n"); 282 297 fprintf (stderr, " -time (start)(stop)\n"); 283 298 fprintf (stderr, " +photcode (code)[,code,code...]\n"); -
trunk/Ohana/src/relastro/src/initialize.c
r27551 r28184 56 56 } 57 57 58 NphotcodesGroupA = 0; 59 photcodesGroupA = NULL; 60 if (PHOTCODE_A_LIST != NULL) { 61 NPHOTCODES = 10; 62 ALLOCATE (photcodesGroupA, PhotCode *, NPHOTCODES); 63 64 /* parse the comma-separated list of photcodesGroupA */ 65 list = PHOTCODE_A_LIST; 66 while ((codename = strtok_r (list, ",", &ptr)) != NULL) { 67 list = NULL; // pass NULL on successive strtok_r calls 68 fprintf (stderr, "PHOTCODE_A_LIST: %s\n", PHOTCODE_A_LIST); 69 fprintf (stderr, "codename: %s\n", codename); 70 if ((photcodesGroupA[NphotcodesGroupA] = GetPhotcodebyName (codename)) == NULL) { 71 fprintf (stderr, "ERROR: photcode %s not found in photcode table\n", codename); 72 exit (1); 73 } 74 NphotcodesGroupA ++; 75 CHECK_REALLOCATE (photcodesGroupA, PhotCode *, NPHOTCODES, NphotcodesGroupA, 10); 76 } 77 } 78 79 NphotcodesGroupB = 0; 80 photcodesGroupB = NULL; 81 if (PHOTCODE_B_LIST != NULL) { 82 NPHOTCODES = 10; 83 ALLOCATE (photcodesGroupB, PhotCode *, NPHOTCODES); 84 85 /* parse the comma-separated list of photcodesGroupB */ 86 list = PHOTCODE_B_LIST; 87 while ((codename = strtok_r (list, ",", &ptr)) != NULL) { 88 list = NULL; // pass NULL on successive strtok_r calls 89 fprintf (stderr, "PHOTCODE_B_LIST: %s\n", PHOTCODE_B_LIST); 90 fprintf (stderr, "codename: %s\n", codename); 91 if ((photcodesGroupB[NphotcodesGroupB] = GetPhotcodebyName (codename)) == NULL) { 92 fprintf (stderr, "ERROR: photcode %s not found in photcode table\n", codename); 93 exit (1); 94 } 95 NphotcodesGroupB ++; 96 CHECK_REALLOCATE (photcodesGroupB, PhotCode *, NPHOTCODES, NphotcodesGroupB, 10); 97 } 98 } 99 58 100 initstats (STATMODE); 59 101 -
trunk/Ohana/src/relastro/src/relastro.c
r27581 r28184 23 23 if (FIT_TARGET == TARGET_OBJECTS) { 24 24 relastro_objects (); 25 exit (0); 26 } 27 28 /* the object analysis is a separate process iterating over catalogs */ 29 if (FIT_TARGET == TARGET_HIGH_SPEED) { 30 high_speed_catalogs (); 25 31 exit (0); 26 32 }
Note:
See TracChangeset
for help on using the changeset viewer.
