Project

General

Profile

Hole Targetting Question

Added by Anonymous almost 15 years ago

Hi everyone,

I am at the step in the MSI set up (Edge) where I'm supposed to set up the hole targeting. Unfortunately, I am at a loss as to how to acquire an image to determine the edge parameters. The manual (pgs. 34-35) suggest using a test image "Original", but I can't find it in the database. I was just wondering how I can get an image of the holes at the hl preset from our microscope to leginon--the only way I can think of is killing the process (something I don't want to do), starting up the manual acquisition node, aquiring an image, saving it to the database, starting up the msi application again, going to the hole-targeting mode, and uploading the image from the database. I'm not even exactly sure where the "Original" test image they suggest to use is.

Somewhat related: does this step need to be done before square targeting? The manual seemed to imply ~pg. 19 of part 2 that after aligning the medium mag presets I should set up the hole targeting (pg. 34-39) before proceeding to the Exposure targeting setup and the autofocus test...

Thank you for your help!


Replies (8)

Re: Hole Targetting Question - Added by Anonymous almost 15 years ago

Well, I tried getting an exposure image through the square targeting step (since it sends an image to the user in hole targeting mode). Everything appears to work fine until I get to the template step in the hole targeting.

When I try to adjust the size of the ring, nothing happens (no window pops up or anything). I tried playing around with the different settings (phase, cross, add, etc.) but none of them gave me an editable table. Leginon wasn't giving me an error at first, but I noticed that when I told it to edit, it gave me this error in the command window Leginon was running in:

  File "/usr/lib/python2.4/site-packages/Leginon/gui/wx/Rings.py", line 145, in onEditButton

dialog = Dialog(self, 'Edit Ring', self._rings[n])

File "/usr/lib/python2.4/site-packages/Leginon/gui/wx/Rings.py", line 29, in __init__

sbszring.Add(szring, 1, wx.EXPAND|wx.ALL, 5)
UnboundLocalError: local variable 'szring' referenced before assignment
Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/Leginon/gui/wx/Rings.py", line 145, in onEditButton

dialog = Dialog(self, 'Edit Ring', self._rings[n])

File "/usr/lib/python2.4/site-packages/Leginon/gui/wx/Rings.py", line 29, in __init__

sbszring.Add(szring, 1, wx.EXPAND|wx.ALL, 5)
UnboundLocalError: local variable 'szring' referenced before assignment

--> I clicked on it twice...

I think it's giving me an error and not even letting me add another template because the square targeting node is calling up a template before it is assigned a value (?), though I find this strange since it says on the panel that it thinks the holes should be 30 - 61 pixels in inner-outer diameter.

I think I'm just going to go ahead and kill the process for now, acquire a manual image at sq magnification, and use that to set up hole targeting.

If you can provide any other solutions, I'd be glad to hear them! <img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" />

Re: Hole Targetting Question - Added by Anonymous almost 15 years ago

Actually, I am still getting stuck (even after getting an image manually) with the same reference error...

Re: Hole Targetting Question - Added by Anonymous almost 15 years ago

Hi everyone:

After looking at the offending python script (Rings.py) we tried a bit of debugging to see if we could get the script to recognize szrings without holding up the whole process.

The following edit to Rings.py seems to help (it got us a gui window to pop up after clicking on add/edit):


class Dialog(wx.Dialog):

def __init__(self, parent, title, ring=None):

wx.Dialog.__init__(self, parent, -1, title)

sbszring = wx.StaticBoxSizer(wx.StaticBox(self, -1, 'Ring'), wx.VERTICAL)
# Carlos' fault if this doesn't work

szring = wx.GridBagSizer(5, 5)
# Carlos' fault if that didn't work

sbszring.Add(szring, 1, wx.EXPAND|wx.ALL, 5)

self.ieinside = IntEntry(self, -1, min=0, chars=4)

self.ieoutside = IntEntry(self, -1, min=0, chars=4)

if ring is not None:

if not parent.validate(ring):

raise ValueError

inside, outside = ring

self.ieinside.SetValue(inside)

self.ieoutside.SetValue(outside)

# Carlos said to move this up
#        szring = wx.GridBagSizer(5, 5)

label = wx.StaticText(self, -1, 'Inside')

szring.Add(label, (0, 1), (1, 1), wx.ALIGN_CENTER)

label = wx.StaticText(self, -1, 'Outside')

We basically moved the definition of szring up to the line before it is sbszring.Add.

Re: Hole Targetting Question - Added by Anchi Cheng almost 15 years ago

Carlos,

I will have to answer one question at a time. First, the Original image example. In a normal operation, the original image is the image published by the Acquisition node before the Target Finder node. For example, for Hole_Targeting node as your "Target Finder" node, the original image is an image sent by "Square" node. AND, as you have done correctly, you need to select an acquisition target on the displayed image montage in "Square Targeting" node to acquire an image in "Square" node. To make it possible for people to learn how to set up the Target Finder node automatically, we made a fake square image, shipped with Leginon so that you can load it as the original instead of actually acquire one. The default settings in the node are selected so that you could find holes in this fake example.

To load the example, you click on the settings (the one with the icon identical to the node settings) window by the the Label "Original", the popup menu has a box for choosing the file. Leave that blank, and just click "Load". When you leave the file entry to blank, Leginon finds out where it is installed and load the fake square example for you. It is not in the database.

Anchi

Re: Hole Targetting Question - Added by Anchi Cheng almost 15 years ago

Part two, About the Ring Editing.

Congratulations, you have found a bug! MSI-Edge has not been used for a long time now here at NRAMM, we didn't even realize that that gui is broken. The user favorite now a day is MSI-T. The proper fix is to move that call for szring to after it is defined completely ( more than just a GridBoxSizer).


wx.Dialog.__init__(self, parent, -1, title)

sbszring = wx.StaticBoxSizer(wx.StaticBox(self, -1, 'Ring'), wx.VERTICAL)

self.ieinside = IntEntry(self, -1, min=0, chars=4)

self.ieoutside = IntEntry(self, -1, min=0, chars=4)

if ring is not None:

if not parent.validate(ring):

raise ValueError

inside, outside = ring

self.ieinside.SetValue(inside)

self.ieoutside.SetValue(outside)

szring = wx.GridBagSizer(5, 5)

label = wx.StaticText(self, -1, 'Inside')

szring.Add(label, (0, 1), (1, 1), wx.ALIGN_CENTER)

label = wx.StaticText(self, -1, 'Outside')

szring.Add(label, (0, 2), (1, 1), wx.ALIGN_CENTER)

label = wx.StaticText(self, -1, 'Diameter')

szring.Add(label, (1, 0), (1, 1), wx.ALIGN_CENTER_VERTICAL)

szring.Add(self.ieinside, (1, 1), (1, 1), wx.ALIGN_CENTER|wx.FIXED_MINSIZE)

szring.Add(self.ieoutside, (1, 2), (1, 1), wx.ALIGN_CENTER|wx.FIXED_MINSIZE)

label = wx.StaticText(self, -1, 'pixels')

szring.Add(label, (1, 3), (1, 1), wx.ALIGN_CENTER_VERTICAL)

sbszring.Add(szring, 1, wx.EXPAND|wx.ALL, 5)

I have committed it to svn so that time when it is downloaded or if you update your local check out, this change will be in there.

Anchi

Re: Hole Targetting Question - Added by Anchi Cheng almost 15 years ago

Part Three,

About the reference problem, we strongly encourage you to dump your database to a file and send that to us through e-mail. We will then be able to check your settings and references saved in your database to find out why you have this problem so frequently. The database does not include the real image files so that it is small. You will use mysql command line to do this. The command has this format:

mysqldump -h your_database_server_host -u your_username -p your_database_name > backup_db.sql

Check mysql document if you are not sure what this means. You can use the same command for backing up your database regularly.

When you send us this, give us an example session (by session name) when this happens to you. Other specific information would be helpful, too, such as what application did you run. At which node that you observed the error. It often helps if the error happens at the end of your interaction with the session so that we can just sort by time to find the problem point.

Anchi

Re: Hole Targetting Question - Added by Anchi Cheng almost 15 years ago

Part 4, Regarding the order of the MSI setup.

When I wrote the manual it was intended to have you follow the "MSI-Quick Start" 33 steps and go to the details when you are not sure what to do to each step. It of course does not work as well in pdf print out. What you are doing is correctly, though. I will make the change in the documentation so that it can be followed better.

Thanks.

Anchi

Re: Hole Targetting Question - Added by Anonymous almost 15 years ago

Thank you for the help, Anchi. I will try to send you our database sometime today.

I thought we were definitely doing something wrong when the GUI didn't come up. Since we have already followed the MSI set up all the way to the end, I think we will be making more use of the Quick Start, though I do think that changing the order of some of the instructions will help future users.

I think I'll give MSI-T a go today, if time permits.

    (1-8/8)