ptypy.engines.utils.projection_update_DM_AP#

ptypy.engines.utils.projection_update_DM_AP(diff_view, alpha=1.0, pbound=None)#

Linear interpolation between Difference Map algorithm (a,b,c = -1,1,2) and Alternating Projections algorithm (a,b,c = 0,1,1) with coefficients a = -alpha, b = 1, c = 1 + alpha. Alpha = 1.0 corresponds to DM and alpha = 0.0 to AP.

Parameters:
  • diff_view (View) – View to diffraction data

  • alpha (float, optional) – Blend between AP (alpha=0.0 and DM (alpha=1.0) . Valid interval [0, 1]

  • pbound (float, optional) – Power bound. Fourier update is bypassed if the quadratic deviation between diffraction data and diff_view is below this value. If None, fourier update always happens.

Returns:

err_fmag, err_exit

  • err_fmag, Fourier magnitude error; quadratic deviation from root of experimental data

  • err_exit, quadratic deviation between exit waves before and after projection

Return type:

float