mirror of
https://github.com/cdtools-developers/cdtools.git
synced 2026-09-09 13:02:41 +02:00
.
This commit is contained in:
@@ -96,10 +96,9 @@ class PolarizedFancyPtycho(FancyPtycho):
|
||||
prs = Ws[...,None,None,None,None] * basis_prs
|
||||
else:
|
||||
raise NotImplementedError('Unstable Modes not Implemented for polarized light')
|
||||
|
||||
print('probes', prs.shape)
|
||||
|
||||
pol_probes = polarization.apply_linear_polarizer(prs, polarizer)
|
||||
print('pol_probes',pol_probes.shape)
|
||||
|
||||
exit_waves = self.probe_norm * tools.interactions.ptycho_2D_sinc(
|
||||
prs, self.obj_support * self.obj,pix_trans,
|
||||
shift_probe=True, multiple_modes=True, polarized=True)
|
||||
|
||||
@@ -454,7 +454,6 @@ def ptycho_2D_sinc(probe, obj, translations, shift_probe=True, padding=10, multi
|
||||
J = 2 * np.pi * J / probe.shape[-1]
|
||||
phase_masks = t.exp(1j*(-subpixel_translations[:,0,None,None]*I
|
||||
-subpixel_translations[:,1,None,None]*J))
|
||||
print('phase masks', phase_masks.shape)
|
||||
|
||||
if polarized:
|
||||
phase_masks = phase_masks[..., None, :, :]
|
||||
@@ -475,7 +474,6 @@ def ptycho_2D_sinc(probe, obj, translations, shift_probe=True, padding=10, multi
|
||||
|
||||
shifted_probe = t.fft.ifft2(t.fft.ifftshift(shifted_fft_probe,
|
||||
dim=(-1,-2)))
|
||||
print('shifted_probe', shifted_probe.shape)
|
||||
|
||||
if not polarized:
|
||||
if multiple_modes: # Multi-mode probe
|
||||
@@ -487,8 +485,6 @@ def ptycho_2D_sinc(probe, obj, translations, shift_probe=True, padding=10, multi
|
||||
else:
|
||||
# print('F', shift_probe)
|
||||
output = polarization.apply_jones_matrix(shifted_probe, selections)
|
||||
print('selections', selections.shape)
|
||||
print('output', output.shape)
|
||||
|
||||
else:
|
||||
raise NotImplementedError('Object shift not yet implemented')
|
||||
|
||||
Reference in New Issue
Block a user