Project

General

Profile

Data collection strategy

Added by Anonymous almost 19 years ago

When taking images for single particle analysis, we would like to vary the defocus for the different pictures.

Is this possible in Leginon, using the same grid? I know you can setup exposure presets at various defoci, but how would one go about cycling through them (1 exposure for each area?).


Replies (9)

- Added by Jim Pulokas almost 19 years ago

If you want some targets acquired at one defocus and some targets acquired at another defocus, there is currently no automated way to cycle through these defoci. The only automated cycling right now is if you want multiple exposures at the same target with different defoci (set up multiple presets for a single acquisition node). For now, there are two ways you can vary the defocus at different targets in a manual way. Obviously this would make it difficult change defocus at every target, but it is not difficult if you want to set one defocus for a while, and then switch to another defocus later. Here are the two ways:

1. The quick and easy way is to just have just one preset and then change the defocus of this preset whenever you want to (in Presets Manager)

2. A more organized way, but more time consuming to manage, is to set up a different preset for each defocus you want to use. Then to change the defocus at any time, you just go into the settings of the acquisition node and change to the preset that you want to use.

Jim

RE: Data collection strategy - Added by Mario Borgnia almost 11 years ago

Hi,
I am looking a way of taking a single image per exposure target while cycling between different defocus values. While searching, I came across this 8 year old post discussing the exact capability. Is there a solution?
Thanks

Mario

RE: Data collection strategy - Added by Anchi Cheng almost 11 years ago

After 8 years, we have a random defocus option in the preset settings that you can set a range now. Each target get a random value within the range. All users were happy enough with that so far.

RE: Data collection strategy - Added by Mario Borgnia almost 11 years ago

Sounds great! I am happy too! Thank you. I do not know how to go about finding those things without asking... Sorry for the noise :)

RE: Data collection strategy - Added by Mario Borgnia almost 11 years ago

One A few more questions? :)
How does the randomizer select the different defocus values within the range?
Would it be possible to coax it to use one of several discrete values?
You see, happiness is a relative concept :)

Thanks again,

RE: Data collection strategy - Added by Anchi Cheng almost 11 years ago

1. The value is selected in python code by random.uniform(a, b) where a and b are the defocus min and max you specified.
2. Yes, if you do python programing.

RE: Data collection strategy - Added by Mario Borgnia almost 11 years ago

Yes, I do python programming. I will try :)
Can you point me to the file in question?

Thanks

RE: Data collection strategy - Added by Anchi Cheng almost 11 years ago

On your linux Leginon server, find the location of the install, and then find in there:

leginon/presets.py

Modify this line to what you want.

mydefocus = random.uniform(mymin, mymax)

RE: Data collection strategy - Added by Anchi Cheng almost 11 years ago

Wait,

That will change all presets that random defocus is activated (meaning the ones with defocus range set), and is not user specific, so be careful with it.

    (1-9/9)