Changeset 31238
- Timestamp:
- Apr 7, 2011, 3:45:46 PM (15 years ago)
- Location:
- trunk/Ohana/src/getstar
- Files:
-
- 4 edited
-
include/dvoImagesAtCoords.h (modified) (2 diffs)
-
src/MatchCoords.c (modified) (1 diff)
-
src/args_coords.c (modified) (1 diff)
-
src/dvoImagesAtCoords.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/getstar/include/dvoImagesAtCoords.h
r27435 r31238 7 7 8 8 int VERBOSE; 9 int LISTCHIPCOORDS; 9 10 10 11 char OUTPUT[256]; … … 19 20 20 21 typedef struct { 22 int n; 23 double x; 24 double y; 25 } Match; 26 27 typedef struct { 21 28 int id; 22 29 double ra; 23 30 double dec; 24 31 int Nmatches; 25 int*matches;32 Match *matches; 26 33 int arrayLength; 27 34 } Point; -
trunk/Ohana/src/getstar/src/MatchCoords.c
r30791 r31238 93 93 totalMatches++; 94 94 95 pt->matches[pt->Nmatches] = i; 95 pt->matches[pt->Nmatches].n = i; 96 pt->matches[pt->Nmatches].x = x; 97 pt->matches[pt->Nmatches].y = y; 96 98 pt->Nmatches ++; 97 99 98 100 if (pt->Nmatches == pt->arrayLength) { 99 101 pt->arrayLength += 20; 100 REALLOCATE (pt->matches, int, pt->arrayLength);102 REALLOCATE (pt->matches, Match, pt->arrayLength); 101 103 } 102 104 } -
trunk/Ohana/src/getstar/src/args_coords.c
r26288 r31238 41 41 42 42 /* check for command line options */ 43 LISTCHIPCOORDS = FALSE; 44 if ((N = get_argument (argc, argv, "-listchipcoords"))) { 45 LISTCHIPCOORDS = TRUE; 46 remove_argument (N, &argc, argv); 47 } 43 48 WITH_PHU = FALSE; 44 49 if ((N = get_argument (argc, argv, "+phu"))) { -
trunk/Ohana/src/getstar/src/dvoImagesAtCoords.c
r29001 r31238 91 91 while ((Nread = fscanf(f, "%d %lf %lf\n", &pts[Npoints].id, &pts[Npoints].ra, &pts[Npoints].dec)) == 3) { 92 92 pts[Npoints].Nmatches = 0; 93 ALLOCATE(pts[Npoints].matches, int, 20);93 ALLOCATE(pts[Npoints].matches, Match, 20); 94 94 pts[Npoints].arrayLength = 20; 95 95 … … 118 118 pts[0].dec = dec; 119 119 pts[0].Nmatches = 0; 120 ALLOCATE(pts[0].matches, int, 20);120 ALLOCATE(pts[0].matches, Match, 20); 121 121 pts[0].arrayLength = 20; 122 122 … … 133 133 Point *pt = points + j; 134 134 for (i = 0; i < pt->Nmatches; i++) { 135 int N = pt->matches[i]; 135 int N = pt->matches[i].n; 136 double x = pt->matches[i].x; 137 double y = pt->matches[i].y; 136 138 137 139 char *name; … … 150 152 name = dbImages[N].name; 151 153 } 152 fprintf (stdout, "%d %lf %lf %s\n", pt->id, pt->ra, pt->dec, name); 154 if (LISTCHIPCOORDS) { 155 fprintf (stdout, "%d %lf %lf %s %8.2lf %8.2lf\n", pt->id, pt->ra, pt->dec, name, x, y); 156 } else { 157 fprintf (stdout, "%d %lf %lf %s\n", pt->id, pt->ra, pt->dec, name); 158 } 153 159 if (copy) { 154 160 free(copy);
Note:
See TracChangeset
for help on using the changeset viewer.
