Project

General

Profile

Exposure targeting problems

Added by Jim Pulokas almost 20 years ago

Susan Saban wrote:

I'm having a lot of difficulty with accurate exposure targeting. Every day I do a good microscope setup and proceed to align the image shifts of the hl and sq presets with the ex preset. Within a few holes targeting is inconsistently off. Less than 30% of exposures at 200,000X have any virus particles. Do you know what could be causing this problem? I'm pretty sure there's no drift because focusing completes successfully without detecting drift. I'm sure the alignment is good at the begining of the session. Could some of the calibrations be going bad?


Replies (15)

- Added by Jim Pulokas almost 20 years ago

We do not have a lot of experience with using such a high magnification, so one possibility is that image shifts do not behave so well when going to 200,000x. This seems less likely though if you were able to set up your presets in the first place. I would suspect a problem if you go to 'ex', then go to another preset, then go back to 'ex' and you notice that the image has shifted from the last time you were at 'ex', even though you have not changed any parameters. This would indicate either drifting, or an instability or lack of reproducibility of the image shift.

The ability to center a target in 'ex' depends on the ability to center that target in the iimage that it originally was chosen ('hl'). In Leginon, we make that assumption that if you choose a target in a 'hl' image and then shift it to the center using image shift, you should be able to apply that exact same image shift at another preset (like 'ex') and center the target there as well.

It is the image shift calibration for 'hl' that is being used to calculate the target centering of 'ex' images. You should be able to diagnose a calibration problem if you go to preset 'hl' and use the navigation node to move around using image shift. Be sure the error checking option is turned on. If the error (in meters) is any larger than about half the field of view of your 'ex' images, then you can not expect to have a target centered in the 'ex' images by using this calibration. For example, in our typical 'ex' images, we have a pixel size of 1.63 angstrom. The field of view in a 4kx4k image is about 0.6um. If I test image shift of the hole preset, it has to have an error of less than 0.3um or my target will not fall within the 'ex' image. I can see that when using 200,000x, you will have to have a much better 'hl' image shift calibration.

Can you post some results of testing your image shift calibration in the navigator node using the hole preset, and if that seems ok, then we can start to look at other possibilities.

Jim

Exposure targeting problem - Added by Anchi Cheng almost 20 years ago

I agree with all Jim's comment. Just want to add one more

possibility.

Do you use stage Z for the final focus? If so, did you enable

"declare drift after Z correction". If not, targeting can be

off simply because the location is changed. You may want to

try the test Jim suggested with and without autofocus turned

on to see if it targets better without autofocusing.

exposure targeting problems - Added by Anonymous almost 20 years ago

I performed the image shift calibration test. The field of view of the CCD camera (4K) at 200,000X is 0.24 microns. The image shift error is 0.015 microns, so the image shift calibration of the 'hl' preset should be accurate enough to capture the region of interest at 200,000X.

Anchi's comment is interesting. Yes, I do use stage Z for the final focus, and "declare drift after Z correction" is selected. The focus node does declare drift after focusing with stage Z, however, there is an error message: "Process target failed: DriftDeclareEvent from focus not bound to any node". This error happens after every 'fa' focus event. This might partially explain the targeting issues.

Exposure targeting problem - Added by Anchi Cheng almost 20 years ago

That is probably it. I just checked, MSI (1.0) application

does not have DriftDeclaredEvent binding from Focus node

to DriftManager. We missed that one not considering the

possibility that others would use the stage Z correction

at that stage. When I tested the reproducity of the Z stage

movement, I found it had stronger hysterisis than decocus,

so I never thought about the possibility. Anyway, here is

what you need to do to remove the error and probably clear

your problem in 1.0 version. We will correct that in 1.1 in the

distribution.

1. Go to leginon Full Manual chapter on Creating and Editing Applications and the session on Editing an existing application

using xml file. You want to export MSI (1.0) and edit it.

2. Using your favorit text editor copy the entry

<sqltable name="BindingSpecData">

<field name="DEF_id">3483</field>

<field name="DEF_timestamp">2004-11-05 14:25:01</field>

