ASSIGMENT: DLS 
Read the material form the Pchm textbook
Experiment: scattering of particles in solvent with different laser wavelenghts 
Autocorrelation data from 20microseconds "bins"
Goal: Find the size of particles.

ALL IN SI units

k=1.38*10^(-23)

T=298

FIND the solvent: water , toluene etc

(Help on the web)

viscosity of water    8.91  10^-4 Pa s   //  Check references//

v=.891*10^(-3)

toluene
v=

Find refractio index n= water, toluene ...

nn=1.334

nn toluene

nn=

Laser wavelengt lambda =ll
HeNe red is 633nm

ll=633. 10^-9

Sin[Pi/4]

nn

calculat q =qq see the texbook, expression 4

light is scattered under 90 degrees -> radians?

q=2*2*Pi*nn*Sin[Pi/4]/(ll)

ok

From discussion in texbook, autocorrelation function is given in 9

we need to fit data with that fuction

general form of function is

fitofdata=NonlinearModelFit[data,a+ b E^(-2*F*t),{a,b,F},t]

a and b scale origin and intensity

the most important is autocorrelations exponential fall 
: DD  q^2  t

t=time

so constant is : D q

F= DD  q^2

Go to data file and fit the data with
from fit F:

(import data from text file)

see below

----------------------------

an  example

F=0.025490386724450302

use yopur own F value from the fit

----------------------

F=

now calculate D from 10

DD=F/q^2

take into account the time  scale  delta t,   drlt t =20 10^-6  s

DDt=F/(20*10^(-6)*q^2)

Now look at the r value (expression 10 from textbook)

r=k*T/(6*Pi*v*DDt)

THIS r is your desired value

% ERROR is:

err=100(rgiv-rcalc)/rgiv

-----------------------------------------------------------------------------------------

FITTING /an example

use yopur ovn path to your file insted of H:\\ALL\\3493briefs\\DLS\\DLSoutput\\outdata.txt

data=Import["H:\\ALL\\3493briefs\\DLS\\DLSoutput\\outdata.txt", "Table"]

example

ListPlot[data,Joined->True,PlotRange->All]

Clear[F]

fitofdata=NonlinearModelFit[data,a+ b E^(-2*F*t),{a,b,F},t]

fitofdata["BestFitParameters"]

see the success of fiting by looking how close the measured and fitted curves are

`

s1=ListPlot[data,Joined->True,PlotRange->All]

s2=Plot[1.01656+0.0648941E^(-2*F*t),{t,0,200}]

Show[s1,s2]