Skip to content

Constraint, iterated CTF

Jens Lucht requested to merge proxctf into master

Contrast transfer function phase reconstruction implemented in PyTorch framework. Convex optimization with constraints is solved with fADMM (T. Goldstein, et al., SIAM 2014) implemented as PyTorch optimizer.

Default CTF class now depends on pytorch. A numpy-only variant is now called DirectCTF (without constraints support).

Example invocation with constraints:

# given data in holograms (as (N, dim_x, dim_y)), fresnelNums

# generate ctf instance for reconstruction with parameters
ctf = CTF(holograms.shape[-2:], fresnelNums, padding=[1024, 1024], betadelta=0.01)

# phase constraints
constrains = Constraints(phase_max=0)  # i.e. negativity constrain for phase

# perform reconstruction (iterated with constraints)
recon = ctf(holograms, constraints=constraints, lr=0.01)

This closes #1 (closed) and #3 (closed).

Edited by Jens Lucht

Merge request reports