IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 7, 2008, 3:31:01 PM (18 years ago)
Author:
eugene
Message:

big update from eam_branch_20081124 with updates to Opihi math

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.data/test/vmaxwell.sh

    r10069 r20936  
    4040 break -auto off
    4141
     42 $C0o = 250
     43 $C1o = 25
     44 $C2o = 100
     45 $C3o = 1
     46 $C4o = 10
     47
    4248 create x 0 1000 1
    43  set y = 1000 * (x-200)^2 * exp(-0.5*(x-300)^2/30^2)
    44  set dy = (rnd(y) - 0.5)/0.5
     49 set y = $C2o * (x-$C4o)^2 * exp(-0.5*(x-$C0o)^2/$C1o^2) + $C3o
     50 gaussdev dY y[] 0.0 1.0
     51 set dy = dY * sqrt(y)
    4552 set y = y + dy
    4653
    47  lim x y; clear; box; plot -x 1 -c black x y
     54 $C0 = $C0o + 20
     55 $C1 = $C1o + 2
     56 $C2 = $C2o + 100
     57 $C3 = $C3o + 10
     58 $C4 = $C4o + 20
    4859
    49  $C0 = 250
    50  $C1 = 25
    51  $C2 = 900
    52  $C3 = 1
    53  $C4 = 190
     60 vmaxwell -q x y dy yfit
     61 lim x y; clear; box; plot -x 1 -c black x y; plot x yfit -c red
    5462
    55  vmaxwell x y dy yfit
    56  plot x yfit -c red
     63 $dS = 6.0 / sqrt(y[])
    5764
    58  if (abs($C0 - 0.0) > 0.01)
     65 if (abs($C0 - $C0o) > $dS)
    5966   $PASS = 0
    6067 end
    61  if (abs($C1 - 3.0) > 0.01)
     68 if (abs($C1 - $C1o)/$C1o > $dS)
    6269   $PASS = 0
    6370 end
    64  if (abs($C2 - 1000.0) > 0.1)
     71 if (abs($C2 - $C2o)/$C2o > $dS)
    6572   $PASS = 0
    6673 end
    67  if (abs($C3 - 0.0) > 0.1)
     74 if (abs($C3 - $C3o) > $dS)
     75   $PASS = 0
     76 end
     77 if (abs($C4 - $C4o)/$C4o > $dS)
    6878   $PASS = 0
    6979 end
Note: See TracChangeset for help on using the changeset viewer.