04-03-2007 04:43 AM
04-05-2007 09:27 AM
Hi Leeser,
I'm looking into your query, but wondered if you could possibly provide me with some more information? If possible, could you send me the VI you're working on and a few screenshots of some of your captured diffraction patterns (use printscrren on your key board and paste into Paint). If you could describe in a bit more detail exactly what you require, hopefully I will be able to come up with something. I studied Physics at University and vaguely remember coming across these functions when describing vibration modes on a drum. Hopefully, the info. you send will jog my memory a bit more and we should be able to develop a solution for your needs!
Best wishes
Rob
04-11-2007 09:51 AM
04-11-2007 09:54 AM
04-12-2007 04:54 AM
Leeser
Thanks for sending over those images. I think i've grasped what you're trying to achieve now, so will see if I can find a method in LabVIEW of matching up the diffraction pattern to the Bessel maxima. I believe the only way you will be able to remove the saturation is by modifying your physical setup. However, without seeing your apparattus, I can only guess that the problem is due to your physical setup which it of course may not be!
I will try and develop a method and get back to you when I have something more solid. In the mean time, there are a couple of links to a few of our Vision aquisition help pages that might be of use to you, especially as you said you were new to LabVIEW. It's definately worthwhile having a good look round our help pages and developer zone if you haven't done so already.
http://zone.ni.com/devzone/cda/tut/p/id/3470
http://zone.ni.com/devzone/cda/tut/p/id/3849
http://forums.ni.com/ni/board/message?board.id=200&message.id=919&requireLogin=False
Best wishes
Rob
04-12-2007 05:38 AM
"For my fitting routine I used ‘Nonlinear Lev-Mar Fit.vi’ and its subvi ‘Target Fn & Deriv Nonlin.vi’ which are found in the directory LabVIEW 7.1/vi.lib/analysis/6fits.llb. On the block diagram of ‘Target..’ I entered my airy formula. Please note that the ‘Target..’ vi also appears in ‘Lev-Mar abx.vi’ and ‘Lev-Mar xx.vi’ in ‘Nonlinear Lev-Mar Fit.vi’.
Your line profiles will be the Y input to ‘Nonlinear..’ For the X input I used an array of 1 to N. Your output will be the ‘Best Fit’ array. "
This looks straightforward enough, but the syntax of formulae was my stumbling block and I never got past a non-functioning vi.
Regards,
Leeser
04-13-2007 10:00 AM
Hi Leeser
I'm continuing to investigate your query but would like a little bit more information if possible. Are you using any image aquisition software, and do you have any of the Vision IMAQ driver sets (i.e. IEEE-1394) installed? If you have the NI Vision Apllication development module, then I believe we would be able to develop a solution pretty easily for you. This software is very powerful and allows you to do direct manipulation of realtime imaging. Don't worry if not though, I beilieve you can still use LabVIEW 7.1 to achieve your goal, but I have only found a possible solution using the IMAQ drivers so far.
Let me know if you have any such software installed and I will see what options there are. If you are simply taking a screenshot of your video signal, and then trying to modify the picture in LabVIEW, it will be a lot harder to try and analyse the line profiles (i.e. intensity of each individual pixel) and then map this to the Bessel function. It may still be possible to come up with some method though and I am continuing to investigate with this in mind.
Hope this makes sense!
Regards
Rob
04-16-2007 04:11 AM
04-16-2007 10:38 AM
Leeser,
Considering you are relatively new to labVIEW, your program was very well structured and seems to approach the problem in the right manner. As you correctly guessed right from the beginning, no-one it seems has attempted fitting a Bessel function to their data. The 'best-fit' VI's found in the 'Fitting Pallette' are more generally concerned with parametric, powers and exponential type functions, rather than more complex differentials such as the Bessel. In cases similar to yours, it seems that people haave tried adopting the Levenberg-Marquardt algorithm which is a Non-Linear Fitting VI found in the Fitting Pallette. This is the Lev-Mar VI which Kristie Elam reccomended you using for the Airy disc. This function allows one to define the equation with which they wish to fit their data, but due to the complexity of the Bessel function, this may be quite tricky.
I have been working on an example VI which provides the basic structure of what you need to implement in to your program. The Bestfit VI converts a picture using the IMAQ functions and then plots the converted data. You can manipulate the row control to choose which row of pixels you wish to analyse. The VI then calls the Lev-Mar Best Fit function which in itself calls the Bessel Formulae VI which is a template for the Bessel Formulae that the Lev-Mar function will use in its best-fit approximation. It is within this VI that you will need to enter the neccessary formulae to produce your theoretical Bessel function. The Lev-Mar Bestfit function can then use this data to plot a Least Squares Best Fit approximation against your spectrum.
Aswell as the Bestfit and Bessel Formulae VI's, I have attached a Gaussian Example VI which gives a complete example of a Bestfit approximation using this method. Furthermore, I have attached a couple of VI's that I found which I hope may help you to develop the Bessel formulae. These include a table of Bessel roots, which you may be able to use to produce a table of the derivative roots, those found on your schematic.
I really hope this information and the files I have attached will be of use to you, I'm just sorry there isn't a direct tool with which you can produce the bestfit approximation. Keep me posted on your progress as I've been working on this for a few days now and would like to see how it goes!
With regards to the Airy disc, I would keep on with the files that you received from Kristie Elam, hopefully using the same method with both the Bessel functions and Airy disc might make things easier for you.
I hope this informtaion is of use to you, best wishes and good luck!
Rob
04-16-2007 12:34 PM