<field name="event class string">DriftDeclaredEvent</field>

<field name="from node alias">Z Focus</field>

<field name="to node alias">Drift Manager</field>

<field name="REF|ApplicationData|application">243</field>

</sqltable>

and paste a copy below it. We will modify this for Focus node.

3. change the line

<field name="from node alias">Z Focus</field>

where Z Focus is to Focus in the pasted copy so we

generate this binding for Focus node.

4. follow the instruction in the editing existing application with

xml to complete the version change and import it back to

leginon.

5. Start leginon and load the application. You may check

the binding by going under MainManu/Events/Binding...

select Focus node on the left and Drift Manager on the right

and you should see the new event binding and you should

no longer see the error when autofocus is completed.

- Added by Jim Pulokas almost 20 years ago

also, while your are editing the xml file:

increment the version number in the line that looks like this:

<field name="version" >1</field>

(in my case, I would change the 1 to 2)

otherwise, when you import, it will complain that the version already exists.

In the soon to be released Leginon 1.1, you will not have to go through this xml editing procedure becuase we now have a user friendly way to edit applications inside leginon.

exposure targeting problems - Added by Anonymous almost 20 years ago

I edited the binding event to include DriftDeclaredEvent for the Focus node; however, when I imported the new version of MSI, Leginon wouldn't let me run an applicaton and gave this error message instead:

Traceback (most recent call last):

File "/usr/lib/python2.3/site-packages/Leginon/gui/wx/Manager.py", line 269, in onMenuRunApplication

dialog = RunApplicationDialog(self, apps, launchernames, history, launchers)

File "/usr/lib/python2.3/site-packages/Leginon/gui/wx/Manager.py", line 735, in init

self.onChoice()

File "/usr/lib/python2.3/site-packages/Leginon/gui/wx/Manager.py", line 795, in onChoice

self.sizer.Add(self.launchersizer, (2, 0), (1, 2), wx.ALIGN_CENTER)

File "/usr/lib/python2.3/site-packages/wx/_core.py", line 10082, in Add

return core.GridBagSizer_Add(*args, **kwargs)

TypeError: wxWindow, wxSizer, wxSize, or (w,h) expected for item

Did I do something wrong or out of order?

Thanks.

- Added by Jim Pulokas almost 20 years ago

Susan,

could you post your xml file here so we can see if something went wrong.

Also, did you restart Leginon before importing the new version, just in case the problem relates to changing an application that is currently running. I am still trying to trace where this error came from.

Jim

exposure targeting problems - Added by Anonymous almost 20 years ago

The old MSI application was running when I imported the new application. I killed this leginon session and started a new one. This is when I received the message I previously listed. The new xml file is listed below. I'm only showing it up to the point of my last change because it's quite long. Thanks.

<applicationdump>

<definition>

<sqltable name="ApplicationData" >

<field

name="DEF_id"

type="int(16)"

null="NOT NULL"

extra="auto_increment"

/>

<field

name="DEF_timestamp"

type="timestamp(14)"

/>

<field

name="name"

type="text"

null="NOT NULL"

/>

<field

name="version"

type="int(11)"

default="DEFAULT '0'"

null="NOT NULL"

/>

<key>PRIMARY KEY (`DEF_id`)</key>

<key>KEY `DEF_timestamp` (`DEF_timestamp`)</key>

</sqltable>

<sqltable name="BindingSpecData" >

<field

name="DEF_id"

type="int(16)"

null="NOT NULL"

extra="auto_increment"

/>

<field

name="DEF_timestamp"

type="timestamp(14)"

/>

<field

name="event class string"

type="text"

null="NOT NULL"

/>

<field

name="from node alias"

type="text"

null="NOT NULL"

/>

<field

name="to node alias"

type="text"

null="NOT NULL"

/>

<field

name="REF|ApplicationData|application"

type="int(20)"

default="DEFAULT '0'"

null="NOT NULL"

/>

<key>KEY `REF|ApplicationData|application` (`REF|ApplicationData|application`)</key>

<key>PRIMARY KEY (`DEF_id`)</key>

