The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

# NAME

Statistics::PhaseOnlyCorrelation - calculate the phase only correlation

# VERSION

This document describes Statistics::PhaseOnlyCorrelation version 0.02

# SYNOPSIS

``````    use Statistics::PhaseOnlyCorrelation qw/poc/;

my \$array1 = [1, 2, 3, 4, 5, 6, 7, 8];
my \$array2 = [1, 2, 3, 4, 5, 6, 7, 8];

my \$coeff = poc(\$array1, \$array2);``````

Or if you want to use own FFT function, you may use like so:

``````    use Math::FFT;
use List::MoreUtils qw/mesh/;
use Statistics::PhaseOnlyCorrelation qw/poc_without_fft/;

my @array1 = (1, 2, 3, 4, 5, 6, 7, 8);
my @array2 = (1, 2, 3, 4, 5, 6, 7, 8);
my @zero_array = (0, 0, 0, 0, 0, 0, 0, 0); # <= imaginary components

@array1 = mesh(@array1, @zero_array);
@array2 = mesh(@array2, @zero_array);

my \$array1_fft = Math::FFT->new(\@array1);
my \$array2_fft = Math::FFT->new(\@array2);
my \$result = poc_without_fft(\$array1_fft->cdft(), \$array2_fft->cdft());

my \$ifft = Math::FFT->new(\$result);
my \$coeff = \$ifft->invcdft(\$result);``````

# DESCRIPTION

``````    This module calculate Phase Only Correlation coefficients. This measures degree of similarity between two waves (signals) heed to only phase component,
so this method is not affected by an amplitude difference.

The more similar two signals (waves), coefficient will approximates 1.0. In the opposite case, coefficient will approaches zero.``````

# METHODS

poc

Calculate phase only correlation with FFT (This function is using Math::FFT).

This function needs two arguments. Both of arguments are array reference. Array reference just has real part (don't need imaginary part).

poc_without_fft

Calculate phase only correlation without FFT.

This function needs two arguments. Both of arguments are array reference, these reference must be processed by FFT.

# CONFIGURATION AND ENVIRONMENT

Statistics::PhaseOnlyCorrelation requires no configuration files or environment variables.

# DEPENDENCIES

Math::FFT (Version 1.28 or later)

List::MoreUtils (Version 0.33 or later)

Test::Most (Version 0.31 or later)

None reported.

# BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to `bug-statistics-phaseonlycorrelation@rt.cpan.org`, or through the web interface at http://rt.cpan.org.

# AUTHOR

moznion `<moznion@gmail.com>`

Copyright (c) 2012, moznion `<moznion@gmail.com>`. All rights reserved.