Changeset 41340 for trunk/Ohana/src/opihi/cmd.data/test/cut.sh
- Timestamp:
- Apr 16, 2020, 1:54:47 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.data/test/cut.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.data/test/cut.sh
r41164 r41340 4 4 memtest1 5 5 end 6 7 macro test28 9 mgaussdev z 50 100 0.0 1.010 11 cut z x y_sum x 0 0 z[][0] z[0][]12 cut z x y_median x 0 0 z[][0] z[0][] -median13 cut z x y_mean x 0 0 z[][0] z[0][] -mean14 cut z x y_inner x 0 0 z[][0] z[0][] -inner15 16 end17 18 macro checkrange19 if ($0 != 2)20 echo "USAGE: checkrange (Npts)"21 break22 end23 24 $Npts = $125 if ($Npts % 2)26 $Ncenter = int($Npts / 2)27 $Nquarter = int(0.25 * $Npts)28 $Ns = $Ncenter - $Nquarter29 $Ne = $Ncenter + $Nquarter30 else31 $Ncenter = int($Npts / 2) - 132 $Nquarter = int(0.25 * $Npts)33 $Ns = $Ncenter - $Nquarter34 $Ne = $Ncenter + $Nquarter + 135 end36 if ($Ns < 0)37 echo "error: Ns < 0: $Ns $Ncenter $Nquarter"38 end39 if ($Ne >= $Npts)40 echo "error: Ne >= Npts: $Ne $Ncenter $Nquarter"41 end42 echo "$Npts : $Ncenter : $Nquarter : $Ns $Ne"43 for i 0 $Npts44 echo $i {($i >= $Ns) && ($i <= $Ne)}45 end46 end47 48 6 49 7 # Test if cut works … … 79 37 end 80 38 end 81 82 macro memtest183 84 $i = 085 mcreate tim 100 10086 cut tim xdir imx X 40 4 60 687 # do one to set up memory that should stay used88 89 memory check90 for i 0 10091 cut tim xdir imx X 40 4 60 692 end93 memory check94 95 for i 0 10096 cut tim xdir imx y 40 4 60 697 end98 memory check99 100 for i 0 100101 cut -median tim xdir imx X 40 4 60 6102 end103 memory check104 105 for i 0 100106 cut -median tim xdir imx y 40 4 60 6107 end108 memory check109 110 for i 0 100111 cut -mean tim xdir imx X 40 4 60 6112 end113 memory check114 115 for i 0 100116 cut -mean tim xdir imx y 40 4 60 6117 end118 memory check119 120 end
Note:
See TracChangeset
for help on using the changeset viewer.
