ufo-kit / ufo-filters

Common plugin suite for the ufo-core processing framework
GNU Lesser General Public License v3.0
10 stars 14 forks source link

Enable Multidistance Phase retrieval #204

Closed MathiasHurst closed 2 years ago

MathiasHurst commented 4 years ago

Can you implement the following phase retrieval filter, for multidistance phaseretrieval? Usually 2-4 distances will be used.

1/ ( SUM_i( 2 sin(pi lambda z_i k^2) ) + 10^-regularization_rate )

with frequency k propagation distance z wavelength lambda

MathiasHurst commented 3 years ago

Hi Tomas, are there any news on this? Bests, Mathias

tfarago commented 3 years ago

Not yet, but thanks for reminding me. Next week I should have some time to check this.

MathiasHurst commented 2 years ago

Hi Tomas, sorry meanwhile I used the python version of this and forgot about the issue. Filter for weakly absorbing sample with a slowly variing phase with homogenous composition is:

CTF = 2 sin(pi lambda z_i k^2) - 2 beta/delta cos(pi lambda z_i * k^2)

FFT(PHI) = SUM_i [ ( FFT(I_i -1) ) * CTF ] / SUM_i [ CTF^2 + epsilon ]

There are some variiations for pure phase or non homogenous objects, but I think this is the approach with the best ratio between applicabilitiy and simplictiy. If used with real data, Image alignment is really crucial.