In [1]:
from skimage.feature import blob_dog, blob_log, blob_doh
from math import sqrt
from skimage.color import rgb2gray

In [2]:
import astropy.io.fits as pyfits
lensed_image = pyfits.getdata("./data/lensed/0_all_imgs.fits")
unlensed_image = pyfits.getdata("./data/unlensed/0_all_imgs.fits")

In [7]:
lensed_image_gray = rgb2gray(lensed_image)
unlensed_image_gray = rgb2gray(unlensed_image)

In [10]:
lensed_blobs_doh = blob_doh(lensed_image_gray, max_sigma=30, num_sigma=10, threshold=.1)
unlensed_blobs_doh = blob_doh(unlensed_image_gray, max_sigma=30, num_sigma=10, threshold=.1)


---------------------------------------------------------------------------
KeyboardInterrupt                         Traceback (most recent call last)
<ipython-input-10-58605532310a> in <module>()
----> 1 lensed_blobs_doh = blob_doh(lensed_image_gray, max_sigma=30, num_sigma=10, threshold=.1)
      2 unlensed_blobs_doh = blob_doh(unlensed_image_gray, max_sigma=30, num_sigma=10, threshold=.1)

/home/babyostrich/anaconda/lib/python2.7/site-packages/skimage/feature/blob.pyc in blob_doh(image, min_sigma, max_sigma, num_sigma, threshold, overlap, log_scale)
    411     # Convert the last index to its corresponding scale value
    412     local_maxima[:, 2] = sigma_list[local_maxima[:, 2]]
--> 413     return _prune_blobs(local_maxima, overlap)

/home/babyostrich/anaconda/lib/python2.7/site-packages/skimage/feature/blob.pyc in _prune_blobs(blobs_array, overlap)
     93     # for most cases
     94     for blob1, blob2 in itt.combinations(blobs_array, 2):
---> 95         if _blob_overlap(blob1, blob2) > overlap:
     96             if blob1[2] > blob2[2]:
     97                 blob2[2] = -1

/home/babyostrich/anaconda/lib/python2.7/site-packages/skimage/feature/blob.pyc in _blob_overlap(blob1, blob2)
     43     # extent of the blob is given by sqrt(2)*scale
     44     r1 = blob1[2] * root2
---> 45     r2 = blob2[2] * root2
     46 
     47     d = hypot(blob1[0] - blob2[0], blob1[1] - blob2[1])

KeyboardInterrupt: 

In [13]:
print(int)


<type 'int'>

In [ ]: