Feature #900
closed
Proposed change in binning behavior for fft display in webviewers, Let me know if you object.
Added by Anchi Cheng about 14 years ago.
Updated about 14 years ago.
Description
I would like to change the meaning of binning when fft is displayed in the viewer. Currently, it first calculate fft (power spectrum, really) with the full-size image and then apply binning. I would like make it to bin down the image before fft calculation.
Unbinned fft of high mag images ofter contains a large empty area due to limited MTF of the camera. The Thon ring and possible diffraction peaks are squeezed to the center. To view this central area where there is true information, a binning in the Fourier space is useless not to mention that the binning does not save time during fft calculation. Binning in the real space before fft, on the other hand produces zooming effect on a given display size. It is a lot more useful. This involves a one-line change in myamiweb/inc/filter.inc
Any objection, especially from the users?
I like the idea, but I am worried if the default bin is say 4, the Thon rings will be cut off by default. A better solution would be to do the calculation in Leginon and cache the FFT as a jpeg.
Just taking the opportunity to plug the new redux module. Its pipeline design allows for you to put the bin before the fft or vice versa. The current example has no mechanism for the client to request the order of operations as it is hard coded in the server, but we can add that functionality.
I think I like Jim's suggestion the best. As a user, I can see the benefit of being able to "zoom" in on the FFT by binning in real space first. On the other hand, I like being able to see the full FFT scaled conveniently to the the size of the image display window. Moreover, I think that users have an expectation of what pushing that button should look like, and it influences how they interpret the quality of their data during collection. I think providing the user with both options would be best.
- Status changed from Assigned to In Code Review
- Assignee changed from Anchi Cheng to Amber Herold
- % Done changed from 0 to 100
committed as r14859. Default is bin before fft and the auto binning is 2. This is different from other auto binning of 4 because the latter value zoom in too much to be generally useful but we need 4 on real space image for speed.
Testing:
1. Open any webviewer and choose an high mag, image of known resolution limit and Thon ring resolution.
2. activate fft display. A resolution ring will show. Open the settings adjustment window and choose different
binnings and choice of before/after binning for fft to see if each display an reasonable resolution ring in the
viewer.
3. click on the view in each case to bring up the mapping, and check in each case the resolution bar is reasonable and the ruler measurement (between the center to a known resolution Thon ring node) works correctly.
Pick-wei said he can test.
- Assignee changed from Amber Herold to Anchi Cheng
image.inc line 79
$binning = ($dimx > 2048) ? (($dimx > 2048) ? 2 : 1 ) : 1;
This will work but it may cause confusion in the future. would be better as:
$binning = ($dimx > 2048) ? 2 : 1;
Otherwise looks good.
- Assignee changed from Anchi Cheng to Amber Herold
remove cause as suggested r14875
Amber, do you want to review again?
- Status changed from In Code Review to In Test
- Assignee changed from Amber Herold to Pick-Wei Lau
- Status changed from In Test to Closed
- Assignee changed from Pick-Wei Lau to Anchi Cheng
I have tried using the viewer to measure the resolution to which the Thon ring goes out to on some of my images. The values that are calculated seems to agree with what Ace2 calculates on the same images. So, I believe that it is working correctly.
Also available in: Atom
PDF