Modules for correlate2d in Python
Question: I want to calculate the correlation between two matrices using
[`correlate2d`](http://docs.scipy.org/doc/scipy-0.7.x/reference/generated/scipy.stsci.convolve.correlate2d.html)
(code: `corr = correlate2d(im, im, fft = True)`).

`correlate2d` was part of scipy and is now under
[stsci_python](http://www.stsci.edu/institute/software_hardware/pyraf/stsci_python).

Currently I am loading modules as follows:

    
    
    import scipy
    from scipy import *
    import numpy as np
    import stsci
    from stsci import *
    

I get the error `name 'correlate2d' is not defined`. What modules do I need to
load for this?


Answer: SciPy has correlate2d in the signal sub-package:

    
    
    import scipy.signal
    

followed by:

    
    
    corr = scipy.signal.correlate2d(matrix1,matrix2)
    

SciPy sub-packages need to be imported separately; stsci may be the same.

-Aldo

