Performance for circular correlation coefficient

Hi all,

I'm trying to calculate the correlation coefficient between two waves containing angles. From what I gathered, StatsCircularCorrelationTest() provides the functionality I want. However, I run into issues when the waves become very long (Igor locking up, beach ball etc). I want to do the calculation for waves containing >10k points.

Here is a minimal example:

Function test()
    Make/O/N=1000 one, two //barely works for 1000, locks up for large numbers, e.g. 10000
    setscale/I x, 0, 1, one, two
    one = gnoise(1)
    two = gnoise(1)
   
    StatsCircularCorrelationTest/PAA/Q one, two
    Wave W_StatsCircularCorrelationTest
    print W_StatsCircularCorrelationTest[0]
End

This is on Igor 8.04B01 (Mac).

Is there a better way to only get the correlation coefficient?

/PAA is a particularly difficult calculation because it involves looping over the data and recomputing some stats after removing one pair of points.  Can you describe the motivation for choosing this option?

I see. The motivation for choosing /PAA was just because it is the first example that came up in the circular correlation demo. To be honest, I haven't looked much into the actual theory at all. All I'm interested in at the moment is something like Pearson's r but for angles, e.g. dihedral angles of an MD trajectory with ~10k time points.

Forum

Support

Gallery

Igor Pro 8

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More