Changeset 41379 for trunk/Ohana/src/opihi/cmd.astro/coords.c
- Timestamp:
- Jun 22, 2020, 11:00:22 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.astro/coords.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.astro/coords.c
r37807 r41379 12 12 Vector *xvec = NULL; 13 13 Vector *yvec = NULL; 14 15 if ((N = get_argument (argc, argv, "-copy"))) { 16 Buffer *src = NULL; 17 18 remove_argument (N, &argc, argv); 19 if ((src = SelectBuffer (argv[N], OLDBUFFER, TRUE)) == NULL) goto escape; 20 21 if (!GetCoords (&coords, &src[0].header)) { 22 gprint (GP_ERR, "error getting WCS elements from src buffer %s\n", argv[N]); 23 return (FALSE); 24 } 25 26 remove_argument (N, &argc, argv); 27 28 if (argc != 2) goto syntax; 29 30 if ((buf = SelectBuffer (argv[1], OLDBUFFER, TRUE)) == NULL) goto escape; 31 if (!PutCoords (&coords, &buf[0].header)) { 32 gprint (GP_ERR, "error getting WCS elements from src buffer %s\n", argv[1]); 33 return (FALSE); 34 } 35 return TRUE; 36 } 14 37 15 38 MOSAIC = NULL; … … 116 139 syntax: 117 140 gprint (GP_ERR, "USAGE: coords [buffer] (-c R D) | (-p X Y)\n"); 118 gprint (GP_ERR, "only one of -p or -c can be used\n"); 141 gprint (GP_ERR, "USAGE: coords [tgtbuffer] (-copy srcbuffer)\n"); 142 gprint (GP_ERR, "only one of -p or -c or -copy can be used\n"); 119 143 gprint (GP_ERR, " -p : from pixels to ra/dec\n"); 120 144 gprint (GP_ERR, " -c : from ra/dec to pixels\n"); 121 145 gprint (GP_ERR, " coordinates are in degrees\n"); 146 gprint (GP_ERR, " -copy : copy coordinate WCS keywords from srcbuffer to tgtbuffer\n"); 122 147 escape: 123 148 if (MOSAIC != NULL) free (MOSAIC);
Note:
See TracChangeset
for help on using the changeset viewer.
