Bug #939
closed
AcquisitionImageTargetData table need to exist to diplay pixelsize in viewer
Added by Jim Pulokas about 14 years ago.
Updated almost 14 years ago.
Affected Version:
Appion/Leginon 2.1.0
Description
This table is not created until a Leginon MSI application is run. When only apppionis used, the initial uploaded image do not have targets. The cause in inc/leginon.inc function getImageInfo returns results without binning infomation which makes pixelsize calculation in inc/leginon.inc function getPresets() multiply binning by zero.
The cause in getImageInfo is set up incorrectly, it should be corrected so that binning, which come from CameraEMData, can be returned.
- Subject changed from install script does not create AcquisitionImageTargetData table to AcquisitionImageTargetData table need to exist to diplay pixelsize in viewer
- Status changed from New to Assigned
- Assignee set to Anchi Cheng
- Priority changed from Normal to Urgent
- Target version set to Appion/Leginon 2.1.0
This is a bug we found at UCLA and forgot that it affect any new installation of appion. I am working on it right now.
r14957 make the query look for all image information except those involves parent. All uploaded and manual images do have pixelsize etc.
This need to be merged into branch 2.1 after testing.
Testing:
1. Use a brand-new installation or ones only have uploaded image so that there is no AcquisitionImageTargetData in leginondb.
2. Go to any image viewer. The old code would not have meaningful pixel size above the image, The fixed one would
- Status changed from Assigned to In Code Review
- Assignee changed from Anchi Cheng to Jim Pulokas
Jim, I can test it this afternoon and merge it after your code review.
I just merged it...want to test tonight.
- Status changed from In Code Review to In Test
- Assignee changed from Jim Pulokas to Amber Herold
Looks good, but here are some things to think about for future problems like this:
If it is a common problem where the existence of tables has to be checked before running a query... Could that table check be done in the low level function that actually runs the query? That would eliminate the need for a lot of "if... isTable(..." in the higher level code. Or in this case, getImageInfo is taking responsibility for calling "isTable" even though getParent is actually running the query that fails if those tables do not exist. If another table is added to the query in getParent, then getImageInfo may have to add more isTable checks. If there is anything in php like the try/except in python, then a query could just be tried, and if it has problems, then it can fall back to returning an empty result. That cleans up code where you otherwise need complicated if statements.
- Status changed from In Test to Closed
- Status changed from Closed to In Code Review
- Assignee changed from Amber Herold to Jim Pulokas
- Priority changed from Urgent to Normal
- % Done changed from 0 to 100
r14982 moved the table_exists check to getParent function to make Jim happier.
r14983 fixed the bug r14982 introduced which made atlas not displayed because grid images came from targets on a fake image.
- Status changed from In Code Review to Closed
Also available in: Atom
PDF