Bug #963
openFindEM/Template picking crashing on rectangular images
0%
Description
Testing settings on one image runs fine for some images. Other images give this error:
An Error occurred - the image 10oct21z_S1040.prtl.jpg was not found in folder /ami/data00/appion/10oct21z/extract/tmplrun4/jpgs
_Traceback (most recent call last):
File "/opt/myamisnap/bin/templateCorrelator.py", line 202, in ?
imgLoop.run()
File "/opt/myamisnap/lib/appionlib/appionLoop2.py", line 70, in run
results = self.loopProcessImage(imgdata)
File "/opt/myamisnap/lib/appionlib/particleLoop2.py", line 117, in loopProcessImage
self.peaktree = filterLoop.FilterLoop.loopProcessImage(self, imgdata)
File "/opt/myamisnap/lib/appionlib/filterLoop.py", line 101, in loopProcessImage
peaktree = self.processImage(imgdata, self.filtarray)
File "/opt/myamisnap/bin/templateCorrelator.py", line 167, in processImage
ccmaplist = apFindEM.runFindEM(imgdata, self.params, thread=self.params['threadfindem'])
File "/opt/myamisnap/lib/appionlib/apFindEM.py", line 133, in runFindEM
apDisplay.printError("findem.exe did not run or crashed.\n")
File "/opt/myamisnap/lib/appionlib/apDisplay.py", line 56, in printError
raise Exception, colorString("\n * FATAL ERROR *\n"+text+"\n\a","red")
Exception:
- FATAL ERROR ***
findem.exe did not run or crashed._
Files
Updated by Lauren Fisher about 14 years ago
File "/opt/appion/bin/templateCorrelator.py", line 202, in ?
imgLoop.run()
File "/usr/lib64/python2.4/site-packages/appionlib/appionLoop2.py", line 70, in run
results = self.loopProcessImage(imgdata)
File "/usr/lib64/python2.4/site-packages/appionlib/particleLoop2.py", line 117, in loopProcessImage
self.peaktree = filterLoop.FilterLoop.loopProcessImage(self, imgdata)
File "/usr/lib64/python2.4/site-packages/appionlib/filterLoop.py", line 101, in loopProcessImage
peaktree = self.processImage(imgdata, self.filtarray)
File "/opt/appion/bin/templateCorrelator.py", line 167, in processImage
ccmaplist = apFindEM.runFindEM(imgdata, self.params, thread=self.params['threadfindem'])
File "/usr/lib64/python2.4/site-packages/appionlib/apFindEM.py", line 133, in runFindEM
apDisplay.printError("findem.exe did not run or crashed.\n")
File "/usr/lib64/python2.4/site-packages/appionlib/apDisplay.py", line 56, in printError
raise Exception, colorString("\n * FATAL ERROR *\n"+text+"\n\a","red")
Exception:
- FATAL ERROR ***
findem.exe did not run or crashed.
Updated by Lauren Fisher about 14 years ago
- Status changed from New to Assigned
- Assignee changed from Amber Herold to Lauren Fisher
- Target version set to Appion/Leginon 2.2.0
templateCorrelator.py needs to rescale the images so the array size is a factor of two before and after binning. It is only rescaling to adjust for before binning and this poses a problem in the next step. Manualpicker rescales properly, so it can be used as a reference for fixing this problem.
Updated by Lauren Fisher almost 14 years ago
I think I have found the solution for this problem, but I need some help verifying my fix. templateCorrelator.py (through a long chain of events) calls the function binImg in imagefilter.py to rescale any images that are not evenly divisible by the binning factor. This is fine, except not only does the image array need to be divisible by the binning factor with no remainders, it needs to result in an even number. If the X dimension is an odd number you will get the error "TODFFT: NX= 2625 MUST BE EVEN!!!" in findem.log and FindEM will crash. (For some odd reason, maybe one of you knows, if the Y dimension is odd, but the X is even, it doesn't crash) So my fix for this is to rescale the array by bin*2. This works in my sandbox for templateCorrelator and manualpicker and dogPicker still run fine, but I know several other tools call this binImg function as well and I want to make sure this won't negatively effect anything else before I check it in to subversion. Can you guys look over the screenshot of my code and let me know what you think? Thanks!
Updated by Neil Voss almost 14 years ago
Good find Lauren! The code looks okay to me.
Updated by Lauren Fisher almost 14 years ago
- Status changed from Assigned to In Code Review
- Assignee changed from Lauren Fisher to Dmitry Lyumkis