Posted by
LMAnovitz on
URL: http://imagej.273.s1.nabble.com/1D-autocorrelation-function-tp3692494p3692501.html
Michael
I gave it a try, and you are right, this is much faster. The results do
not, however seem to be identical.
Since you were curious about the comparison of the two techniques, here are
the results. Unfortunately, the server won¹t let me sent
Figures, but if you want to see them send me a direct e-mail, mine is listed
below.
The RDF macro/plug-in was done on the full 2048 x 2048 image (the original
image is actually a 1024 x 1024 image
Copied 4 times in order to try to reduce the edge effects. This may not be
necessary for the RDF approach).
The 2-point correlation plug-in. It was done on the same 4x Image,
downsampled to 1024 x 1024 using the Averaging Reducer plugin
There are several differences between
1. the 2PC curve is smoother, and composed of about 10x more points
2. the Y scale is different, with a maximum on the RDF af about 4.5 and the
2PC or about 4000. This is probably immaterial, however, as this wil be
normalized
3. there is a long tail in the 2PC curve that is probably an artifact of the
image multiplication and edges. It can be fitted as a stretched exponential
and subtracted
4. importantly, the sharp drop-off in the curve appears to be at about 5-10x
larger r in the RDF plot (between about 8 and 25 microns) than the 2PC plot
(between 1.5 and 3 microns)
I can also compare these two results (normalized, and with the tail
subtracted from the 2PC curve)
to a plot of the correlation function calculated from a measured neutron
scattering curve and a pore Volume obtained from the image.
This has a half-fall distance of about 4 microns. Thus the measured values
lie between the other 2.
The direct neutron measurements are for scales up to approx 24 microns, so
most of this curve is directly constrained. However, while it may not seem
very important in the correlation plot, a lot of the calculated volume comes
from that high-r part of the curve
What do you think ?
--larry
On 5/14/09 4:19 AM, "Michael Schmid" <
[hidden email]> wrote:
> Hi Larry,
>
> if it is simply the radial distribution function that you are
> interested in you can try my macro
>
http://imagejdocu.tudor.lu/doku.php?
> id=macro:radial_distribution_function
>
> It needs about half a minute (2.4 GHz Core2Duo) and 500 MB RAM for a
> 2048*2048 binary image.
> It uses the FFT, but does not assume periodic boundary conditions.
> Instead, it rather expands the image (in this case to 4096*4096) and
> corrects for the finite size (edge effects) of the image. So you need
> not (and should not) expand your image when using it.
> ---
> Concerning the r resulution: For radii well above 1, there should be
> enough pixels in each zone between r and r+0.3 pixels. My macro
> simply uses the Radial Profile Plugin, which uses increments of 1 for
> the radius.
>
http://rsb.info.nih.gov/ij/plugins/radial-profile.html>
> It would be interesting to see how the results of my macro compare
> with the plugin by Dscho; if you find any significant differences or
> a bug in my macro, let me know, please.
>
> Michael
> ________________________________________________________________
>
> On 13 May 2009, at 22:47, Larry Anovitz wrote:
>
>> Hi,
>> A few weeks back, Gabriel was kind enough to send me the
>> suggestion
>> below in response to my question about a plug-in to calculate 2-point
>> correlation functions.
>> Having been working with this plug-in for a few weeks now, I
>> have run
>> into a couple of problems, and one query, which I hope someone can
>> help me
>> solve.
>> The biggest problem is memory. Running this plug-in takes a
>> lot. If I
>> have a 1024 x 1024 pixel image I can get it to solve if I set the
>> memory to
>> 2 GB, If I have a 2048 x 2048 image I have not yet gotten the
>> program to
>> work. Instead, it comes back with a window saying that it has used
>> up the
>> available memory (I've used values as high as 4 GB, and downloaded the
>> newest version of ImageJ for the Mac this afternoon). While I have
>> tried
>> down-sampling the image, and this works, it does not give me the
>> resolution
>> I would like, and I need to keep the overall image size large to
>> avoid edge
>> effects (I'd like to go to a 4096 x 4096 image at least).
>> The second problem is that the "naïve" computation version of
>> the plug
>> in does not seem to work at all. The pop-up window does say that
>> this is
>> slow, but I've left if for hours without any results.
>> Finally, a question. The plug-in has a default radius step
>> (changeable)
>> of 0.3 pixels. Since this is (obviously) less than 1 pixel, and the
>> correlation has to do with the relationship between pixels, this
>> seems a bit
>> odd. I suspect it may be due to the FFT method of obtaining the
>> calculation, but am not sure, and was wondering if Dsho (who wrote the
>> plug-in) could enlighten me.
>>
>> Many thanks in advance for help with this.
>>
>> --Larry
>>
>> I am running a Mac, with system version 10.5.6, a 2 x 3.2 GHz Quad-
>> Core
>> Intel Xeon processor, and 6 GB of 800 MHz DDR2 FB-DIMM memory.
>>
>> --Larry Anovitz
>>
>>
>> --
>> Dr. Lawrence M. Anovitz
>> MS 6110 PO Box 2008
>> Aqueous and Geochemistry Group
>> Oak Ridge National Laboratory
>> Oak Ridge, Tennessee 37831-6110
>>
>> 865-574-5034 : phone
>> 865-574-4961 : fax
>>
>>
[hidden email]
>>
>>
>>
>>
>>
>> On 4/6/09 10:46 AM, "Gabriel Landini" <
[hidden email]> wrote:
>>
>>> Larry,
>>> Are you sure you do not mean the "two-point correlation function"?
>>> That is a
>>> commonly used technique in condensed matter physics (I have seen
>>> it several
>>> times used to characterise fractal agglormerates and porous
>>> materials).
>>>
>>> Dsho wrote a plugin some time ago. I have not used it, though:
>>>
>>>
http://wbgn013.biozentrum.uni-wuerzburg.de/ImageJ/two-point->>> correlation.html
>>>
>>> Cheers,
>>>
>>> G.