Feature #4705
openLacey carbon DoG-based hole finder
0%
Description
I wanted to design a lacey carbon DoG-based hole finder.
basically the workflow would be:
users sets a pixel diameter (e.g. 75 pixels) and sloppiness factor (k = 1.3)
then you'll get two sigma values:
k = 1.3 pixdiam = 75 # find xi (E) function of k Ek = math.sqrt( (k**2 - 1.0) / (2.0 * k**2 * math.log(k)) ) # convert pixel diameter to sigma1 sigma1 = Ek * pixdiam/2 # find sigmaprime sigmaprime = sigma1 * math.sqrt(k*k-1.0) #do the blurring #first blur imgarray1 = ndimage.gaussian_filter(imgarray0, sigma=sigma1, mode='reflect') # double blur of first blur imgarray2 = ndimage.gaussian_filter(imgarray1, sigma=sigmaprime, mode='reflect') #subtract dogmap = imgarray1 - imgarray2
threshold and away you go...
Updated by Anchi Cheng over 7 years ago
- Assignee changed from Anchi Cheng to Neil Voss
Updated by Neil Voss over 7 years ago
- Status changed from Assigned to In Test
- Assignee changed from Neil Voss to Anchi Cheng
- picking holes on many images: c-flats, lacey carbon, leginon simulator
- DoG finder node complete, create node to test
- MSI-Lacey application created, upload to try
- After selecting targets in MSI-Lacey Square level and hitting submit, it does not collect the hole images. Might be leginon setting or something else. I think I need Anchi's help for this.
- Focus location selection. Carl and I spoke about using Voronoi/Delauney triangulation to automatically find a focus spot, but Voronoi code is not available on CentOS6, it was added to scipy in 2013, so maybe available in CentOS7 for future updates.
- Could not just use JAHC/Hole Finder (back) code, because both involved lattice fitting, which does not apply. Had to adapt many functions to work.
Updated by Alex Noble over 7 years ago
Tested the application. It works fine. So bindings are all fine. Did it give you an error about "Must have a focus target" ? The default now for any targetfinder is to require a focus target. You can force it not to require that in Advanced settings of your Hole Targeting node.
Updated by Neil Voss over 7 years ago
Thanks.
No, I would manually select the focus target, hit the green "play" triangle and nothing would happen; no errors, no subsequent images, nothing.
Updated by Anchi Cheng over 7 years ago
It was not Alex but me posting last message. Sorry for the confusion.
Check Hole node settings to see what target it processes. Maybe that is wrong. Do other MSI applications work on your simulator ?
Updated by Neil Voss over 7 years ago
Regarding the Lacey carbon hole finder, will CentOS 7 update include the
availability of the newer scipy for the focus targeting ? Without a focus targeting
mechanism of some kind, people will not be able to use it.
Hi Anchi,
No, it is not fully automated, but it still could save time when queuing up targets.
I can get the Voronoi focus target implemented fairly quickly, but make take some debugging/tweaking to get it acceptably automated where it always chooses a good focus target.
I found three ways to get a Voronoi function into numpy:- Newer version of scipy 0.12 or newer (CentOS 7 has scipy 0.12.1, CentOS 6 is only 0.7.2) - implementation is easy
- The scipy voronoi function is ported from qhull for which there is also pyhull (pip install works on CentOS 6) - implementation is easy
- There is also the standalone pyvoro (pip install works on CentOS 6) - did not work
I guess my question to you is... should I find a way in CentOS6 (pyhull) or are you wanting to upgrade to CentOS7 for the leginon computer?
Updated by Anchi Cheng over 7 years ago
CentOS 7 upgrade will be up to Sargis, Carl, and Fedor if they have time to do so, and we will need testing time, especially regarding opencv and other dependencies that you may not have use for.
Carl was able to install scipy 0.12 on one leginon computer. We will have to use it for real to know if there are problems. I think you should go with this option for now.
Updated by Neil Voss over 7 years ago
Focus hole part completed, I will create video to show how it works.
Updated by Neil Voss over 7 years ago
Original target spot video:
https://www.youtube.com/watch?v=I_FnTs6uJSU
Focus spot video:
https://www.youtube.com/watch?v=Ie0u8R85JFA