mirror of
https://github.com/cdtools-developers/cdtools.git
synced 2026-10-16 12:55:12 +02:00
Merge pull request #81 from cdtools-developers/fix_oversampling_pix_size
Fix an issue with the probe pixel size when probe_fourier_crop and oversampling are both used
This commit is contained in:
@@ -398,6 +398,7 @@ class FancyPtycho(CDIModel):
|
||||
dataset.patterns.shape[-2:], dtype=t.float32)
|
||||
|
||||
if probe_fourier_crop is not None:
|
||||
initial_probe_shape = np.array(probe.shape)
|
||||
probe = tools.propagators.far_field(probe)
|
||||
probe = probe[probe_fourier_crop : probe.shape[-2]
|
||||
- probe_fourier_crop,
|
||||
@@ -405,7 +406,7 @@ class FancyPtycho(CDIModel):
|
||||
- probe_fourier_crop]
|
||||
probe = tools.propagators.inverse_far_field(probe)
|
||||
|
||||
scale_factor = np.array(det_shape) / np.array(probe.shape)
|
||||
scale_factor = initial_probe_shape / np.array(probe.shape)
|
||||
probe_basis = obj_basis * scale_factor[None,:]
|
||||
else:
|
||||
probe_basis = obj_basis.clone()
|
||||
|
||||
Reference in New Issue
Block a user