diff --git a/CDTools/models/fancy_ptycho.py b/CDTools/models/fancy_ptycho.py index f075ecd..683a320 100644 --- a/CDTools/models/fancy_ptycho.py +++ b/CDTools/models/fancy_ptycho.py @@ -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 diff --git a/CDTools/models/multislice_2d_ptycho.py b/CDTools/models/multislice_2d_ptycho.py index 02cd397..9ec50e4 100644 --- a/CDTools/models/multislice_2d_ptycho.py +++ b/CDTools/models/multislice_2d_ptycho.py @@ -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