Changeset 41322
- Timestamp:
- Apr 1, 2020, 4:13:12 PM (6 years ago)
- Location:
- trunk/Ohana/src/opihi
- Files:
-
- 4 edited
-
cmd.astro/cgrid.c (modified) (3 diffs)
-
cmd.astro/fitplx_irls.c (modified) (3 diffs)
-
cmd.data/Makefile (modified) (1 diff)
-
cmd.data/init.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.astro/cgrid.c
r41269 r41322 83 83 Graphdata graphmode; 84 84 85 if ((N = get_argument (argc, argv, "-h"))) goto usage; 86 if ((N = get_argument (argc, argv, "--help"))) goto usage; 87 85 88 RAbyHour = FALSE; 86 89 if ((N = get_argument (argc, argv, "-ra-by-hour"))) { … … 151 154 if (!style_args (&graphmode, &argc, argv, &kapa)) return FALSE; 152 155 153 if (argc != 1) { 154 gprint (GP_ERR, "USAGE: cgrid [style] [-ra-by-hour] [-labels]\n"); 155 return (FALSE); 156 } 156 if (argc != 1) goto usage; 157 157 158 158 /* are we plotting one of the poles? */ … … 346 346 return (TRUE); 347 347 348 usage: 349 350 gprint (GP_ERR, "USAGE: cgrid [style] [options]\n"); 351 gprint (GP_ERR, " options:\n"); 352 gprint (GP_ERR, " -h, --help: show this list\n"); 353 gprint (GP_ERR, " -ra-by-hour : RA grid lines will be space on rounded hour lines (default is degrees)\n"); 354 gprint (GP_ERR, " -labels : add RA & dec coordinates\n"); 355 gprint (GP_ERR, " -major-spacing : grid lines drawn at major tickmarks, not minor tickmarks\n"); 356 gprint (GP_ERR, " -ra-spacing : specify size of RA grid steps in degrees (ignores -ra-by-hour)\n"); 357 gprint (GP_ERR, " -dec-spacing : specify size of dec grid steps in degrees\n"); 358 gprint (GP_ERR, " -justify-ra : choose how RA labels are justified (see below)\n"); 359 gprint (GP_ERR, " -justify-dec : choose how dec labels are justified (see below)\n"); 360 gprint (GP_ERR, " -label-ra : RA coordinate of the Dec-line labels\n"); 361 gprint (GP_ERR, " -label-dec : Dec coordinate of the RA-line labels\n"); 362 gprint (GP_ERR, " -label-color : color for the labels (independent of grid lines)\n"); 363 gprint (GP_ERR, " text justification: text is justified horizontally and vertically based on the following numbers:\n"); 364 gprint (GP_ERR, " 6 7 8\n"); 365 gprint (GP_ERR, " 3 4 5\n"); 366 gprint (GP_ERR, " 0 1 2\n"); 367 return (FALSE); 348 368 } 369 -
trunk/Ohana/src/opihi/cmd.astro/fitplx_irls.c
r40518 r41322 11 11 remove_argument (N, &argc, argv); 12 12 if ((mvec = SelectVector (argv[N], ANYVECTOR, TRUE)) == NULL) return (FALSE); 13 remove_argument (N, &argc, argv); 14 } 15 16 Vector *WxOutV = NULL; // mask vector 17 if ((N = get_argument (argc, argv, "-Wxvec"))) { 18 remove_argument (N, &argc, argv); 19 if ((WxOutV = SelectVector (argv[N], ANYVECTOR, TRUE)) == NULL) return (FALSE); 20 remove_argument (N, &argc, argv); 21 } 22 Vector *WyOutV = NULL; // mask vector 23 if ((N = get_argument (argc, argv, "-Wyvec"))) { 24 remove_argument (N, &argc, argv); 25 if ((WyOutV = SelectVector (argv[N], ANYVECTOR, TRUE)) == NULL) return (FALSE); 13 26 remove_argument (N, &argc, argv); 14 27 } … … 101 114 mask = mvec->elements.Int; 102 115 } 116 } 117 118 if (WxOutV) { 119 ResetVector (WxOutV, OPIHI_FLT, Ntotal); 120 for (i = 0; i < Ntotal; i++) { WxOutV->elements.Flt[i] = NAN; } 121 } 122 if (WyOutV) { 123 ResetVector (WyOutV, OPIHI_FLT, Ntotal); 124 for (i = 0; i < Ntotal; i++) { WyOutV->elements.Flt[i] = NAN; } 103 125 } 104 126 … … 169 191 } 170 192 } 193 } 194 } 195 if (WxOutV) { 196 // save the calculated weights 197 for (i = 0; i < fitdata.Npts; i++) { 198 // fitdata only includes the previously unmasked points 199 int n = fitdata.index[i]; 200 WxOutV->elements.Flt[n] = fitdata.Wx[i]; 201 } 202 } 203 if (WyOutV) { 204 // save the calculated weights 205 for (i = 0; i < fitdata.Npts; i++) { 206 // fitdata only includes the previously unmasked points 207 int n = fitdata.index[i]; 208 WyOutV->elements.Flt[n] = fitdata.Wy[i]; 171 209 } 172 210 } -
trunk/Ohana/src/opihi/cmd.data/Makefile
r41284 r41322 117 117 $(SRC)/point.$(ARCH).o \ 118 118 $(SRC)/ps.$(ARCH).o \ 119 $(SRC)/pdf.$(ARCH).o \ 119 120 $(SRC)/print_vectors.$(ARCH).o \ 120 121 $(SRC)/mprint.$(ARCH).o \ -
trunk/Ohana/src/opihi/cmd.data/init.c
r41284 r41322 103 103 int parity PROTO((int, char **)); 104 104 int point PROTO((int, char **)); 105 int pdf PROTO((int, char **)); 105 106 int ps PROTO((int, char **)); 106 107 int vprint PROTO((int, char **)); … … 303 304 {1, "ppm", jpeg, "convert display graphic to PPM"}, 304 305 {1, "ps", ps, "convert display to PostScript"}, 306 {1, "pdf", pdf, "convert display to PDF"}, 305 307 {1, "print_vectors", vprint, "print a set of vectors"}, 306 308 {1, "vprint", vprint, "print a set of vectors"},
Note:
See TracChangeset
for help on using the changeset viewer.
