Пример #1
0
def MOD(phim, phiw, fm, fw, const, theta, rho, phif, phi, f):
    ph = np.moveaxis(phase(theta, rho), 1, 0)
    bw = BW(phim, phiw, fm, fw, phi, f)
    _phif = dplex.dtomine(np.einsum('ijk,il->ljk', phif, const))
    _phif = dplex.deinsum('ijk,i->ijk', _phif, ph)
    _phif = dplex.deinsum('ijk,ij->jk', _phif, bw)
    return _phif
Пример #2
0
 def MOD(self, fm, fw, const, theta, phif, phi, f):
     phim = np.asarray([1.02])
     phiw = np.asarray([0.01])
     ph = np.moveaxis(self.phase(theta), 1, 0)
     bw = self.BW(phim, phiw, fm, fw, phi, f)
     _phif = dplex.dtomine(np.einsum('ijk,il->ljk', phif, const))
     _phif = dplex.deinsum('ijk,i->ijk', _phif, ph)
     _phif = dplex.deinsum('ijk,ij->jk', _phif, bw)
     return _phif
Пример #3
0
    def test_pw(self, phim, phiw, f0m, f0w, const, rho, theta, phif0, phi, f0):
        print(self.id + ': test_pw is called')
        ph = np.moveaxis(self.phase_f0(theta, rho), 1, 0)
        bw = self.BW_f0(phim, phiw, f0m, f0w, phi, f0)
        _phif0 = dplex.dtomine(np.einsum('ijk,il->ljk', phif0, const))
        _phif0 = dplex.deinsum('ijk,i->ijk', _phif0, ph)
        _phif0 = dplex.deinsum('ijk,ij->jk', _phif0, bw)
        _phif0 = np.real(np.sum(dplex.dabs(_phif0), axis=1))

        return -np.sum(np.log(_phif0))
Пример #4
0
def MOD(fm, fw, _const, phif, phi, f):
    phim = np.asarray([1.02])
    phiw = np.asarray([0.01])
    theta = np.asarray([1.])
    rho = np.asarray([1.])
    const = np.append(_const, 1.).reshape(2, 1)
    ph = np.moveaxis(phase(theta, rho), 1, 0)
    bw = BW(phim, phiw, fm, fw, phi, f)
    _phif = dplex.dtomine(np.einsum('ijk,il->ljk', phif, const))
    _phif = dplex.deinsum('ijk,i->ijk', _phif, ph)
    _phif = dplex.deinsum('ijk,ij->jk', _phif, bw)
    return _phif