Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/c/x/CXPhasing-0.3.0/cxphasing/CXPhasing.py   CXPhasing(Download)
import CXParams as CXP
from CXData import CXData
from CXData import fft2, ifft2, angle, exp, fftshift, conj, abs
from CXData import log as nlog
import time
        obj = CXData(data=sp.zeros(orig_obj.data[0].shape, np.complex))
        for i in range(len(psi)):
            obj[id1[i] - p2: id1[i] + p2, id2[i] - p2: id2[i] + p2] += CXData.shift(conj(probe) * psi[i],
                                                                            d1[i]%1, d2[i]%1)
        return obj
        d1, d2 = self.positions.data
        for i in range(self.positions.total):
            self.probe += conj(self.object[d1[i] - p2:d1[i] + p2, d2[i] - p2:d2[i] + p2]) * self.psi[i]
 
        self.probe /= (self.ob_mod_squared_map + self.reg_filt(self.ob_mod_squared_map))