Difference between revisions of "Optical Microscopy Part 3: Resolution and Stability"

From Course Wiki
Jump to: navigation, search
(Instructions)
(Stability of microscope for particle tracking)
 
(20 intermediate revisions by 5 users not shown)
Line 4: Line 4:
  
 
==Overview==
 
==Overview==
In this part of the lab, you will use image processing techniques to characterize two important properties of your microscope: resolution and stability.  
+
Congratulations on completing part 2. You made a functioning epifluorescence microscope. How cool is that?
  
The next part of this lab involves making movies of microscopic objects and measuring their mean squared displacement of their motion as a function of time interval. In order to do this, you will need to be able to acquire image sequences, precisely locate objects in the images, and track objects through time. The stability measurement will provide a baseline performance parameter for your instrument.
+
In this part of the lab, you will measure the resolution of your microscope using tiny, fluorescent microspheres as sourcesNext, you will quantify the stability of your microscope by tracking immobile beads. In part 4 of this lab, you will characterize the diffusive motion of particles in different rheological environments by tracking fluorescent microspheres. Your microscope will act as a position detector. To prepare for these measurements, you will measure the position noise of your instrument to establish a baseline performance parameter.
 
+
===Shot noise and centroid finding===
+
[[Image:Simulated Shot Noise.png|Simulated image of a fluorescent microshpere at various signal to noise ratios.]]
+
Shot noise is a fluctuation that affects all light intensity measurements, including microscopic images recorded with a CCD camera. <ref>There are a few exotic methods, such as [http://www.rp-photonics.com/amplitude_squeezed_light.html amplitude-squeezed light] that reduce noise below the shot noise level.</ref> It is a consequence the discrete and the stochastic nature of photon emission. Poisson statistics provide an excellent model for shot noise. The standard deviation of a Poisson-distributed random variable is equal to the square root of its average value. Thus, the lowest possible signal to noise ratio of an intensity measurement is equal to the square root of the average number of photons (intensity). The simulated images above show the effect of shot noise on the image of a fluorescent microsphere with a radius of 10 pixels for several values of intensity.
+
 
+
One method to estimate the position of a microsphere in an image is to compute an intensity-weighted centroid, also called the center of mass. Intensity-weighted centroids can provide locations accurate to a fraction of a pixel. Shot noise causes random variation in the pixel intensities, which perturbs the centroid. Repeated localizations of a stationary particle will exhibit random variation. Deriving an analytical expression for the variation is tedious. Happily, patient people with exceptional mathematical abilities have taken the time to do so. (See, for example, this reference: [http://www.opticsinfobase.org/josaa/abstract.cfm?uri=josaa-27-9-2038|Hui Jia, Jiankun Yang, and Xiujian Li. Minimum variance unbiased subpixel centroid estimation of point image limited by photon shot noise.]). The variation in the centroid is approximately proportional to the square root of intensity.
+
 
+
As a result, the diffusion coefficient measured by taking intensity weighted centroids of a perfectly stationary particle will not be zero. The measured diffusion coefficient of a non stationary particle will be systematically increased.
+
 
+
Here is the code that generated the simulated images:
+
<pre>
+
figure
+
 
+
maximumIntensity = [1e6 1e4 1e2 1e1 1e0];
+
radius = 10;
+
imageSize = [40 40];
+
 
+
for ii = 1:length(maximumIntensity)
+
    subplot(1, length(maximumIntensity), ii)
+
    imshow(poissrnd(SimulateFluorescentParticleImage(imageSize ./ 2, maximumIntensity(ii), ...
+
          radius, imageSize)) ./ maximumIntensity(ii));
+
    title(['SNR = ' num2str(sqrt(maximumIntensity(ii)))]);
+
end
+
 
+
 
+
function [ OutputImage ] = SimulateFluorescentParticleImage( CentroidList, Intensity, ...
+
                          Raduis, ImageSize )
+
 
+
    numberOfParticles = size(CentroidList,1);
+
 
+
    OutputImage = zeros(ImageSize);
+
 
+
    if(length(Raduis) == 1)
+
        Radius = Raduis * ones(1, numberOfParticles);
+
    end
+
 
+
    if(length(Intensity) == 1)
+
        Intensity = Intensity * ones(1, numberOfParticles);
+
    end
+
 
+
    for ii=1:numberOfParticles
+
        OutputImage = OutputImage + DrawParticle(CentroidList(ii, 1), CentroidList(ii, 2), ...
+
                      Radius(ii), Intensity(ii), ImageSize(1), ImageSize(2));
+
    end
+
end
+
 
+
 
+
</pre>
+
  
 
==Instructions==
 
==Instructions==
Line 69: Line 21:
 
You will use image processing functions to locate the beads in your image and fit a Gaussian function to them. Gaussians are more amenable to nonlinear regression than Bessel functions, and they are a very good approximation. It is straightforward to convert the Gaussian parameters to Rayleigh resolution. See [[Converting Gaussian fit to Rayleigh resolution]] for a discussion of the conversion.
 
You will use image processing functions to locate the beads in your image and fit a Gaussian function to them. Gaussians are more amenable to nonlinear regression than Bessel functions, and they are a very good approximation. It is straightforward to convert the Gaussian parameters to Rayleigh resolution. See [[Converting Gaussian fit to Rayleigh resolution]] for a discussion of the conversion.
  
# Make an image of a sample of 110 or 190 nm fluorescent beads with the 40X objective. (Several dozens to hundreds of PSF spheres should be captured in your image.)
+
# Make an image of a sample of 170 nm fluorescent beads with the 40X objective. (Several dozens to hundreds of PSF spheres should be captured in your image.)
 
#* Use 12-bit mode on the camera and make sure to save the image in a format that preserves all 12 bits.
 
#* Use 12-bit mode on the camera and make sure to save the image in a format that preserves all 12 bits.
 
#* Use <code>imhist</code> to ensure that the image is exposed properly.
 
#* Use <code>imhist</code> to ensure that the image is exposed properly.
Line 83: Line 35:
 
===Stability of microscope for particle tracking===
 
===Stability of microscope for particle tracking===
  
The accuracy of optical particle tracking may be limited by mechanical and optical phenomena. Vibration and drift are a source of additive noise. Shot noise and CCD readout noise in the image of a particle bring about uncertainty in the estimate of its centroid. Excessive vibration can frequently be corrected by improving the mechanical support structure of the instrument. Most stages can be locked to reduce drift. Shot noise is fundamental; however, its relative contribution to the total signal can be minimized by ensuring that the optical system is functioning at peak efficiency.
+
The accuracy of optical particle tracking may be limited by mechanical and optical phenomena. Vibration and drift are a source of additive noise. [[Shot noise and centroid finding|Shot noise]] and CCD readout noise in the image of a particle bring about uncertainty in the estimate of its centroid. Excessive vibration can frequently be corrected by improving the mechanical support structure of the instrument. Most stages can be locked to reduce drift. Shot noise is fundamental; however, its relative contribution to the total signal can be minimized by ensuring that the optical system is functioning at peak efficiency.
  
Before attempting to make measurements with particle tracking, it is essential to determine the performance characteristics of the instrument to be used. This can be accomplished by measuring a specimen with known characteristics. Perhaps the most foolproof choice is a sample with fixed particles. Any measured variation in the fixed sample is noise.
+
Before attempting to make measurements with particle tracking (Part 4), it is essential to determine the performance characteristics of the instrument to be used. This can be accomplished by measuring a specimen with known characteristics. Perhaps the most foolproof choice is a sample with fixed particles. Any measured variation in the fixed sample is noise.
 +
 
 +
In order to analyze your data, you will need to write code in Matlab. It is helpful to make sure your code is working before you collect data (especially for Part 4). You may download this set of Matlab files to help you get started: [[File:Matlab_Code_Following_Things_2.zip]]. Please note that you should take any code you download from the internet (including ones from this class) with a grain of salt--you will want to verify your code is working the way it should and that any bugs are fixed. One way to help test your code is to use it on simulated data, where you know what the output should be. You will find [[Particle Tracking Exercise|this exercise]] useful.
  
 
* To verify that your system is sufficiently stable for accurate particle tracking, monitor a dry specimen containing 0.84&mu;m fluorescent beads.  
 
* To verify that your system is sufficiently stable for accurate particle tracking, monitor a dry specimen containing 0.84&mu;m fluorescent beads.  
Line 91: Line 45:
 
[[Image:Stability Plot.png|right|300px|thumb|Example stability plot from the demo microscope.]]
 
[[Image:Stability Plot.png|right|300px|thumb|Example stability plot from the demo microscope.]]
  
# Bring a slide with fixed beads into focus. Choose a field of view in which you can see at least 3 beads with the 40× objective. Limit the field of view to only those beads by choosing a region of interest (ROI) in <tt>imaqtool</tt>.
+
# Bring a slide with fixed beads into focus. Choose a field of view in which you can see at least 3 beads with the 40× objective. Limit the field of view to only those beads by choosing a region of interest (ROI) with the <tt>UsefulImageAcquisition</tt> tool.
 
# Track the beads for 3 minutes in a Matlab video and save the centroids with a frame rate of your choice and make a note of it.
 
# Track the beads for 3 minutes in a Matlab video and save the centroids with a frame rate of your choice and make a note of it.
# Use the Matlab function <code>track</code> (check out the Stellar Reading Materials sections for an example, and be sure to limit the algorithm to a small region of interest around the beads, otherwise Matlab will struggle!) to separate the centroids into individual trajectories, <math>\vec r_n(t)</math>, where <math>t = nT</math> and <math>T</math> is the inverse of the frame rate you set above.
+
# Use the Matlab function <code>track</code> (be sure to limit the algorithm to a small region of interest around the beads, otherwise Matlab will struggle!) to separate the centroids into individual trajectories, <math>\vec r_n(t)</math>, where <math>t = nT</math> and <math>T</math> is the inverse of the frame rate you set above.
 
# Compute the difference of the trajectories for two particles, <math>\vec r_-(t) = {{\vec r_1(t) - \vec r_2(t)} \over \sqrt{2}}</math>. (Why is the square root of 2 necessary?)
 
# Compute the difference of the trajectories for two particles, <math>\vec r_-(t) = {{\vec r_1(t) - \vec r_2(t)} \over \sqrt{2}}</math>. (Why is the square root of 2 necessary?)
 
# Compute and plot the mean squared displacement (MSD) of <math>r_-</math> as a function of time interval and compare to the MSD of the actual particle tracks, <math>\left \langle {\left | \vec r(t+\tau)-\vec r(t) \right \vert}^2 \right \rangle</math> for intervals <math>\tau=nT</math> up to 180 s.
 
# Compute and plot the mean squared displacement (MSD) of <math>r_-</math> as a function of time interval and compare to the MSD of the actual particle tracks, <math>\left \langle {\left | \vec r(t+\tau)-\vec r(t) \right \vert}^2 \right \rangle</math> for intervals <math>\tau=nT</math> up to 180 s.
Line 101: Line 55:
 
* Make any necessary adjustments to your microscope and repeat this particle-tracking procedure to attain sufficient stability:
 
* Make any necessary adjustments to your microscope and repeat this particle-tracking procedure to attain sufficient stability:
 
** The MSD from the difference trajectory should start out less than 100 nm<sup>2</sup> at t = 1 s and still be less than 1000 nm<sup>2</sup> for t = 180 s.
 
** The MSD from the difference trajectory should start out less than 100 nm<sup>2</sup> at t = 1 s and still be less than 1000 nm<sup>2</sup> for t = 180 s.
 
===Actin imaging===
 
 
In this part of the lab, you will investigate how a drug called cytochalasin D (CytoD) affects the structural properties of fibroblast cells. Immunofluorescent staining will be used to make the actin cytoskeleton of fibroblast cells visible. You will compare the structure of cells that have been treated with CytoD with that of untreated cells.
 
 
* Read background reference: [[Cellular microrheology]]
 
 
The mushroom toxin phalloidin binds to polymerized filamentous actin (F-actin) much more tightly than to actin monomers (G-actin), and stabilizes actin filaments by preventing their depolymerization.  You will take advantage of this strong affinity between phalloidin and F-actin to image the cell's actin cytoskeleton.  Phalloidin conjugated with the fluorescent dye Alexa Fluor 568 will be introduced in mouse embryonic fibroblast (mEF) cells.
 
 
{|class="wikitable"
 
|width="200"|[[File: 20.309 130904 PhalloidinActin.png|200px]]
 
|width="250"|[[File: Alexa568.jpg|250px]]
 
|-
 
|Example of a 3T3 cell labeled with rhodamine phalloidin
 
|Excitation and emission spectra for Alexa Fluor 568
 
|}
 
 
By comparing Alexa Fluor phalloidin-stained untreated cells and CytoD-treated cells, you will observe and quantify the effect CytoD has on the actin stress fiber network.  Cytochalasin D is also a mycotoxin, but contrary to phalloidin, it poisons the cell by strongly inhibiting actin polymerization.
 
 
{{Template:Safety Warning|message=Wear gloves when you are handling biological samples.}}
 
 
====Procedures for fixing and labeling cells====
 
 
[[File: 3T3.PNG|thumb|200px|3T3 Swiss Albino]]
 
You will be given two plates of cells:
 
* one dish will be left untreated, and then fixed and labeled with phalloidin;
 
* the second dish will be first treated with CytoD, and then fixed and labeled with phalloidin.
 
 
A key technique to keep in mind when working with live cells - to avoid shocking them with "cold" at 20°C - is to be sure that any solutions you add are pre-warmed to 37°C. We will keep a warm-water bath running for this purpose, in which we will keep the various media.
 
 
You are provided with mEF cells, which were prepared as follows:
 
Cells were cultured at 37°C in 5% CO<math>_2</math> in standard T75 flasks in a medium referred to as DMEM++. This consists of Dulbecco's Modified Eagle Medium (DMEM - Invitrogen) supplemented with 10% fetal bovine serum (FBS - Invitrogen) and 1% of the antibiotic penicillin-streptomycin (Invitrogen). The day prior to the microrheology experiments, fibroblasts were plated on 35 mm glass-bottom cell culture dishes (MatTek, equipped with coverslip suited for optical microscopy studies). 
 
 
<u>Dish 1</u>
 
 
Below is the protocol to stain mEF cells with Alexa Fluor 568 phalloidin:
 
* Start with cells about 60% confluent. This is about the optimum percentage of cell population. If cells are too crowded, they will not stretch properly and show their beautiful actin filaments. Note also that these cells remain alive until the addition of formaldehyde, therefore requiring that any buffer/media added be pre-warmed.
 
 
# Pre-warm 3.7% formaldehyde solution and phosphate buffered saline at pH 7.4 (PBS) in a 37&deg;C water bath. Keep the formaldehyde wrapped in foil to protect from light.
 
# Retrieve an aliquot of cytochalasin D from the freezer and warm it in the water bath to 37&deg;C.
 
# After you get your dishes from the instructor, first remove the medium with a pipette and wash the dish 2X with 2 mL of pre-warmed PBS. Pipet up and down into the dish gently to avoid washing away cells.
 
# Carefully pipet 400 μL of 3.7% formaldehyde solution onto the cells in the central glass region of the dish and incubate for 10 minutes at room temperature. This "fixes" the cells, ''i.e.'' cross-links the intracellular proteins and freezes the cell structure.
 
# Wash the cells 3X with 1.5 mL PBS (note that this PBS solution no longer needs to be pre-warmed as the cells are dead).
 
# Extract the dish with 1.5 mL 0.1% Triton X-100 (a detergent) for 3-5 minutes. (Extraction refers to the partially dissolution of the plasma membrane of the cell.)
 
# Wash the cells 2X with 1.5 mL PBS.
 
# Incubate the fixed cells with 1.5 mL 1% BSA in PBS for 20 minutes. (BSA blocks the nonspecific binding sites.)
 
# Wash the cells 2X with PBS.
 
# Add 200 μL of Alexa Fluor 568 phalloidin solution (pre-mixed in methanol and PBS). Carefully pipet this just onto the center of the dish, cover with aluminum foil, and incubate for 45 minutes at room temperature.
 
# Wash 3X with PBS.
 
# You can now store the sample at +4&deg;C (regular refrigerator) in PBS for a few days, wrapped in parafilm and foil. It can also be stored in mounting medium for up to 1 year.
 
 
<u>Dish 2</u>
 
* By a very similar procedure, also prepare cells treated with cytochalasin D (CytoD):
 
:0. Before adding the formaldehyde, add 1 mL of the pre-warmed 10 μM CytoD solution to the second cell culture dish and incubate at 37&deg;C for 20 minutes (''and not a minute longer!''). Afterwards, wash 2X with PBS.
 
 
====Visualizing the actin cytoskeleton under your 20.309 microscope====
 
 
Since actin filaments and stress fibers are nanometer-scale objects, they are much dimmer than fluorescent
 
beads or the dye solution - care must be taken to get good images of the cytoskeleton. You may
 
need to cover the microscope to reduce room light contamination.
 
 
# Adjust the gain and exposure of the camera to get the best picture. Be sure to keep the same exposure conditions, however, for both untreated and CytoD-treated cells.
 
# Using the 40x objective, take some good fluorescence images of Alexa Fluor phalloidin-labeled cells, both untreated (Dish 1) and CytoD-treated (Dish 2).
 
  
 
==Report==
 
==Report==

Latest revision as of 18:12, 29 September 2016

20.309: Biological Instrumentation and Measurement

ImageBar 774.jpg


Overview

Congratulations on completing part 2. You made a functioning epifluorescence microscope. How cool is that?

In this part of the lab, you will measure the resolution of your microscope using tiny, fluorescent microspheres as sources. Next, you will quantify the stability of your microscope by tracking immobile beads. In part 4 of this lab, you will characterize the diffusive motion of particles in different rheological environments by tracking fluorescent microspheres. Your microscope will act as a position detector. To prepare for these measurements, you will measure the position noise of your instrument to establish a baseline performance parameter.

Instructions

Measuring resolution

One of the most commonly used definitions of resolution is the distance between two point sources in the sample plane such that the peak of one source’s image falls on the first minimum of the other source’s image. This suggests a procedure for measuring resolution: image a point source; measure the peak-to-trough distance; and divide by the magnification. In this part of the lab, you will use this method to estimate the resolution of your microscope.

Example image processing on PSF beads to determine microscope resolution.
Example Gaussian fit of a PSF bead fluorescence emission profile to estimate microscope resolution.

A practical problem with this method is that true point sources are difficult to come by. If you are using a telescope, stars are readily available approximate point sources. In microscopy, people usually use tiny, fluorescent beads with diameters of 100-190 nm. These beads are small enough to be considered point sources. You will use nonlinear regression to estimate the resolution of your microscope from an image of the tiny beads. Unfortunately, beads small enough for this purpose are not very bright. Imaging them can be challenging. Your microscope must be aligned very well to get good results.

You will use image processing functions to locate the beads in your image and fit a Gaussian function to them. Gaussians are more amenable to nonlinear regression than Bessel functions, and they are a very good approximation. It is straightforward to convert the Gaussian parameters to Rayleigh resolution. See Converting Gaussian fit to Rayleigh resolution for a discussion of the conversion.

  1. Make an image of a sample of 170 nm fluorescent beads with the 40X objective. (Several dozens to hundreds of PSF spheres should be captured in your image.)
    • Use 12-bit mode on the camera and make sure to save the image in a format that preserves all 12 bits.
    • Use imhist to ensure that the image is exposed properly.
      • Since there are a very small number of bright pixels, plot the histogram counts on a logarithmic scale.
    • Include the image and the histogram in your lab report.
  2. Use image processing functions to locate non-overlapping, single beads in the image.
  3. Use nonlinear regression to fit a Gaussian to each bead image.
  4. Convert the Gaussian parameters to resolution.
  5. Report the results in your lab report.
    • This page has example MATLAB code.
    • Discuss how the measured resolution compares with the theoretical value.

Stability of microscope for particle tracking

The accuracy of optical particle tracking may be limited by mechanical and optical phenomena. Vibration and drift are a source of additive noise. Shot noise and CCD readout noise in the image of a particle bring about uncertainty in the estimate of its centroid. Excessive vibration can frequently be corrected by improving the mechanical support structure of the instrument. Most stages can be locked to reduce drift. Shot noise is fundamental; however, its relative contribution to the total signal can be minimized by ensuring that the optical system is functioning at peak efficiency.

Before attempting to make measurements with particle tracking (Part 4), it is essential to determine the performance characteristics of the instrument to be used. This can be accomplished by measuring a specimen with known characteristics. Perhaps the most foolproof choice is a sample with fixed particles. Any measured variation in the fixed sample is noise.

In order to analyze your data, you will need to write code in Matlab. It is helpful to make sure your code is working before you collect data (especially for Part 4). You may download this set of Matlab files to help you get started: File:Matlab Code Following Things 2.zip. Please note that you should take any code you download from the internet (including ones from this class) with a grain of salt--you will want to verify your code is working the way it should and that any bugs are fixed. One way to help test your code is to use it on simulated data, where you know what the output should be. You will find this exercise useful.

  • To verify that your system is sufficiently stable for accurate particle tracking, monitor a dry specimen containing 0.84μm fluorescent beads.
Example stability plot from the demo microscope.
  1. Bring a slide with fixed beads into focus. Choose a field of view in which you can see at least 3 beads with the 40× objective. Limit the field of view to only those beads by choosing a region of interest (ROI) with the UsefulImageAcquisition tool.
  2. Track the beads for 3 minutes in a Matlab video and save the centroids with a frame rate of your choice and make a note of it.
  3. Use the Matlab function track (be sure to limit the algorithm to a small region of interest around the beads, otherwise Matlab will struggle!) to separate the centroids into individual trajectories, $ \vec r_n(t) $, where $ t = nT $ and $ T $ is the inverse of the frame rate you set above.
  4. Compute the difference of the trajectories for two particles, $ \vec r_-(t) = {{\vec r_1(t) - \vec r_2(t)} \over \sqrt{2}} $. (Why is the square root of 2 necessary?)
  5. Compute and plot the mean squared displacement (MSD) of $ r_- $ as a function of time interval and compare to the MSD of the actual particle tracks, $ \left \langle {\left | \vec r(t+\tau)-\vec r(t) \right \vert}^2 \right \rangle $ for intervals $ \tau=nT $ up to 180 s.
  • Why does the MSD of the particle trajectory increase while the difference trajectory stays about constant over the range of lag times τ?
  • Can you take advantage of this property to decrease the error in measurements of unknown samples?
  • Make any necessary adjustments to your microscope and repeat this particle-tracking procedure to attain sufficient stability:
    • The MSD from the difference trajectory should start out less than 100 nm2 at t = 1 s and still be less than 1000 nm2 for t = 180 s.

Report

Find and follow all guidelines on the Microscopy report outline wiki page.


  1. Resolution
    1. Procedure
      • Document the samples you used and how you captured images (camera settings, software used, etc…)
    2. Data
      • Include an image of the PSF sample indicating which beads were used for resolution measurement..
    3. Analysis and Results
      • Report the resolution you measured. Make sure to include N and a measure of uncertainty.
      • Show sample Gaussian fits.
      • Explain the Matlab algorithm used for data analysis.
    4. Discussion
      • Compare the measured value to the theoretical value.
      • Include a thorough discussion of error sources. Do not comment on insignificant sources of error. To determine which error sources are significant, and which are not, you must think carefully about the uncertainty related to each error source and estimate its magnitude and sign. Include these estimates in your report along with your estimate of the combined, total uncertainty. It may be helpful to list out the error sources in a table, including a category for the error source, type of error (random, systematic, fundamental, technical, etc.), the magnitude of the error, and a description and way to minimize each one.
  2. Stability
    1. Procedure
      • Document the samples you used and how you captured images (camera settings, frame rate, total number of frames, exposure, software used, etc…)
    2. Data
      • Show an example frame from the stability movie.
      • Plot two or more example bead trajectories for each of the samples. (Hint: If you subtract the initial position from each trajectory, then you can plot multiple trajectories on a single set of axes.)
    3. Analysis and Results
      • Plot MSD versus time interval τ for individual and difference tracks using log-log axes.
      • Provide a bullet point outline of data analysis methodology.
    4. Discussion
      • What are the benefits and drawbacks of differential tracking?
      • Include a thorough discussion of error sources.

Optical microscopy lab

Code examples and simulations

Background reading

References