ptycho¶
Provides ptychography related functions.
Solve the ptychography problem using the given algorithm. |
|
Return real-valued detector counts of simulated ptychography data. |
-
tike.ptycho.ptycho.
reconstruct
(data, probe, scan, algorithm, psi=None, num_gpu=1, num_iter=1, rtol=- 1, model='gaussian', use_mpi=False, cost=None, times=None, eigen_probe=None, eigen_weights=None, batch_size=None, **kwargs)[source]¶ Solve the ptychography problem using the given algorithm.
- Parameters
data ((…, FRAME, WIDE, HIGH) float32) – The intensity (square of the absolute value) of the propagated wavefront; i.e. what the detector records.
eigen_probe ((…, 1, EIGEN, SHARED, WIDE, HIGH) complex64) – The eigen probes for all positions.
eigen_weights ((…, POSI, EIGEN, SHARED) float32) – The relative intensity of the eigen probes at each position.
psi ((…, WIDE, HIGH) complex64) – The wavefront modulation coefficients of the object.
probe ((…, 1, 1, SHARED, WIDE, HIGH) complex64) – The shared complex illumination function amongst all positions.
scan ((…, POSI, 2) float32) – Coordinates of the minimum corner of the probe grid for each measurement in the coordinate system of psi. Coordinate order consistent with WIDE, HIGH order.
algorithm (string) – The name of one algorithms from
ptycho.solvers
.rtol (float) – Terminate early if the relative decrease of the cost function is less than this amount.
batch_size (int) – The approximate number of scan positions processed by each GPU simultaneously per view.
-
tike.ptycho.ptycho.
simulate
(detector_shape, probe, scan, psi, fly=1, eigen_probe=None, eigen_weights=None, **kwargs)[source]¶ Return real-valued detector counts of simulated ptychography data.
- Parameters
detector_shape (int) – The pixel width of the detector.
probe ((…, 1, 1, SHARED, WIDE, HIGH) complex64) – The shared complex illumination function amongst all positions.
scan ((…, POSI, 2) float32) – Coordinates of the minimum corner of the probe grid for each measurement in the coordinate system of psi.
psi ((…, WIDE, HIGH) complex64) – The complex wavefront modulation of the object.
fly (int) – The number of scan positions which combine for one detector frame.
eigen_probe ((…, 1, EIGEN, SHARED, WIDE, HIGH) complex64) – The eigen probes for all positions.
eigen_weights ((…, POSI, EIGEN, SHARED) float32) – The relative intensity of the eigen probes at each position.
- Returns
data ((…, FRAME, WIDE, HIGH) float32) – The simulated intensity on the detector.