IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31238


Ignore:
Timestamp:
Apr 7, 2011, 3:45:46 PM (15 years ago)
Author:
bills
Message:

add parameter -listchipcoords to dvoImagesAtCoords. If supplied the program prints out
the image coordinates for each matched point

Location:
trunk/Ohana/src/getstar
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/getstar/include/dvoImagesAtCoords.h

    r27435 r31238  
    77
    88int       VERBOSE;
     9int       LISTCHIPCOORDS;
    910
    1011char OUTPUT[256];
     
    1920
    2021typedef struct {
     22    int     n;
     23    double  x;
     24    double  y;
     25} Match;
     26
     27typedef struct {
    2128    int     id;
    2229    double  ra;
    2330    double  dec;
    2431    int     Nmatches;
    25     int     *matches;
     32    Match   *matches;
    2633    int     arrayLength;
    2734} Point;
  • trunk/Ohana/src/getstar/src/MatchCoords.c

    r30791 r31238  
    9393            totalMatches++;
    9494
    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;
    9698            pt->Nmatches ++;
    9799
    98100            if (pt->Nmatches == pt->arrayLength) {
    99101                pt->arrayLength += 20;
    100                 REALLOCATE (pt->matches, int, pt->arrayLength);
     102                REALLOCATE (pt->matches, Match, pt->arrayLength);
    101103            }
    102104        }
  • trunk/Ohana/src/getstar/src/args_coords.c

    r26288 r31238  
    4141
    4242  /* 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  }
    4348  WITH_PHU = FALSE;
    4449  if ((N = get_argument (argc, argv, "+phu"))) {
  • trunk/Ohana/src/getstar/src/dvoImagesAtCoords.c

    r29001 r31238  
    9191    while ((Nread = fscanf(f, "%d %lf %lf\n", &pts[Npoints].id, &pts[Npoints].ra, &pts[Npoints].dec)) == 3) {
    9292        pts[Npoints].Nmatches = 0;
    93         ALLOCATE(pts[Npoints].matches, int, 20);
     93        ALLOCATE(pts[Npoints].matches, Match, 20);
    9494        pts[Npoints].arrayLength = 20;
    9595
     
    118118    pts[0].dec = dec;
    119119    pts[0].Nmatches = 0;
    120     ALLOCATE(pts[0].matches, int, 20);
     120    ALLOCATE(pts[0].matches, Match, 20);
    121121    pts[0].arrayLength = 20;
    122122
     
    133133      Point *pt = points + j;
    134134      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;
    136138
    137139        char *name;
     
    150152            name = dbImages[N].name;
    151153        }
    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        }
    153159        if  (copy) {
    154160            free(copy);
Note: See TracChangeset for help on using the changeset viewer.