From a4d70bc37558ca2dcae7c0d12ea11d3021596dd4 Mon Sep 17 00:00:00 2001 From: Abe Levitan Date: Wed, 28 Jul 2021 17:14:41 -0400 Subject: [PATCH] Update polarized_fancy_ptycho.py --- CDTools/models/polarized_fancy_ptycho.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CDTools/models/polarized_fancy_ptycho.py b/CDTools/models/polarized_fancy_ptycho.py index b69c495..cd0027b 100644 --- a/CDTools/models/polarized_fancy_ptycho.py +++ b/CDTools/models/polarized_fancy_ptycho.py @@ -118,15 +118,17 @@ class PolarizedFancyPtycho(FancyPtycho): # This restricts the basis probes to stay within the probe support - basis_prs = self.probe * self.probe_support[...,:,:] - + basis_prs = self.probe * self.probe_support[...,:,:] # This makes no sense + # self.probe is an Nx2xXxY stach of probes # Now we construct the probes for each shot from the basis probes Ws = self.weights[index] if len(self.weights[0].shape) == 0: # If a purely stable coherent illumination is defined - prs = Ws[...,None,None,None] * basis_prs + # Ws is a tensor of length M, M is the number of frames to be processed + prs = Ws[...,None,None,None,None] * basis_prs else: + raise NotImplementedError('Unstable Modes not Implemented for polarized light') # If a frame-by-frame weight matrix is defined # This takes the dot product of all the weight matrices with # the probes. The output has dimensions of translation, then