Project

General

Profile

Image shift calibration trouble

Added by Jason van Rooyen about 10 years ago

Hi,

We recently lost our database server and I took the opportunity to upgrade to Leginon 3.0.

I am now trying to calibrate the processing box next to our F20 to get Leginon up and running again. However, I am battling with the image shift calibration at anything other than fc,fa,en and ef.

The calibration worked with default values in the setup dialogue in fc and I have confirmed the calibration using the navigation node.

However, when I try in the other presets (gr, sq, and hl) no image shift is recorded. Any change to the interval results in the same error.

Should I be changing another value to get a larger shift?

Could it be my pixel calibrations?

Any advice is appreciated.

Thanks,
Jason


Replies (13)

RE: Image shift calibration trouble - Added by Anchi Cheng about 10 years ago

Jason,

Nothing significant change in calibration.

1. Check to see if your pixel size at hl vs fa mag is inversely proportional to the magnification. That tells you if the pixel size is off.

2. The default movement is 25 % of the imaging length calculated from the pixel size. Can you see the feature in the image move by approximately that amount during the calibration ?

2a. If you have a feature to look at but it barely moved, then you might have to check if the image shift calibration of the scope is off. Given that this is the same scope that you have used before, this is less likely.

2b. If you have a feature and it moved by approximately a quarter of the image. Click on "Correlation" display to show the correlation map. Check if the peak is obvious, and also check if the correlation peak the algorithm finds matches the map. If the correlation peak is not obvious, move the stage to a better area, and/or try a different correlation method as defined in the settings for "Matrix" node. If this still does not work, post a screenshot with this information, along with the imaging condition of the presetns and we can go from there.

RE: Image shift calibration trouble - Added by Jason van Rooyen about 10 years ago

Hi Anchi,

It was the pixel calibration.

I was measuring the lattice spacings without over-riding the camera presets. As a result, the binning was not taken into account.

When, I set the recording mode to 1*4096 for all imaging of my grating grid, the pixel sizes made sense and all subsequent calibrations worked first time!

Thanks again,
Jason

RE: Image shift calibration trouble - Added by Anchi Cheng about 10 years ago

Good.

Yes, the pixel size recorded in Leginon calibrations need to be the unbinned pixel sizes. I shall investigate why you need to over-ride the camera presets to get it right. Did you use the "Acquire" tool in "Pixel Size" node and then measure distance between diffraction spots/line/ring in Fourier space ? Or just measure distance in the real space image and do the calculation yourself ?

RE: Image shift calibration trouble - Added by Gregory Alushin almost 10 years ago

Hi Anchi-

I have run into a similar problem. We have upgraded to Leginon 3.1 running our F20 / K2.

For the pixel size calibration, I entered the values manually based on my calibrations with Digital Micrograph. I am fairly confident they are correct.

When I attempt to do the image shift calibration with the Matrix node, if I set the Shift fraction to 29% or less, 0 image shift is applied and the calibration fails. If I set the Shift fraction to 30% or greater it goes bonkers and shifts totally outside of the field of view, and the calibration fails.

This occurs independently of the magnification and camera settings. Image shift and image shift / beam shift calibrations on microscope are good.

I realize in retrospect I did not set the camera configuration to full field bin 1 when I set the pixel calibrations. Setting the camera to full field bin 1 and overriding the preset in the pixel calibration, then resetting the pixel sizes does not fix the problem.

On a similar note, attempting to do the stage position calibration with the matrix node produces the error message "Calibration failed: no extended error information, assuming stage limit was hit".

One thing that I fear could be causing the problem(s) is that when we first installed leginon 3.1 on our camera computer and linux box, I started it up running the leginon 2.2 client on the microscope computer. Although it was able to communicate with the microscope when I created presets, I could not subsequently edit the presets. We since upgraded the microscope computer to leginon 3.1, but I wonder if somehow the microscope info in the database got messed up by the 2.2 client...

Sorry for the rambling post, any help would be greatly appreciated!!!

Thanks,
-Greg Alushin

RE: Image shift calibration trouble - Added by Anchi Cheng almost 10 years ago

This is like solving a mystery ; )

The clue on stage position calibration suggests that the pixel size might be in the wrong scale, but given that you are confident about pixel size calibration, it is probably not it. However, we found last week a bug (must has been there for years) #3010. You should at least check the pixel size again in case that you have made modification to pixel size and then change back, where this bug would surface. The fix is only in one line. You can apply it yourself.

If that is not it, I may need to study your database. You can dump the database and send that to me offline if my first guess is wrong.

RE: Image shift calibration trouble - Added by Gregory Alushin almost 10 years ago

Hi Anchi-

The link to #3010 doesn't say what the fix is. I'll try the fix if you can tell me what code to modify.

RE: Image shift calibration trouble - Added by Anchi Cheng almost 10 years ago

Hi, Greg,

According to your database, you have an unbinned image pixel size of 1269 Angstrum (= 1.269e-7 m), a factor of 1000 off. I think change them will solve your problem.

RE: Image shift calibration trouble - Added by Anchi Cheng almost 10 years ago

One more thing, 50kx value is smaller than 62kx value in your database.

RE: Image shift calibration trouble - Added by Gregory Alushin over 9 years ago

Hi Anchi-

Thanks again for spotting my stupid mistake. Indeed, I changing the power of 10 to the proper value fixed the problem, and I was subsequently able to complete all calibrations. We are now up and running.

The 50Kx value being smaller than the 62Kx value, however, may be due to a problem with how leginon extrapolates pixel sizes. I had selected all of my experimentally calibrated mags (220 through 50000) through the GUI, to extrapolate both very low and very high mags, which gave a very wrong obviously wrong pixel size for 62Kx.

I think my experimental calibrations are good based on the R^2 from a linear fit, and suggests there is a post-column magnification of ~1.37. I therefore calculated the pixel size for each mag using this factor (5E-6 / (1.37 * nominal)), and compared it to leginon's extrapolation.

I tried selecting only a subset of the experimental calibrations (i.e. 4 highest experimental mags for high mag extrapolation, and 4 lowest experimental mags for low mag calibration), which improved the extrapolation for high mags, but not for low mags, which are still off by a linear factor...

How does leginon do the extrapolation?

RE: Image shift calibration trouble - Added by Anchi Cheng over 9 years ago

Sorry, Greg,

Our e-mail notification mechanism has been broken. Thanks for the bug report and to put where other users can see. I will try to fix this, but not immediately since you have a good workaround.

RE: Image shift calibration trouble - Added by Anchi Cheng about 9 years ago

The bug may have been fixed. Will be available in 3.2 release

    (1-13/13)