From 042197f978d584ae6fe559aa02fd70e88258bd40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Thu, 9 Feb 2017 07:08:20 +0200 Subject: [PATCH] =?UTF-8?q?[hexpoint]=C2=A0some=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 2741873a8507d756e95752e41bb1793e9a261219 --- qpms/hexpoints.py | 8 +++++--- setup.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/qpms/hexpoints.py b/qpms/hexpoints.py index 9b07547..1a104fc 100644 --- a/qpms/hexpoints.py +++ b/qpms/hexpoints.py @@ -296,7 +296,7 @@ def hexlattice_precalc_AB_loadunwrap(file, tpdict = None, tphcdict = None, retur a_self[tpdict['mi'][0]]=npz['a_self_m0'] b_self[tpdict['nmi']]=npz['b_self_nm'] b_self[tpdict['mi'][0]]=npz['b_self_m0'] - mirrorangles = qpms.cart2sph(self_tr[tpdict['mi'][1]])[:,2] - qpms.cart2sph(self_tr[tpdict['mi'][0]])[:,2] + mirrorangles = cart2sph(self_tr[tpdict['mi'][1]])[:,2] - cart2sph(self_tr[tpdict['mi'][0]])[:,2] a_self[tpdict['mi'][1],:,:] = a_self[tpdict['mi'][0],:,:] * np.exp(1j*mirrorangles[:,nx,nx]*(my[nx,nx,:]-my[nx,:,nx])) b_self[tpdict['mi'][1],:,:] = b_self[tpdict['mi'][0],:,:] * np.exp(1j*mirrorangles[:,nx,nx]*(my[nx,nx,:]-my[nx,:,nx])) for i in range(1,6): @@ -306,7 +306,7 @@ def hexlattice_precalc_AB_loadunwrap(file, tpdict = None, tphcdict = None, retur a_d2u[tphcdict['mi'][0]]=npz['a_d2u_m0'] b_d2u[tphcdict['nmi']]=npz['b_d2u_nm'] b_d2u[tphcdict['mi'][0]]=npz['b_d2u_m0'] - mirrorangles = qpms.cart2sph(self_tr[tphcdict['mi'][1]])[:,2] - qpms.cart2sph(self_tr[tphcdict['mi'][0]])[:,2] + mirrorangles = cart2sph(self_tr[tphcdict['mi'][1]])[:,2] - cart2sph(self_tr[tphcdict['mi'][0]])[:,2] a_d2u[tphcdict['mi'][1],:,:] = a_d2u[tphcdict['mi'][0],:,:] * np.exp(1j*mirrorangles[:,nx,nx]*(my[nx,nx,:]-my[nx,:,nx])) b_d2u[tphcdict['mi'][1],:,:] = b_d2u[tphcdict['mi'][0],:,:] * np.exp(1j*mirrorangles[:,nx,nx]*(my[nx,nx,:]-my[nx,:,nx])) for i in (1,-1): @@ -320,8 +320,10 @@ def hexlattice_precalc_AB_loadunwrap(file, tpdict = None, tphcdict = None, retur 'a_d2u' : a_d2u, 'b_d2u' : b_d2u, 'a_u2d' : a_u2d, - 'b_u2d' : b_u2d + 'b_u2d' : b_u2d, } + for k in precalc_params.keys(): + d[k] = precalc_params[k] if return_points: d['d2u_tr'] = tphcdict['points'] d['u2d_tr'] = -tphcdict['points'] diff --git a/setup.py b/setup.py index b5ae396..9779442 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ qpms_c = Extension('qpms_c', sources = ['qpms/qpms_c.pyx']) setup(name='qpms', - version = "0.1.8", + version = "0.1.9", packages=['qpms'], # setup_requires=['setuptools_cython'], install_requires=['cython>=0.21','quaternion','spherical_functions','py_gmm'],