Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PYTHON ONLY! PLEASE FOLLOW DIRECTIONS! DIRECTIONS: import math import stdio # Re

ID: 3836616 • Letter: P

Question

PYTHON ONLY! PLEASE FOLLOW DIRECTIONS!

DIRECTIONS:

import math
import stdio


# Reads in the displacements produced by bead_tracker.py from standard
# input; computes an estimate of Boltzmann's constant and Avogadro's number;
# and writes those estimates to standard output.
def main():
...

if __name__ == '__main__':
main()

Problem 3. (Data Analysis) Einstein's theory of Brownian motion connects microscopic properties (eg, radius, diffusivity) of the beads to macroscopic properties (eg, temperature, vi of the fluid in which the beads are immersed. This amazing theory enables us to estimate Avogad number with an ordinary microscope by observing the collective effect of ro's millions of water molecules on the beads. l. Estimating the selfdiffusion constant. The self-diffusion constant D characterizes the stochastic movement of a molecule (bead) through a homogeneous medium (the water molecules) as a result of random thermal energy. The Einstein Smoluchowski equation states that the random displacement of a bead in one dimension has a Gaussian distribution with mean zero and variance o2 2DAt, where At is the time interval between position measurements. That is, a molecule's mean displacement is zero and its mean square displacement is proportional to the elapsed time between measurements, with the constant of proportionality 2D. We estimate or by computing the variance of all observed bead displacements in the r and y directions. Let (A Ayi) (Arn, Ayn) be the n bead displacements, and let z1, ri,...,rn denote the radial displacements. Then (Ari Ara) (Ayr Aya) 2n ri r2 2n For our data, Al 0.5 so our estimate for a is an estimate for D as well. Note that the radial displacements in the formula above are measured in meters. The radial displacements output by your bead-tracker.Py program are measured in pixels. To convert from pixels to meters, multiply by 0.175x10-6 (meters per pixel). The value of n is the count of the total number of displacements read. Estimating the Boltzmann constant. The Stokes-Einstein relation asserts that the self-diffusion constant D of a spherical particle immersed in a fluid is given by kT where, for our data T (absolute temperature) is 297 degrees Kelvin room temperature), (viscosity of water) is 9.135x10-4 Nism-2 (at room temperature), p (radius of bead) is 0.5x10 and k is the Boltzmann constant. All parameters are given in SI units. The Boltzmann constant is a fundamental physical constant that relates the average kinetic energy of a molecule to its temperature. We estimate k by measuring all of the parameters in the Stokes-Einstein equation, and solving for k 3. Estimating Avogadro's number. Avogad number NA is defined to be the number of particles in a mole. By definition ro's k R/NA, where the universal gas constant R is approximately 8.31457 JK-imol-1. Use R/k as an estimate of Avogadro's number For the final part, implement a client program avogadro.py that reads in the displacements from standard input and computes an estimate of Boltzmann's constant and Avogadro s number using the formulae described above python tracker py 25 180.0 25.0 data/r jpg data run-1/frame00001 jpg I Python avogadro py Boltzman 1.173701 -23 Avogadro 7.084062 +23 Data We provide ten datasets (they are under the data directory), obtained by William Ryu (Princeton University) using fluorescent imaging. Each run contains a sequence of two hundred 640-by-480 color JPEG images, frameooooo.jpg through franeoo199.jpg and is stored in a subdirectory run-1 through run-10. The directory also contains some reference solutions

Explanation / Answer

Please find the below working code in phython

*************************

**************************