Changeset 20936 for trunk/Ohana/src/opihi/cmd.data/test/vgauss.sh
- Timestamp:
- Dec 7, 2008, 3:31:01 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.data/test/vgauss.sh (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.data/test/vgauss.sh
r10069 r20936 20 20 21 21 vgauss -q x y dy yfit 22 # lim x y; clear; box; plot -x 1 -c black x y; plot -c red x yfit 23 # cursor 22 24 23 25 if (abs($C0 - 0.0) > 0.01) … … 51 53 52 54 vgauss -q x y dy yfit 55 # lim x y; clear; box; plot -x 1 -c black x y; plot -c red x yfit 56 # cursor 53 57 54 58 if (abs($C0 - 0.0) > 0.01) … … 71 75 break -auto off 72 76 77 $C0o = 0.5 78 $C1o = 2 79 $C2o = 900 80 $C3o = 1 81 73 82 create x -10 10 0.1 74 set y = 1000 * exp(-0.5*x^2/3^2)83 set y = $C3o + $C2o * exp(-0.5*(x - $C0o)^2/$C1o^2) 75 84 76 85 gaussdev dY y[] 0.0 1.0 … … 78 87 set y = y + dy 79 88 80 $C0 = 0.581 $C1 = 282 $C2 = 90083 $C3 = 189 $C0 = $C0o + 2 90 $C1 = $C1o + 2 91 $C2 = $C2o + 50 92 $C3 = $C3o + 10 84 93 85 94 vgauss -q x y dy yfit 95 # lim x y; clear; box; plot -x 1 -c black x y; plot -c red x yfit 96 # cursor 86 97 87 if (abs($C0 - 0.0) > 0.01) 98 $dS = 3.0 / sqrt(y[]) 99 100 if (abs($C0 - $C0o) > $dS) 88 101 $PASS = 0 89 102 end 90 if (abs($C1 - 3.0) > 0.01)103 if (abs($C1 - $C1o)/$C1o > $dS) 91 104 $PASS = 0 92 105 end 93 if (abs($C2 - 1000.0) > 1)106 if (abs($C2 - $C2o)/$C2o > $dS) 94 107 $PASS = 0 95 108 end 96 if (abs($C3 - 0.0) > 0.2)109 if (abs($C3 - $C3o) > $dS) 97 110 $PASS = 0 98 111 end
Note:
See TracChangeset
for help on using the changeset viewer.