<key>KEY `DEF_timestamp` (`DEF_timestamp`)</key>

</sqltable>

<sqltable name="NodeSpecData" >

<field

name="DEF_id"

type="int(16)"

null="NOT NULL"

extra="auto_increment"

/>

<field

name="DEF_timestamp"

type="timestamp(14)"

/>

<field

name="class string"

type="text"

null="NOT NULL"

/>

<field

name="alias"

type="text"

null="NOT NULL"

/>

<field

name="launcher alias"

type="text"

null="NOT NULL"

/>

<field

name="SEQ|args"

type="text"

null="NOT NULL"

/>

<field

name="new process flag"

type="int(20)"

default="DEFAULT '0'"

null="NOT NULL"

/>

<field

name="SEQ|dependencies"

type="text"

null="NOT NULL"

/>

<field

name="REF|ApplicationData|application"

type="int(20)"

default="DEFAULT '0'"

null="NOT NULL"

/>

<key>KEY `REF|ApplicationData|application` (`REF|ApplicationData|application`)</key>

<key>PRIMARY KEY (`DEF_id`)</key>

<key>KEY `DEF_timestamp` (`DEF_timestamp`)</key>

</sqltable>

</definition>

<data>

<sqltable name="ApplicationData">

<field name="DEF_id" >1</field>

<field name="version" >10</field>

<field name="DEF_timestamp" >20050318115741</field>

<field name="name" >MSI (1.0)</field>

</sqltable>

<sqltable name="BindingSpecData">

<field name="DEF_timestamp" >20050318115741</field>

<field name="event class string" >SetScopeEvent</field>

<field name="REF|ApplicationData|application" >1</field>

<field name="DEF_id" >1</field>

<field name="to node alias" >Instrument</field>

<field name="from node alias" >Z Focus</field>

</sqltable>

<sqltable name="BindingSpecData">

<field name="DEF_timestamp" >20050318115741</field>

<field name="event class string" >DriftDeclaredEvent</field>

<field name="REF|ApplicationData|application" >1</field>

<field name="DEF_id" >2</field>

<field name="to node alias" >Drift Manager</field>

<field name="from node alias" >Z Focus</field>

</sqltable>

<sqltable name="BindingSpecData">

<field name="DEF_timestamp" >20050318115741</field>

<field name="event class string" >DriftDeclaredEvent</field>

<field name="REF|ApplicationData|application" >1</field>

<field name="DEF_id" >2</field>

<field name="to node alias" >Drift Manager</field>

<field name="from node alias" >Focus</field>

</sqltable>

Exposure Targeting problem - Added by Anchi Cheng almost 20 years ago

Hi, Susan,

Neither Jim nor I can see any problem in your xml file. The

error message you got seems to suggest that it could not find

launcher definition, which should not have happen since that part

was not modified. We wonder if there is some database problem

over your end that does not happen here or there is a problem

in exporting/importing.

Please try these three things for us:

First, load an application you know worked previously to see if the

same message show up. MSI-raster (1.0) would be a good one if

you have leginon 1.0.1.

Second, import in the same name

1. Export your good MSI (1.0) to xml file. Based on the xml file you

posted, I assume it is version 9, like ours.

2. Increment the version number in the xml file to a new number

that has not been used.

3. Import that back to leginon.

4. Run that application.

Third, import with a different name

similar pocedure, but change the application name in the same sqltable

to something such as test and set version to 0.

I hope this will give us a better idea what went wrong.

Anchi

- Added by Anonymous almost 20 years ago

Hi Anchi and Jim:

I tried your tests and here's what I found:

1. Load an application you know worked previously:

I started a new session and with the intent of loading the Calibrations application. When I chose 'run' under 'application', it didn't even give an option of applications to choose from. I only got the following error message in the terminal window:

Traceback (most recent call last):

File "/usr/lib/python2.3/site-packages/Leginon/gui/wx/Manager.py", line 269, in onMenuRunApplication

dialog = RunApplicationDialog(self, apps, launchernames, history, launchers)

