# User:TheLarry/Notebook/Larrys Notebook/2010/03/02/Image Generating Software

### From OpenWetWare

## Contents |

# Image Generating Software

## Basics

A point source of light looks like an Airy Disk thanks to a limited sampling geometry in this case the objective. An Airy Disk can be approximated as a Gaussian, but I don't do that here. The basic idea is that a microtubule is labeled with a certain number of fluorphores. If it wasn't for the fluorphore the microtubule will basically be invisible using our microscope. Each one of these dyes emits light like a point source. So each one of these dyes can be approximated as an Airy Disk. The basic idea behind this software is to place Airy Disks randomly along a straight line and call that our microtubule.

## Initially

There are a couple things that happen before the image is formed. The "dyes" need to be placed along the microtubule. To do this the user inputs the length of the microtubule, how many sites the dye can attach to per length, and the probability the dye will attach there. The software then randomly places the "dyes" down along the length. This is used with a random number generator.

The software also calculates the Airy Disk. The user inputs the prefactor, which I'll explain in a second. The Airy Disk equation is

k is what i call the prefactor. It connects the physical dimensions to the theory. Through an equation that i'll have to put here later. I'll get back to this i promise. Anyway with the Airy Disk calculated over a certain range that the user can input. I usually do -250 to 250 for both x and y. As long as the whole microtubule is inside of it; it isn't a problem. The Airy Disk will be centered at 0.

The last thing the software needs to do before generating an image is for the user to input the trajectory the microtubule will follow. I wrote a sub.vi earlier to do this. The user can pick from a horizontal straight line, vertical line, sloped line, and a circle. He/She, They, He can combine any of these to create a trajectory as complicated as he wants.

## Creating Image

An Airy Disk is placed at each center location along the microtubule. The centers are labeled from their distance from the start of the microtubule. So the x,y coordinate of the Airy Disk location is chosen as a point along the trajectory that is that far from the start of the microtubule. Any overlap are added together. With all the Airy Disks in place the image is normalized so that it can be a probability density function. This is done through a two dimensional integration. However a monte carlo integration may be used in the future.

With a probability density function for the microtubule, N number of random numbers are used to find the location of each photon that is emitted. Each photon carries an intensity that the user can set. This produces a (possibly even though I haven't checked yet) Poisson Distributed microtubule image. This looks like Shot noise from the real image.

Background noise is then added to the image. The noise is Gaussian distributed whose standard deviation and mean can be set by user.

The x,y coordinate of the start of the microtubule is then adjusted along the trajectory a distance equal to the velocity which is in pixels/frame and the next iteration begins starting with finding all the locations of each center of the Airy Disks again.

Right now i integrate to find the PDF each time but i think that the answer doesn't change too much and I might be able to do it just once. I'll think more about this.

Each image is saved and I will track those tomorrow.

## Epilogue

This is the second attempt i had to create an image. The first was to convolute a rectangle (or line) with an Airy Disk. If you look back in my notebook i successfully did that. However this procedure seems more realistic. And if you look at todays entry I wrote a list of the advantages this way has over the previous method.

There is bound to be more work to do on this software, and I am sure i'll need to rewrite this page, but so far this ain't too bad. I should probably add images and pictures to this page, but i'll do that later. I am feeling lazy right now.