- Timestamp:
- May 21, 2007, 6:29:09 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.data/cursor.c
r13434 r13465 7 7 double X, Y, R, D, Z; 8 8 void *oldsignal; 9 Graphdata graphmode;10 Buffer *buf;11 9 12 10 // XXX need to be able to specify graph vs image coords … … 22 20 remove_argument (N, &argc, argv); 23 21 } 24 if (!GetGraph (&graphmode, &kapa, name)) return (FALSE);22 if (!GetGraphData (NULL, &kapa, name)) return (FALSE); 25 23 FREE (name); 26 24 … … 33 31 } 34 32 35 buf = NULL;36 // if (IsImage) buf = SelectBuffer (GetImageName(), OLDBUFFER, FALSE);37 // XXX this stuff will go away with 32bit image data38 39 33 KiiCursorOn (kapa); 40 34 41 35 oldsignal = signal (SIGINT, handle_interrupt); 42 36 interrupt = FALSE; 43 Z = -1.0; 37 44 38 for (i = 0; ((i < N) || (N == 0)) && !interrupt; i++) { 45 39 46 // XXX have kapa return x,y,z,ra,dec for all options 47 KiiCursorRead (kapa, &X, &Y, key); 40 KiiCursorRead (kapa, &X, &Y, &Z, &R, &D, key); 48 41 49 42 sprintf (string, "X%s", key); … … 51 44 sprintf (string, "Y%s", key); 52 45 set_variable (string, Y); 46 sprintf (string, "Z%s", key); 47 set_variable (string, Z); 48 sprintf (string, "R%s", key); 49 set_variable (string, R); 50 sprintf (string, "D%s", key); 51 set_variable (string, D); 52 53 53 set_str_variable ("KEY", key); 54 54 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); 58 } else { 59 XY_to_RD (&R, &D, X, Y, &graphmode.coords); 60 sprintf (string, "R%s", key); 61 set_variable (string, R); 62 sprintf (string, "D%s", key); 63 set_variable (string, D); 64 gprint (GP_LOG, "%s %f %f\n", key, X, Y); 65 } 55 gprint (GP_LOG, "%s %f %f %f %f %f\n", key, X, Y, Z, R, D); 56 66 57 if (!strcasecmp (key, "Q")) break; 67 58 }
Note:
See TracChangeset
for help on using the changeset viewer.
