# LabVIEW

cancel
Showing results for
Did you mean:

## How to plot the intensity of a diffraction pattern through a circular aperture

I'm new to LabVIEW and I was advised to run a tutorial exercise writen for other University students to familiarise myself with the program. Unfortunately, I've fallen at the final hurdle and I have no idea what I'm doing wrong

The task is to calculate and display the far-field diffraction pattern of a circular aperture, which is essentially the same as the 2D Fourier transform of a sine wave

I have a diffraction pattern on my intensity graph but it's not circular, and I've tried various things to make it circular but to no avial. I think my problem is that I'm not properly converting the aperture size to a circular shape, does anyone have any idea how I could do this?

Incase it helps, here is the link to the tutorial I've been using:

The tutorial can be found listed under "Teaching Material" on the right hand side, and is simply called "LabVIEW". Clicking the link opens the PDF with the tutorial in it, and my problem begins on Pg 58. I'm also unsure of how to impliment the suggestions found on Pg 59

Ben
Message 1 of 11
(7,305 Views)

## Re: How to plot the intensity of a diffraction pattern through a circular aperture

Hi Ben,

Did you pay attention to the note about auto-scaling off and manually setting the ranges?

Just trying to help (another Ben studying physics),

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 11
(7,274 Views)

## Re: How to plot the intensity of a diffraction pattern through a circular aperture

Hi Ben (this could potentially get confusing!),

Autoscaling is off for both graphs, though I'd not set the ranges as I didn't think it would affect the pattern. The "Aperture Size" graph is DEFINATELY in the wrong place just now, but I moved it to look for potential problems in other sections of the code. There are probably various problems with the code, so feel free to pint them out!

Thanks again,

Ben
Message 3 of 11
(7,256 Views)

## Re: How to plot the intensity of a diffraction pattern through a circular aperture

Hi Ben,

There is a running joke on these forums "Don't let Ben do math." so you are going to have to remind about some of that optics stuff I have not looked in quite a while.

Below you will find my mods of your code which were mostly just clean-up and simplifying. The big thing I did was re-size your graphs such that their aspect ratios were square. The pattern looks like something I recognize so I am not sure what is wrong. So please explain what you don't think is right and I'll see if I can be of any furterh assistance.

Just trying to help,

Ben

Message Edited by Ben on 06-05-2008 07:47 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 11
(7,240 Views)

## Re: How to plot the intensity of a diffraction pattern through a circular aperture

Hi Ben,

The problem I have is that the Diffraction Graph should come out looking something like a series of rings of increasing size, becoming less intense and more distorted the further from the centre they are (though it's more the shape in the centre that's important), fairly similar to the "Aperture Size" plot, only more defined:

http://en.wikipedia.org/wiki/Image:Airy-pattern.png

I doubt it'll come out exactly like that, but it's the best image I could find of what I'm meant to be simulating

As far as I can tell the interference pattern in the diffraction graph is wrong because the information being put into the formula should be simulating a circle, and it's actually simulating a square (I'm not sure if that makes sense but it's hard to explain when I'm not talking about the physical apparatus I'd normally be using for something like this) and thus the final pattern has interference in the wrong places

Thanks again for your help, and I wouldn't worry if it has you stumped as no-one here knows how to do it either!

Ben

Message 5 of 11
(7,230 Views)

## Re: How to plot the intensity of a diffraction pattern through a circular aperture

Hi Ben (or anyone else who's read this problem),

I've just received a solution to the problem from a friend of a colleague who'd worked through the tutorial I was doing some time previously. If anyone wants I can post the correct code (though it was written in LabVIEW 7.1)

Thanks for all help given, I'm still learning LabVIEW but this has helped me alot,

Ben

Message 6 of 11
(7,216 Views)

## Re: How to plot the intensity of a diffraction pattern through a circular aperture

Hi Ben

I 'm glad to hear that you have solved the problem that you were having. The forum community relies on people posting both problems and solutions up hear together as this then forms a great resource and store or knowledge for future users.

If you would post your solution up here not only would I be interested but I'm sure that it would be of use to people with similar problems in the future.

Thanks very much
Graham Green

Sr. Product Marketing Manager

National instruments
Message 7 of 11
(7,158 Views)

## Re: How to plot the intensity of a diffraction pattern through a circular aperture

Hi Graham,

Here's the solution I was sent, the problem I was having was down to a couple of missing sections of code I'd not known how or where to add in.

The solution includes two different approaches to the problem (creating the far field diffraction pattern from a circular aperture), where a hard and soft aperture have been created. The solution I was looking for (from the tutorial link I posted above) was the hard aperture, which corresponds to the top code (it should all be clearly marked)

Thanks,

Ben

Message 8 of 11
(7,153 Views)

## Re: How to plot the intensity of a diffraction pattern through a circular aperture

Hi ben

Thanks, that looks great.

Graham Green

Sr. Product Marketing Manager

National instruments
Message 9 of 11
(7,146 Views)

Interference

Message 10 of 11
(4,679 Views)