Jim's
Tutorials

Spring 2019
course
site

My program is done! Well, the one that isn't the large particle being bounced around by the smaller ones, that one still needs work (I just met with Jeremy today to make a plan on how to get that done), but the simulation where particles are doing brownian motion and from that I calculate the intensity and then I autocorrelate it and power spectrum it and then find gamma from that so I can determine the diameter of the spheres, that one is finished! Actually it isn't quite finished, I still need to clean it up a bit. I need to improve the documentation and actually add realistic numbers (constants are currently set to one) and implement tests more properly. I don't really know how I will implement tests for auto correlation and power spectrum stuff, I've just been making sure they output graphs that look like what I expect.

With that said, there is actually a problem with this. So it isn't technically done. It returns gamma which is what I need but my auto correlation graph looks nothing like what I expect, until halfway through (maybe exactly, it's hard to tell) when it matches the shape I need very closely. And I can't quite figure out what's going on. It would be a hell of a coincidence if I am just doing it completely wrong but it becomes exactly what I need in the middle. It might fix itself when I input actual numbers. The problem might also be that I am starting with all the phases exactly the same, so maybe it takes a while to get to the proper level of disorder so the autocorrelation works properly. Finally, I'm a bit confused about the x access. I know it is \( \Delta t\) but I don't really know how to quantify it based on what I have. Since I have just been checking for shape (note the x access on the power spectrum one is actually frequency), I've just been setting every point evenly spaced. Like my y values for the graph are calculated from me doing autocorrelation, and my x values are just [0,1,2,3,4...] and I don't know if that is accurate. It might be, I don't know I'm just throwing down every thought in my head right now.

I should note, that I can just do the analysis only using the power spectrum, but Iwould also like to have the autocorrelation working.

https://cs.marlboro.college /cours /spring2019 /jims_tutorials /jtuttle /apr9
last modified Sat May 4 2024 12:58 am

attachments [paper clip]

  last modified size
TXT brownianlab.ipynb Sat May 04 2024 12:58 am 44K
TXT brownianlab_1.html Sat May 04 2024 12:58 am 311K