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/vgauss.sh

    r10069 r20936  
    2020
    2121 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
    2224
    2325 if (abs($C0 - 0.0) > 0.01)
     
    5153
    5254 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
    5357
    5458 if (abs($C0 - 0.0) > 0.01)
     
    7175 break -auto off
    7276
     77 $C0o = 0.5
     78 $C1o = 2
     79 $C2o = 900
     80 $C3o = 1
     81
    7382 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)
    7584
    7685 gaussdev dY y[] 0.0 1.0
     
    7887 set y = y + dy
    7988
    80  $C0 = 0.5
    81  $C1 = 2
    82  $C2 = 900
    83  $C3 = 1
     89 $C0 = $C0o + 2
     90 $C1 = $C1o + 2
     91 $C2 = $C2o + 50
     92 $C3 = $C3o + 10
    8493
    8594 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
    8697
    87  if (abs($C0 - 0.0) > 0.01)
     98 $dS = 3.0 / sqrt(y[])
     99
     100 if (abs($C0 - $C0o) > $dS)
    88101   $PASS = 0
    89102 end
    90  if (abs($C1 - 3.0) > 0.01)
     103 if (abs($C1 - $C1o)/$C1o > $dS)
    91104   $PASS = 0
    92105 end
    93  if (abs($C2 - 1000.0) > 1)
     106 if (abs($C2 - $C2o)/$C2o > $dS)
    94107   $PASS = 0
    95108 end
    96  if (abs($C3 - 0.0) > 0.2)
     109 if (abs($C3 - $C3o) > $dS)
    97110   $PASS = 0
    98111 end
Note: See TracChangeset for help on using the changeset viewer.