Fix a bug in the incoherent probe mode update

This commit is contained in:
Abe Levitan
2021-03-15 18:55:05 -04:00
parent f6f8084978
commit 2774953c2a
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -286,7 +286,8 @@ class FancyPtycho(CDIModel):
if len(self.weights[0].shape) == 0:
# If a purely stable coherent illumination is defined
prs = cmath.cmult(Ws[...,None,None,None,:],basis_prs)
# No cmult because Ws is real in this case
prs = Ws[...,None,None,None,None] * basis_prs
else:
# If a frame-by-frame weight matrix is defined
# This takes the dot product of all the weight matrices with
+2 -1
View File
@@ -300,7 +300,8 @@ class Multislice2DPtycho(CDIModel):
if len(self.weights[0].shape) == 0:
# If a purely stable coherent illumination is defined
prs = cmath.cmult(Ws[...,None,None,None,:],basis_prs)
# No cmult because Ws is real in this case
prs = Ws[...,None,None,None,None] * basis_prs
else:
# If a frame-by-frame weight matrix is defined
# This takes the dot product of all the weight matrices with