Williams: PSF and Deconvolution Lab 2

From Course Wiki
Jump to: navigation, search
20.345: Bioinstrumentation Project Lab
Hardware & Software Specifications
  1. Pololu A4983 Stepper Motor Driver Carrier with Voltage Regulators
  2. Thorlabs 8 mm Travel Stepper Motor Actuator[2]
  3. Matlab
  4. Matlab Image Acquisition Toolbox[3]
  5. Matlab Allied Vision Technologies Adaptor[4]
  6. National Instruments USB Data Acquisition (DAQ)
  7. Epi-fluorescence Microscope[6] with parts from Thorlabs
  8. Submicron beads, small enough to be considered point sources
A4983 Stepper Motor Driver Carrier with Voltage Regulators
MicroStepping Driver

The microstepper driver was wired on a standard on a standard bread board. We used the 5V source on the pcb to serve as the Reference(Ref). The signals to MS1,MS2,MS3,STEP, and SLEEP were inputted digital (using the output changes of the DAQ). The ENABLE port was used in conjunction with wires 1 and 3 of the stepper motor to regulate when the user has the ability to move the z-axis of the microstepper stage. When the stage is about the be moved past it's z-upper or lower bounds, the circuit between wires 1 and 3 open ( infinite impedance ). This fact was used to regulate when ENABLE-bar was receiving the 5V from the REF port. ENABLE-bar is originally set to digital local 0 when it is not receiving the full 5V so it is disabled ( i.e. digital logical 0). When the stage is trying to be moved pasts its z bounds, the wires open and ENABLE-bar(disable) is set to true and z-stage handle becomes stuck. The digital output connected to SLEEP-bar is used to control whether movement in the z-axis of the stage is locked ( i.e you are not able to focus it ) or unlocked/sleeping ( you are able to focus the stage). When the digital signal is 1(true) the microstepper driver is not sleeping and when the digital signal is 0(false) you are able to control the stage. STEP was originally controlled with an analog signal but it was mentioned that STEP is should receive only digital signals. I'm uncertain about whether this is true. Because the logical behind the STEP function should be that it steps whenever it sees a rising edge, and if the reference value ( i.e. the value for true is set to 5V). In my opinion you should be able to feed a analog signal into STEP and have it respond so that it steps whenever it sees a rising signal from 0 to 5. It was my initial intention to feed step a rectangular pulse waveform, with rectangles of height 5Vs. Theoretically you could also feed STEP a sine wave.

The MS1,MS2 and MS3 were all used to control the angle the magnet rotates per step six. At full step the stepper rotates 1.8 degrees. For our purposes we used the smallest step size ( 16th-step ) which corresponds to 0.2 degrees per step.

Code & Image Acquisition
  • Microstepper Script
  • GUI for Z-stack imaging
  • script of GUI for z-stack imaging
  • The first script is used to control how Thorlabs 8 mm Travel Stepper Motor Actuator moves. The Nyquist frequency was chosen using a algorithm online.

    The images are acquired using the "avtmatlabadaptor_r2009b" at 16bit binning. The exposure was set by looking at the PSF beads ( 190nm in diameter ) under the microscope and playing with the exposure values until a good image was seen on the computer. In the future, in the GUI the user should be able to adjust this parameter. For now, this value is hard coded into the script. The speed that the stepper steps was increased by storing the intensity values of the images in an array and saving the images in 'tiff' files after all of the images had been acquired. The z-stack imaging operates in the following order

    • Set digital lines
    • Set camera and camera properties and start vid
    • Determine step distance for nyquist frequency
    • Set step size based on user input or default value if user input not available
    • Determine number of steps to take
    • Start collecting images using video object
    • Store images in psf array
    • Reverse direction
    • Repeat from step "start collecting images using video object
    • Set sleep-bar to (0:false) and end script
    GUI interface for controlling microstepper.m script

    Right now the script uses "for" loops to give signal the microstepper to step. This will be changed so that the MS1,MS2,M23 lines receive square waveforms. In the future it would also be useful to allow users to set parameters such as step size in terms of the number of images they which to generate and the size of their sample. </br> The guide allows the user to set the nyquist frequency and also alerts the user as to when the microstepper is asleep and not asleep. When the stepper driver is not asleep a button turns red. The results from the image acquisition are displayed on the two axes. The left most axis displays the acquired image. The right most axis displays a log of the binned intensity values. Text is also displayed when the guide is saving the acquired images.

    Deconvolution of raw image of bars ( taken from deconvolution database) with the corresponding psf
    3D image of bars with noise

    We collected PSF images of a 190nm bead. The 3D image of the psf bead is displayed below. A raw image was obtained from the deconvolution database. The raw image is an image of bars that was corrupted with Gaussian and Poison noise. Since we did not take raw images of our own, I used our collected PSF images to deconvolve one of the raw images from the database. I then used the database's bar-psf image to deconvolve the raw image. The results of the deconvolution are should below.

    3d image of PSF of 190nm bead
    Theoretically calculated PSF.

    A theoretical PSF was also created using the parameters specified in Spring_2011:3D_PSF_lab#ImageJ_Tutorial:_Deconvolution_Lab. I attempted to calculate the SER between the in lab PSF beads and the theoretical PSF beads but the images for the PSF of beads taken in lab was too small so the program was unable to calculate the SERI didn't understand all the parameters so I'll probably pester on of the Steven's later this week and ask them to explain things to me.


    If there is extra time at the end of the semester I would like to come back and take a raw image using the fluorescent microscope set-up and then deconvolve my raw image with the PSF of the 190nm beads.

    Special thanks to Leanna and both Steve's for their help with the circuitry and special thanks to Leanna for cropping the PSF images!!