myimagelib.corrLib.density_fluctuation

myimagelib.corrLib.density_fluctuation(img8)

This is the first attempt to calculate density fluctuations in bacterial suspensions. There exists 2 methods: i) compute the spatial variation in each image, with respect to various box size, then average over time; ii) compute temporal variation in at different spot, with respect to various box size, then average over space.

Method implemented in this function is the first one. It turned out that even for a static video, we can easily measure a very strong density fluctuation, which cannot be true. We later realize that, this is due to the intrinsic spatial light variation of the bright field microscopy.

One way to solve this problem is to subtract the intrinsic variation from the raw images. However, at that time we did not succeed in doing it (as I am writing this document, I konw better how to do it). So we chose the second way: to use method (ii) for the density fluctuation calculation. Different from method (i), method (ii) is not sensitive to the spatial variation in each image, but considers how the intensities evolve over time. Therefore, we can get density fluctuations that make sense.

Warning

Currently, we deprecate this method. It is not used in our publication Soft Matter 17: 10806–17. https://doi.org/10.1039/D1SM01183A.

Parameters

img8 (2d array) – 8-bit grayscale image

Returns

density fluctuation data, a 2-column table containing the box size (area) “n” and the intensity standard deviation over time “d”