File "/usr/lib/python2.3/site-packages/Leginon/gui/wx/Manager.py", line 735, in init

self.onChoice()

File "/usr/lib/python2.3/site-packages/Leginon/gui/wx/Manager.py", line 795, in onChoice

self.sizer.Add(self.launchersizer, (2, 0), (1, 2), wx.ALIGN_CENTER)

File "/usr/lib/python2.3/site-packages/wx/_core.py", line 10082, in Add

return core.GridBagSizer_Add(*args, **kwargs)

TypeError: wxWindow, wxSizer, wxSize, or (w,h) expected for item

2. Export and import with the same name.

I exported the 'good' MSI file. It's actually the version I modified and tried to import yesterday, version 10. Interestingly, it was truncated after the first sqltable (Application Data). It should have had many more sqltables. When I first exported MSI 1.0, it gave the entire file. So, it looks like the version I imported yesterday was imported improperly.

Is there another way to import an application rather than through the Leginon user interface?

Thanks,

Susan

- Added by Jim Pulokas almost 20 years ago

Susan,

Could you clarify how you did the import/export. Was it through the web admin tool, or through Leginon? The import/export feature of Leginon has had bugs in the past, but the web tools import/export has usually been very stable. Which ever method you used before, try the other one now. Export the original working version of MSI and apply the changes as before.

Jim

Exposure targeting Problem - Added by Anchi Cheng almost 20 years ago

Susan,

There are three ways to modify an application.

1. Edit the application using application editor in Leginon.

2. Export the xml file from Leginon and import with the

same after modification.

3. Export the xml file from Web Administration page and

import with the same after modification.

The third method is the most convernient in v1.0 and best

tested of the version.

If you used web application export/import, try import the

second time with a new version. I tried it here on Friday. The first

import gave me a truncated application as you have observed.

However, it worked the second time on. Same thing happened

to Jim. It is odd. You can check whether the import is good by:

1. Refresh your Admin webpage so that the import shows up in

the list of application available for export.

2. select the application and version you just imported.

3. Use the View option to export the application to the webpage

so that you can see what is in it.

When I loaded the truncated application, leginon gave me the

same error you reported. If it is still broken after the good import, your database might be corrupted.....

If the database is corrupted, none of the method will work properly.

The database will need to be examined and clear of the problem.

It should not be a hard fix but Jim will need to access to your database.

Anchi

exposure targeting problems - Added by Anonymous almost 20 years ago

Hi Anchi and Jim,

I had been importing/exporting applications with Leginon. I tried it again with the Web Administration page and viewed the application as Anchi suggested. Now, there are no errors when I start Leginon, and I'm running the edited MSI application right now. Thanks for your help!

Also, there's no error message following focus correction with Stage Z. The exposure targeting problem is less pronounced now, so I think the drift declaration is helping. If you can think of anything else to try let me know.

Thanks,

Susan

exposure targeting problem - Added by Anchi Cheng almost 20 years ago

Susan,

High mag targeting will take a bit of thinking now if drift management

is not enough. Could you point me to your web image viewer so that

I can take a closer look of your set up to see if anything can be done.

Send it in a private e-mail if you don't want it broadcasted....

Anchi

exposure targeting problem - Added by Anchi Cheng almost 20 years ago

Hi, Susan,

We did some testing here. We found that image shifts are different for high mag exposure such as 200kx depending on whether its preset was

sent twice or if a lower mag preset such as 5000x was sent before the 200kx preset was sent With Mag Only cycling option on in Presets. When we

turned the option off which sent the all presets parameters to the scope

including image shift to scope during cycling, the image shift was more

consistent. You may try it out on a test grid to see if it is true on your

scope, too.

With such set up my targeting is normally +/- 40 nm or less.

About a quarter of the imaging area at 200kx here on our Tecnai2

which is at 0.0408 nm/pixel. The deviation is often random so it is hard

for me to figure out what further improvement we can make. Some of

the error comes from my clicking of targeting at low mags as well.

Let us know if your targeting is worse than this or if it is not good enough.

Anchi

    (1-15/15)