*Figure 2 : The features of the microscope are highlighted. Figure (a) shows the view below the sample stage, whereas figure (b) shows a bigger, overall view of the microscope.
</WRAP> |
The total magnification of the microscope is given by the product of the 10x eyepiece and the selected objective's magnification.
The condenser is used to take the light coming from the light source and focus it into a cone which narrows to a point at the sample, and then expands back into a cone of light entering the objective. The condenser needs to be adjusted separately for each objective, so that the cone angle matches the numerical aperture (or acceptance angle) for that objective. Getting the best image means adjusting the position of the condenser, the opening diameter of the iris, and the brightness of the light source.
==== The camera ====
|For video recording, a CCD camera (model ImagingSource DMK 72BUC02)is coupled to one of the microscope eyepieces. The camera connects to the computer via USB and is controlled by the IC Capture application which should be on the desktop. |
{ ${/download/attachments/268108850/20161025_124410.jpg?version=1&modificationDate=1614188566000&api=v2}$
Figure 3 : The CCD camera, shown disconnected from the microscope eyepiece.
=== Image capture and analysis ===
Once the microscope has been focused and adjusted, a video is collected. The video can to be processed frame-by-frame to subtract out the background so that the particles are easier to identify and track, and will be broken down into individual frames. This processing is done using the open source Java program ImageJ, which is available as a free download.
|The frames of the video are then analyzed in TrackPy, a python-based package for identifying and tracking particles. You will run TrackPy in-lab on a department computer which has been set up for you, but you are encouraged to download and install the TrackPy package on your own computer so that you have the ability to work with your video file outside of lab. |
TrackPy is a set of python routines which does the following:
- identifies individual potential particles in each frame of the video and allow the user to specify different criteria for inclusion or exclusion; - tracks the locations of individual particles from one frame to the next, thereby reconstructing the path which the particles trace out over the course of the video; and - calculates and outputs statistical information about the trajectories of these particles for use in analyzing the behavior of individual particles or of ensemble averages of particles.
TrackPy gives the user a lot of flexibility in determining the values of various parameters which are used to identify and track the particles. A large part of what you do in lab will be changing these parameters and observing the effects of the changes.
==== Installing ImageJ and TrackPy for home use ====
=== ImageJ ===
Most students process their videos and create final still frames completely in-lab, but having the software on your personal computer allows you do further processing or to explore different options after you've gone home.
Follow the instructions online to download and install ImageJ on your computer. You will also need to install the homemade plugin “bkg”. Download the file and place in the “ImageJ/plugins” application folder. (The software should automatically detect the plugin next time it starts up.)
=== TrackPy ===
|To install the TrackPy package on your own computer, first make sure that you have installed Anaconda. Open the “Anaconda Prompt”, “Terminal” (Mac only) or “Command Prompt” (Windows only) and type and execute the following commands (agreeing to proceed when prompted): |
<blockquote>
<code>
</HTML>conda update conda
</code>
<code>
conda install -c conda-forge trackpy
</code>
<code>
conda install -c conda-forge pims
</code>
<code>
conda install pandas=0.23.0
</code>
</blockquote></HTML>
If there are no issues, you should be able to run any file that calls the TrackPy library. We provide a customized tutorial notebook below, but other example notebooks detailing the functionality of the package are available here. (Click “Clone or download” and select “Download ZIP”. Unzip the resulting file to a convenient location on your computer.)
== What to do if there are issues ==
If you are having issues (in particular if you see the error “'frame' is both an index level and a column label.”), you can try creating a new environment in Python for your code. To do so, open up the Anaconda navigator and select the 'Environments' tab. Click on the 'Import' button on the bottom of the screen, and use the following file for the specification:
|PHY211Config.yml |
After everything downloads, you should have an Anaconda environment with appropriate versions of the needed packages. Simply select the new environment by clicking on it and then launch Jupyter notebook as normal.
For the command line inclined,
<blockquote>
<code>
</HTML>conda env create -f PHY211Config.yml -n phy211
</code>
<code>
conda activate phy211
</code>
</blockquote></HTML>
should achieve the same effect, provided you have the config file in an appropriate directory.
===== Experimental procedure =====
Before Beginning
Create a folder on the computer desktop. Keep all of your files and data in this folder.
|Put a freshly downloaded copy of the tutorial notebook[ ](/download/attachments/268108850/Brownian_Motion_Tutorial_2019_04_11.ipynb?version=2&modificationDate=1615834502000&api=v2)inside this folder. Do not use any version of the tutorial which is already on the computer desktop as there is no way of knowing what changes made have been made to the code by previous students. (When you first run the tutorial, you may need to change the file path to the appropriate folder containing your data.) |
In the first part of the experiment, you will gain experience in performing the following tasks:
* preparing samples and using the microscope;
* recording videos and processing them in ImageJ;
* calibrating the plate scale of the CCD camera;
* running the basic TrackPy processing routines to identify particles and tracks; and
* outputting useful statistical information about your tracks.
At the end of the first part, you should obtain a histogram of particle displacements extracted for one or more videos, and you should calculate an estimate for the diffusion coefficient.
For the second part of the experiment, you will investigate systematic effects. You will have some freedom to choose what effects you study, and the approach will be open-ended as you explore different ways to look into your chosen topic(s).
==== Procedure ====
- Begin by preparing a sample following the procedure given in Appendix A. For Part I, we suggest using the 1 μm silica spheres as these represent particles large enough to focus on easily, but small enough to move vigorously. - Follow the procedure in Appendix B to locate and focus the microscope on the particles in the sample. Identify a region of the sample which is free of dirt or bubbles and where the particles appear uniformly distributed and are not clumped together. - Following the procedure in Appendix C, record a 300 frame video. The video should be recorded at a frame rate such that the particles move not much more than one diameter between frames. Too large a displacement between frames makes it more likely that TrackPy will lose track of the particle quickly. Too small of a step between frames will result in short particle tracks which lead to larger uncertainties in the final results. - Following the procedure in Appendix D, open the video in ImageJ, generate and apply a background correction to make the particles stand out more better in each frame. Save the video to a sub directory as an image stack of either TIFF or PNG files. - Close both the IC Capture and ImageJ applications to free up system resources. There should be no other applications open and running in the background while processing the video in TrackPy. - Now startup a Jupyter notebook session and begin working through the TrackPy notebook. Once the trackPy analysis is complete you will have a text file containing particle displacements in x and y for all identified particle tracks. These displacements are given in units of pixels from the CCD camera chip. - You need to convert the particle displacements from units of pixels to microns, this conversion factor is called the plate scale of the detector. Follow the procedure in Appendix E to calibrate the plate scale of the CCD.
After completing the above steps, there are two methods we can use to extract the diffusion coefficient from the data.
* The first method is to plot a histogram of particle displacements over a given time step. The variance of such a distribution is proportional to the diffusion coefficient.
* The second method is to break up all trajectories into sub-trajectories of given time length and to explicitly plot { $\langle x^2 \rangle$ versus time, [Math Processing Error]t { $t$ . The slope of such a plot yields the diffusion coefficient.
Explore both methods in the Jupyter analysis notebook and try to understand how the program parameters affect the results.
STOP : After you complete the data collection and analysis for the first part of this experiment, stop and schedule a meeting with the faculty instructor in charge of this experiment. At your meeting, you will discuss your work and results from Part I and your plans for Part II.
In preparation for that meeting, complete the analyses outlined here, (and any other investigations that you see fit), and read ahead to the Part II procedure. You do not need to prepare a formal presentation or written lab report, but you should come ready for a detailed discussion. Your knowledge of the experiment, your properly recorded lab notebook, and your analysis of the data from the first part should be adequate. You and the instructor will discuss any problems or weaknesses that need to be addressed in the work, (including, for example, repeating measurements, collecting additional data, or modifying your analysis), and you will jointly decide on a set of appropriate goals for the remainder of the experiment.
====== Analysis of Part I ======
—-
The principle way you will analyze your data is to run your video(s) through the TrackPy notebook and look at how the output changes as you make changes to the different parameters within the program.
<blockquote>
QUESTION: The diffusion constant you obtained was likely different from the predicted value by more than you would expect due to purely statistical fluctuations. This suggests the possibility of some sort of systematic effect which we are not accounting for in our analysis. This is a common occurrence in experimental work, and much time and effort is put into investigating, understanding and characterizing systematic biases in the data. In the second part of this experiment you will investigate one such possible systematic effect. To help set the stage, consider the following list of possible sources of systematic bias in the data. For each item in the list, decide whether you would expect the effect to make the diffusion constant larger or smaller. Why would you expect this to be the case?
</HTML>
- High density of particles resulting in particles colliding with each other in addition to interacting with the water molecules. - Some attractive force between particles causing small groups (2 or 3 particles) to clump together. - Gravity causing particles to slowly settle to the bottom of the drop and therefore interact with the microscope slide. - Heating from the light source raising the temperature of the sample.</blockquote></HTML>
====== Part II: Investigation of systematic effects ======
—-
This experiment provides a good opportunity to investigate systematic effects. In many of our experiments, the systematic and statistical effects on the data are difficult to treat separately. Here though, the distribution of the particle step sizes should be very well described by Gaussian statistics, leaving everything else as a systematic effect.
For Part II, choose one or more systematic effects to investigate. By its nature, this is an open ended task. There is no “correct” answer to compare your results to. You may find that the diffusion coefficient you get from the data changes very little, or not at all as a function of the parameter you choose. In this case you can say that the method we are using here is insensitive to that particular effect. Or you may find that at, above or below a certain value the analysis effected in some way which you should elaborate upon. In a real experiment you would spend considerable time investigating as many of these types of systematic effects as possible in order to better understand your final results.
====== Appendices ======
—-
===== Appendix A: Preparing a sample =====
Below are a few videos showing how to mix a particle solution an prepare a sample slide. Below that is the same information in written form.
|
*Video : Preparing particle solutions
</WRAP> |
*Video : Preparing a sample slide
</WRAP> |
| Vials containing pre-mixed solutions of particles with doubly-deionized water may be available or you may need to prepare your own. * If pre-mixed vials are available, shake the vial by hand to loosen up stuck particles, then place the vial on the “Vortex Genie” for about 30 seconds to ensure that particles are evenly mixed. * If you need to prepare your own sample, ask the lab staff for assistance. You will need to remove a small volume of particles from the dense solution, place it in a clean vial, and add water gradually until an appropriate dilution is achieved. To prepare a drop for viewing, we need to place a drop of a given solution onto a microscope slide and top with a cover slip. This will confine the drop to a small area, but allow the particles within the water to diffuse naturally. Start by cleaning the taped microscope slide with a kimwipe to remove any dirt or residue. Check that the micropipette tip is clean, press down the button on the micropipette and insert into the vial of particles. When you release the button, a small volume of solution will be pulled into the tip. Move the pipette over the slide, and carefully place a single drop in the center of the slide. If the drop spreads to the edges of the slide or to the tape, wipe the surface clean and place another drop. Wipe a cover slip clean with a kimwipe and gently place over the drop. There will be a little bit of spreading; if the drop reaches the edges or tape, wipe clean and repeat. Place the slide onto the microscope slide holder and turn the microscope on. | { ${/download/attachments/268108850/Sample_prep.jpg?version=1&modificationDate=1614188566000&api=v2}$ |
===== Appendix B: Focusing the microscope =====
The particles we are using are too small to see individually with our eyes, so we need to us the microscope to magnify them. Figure 4 shows a schematic of the situation, and shows that typically particles will cluster around the middle of the drop (between the upper cover slip and lower microscope slide. In order to find these particles, we will focus the microscope in steps.
{ ${/download/attachments/268108850/Focusing.png?version=1&modificationDate=1614188566000&api=v2}$
Figure 4 : Particles in the sample fluid will be concentrated in a band somewhere between the cover slip and the microscope slide.
If you want, you can remove the CCD camera and look through the microscope binoculars to see particles with your own eyes. Most, however, find it easier to use the camera recording on the computer, and make adjustments that way.
| 1. Make sure that the CCD camera is connected to one of the computer USB ports. 2. Open the IC Capture application on the desktop. 3. The main window should look something like Fig. 5. The Device should be “DMK 72BUC02”. 4. Set the video size to Y800 (1024 x 768) as indicated in Fig 5. 5. If the the image from the camera is not being displayed, select Live from the Device menu. 6. If the histogram window is not being displayed, selected Histogram from the View menu. | { ${/download/attachments/268108850/IC_cap.PNG?version=1&modificationDate=1614188566000&api=v2}$ Figure 5: A screenshot of the IC Capture software |
Once you have a live image on the computer, you can begin to focus. We provide a video tutorial, followed by written (and photo) instructions.
|
*Video : Focusing the microscope
</WRAP> |
* Begin by looking at the slide with the 4x objective as in Fig. 6(a). (This is a total of 40x magnification: the 4x objective in conjunction with the 10x eyepiece.) Move the slide around until you find the meniscus (edge) of your drop and adjust until that is in focus. You may need to increase the light intensity or adjust the aperture or condenser position to make the image clearer.
* Increase the objective to 10x (for a total magnification of 100x) as in Fig. 6(b). Refocus on the meniscus and re-adjust the light as needed. You may not see the particles clearly yet (unless you are using the biggest particles), but you may see artifacts or defects that exist on the cover slip, slide, lenses, or in the water. Note that these features (except for the ones on the lens) come into and out of focus as you adjust… you are seeing that the focal plane is changing up or down within the sample and that different things are visible at different levels.
* Increase the objective to 40x (for a total magnification of 400x) as in Fig. 6©. Refocus and adjust the light. Look first for the meniscus, but now focus deeper into the sample and look for particles. You may find more than one layer of particles; you are looking for the most dense layer. Move the slide stage around and look for areas where particles are not clumped together and are moving freely.
* We typically do not need to go to the highest objective of 100x (1000x total magnification).
* Once you have a clear and focused patch of particles, you can begin to play with image exposure settings to help make the particles more clearly visible (as in Fig. 6(d)). We will discuss this process next.
| { ${/download/attachments/268108850/Focusing_40x.png?version=1&modificationDate=1614188566000&api=v2}$ (a) View of the sample at the lowest magnification of 40x. | { ${/download/attachments/268108850/Focusing_100x.png?version=1&modificationDate=1614188566000&api=v2}$ (b) View of the sample at a magnification of 100x. The particles will not be visible at this magnification. |
| { ${/download/attachments/268108850/Focusing_400x.png?version=1&modificationDate=1614188566000&api=v2}$ © View of the sample at a magnification of 400x. The particles are now visible. You can see areas where several particles have clumped together. | { ${/download/attachments/268108850/Focusing_400_1x.png?version=1&modificationDate=1614188566000&api=v2}${ ${/download/attachments/268108850/Focusing_400_2x.png?version=1&modificationDate=1614188566000&api=v2}$ (d) This is the same 400x image, but with the camera gamma turned up the IC capture software. Notice how much darker the individual particles appear. The trade off however is that the background becomes less uniform. The background can be subtracted out at a later stage in the data processing. |
|
*Figure 6 : Focusing the microscope image
</WRAP> |
Depending on how much light is shining through the sample, you may need to adjust the exposure settings.
| 1. From the Device menu, select Properties. A dialog will come up as shown in Fig. 7. 2. In the Exposure tab, uncheck all of the Auto boxes. 1. Set the exposure to 1/120 sec. 2. Adjust the Gain to set the image brightness. The histogram display can be useful here to see the distribution of pixel intensities. 3. Leave Auto Reference and Auto Max Value alone. 3. In the Image tab you can make adjustments to the gamma control. Experiment with these to see how they affect the image. | { ${/download/attachments/268108850/Dev_prop.PNG?version=1&modificationDate=1614188566000&api=v2}$ Figure 7 : The Device Properties menu where you can adjust exposure |
===== Appendix C: Recording a video =====
When you have focused the microscope onto an appropriate region that shows many particles dancing about and have adjusted the exposure to your liking, you are ready to record a video.
- In the main window in the toolbar at the top of the screen, set the frame rate to 10 fps. - From the Capture menu, select Toggle Recording Info. You should now have access to the tabs shown in Fig. 8(a)-©. - In the Codec tab, the file type should be AVI and the video compressor should be Uncompressed - Y800. - In the Video File tab, set the directory into which the video file will be saved and the file name (or allow automatic filename generation). - In the Advanced tab, set the camera to auto stop after X frames where X is the number of frames you wish to capture. Typically 300 frames is sufficient (not the 2000 shown in the Fig. 8). The Frame Filter box should be unchecked if you want to keep all 10 frames per second. For large (slow-moving) particles, you may want to use this to adjust the saved frame rate. - When all is ready, select Record Video File from the Capture menu (see Fig. 8(d)) and click the red record button.
| { ${/download/attachments/268108850/Codec.PNG?version=1&modificationDate=1614188566000&api=v2}$ (a) the Codec tab | { ${/download/attachments/268108850/rec_settings_vid.PNG?version=1&modificationDate=1614188566000&api=v2}$ (b) the Video File tab |
| { ${/download/attachments/268108850/Rec_set.PNG?version=1&modificationDate=1614188566000&api=v2}$ © the Advanced tab | { ${/download/attachments/268108850/Rec_prop.PNG?version=1&modificationDate=1614188566000&api=v2}$ (d) The Record Video File dialog box |
Figure 8 : Video recording dialog boxes.
===== Appendix D: Applying the background correction =====
| 1. Start the ImageJ application. Open your AVI file. In the AVI Reader dialog, check “Use Virtual Stack”. You should see the first frame of the video file, as in Fig. 9(a). 2. From the _Image _menu, go to _Stacks _and select Z Project… In the dialog box, select “Median” as the projection type. Note that the window displaying the AVI file must be selected and in the foreground before making the aforementioned menu selections. It may take a few moments to process all of the frames in the AVI stack. You should end up with a frame which looks like Fig. 9(b). 3. Click first on the window displaying the median image, then on the AVI movie stack window. (The order matters for what is about to come next.) From the Plug-ins menu run the _bkg _macro.Choose a new directory in which to store the output. You should see ImageJ flipping through each image in the AVI stack as it applies the background correction. When you are finished, your output directory should be filled with images which look like Fig. 9©. |
| { ${/download/attachments/268108850/Screen%20Shot%202016-10-27%20at%2010.51.14%20AM.png?version=1&modificationDate=1614188566000&api=v2}$ (a) the first image of a video file | { ${/download/attachments/268108850/Screen%20Shot%202016-10-27%20at%2010.51.40%20AM.png?version=1&modificationDate=1614188566000&api=v2}$ (b) the “background” image generated from taking the average of all frames | { ${/download/attachments/268108850/Screen%20Shot%202016-10-27%20at%201.10.56%20PM.png?version=1&modificationDate=1614188566000&api=v2}$ © the first frame of a video after background subtraction |
|
*Figure 9 : The evolution of a video file from AVI to stack of background-subtracted images
</WRAP> |
===== Appendix E: Calibrating the CCD =====
You are provided with a Bausch and Lomb Standard Series Stage Micrometer (see Fig. 10) for calibrating the pixel scale of the CCD camera. The stage micrometer has rulings scribed on it in increments of 0.1 mm and 0.01 mm.
| { ${/download/attachments/268108850/BL%20standard%20stage.jpeg?version=1&modificationDate=1614188566000&api=v2}$ (a) | { ${/download/attachments/268108850/Mic_calibi.png?version=1&modificationDate=1614188566000&api=v2}$ (b) |
|
*Figure 10: The Bausch and Lomb Standard Series Stage Micrometer slide contains a calibrated scale is in the center of the reflective disc in the middle of the slide. The slide is shown in (a) and the calibrated scale under 40x magnification in (b).
</WRAP> |
You need to record an image of the micrometer scale for each magnification at which you record data. The distance between rulings in pixels can be measured in an image processing program and compared to the known physical distance.
The following procedure can be used to obtain and analyze the calibration files:
* Place the slide on the microscope such that the text is right-side up; otherwise you will not be able to focus on the scale at higher powers.
* Focus the microscope on the micrometer scale. Begin at the lowest power of 40x to locate and center the features, then switch to the magnification at which you are calibrating.
* Set the CCD camera to display live images on the computer screen.
* Adjust the intensity of the light source and the focus as needed to obtain a clear image of the scale as seen by the ccd camera. Note that if the image is too bright, the pixels near the scribe lines will saturate and the lines will appear to be thicker, making it less certain where the center of the line is located. This should be avoided.
* Adjust the position of the micrometer slide so that a useable region of the micrometer scale is in the center of the field of view.
* Capture and save a single image as a TIFF file.
* Now switch to ImageJ and open the image file you just saved. Using the Point** tool in ImageJ, determine the pixel values for several points on the scale lines. Use the known separation of the scribe lines to determine the size of the pixels along both the vertical and horizontal axes.
| 1. Start the application ImageJ and open the image to be analyzed. 2. Select the Point tool in the tool bar. 3. Place the cursor crosshair at the location in the image that you wish to measure. The x- and y-coordinates, in pixels, of the point in the crosshair will appear below the tool bar. The up/down and left/right arrow keys can be used to accurately position the crosshair on the image. The arrow keys are particularly useful for when you want to move the crosshair vertically or horizontally along a column or row of pixels. | { ${/download/attachments/268108850/ImageJ_calib.png?version=1&modificationDate=1614188566000&api=v2}$ |
Appendix F: Settling times
| According to the technical note from the manufacturer, particles will settle under the force of gravity at room temperature with a terminal velocity given by | |
{ $V_{m} = 5.448x10^{-5} (\rho_{s} - 1) d^{2}$
where { $V_{m}$ is the maximum settling velocity (in cm/sec), [Math Processing Error]ρs { $\rho_{s}$ is the sphere density (in units of g/cm3), and [Math Processing Error]d { $d$ is the mean diameter of spheres (in μm). The mean diameter is given on each sample bottle, and the particle density can be found in the following particle data sheets:

|