Project

General

Profile

Actions

Bug #963

open

FindEM/Template picking crashing on rectangular images

Added by Lauren Fisher about 14 years ago. Updated almost 14 years ago.

Status:
In Code Review
Priority:
Normal
Category:
-
Target version:
Start date:
10/22/2010
Due date:
% Done:

0%

Estimated time:
Affected Version:
Appion/Leginon 2.1.0
Show in known bugs:
No
Workaround:

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

When committing to database on full dataset, FindEM gives this error:
_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


Related issues 1 (0 open1 closed)

Has duplicate Appion - Bug #965: Error check for array size in FindEMDuplicateLauren Fisher10/22/2010

Actions
Actions #1

Updated by Lauren Fisher about 14 years ago

Traceback (most recent call last):
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.
Actions #2

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.

Actions #3

Updated by Amber Herold about 14 years ago

  • Deliverable set to 2.2 Bug Reduction
Actions #4

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!

Actions #5

Updated by Neil Voss almost 14 years ago

Good find Lauren! The code looks okay to me.

Actions #6

Updated by Lauren Fisher almost 14 years ago

  • Status changed from Assigned to In Code Review
  • Assignee changed from Lauren Fisher to Dmitry Lyumkis
Actions

Also available in: Atom PDF