TIP: Click on subject to list as thread! ANSI
echo: atm
to: ATM
from: jlerch1{at}tampabay.rr.com
date: 2003-07-08 16:50:50
subject: Re: Monte Carlo & FigureXP , was Re: ATM Robo-Focualt, Killing Time cru

From: "James Lerch" 
To: "Michael Lindner" , "Dale
Eason" ,
        
Reply-To: "James Lerch" 


----- Original Message -----
From: "Michael Lindner" 
> On Monday 07 July 2003 06:41 pm, Dale Eason wrote:
> > With the above in mind, would a 'proper' MC analysis be constrained to only
> > longitudinal KE errors, Zone Radius errors, or BOTH???
>
> In the final analysis, all non-systematic errors will result in longitudinal
> KE errors. MC analysis won't do anything for systematic errors (e.g. mask
> manufactured wrong). So, taking multiple measurements, finding the mean and
> std deviation, and doing MC analysis gets you there.
>


Hi Mike,

BTW, I am using plain text, yes? :)

This method will work for Robo data, just as well as any other data, yes?

I implemented your MC code, and here's what I get for a result (using a standard
dev of 0.0013" for longitudinal KE readings, which is close to what I
should be using on Axis A data, yes?)

http://lerch.no-ip.com/atm/2ndTry/MC_Axis_A.gif  (30KB)
http://lerch.no-ip.com/atm/2ndTry/MC_axis_A.xls   (39KB)

In the above I also tossed in a couple runs with higher Standard Devs, just
to see if it looked right, which I think it does (for what little that
means )

If the above looks right, then adding MC to FigureXP is nearly done, just
needing to graph the result (easy).  However, I was thinking about that
Standard
Dev entry.  I could go one of three Routes (all user selectable?)

#1 User enters average (mean?) Standard Deviation estimate for the set of data

#2 Figure XP calculates average Standard Deviation for all zones

#3 Figure XP calculates Standard Deviation for EACH zone, and applies that
value
for each zone in the MC analysis....

BTW,  here's a cut-n-paste of the VB code I used for reference.  (amazingly
I can Read C/C++ but I can't write it!!)  ALSO, for the record, I've read
the VB's
Rnd function is a little suspect, only returning a single.  It should
suffice for our purposes, yes?

Private Sub Command3_Click()
Dim KEstddev(15) As Double
Dim OrigKE(15) As Double
Dim Monte(100) As Long
Dim v1 As Double
Dim v2 As Double
Dim s As Double
Dim i As Long
Dim j As Long

If Monte_in Then Exit Sub

Monte_in = True

For i = 1 To Nmask
    OrigKE(i) = KE(i)
    KEstddev(i) = 0.0013  <--- need to change to user input / auto-calc
Next i

For i = 1 To 10000
    For j = 1 To Nmask
        Do
            v1 = 2 * Rnd - 1
            v2 = 2 * Rnd - 1
            s = v1 ^ 2 + v2 ^ 2
        Loop While s > 1
        KE(j) = ((-2 * Log(s) / 2) * v1 * KEstddev(j)) + OrigKE(j)

    Next j

    Surface_analysis
    Monte(Round(Strehl, 2) * 100) = Monte(Round(Strehl, 2) * 100) + 1
    DoEvents
Next i

For i = 1 To Nmask
    KE(i) = OrigKE(i)
Next i

Dim textsave As String
For i = 0 To 100
    textsave = textsave & Monte(i) & vbCrLf
Next i
Clipboard.Clear
Clipboard.SetText textsave
MsgBox "hey"

Monte_in = False

--- BBBS/NT v4.01 Flag-4
* Origin: Email Gate (1:379/100)
SEEN-BY: 633/267 270
@PATH: 379/100 1 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.