IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 18, 2007, 10:10:41 AM (19 years ago)
Author:
eugene
Message:

image/graph metadata stored/retrieved from kapa

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.data/cursor.c

    r13391 r13434  
    44
    55  char string[20], key[20], *name;
    6   int i, N, kapa, IsImage;
     6  int i, N, kapa;
    77  double X, Y, R, D, Z;
    88  void *oldsignal;
     
    1010  Buffer *buf;
    1111
    12   /* need to be able to specify graph vs image coords
    13   if ((N = get_argument (argc, argv, "-g"))) {
    14     remove_argument (N, &argc, argv);
    15     SetImageDevice (FALSE);
    16   } 
    17   if ((N = get_argument (argc, argv, "-i"))) {
    18     remove_argument (N, &argc, argv);
    19     SetImageDevice (TRUE);
    20   } 
    21   */
     12  // XXX need to be able to specify graph vs image coords
     13  // currently, if only one exists, that frame will be used
     14  // if both exist, defaults to ??
     15  // if ((N = get_argument (argc, argv, "-g"))) {
     16  // if ((N = get_argument (argc, argv, "-i"))) {
    2217
    2318  name = NULL;
     
    3934 
    4035  buf = NULL;
    41   if (IsImage) buf = SelectBuffer (GetImageName(), OLDBUFFER, FALSE);
     36  // if (IsImage) buf = SelectBuffer (GetImageName(), OLDBUFFER, FALSE);
     37  // XXX this stuff will go away with 32bit image data
    4238 
    4339  KiiCursorOn (kapa);
     
    4743  Z = -1.0;
    4844  for (i = 0; ((i < N) || (N == 0)) && !interrupt; i++) {
     45
     46    // XXX have kapa return x,y,z,ra,dec for all options
    4947    KiiCursorRead (kapa, &X, &Y, key);
    5048
     
    5553    set_str_variable ("KEY", key);
    5654   
    57     if (IsImage) {
    58       if (buf != NULL) {
    59         Z = gfits_get_matrix_value (&buf[0].matrix, (int) X, (int) Y);
    60       }
    61       gprint (GP_LOG, "%s %f %f  %f\n", key, X, Y, Z);
     55    if (buf != NULL) {
     56      Z = gfits_get_matrix_value (&buf[0].matrix, (int) X, (int) Y);
     57      // gprint (GP_LOG, "%s %f %f  %f\n", key, X, Y, Z);
    6258    } else {
    6359      XY_to_RD (&R, &D, X, Y, &graphmode.coords);
Note: See TracChangeset for help on using the changeset viewer.