Changeset 40664 for branches/eam_branches/ohana.20190329
- Timestamp:
- Apr 2, 2019, 8:29:31 PM (7 years ago)
- Location:
- branches/eam_branches/ohana.20190329/src/opihi/cmd.data
- Files:
-
- 1 added
- 3 edited
-
Makefile (modified) (1 diff)
-
init.c (modified) (2 diffs)
-
threshold.c (modified) (2 diffs)
-
vtransitions.c (added)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20190329/src/opihi/cmd.data/Makefile
r40662 r40664 176 176 $(SRC)/vzload.$(ARCH).o \ 177 177 $(SRC)/vpeaks.$(ARCH).o \ 178 $(SRC)/vtransitions.$(ARCH).o \ 178 179 $(SRC)/vpop.$(ARCH).o \ 179 180 $(SRC)/vroll.$(ARCH).o \ -
branches/eam_branches/ohana.20190329/src/opihi/cmd.data/init.c
r40662 r40664 169 169 int vshift PROTO((int, char **)); 170 170 int vpeaks PROTO((int, char **)); 171 int vtransitions PROTO((int, char **)); 171 172 int vpop PROTO((int, char **)); 172 173 int vsmooth PROTO((int, char **)); … … 357 358 {1, "vload", vload, "load vectors as overlay on image display"}, 358 359 {1, "vmaxwell", vmaxwell, "fit a Maxwellian to a vector"}, 359 {1, "vpeaks", vpeaks, "fine coord and flux of peaks in vector"}, 360 {1, "vpeaks", vpeaks, "find coord and flux of peaks in vector"}, 361 {1, "vtransitions", vtransitions, "find points in vector that cross the transition value"}, 360 362 {1, "vpop", vpop, "remove first element of a vector"}, 361 363 {1, "vroll", vroll, "roll vector elements by 1 entry"}, -
branches/eam_branches/ohana.20190329/src/opihi/cmd.data/threshold.c
r40623 r40664 71 71 72 72 if (!REVERSE) { 73 // this algorithm assumes vecy[BinMax] > threshold, vecy[BinMin] < threshold 74 if (vecy[0].elements.Flt[BinMin] > value) { 75 gprint (GP_ERR, "ERROR: all values above threshold\n"); 76 return FALSE; 77 } 78 if (vecy[0].elements.Flt[BinMax] < value) { 79 gprint (GP_ERR, "ERROR: all values below threshold\n"); 80 return FALSE; 81 } 73 82 while (Nhi - Nlo > 10) { 74 83 N = 0.5*(Nlo + Nhi); … … 89 98 } 90 99 } else { 100 // this algorithm assumes vecy[BinMin] > threshold, vecy[BinMax] < threshold 101 if (vecy[0].elements.Flt[BinMin] < value) { 102 gprint (GP_ERR, "ERROR: all values below threshold\n"); 103 return FALSE; 104 } 105 if (vecy[0].elements.Flt[BinMax] > value) { 106 gprint (GP_ERR, "ERROR: all values above threshold\n"); 107 return FALSE; 108 } 91 109 while (Nhi - Nlo > 10) { 92 110 N = 0.5*(Nlo + Nhi);
Note:
See TracChangeset
for help on using the changeset viewer.
