File Exchange

image thumbnail

Polar Onion Peeling

version 1.6 (15.9 MB) by

Apply polar onion peeling method for analyzing velocity map imaging (VMI) data.

5 Downloads

Updated

View License

The code implements the method shown at "Toward real-time charged-particle image reconstruction using polar onion-peeling" by G.M. Roberts et-al, Rev. Sci. Instr. 80, 053104 (2009). It supports images of up to 4K and accepts arbitrary (even) beta parameters. Specific quadrants of the image can be selected in the analysis in case of image asymmetries. NaN values can be used for masking unwanted pixels or areas.
For more info regarding the method see: http://rsi.aip.org/resource/1/rsinak/v80/i5/p053104_s1?isAuthorized=no

Comments and Ratings (7)

Natan

Natan (view profile)

Hi Bennet, Can you please send me a sample of the code you are using, I manage to get the iradeconExp info... I'll also soon update the code with a more current version that allows for masking with NaN...

Bennet Krebs

Hi Natan, your code is very useful and i appreciate the time you took making it public.
My problem it with the "experimental image". I cannot seem to get your code to work with the 'exp' parameter, the following error occurs:

Error using POP>t2f (line 294)
Not enough input arguments.

Error in POP (line 249)
zz=t2f(iradeconExp,l,PPR,AngleInc);

Error in TESTBED (line 2)
s=POP(im,2:2:4, 1:4, 'exp');

I tired it with multiple of my own VMI-Spectra and your testfile, which all work perfect with the 'sim' setting.
I'm currently reading through your refereed paper and the code itself, so maybe I find the answer in there.
Thanks.

Ablikim

Thanks Natan for the inversion code. Hopefully it works for me. I will try it on my ion/electron raw images. :)

Natan

Natan (view profile)

Your data is probably all zeros in some radius, so the interpolation is not possible. Just add to your data a negligible const value, like: data=data+eps; to solve it. I'll update the code with a try\catch case in that loop for this case in the future.

Pengju

Pengju (view profile)

The code is very cool!
I tried my images, it works very well and fast.
It can also give higher order beta, amazing.
----------
But still some of my images meet one error as:
??? Error using ==> interp1 at 184
There should be at least two data points.

Error in ==> POP at 234
sqp(ii,:)=interp1(1:nzpr(ii),iraraw(ii,1:nzpr(ii)),linspace(1,nzpr(ii),N),'spline');

My image size is 990*990 (double)as .mat file.

Would you please give me some advice?

Natan

Natan (view profile)

@Luis, if you press "Download Submission" you'll get a zip file (pop.zip) that contains also delta_lut.mat ...

Luis

Luis (view profile)

Tried to test it but couldn't find delta_lut.mat, thanks

Updates

1.6

Support in NaN values for masking the raw images was added, the code is restructured for better readability and a sample script to demonstrate how it works was added.

1.5

The code supports images of up to 4K. bld_lut.m was added for radial basis set generation of arbitrary size. Code improvements include applying better matrix inversion method, avoiding divergences at the origin artifacts and other minor improvements.

1.4

Faster code, some minor debugging for the case of all zeros data, improved support in higher Legendre polynomials up to the floating point accuracy limit.

1.3

added Matlab version control to use the proper interpolator name.

1.2

Added support in specific image quadrants analysis in case of image asymmetries. Improved documentation and warnings\errors handling.

1.1

The code now supports higher order Legendre polynomials, this was done with the help of Adam Chatterley.

MATLAB Release
MATLAB 8.2 (R2013b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today