Bug #1990
closedpicking bug at FSU
0%
Description
Here is the bug I was describing:
Traceback (most recent call last): File "/panfs/storage.local/imb/stagg/software/rhel61/usr/local/bin/templateCorrelator.py", line 190, in <module> imgLoop.run() File "/panfs/storage.local/imb/stagg/software/myami_2_2env/lib/python2.6/site-packages/appionlib/appionLoop2.py", line 70, in run results = self.loopProcessImage(imgdata) File "/panfs/storage.local/imb/stagg/software/myami_2_2env/lib/python2.6/site-packages/appionlib/particleLoop2.py", line 104, in loopProcessImage self.peaktree = filterLoop.FilterLoop.loopProcessImage(self, imgdata) File "/panfs/storage.local/imb/stagg/software/myami_2_2env/lib/python2.6/site-packages/appionlib/filterLoop.py", line 87, in loopProcessImage peaktree = self.processImage(imgdata, self.filtarray) File "/panfs/storage.local/imb/stagg/software/rhel61/usr/local/bin/templateCorrelator.py", line 163, in processImage peaktree = apPeaks.findPeaks(imgdata, ccmaplist, self.params) File "/panfs/storage.local/imb/stagg/software/myami_2_2env/lib/python2.6/site-packages/appionlib/apPeaks.py", line 50, in findPeaks maxpeaks, maxsizemult, msg, tmpldbid, mapdiam, bin=bin, peaktype=peaktype) File "/panfs/storage.local/imb/stagg/software/myami_2_2env/lib/python2.6/site-packages/appionlib/apPeaks.py", line 94, in findPeaksInMap varyThreshold(imgmap, thresh, maxsize) File "/panfs/storage.local/imb/stagg/software/myami_2_2env/lib/python2.6/site-packages/appionlib/apPeaks.py", line 330, in varyThreshold blobtree, percentcov = findBlobs(ccmap, thresh, maxsize=maxsize) File "/panfs/storage.local/imb/stagg/software/myami_2_2env/lib/python2.6/site-packages/appionlib/apPeaks.py", line 396, in findBlobs maxsize, minsize, maxmoment, elim, summary) File "/panfs/storage.local/imb/stagg/software/myami_2_2env/lib/python2.6/site-packages/pyami/imagefun.py", line 357, in find_blobs blobs = scipyblobs(image,tmpmask) File "/panfs/storage.local/imb/stagg/software/myami_2_2env/lib/python2.6/site-packages/pyami/imagefun.py", line 286, in scipyblobs stds = scipy.ndimage.standard_deviation(im,labels,range(1,n+1)) File "/usr/lib64/python2.6/site-packages/scipy/ndimage/measurements.py", line 649, in standard_deviation return numpy.sqrt(variance(input, labels, index)) File "/usr/lib64/python2.6/site-packages/scipy/ndimage/measurements.py", line 596, in variance count, sum, sum_c_sq = _stats(input, labels, index, centered=True) File "/usr/lib64/python2.6/site-packages/scipy/ndimage/measurements.py", line 434, in _stats sums_c = _sum_centered(labels.ravel()) File "/usr/lib64/python2.6/site-packages/scipy/ndimage/measurements.py", line 408, in _sum_centered centered_input = input - means[labels] ValueError: operands could not be broadcast together with shapes (512,512) (262144) [sstagg@kriosdb ~]$
Updated by Scott Stagg about 12 years ago
I found a work around for this. It seems that with the setup at FSU scipy.ndimage.standard_deviation(im,labels,range(1,n+1)) is not behaving the same as it does at Scripps. I think this must be a problem with the particular numpy, scipy, python combination that we are using at FSU. I got around the error by replacing the scipy.ndimage.standard_deviation(im,labels,range(1,n+1)) line in scipyblobs function with:
stds = numpy.zeros(n)
This is a less than desirable workaround. Anchi and Jim, do you have any suggestions about what else I could do? BTW, I am using python 2.6.6, scipy 0.9.0, and numpy 1.6.1
Updated by Anchi Cheng about 12 years ago
How about upgrade to scipy 0.10? See #1401
Updated by Anchi Cheng about 12 years ago
Option 2 (works on my Mac that suffers the same problem even after I upgraded to 0.10)
- Go to you scipy installation in python site-package and edit ndimage/measurements.py
- Find the function _sum_centered and modify the following:
Change
centered_input = input - means[labels]
To
label_means = numpy.reshape(means[labels],input.shape) centered_input = input - label_means
Updated by Amber Herold over 10 years ago
- Status changed from New to Won't Fix or Won't Do