Changeset 40291 for trunk/Ohana/src/opihi/cmd.astro/star.c
- Timestamp:
- Dec 13, 2017, 10:53:48 AM (9 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/opihi/cmd.astro/star.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
-
trunk/Ohana/src/opihi/cmd.astro/star.c
r36679 r40291 3 3 int star (int argc, char **argv) { 4 4 5 int x, y, N, dx,Nborder;5 int x, y, N, Nborder; 6 6 double max; 7 7 Buffer *buf; … … 33 33 } 34 34 35 int dx = 11; 36 int dy = 11; 37 int BOX = FALSE; 38 if ((N = get_argument (argc, argv, "-box"))) { 39 remove_argument (N, &argc, argv); 40 dx = atoi(argv[N]); 41 remove_argument (N, &argc, argv); 42 dy = atoi(argv[N]); 43 remove_argument (N, &argc, argv); 44 BOX = TRUE; 45 } 46 35 47 if ((argc != 4) && (argc != 5)) { 36 gprint (GP_ERR, "USAGE: star (buffer) x y [dx] [-border N] [-sat cnts] \n");48 gprint (GP_ERR, "USAGE: star (buffer) x y [dx] [-border N] [-sat cnts] [-box dx dy]\n"); 37 49 gprint (GP_ERR, " dx is the aperture diameter, but is adjusted up to the next odd number\n"); 38 50 return (FALSE); … … 40 52 if ((buf = SelectBuffer (argv[1], OLDBUFFER, TRUE)) == NULL) return (FALSE); 41 53 42 dx = 11;43 54 x = atof (argv[2]); 44 55 y = atof (argv[3]); … … 47 58 } 48 59 49 get_aperture_stats (&buf[0].matrix, x, y, dx, Nborder, max, VERBOSE); 60 if (BOX) { 61 get_box_stats (&buf[0].matrix, x, y, dx, dy, Nborder, max, VERBOSE); 62 } else { 63 get_aperture_stats (&buf[0].matrix, x, y, dx, Nborder, max, VERBOSE); 64 } 50 65 51 66 return (TRUE);
Note:
See TracChangeset
for help on using the changeset viewer.
