ptypy.engines.posref.PositionRefine#

class ptypy.engines.posref.PositionRefine(p)#

Bases: object

__init__(p)#

Methods

__init__(p)

cleanup()

Cleans up every iteration

estimate_fourier_metric(di_view, obj)

Calculates error based on DM fourier error estimate.

estimate_photon_metric(di_view, obj)

Calculates error based on reduced likelihood estimate.

update_constraints(iteration)

update_view_position(di_view)

Refines the position of a single diffraction view :param di_view: A diffraction view that we wish to refine.

Attributes

citation_dictionary

cleanup()#

Cleans up every iteration

estimate_fourier_metric(di_view, obj)#

Calculates error based on DM fourier error estimate.

Parameters:
  • di_view (ptypy.core.classes.View) – A diffraction view for which we wish to calculate the error.

  • obj (numpy.ndarray) – The current calculated object for which we wish to evaluate the error against.

Returns:

The calculated fourier error

Return type:

np.float

estimate_photon_metric(di_view, obj)#

Calculates error based on reduced likelihood estimate.

Parameters:
  • di_view (ptypy.core.classes.View) – A diffraction view for which we wish to calculate the error.

  • obj (numpy.ndarray) – The current calculated object for which we wish to evaluate the error against.

Returns:

The calculated fourier error

Return type:

np.float

update_constraints(iteration)#
Parameters:

iteration (int) – The current iteration of the engine.

update_view_position(di_view)#

Refines the position of a single diffraction view :param di_view: A diffraction view that we wish to refine. :type di_view: ptypy.core.classes.View

Returns:

A length 2 numpy array with the position increments for x and y co-ordinates respectively

Return type:

numpy.ndarray