This commit is contained in:
Anastasiia Kutakh
2021-07-31 21:33:14 -04:00
parent 026f1c2b0b
commit 709c3f398d
2 changed files with 2 additions and 7 deletions
+2 -3
View File
@@ -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')