FarFieldPtychographyGeometry#

class deepinv.physics.FarFieldPtychographyGeometry(wavelength, object_detector_distance, detector_shape, detector_pixel_size)[source]#

Bases: PtychographyGeometry

Fraunhofer ptychography geometry.

The object-plane pixel size is determined from the detector sampling by

\[\Delta_o = \frac{\lambda z}{N \Delta_d},\]

where \(N\) is the number of detector pixels along that dimension.

Parameters:
  • wavelength (float) – Illumination wavelength \(\lambda\), in metres.

  • object_detector_distance (float) – Object-to-detector distance \(z\), in metres.

  • detector_shape (tuple[int, int]) – Number of detector pixels (height, width), i.e. \(N\) along each spatial dimension. Must match the spatial shape of the probe and diffraction patterns.

  • detector_pixel_size (tuple[float, float]) – Effective detector pixel size (dy, dx) \(\Delta_d\), in metres.


Examples:

Object-plane pixel size from the detector sampling:

>>> import torch
>>> from deepinv.physics import FarFieldPtychographyGeometry
>>> geometry = FarFieldPtychographyGeometry(
...     wavelength=1e-9, object_detector_distance=1.0,
...     detector_shape=(100, 100), detector_pixel_size=(1e-6, 1e-6),
... )
>>> geometry.object_pixel_size
(1e-05, 1e-05)

Convert scan positions from metres to pixel shifts, centred on the scan:

>>> positions = torch.tensor([[0.0, 0.0], [0.0, 2e-5]])  # 20 um apart in x
>>> geometry.positions_to_shifts(positions)
tensor([[ 0, -1],
        [ 0,  1]], dtype=torch.int32)

Examples using FarFieldPtychographyGeometry:#

Ptychography phase retrieval

Ptychography phase retrieval