Changeset 37227
- Timestamp:
- Aug 12, 2014, 1:06:30 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140717/Ohana/src/opihi
- Files:
-
- 2 edited
-
cmd.astro/cplot.c (modified) (5 diffs)
-
dvo/gstar.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140717/Ohana/src/opihi/cmd.astro/cplot.c
r34613 r37227 4 4 5 5 double ra_prev = 0; 6 int i, kapa, Npts, status, leftside ;6 int i, kapa, Npts, status, leftside, valid, size; 7 7 opihi_flt *x, *y, *r, *d, Rmin, Rmax, Rmid; 8 8 Vector Xvec, Yvec, *xvec, *yvec; … … 11 11 if (!style_args (&graphmode, &argc, argv, &kapa)) return FALSE; 12 12 13 if (argc != 3) { 13 valid = (argc == 3); 14 valid |= (argc > 4) && !strcmp (argv[3], "where"); 15 if (!valid) { 14 16 gprint (GP_ERR, "USAGE: cplot <ra> <dec> [style]\n"); 17 gprint (GP_ERR, " OR: cplot <ra> <dec> [style] where (condition)\n"); 15 18 return (FALSE); 16 19 } … … 32 35 } 33 36 37 // tvec is used for logical test (truth vector) 38 Vector *tvec = NULL; 39 if (argc > 4) { 40 char *out = dvomath (argc - 4, &argv[4], &size, 1); 41 if (out == NULL) { 42 print_error (); 43 return FALSE; 44 } 45 if ((tvec = SelectVector (out, OLDVECTOR, TRUE)) == NULL) { 46 gprint (GP_ERR, " invalid logic result\n"); 47 DeleteNamedVector (out); 48 free (out); 49 return (FALSE); 50 } 51 } 52 53 if (tvec && tvec[0].Nelements != yvec[0].Nelements) { 54 gprint (GP_ERR, "logic test vector not the same length as data vectors\n"); 55 DeleteVector (tvec); 56 return (FALSE); 57 } 58 34 59 SetVector (&Xvec, OPIHI_FLT, xvec[0].Nelements); 35 60 SetVector (&Yvec, OPIHI_FLT, xvec[0].Nelements); … … 42 67 Npts = 0; 43 68 for (i = 0; i < Xvec.Nelements; i++, r++, d++) { 69 if (tvec) { 70 int skip = (tvec->type == OPIHI_FLT) ? (tvec->elements.Flt[i] == 0.0) : (tvec->elements.Int[i] == 0.0); 71 if (skip) continue; 72 } 73 44 74 double ra = ohana_normalize_angle (*r); 45 75 while (ra < Rmin) ra += 360.0; … … 88 118 free (Yvec.elements.Ptr); 89 119 120 if (tvec) DeleteVector (tvec); 121 90 122 return (TRUE); 91 123 } -
branches/eam_branches/ipp-20140717/Ohana/src/opihi/dvo/gstar.c
r37111 r37227 627 627 gprint (GP_LOG, "%5.3f ", catalog.measure[Nv].psfQF); 628 628 gprint (GP_LOG, "%7.1f ", catalog.measure[Nv].psfChisq); 629 gprint (GP_LOG, "%3.1f ", catalog.measure[Nv].crNsigma);629 // gprint (GP_LOG, "%3.1f ", catalog.measure[Nv].crNsigma); 630 630 gprint (GP_LOG, "%4.1f ", catalog.measure[Nv].extNsigma); 631 631 gprint (GP_LOG, "%5.1f ", FromShortDegrees(catalog.measure[Nv].theta));
Note:
See TracChangeset
for help on using the changeset viewer.
