06-08-2010 01:12 PM
06-08-2010 01:21 PM
06-08-2010 01:25 PM
right... okay, so this is because using those guesses would be an exponential plot shifted slightly to the left, and so it reaches y (or Rp) = 1 at a smaller angle, and above that it is infinity... so it would get NaN / inf answers if the guess is low... if you guess high, you still run into problems but not on every iteration.
i really appreciate your help, i have decided to pursue a different path (my orig code, calculating chi squared from some plots around the signal)... discontinuous functions are a pain. thanks again!
06-08-2010 01:35 PM
sorry, i didnt see your 121PM post when i put up my 125PM post. what you said makes perfect sense and i see that. however, what do you suggest i do in such a case?
06-08-2010 02:03 PM - edited 06-08-2010 02:03 PM
Yes, the function is quite hairtrigger and a slight cahge in parameter can give NaNs. Maybe you want to skip the few highest points?
How accurate are the x-values? The Y-values.
Could there be systematic errors? For example if I allow slight shifts and offset, the fit can be quite good.
06-08-2010 02:56 PM
first of all, thanks again. that plot looks great and i see how you "re-parameterized" the equation.
the problem i have with doing it that way is because the way i had it the values of the function correspond to the prism index and the material index, so i am able to get those actual values from the L-M.
i'm thinking that i can do something that sort of matches the fit you put up to the original equation, sort of using your equation as a conduit to take me to the right values. the x values correspond to 0.1 degrees, that will be very accurate with our ~$2k rotary stage (still waiting for it in the mail). the y values are based on a "noisy" signal which i generated with labview. i don't think the actual signal will be nearly that noisy but i am giving it a noisy signal in an effort to make it a good VI.
let me think about this a bit and i will get back to you with any updates. thanks though, i can definitely make progress with your ideas.
06-08-2010 03:09 PM
Dan K wrote:the problem i have with doing it that way is because the way i had it the values of the function correspond to the prism index and the material index, so i am able to get those actual values from the L-M.
06-08-2010 03:48 PM
i know what you're saying, and i share your disbelief.
but if you look at the paper attached, and my calculations, you will see what i mean. this is a problem i am trying to work around.
06-09-2010 07:30 AM
06-09-2010 09:51 AM