More specific imports
Former-commit-id: 47a8ca8ef3375d0bffa1776b923cc06bf7496b94
This commit is contained in:
parent
56147ef91d
commit
7e010fda1d
|
@ -1,4 +1,4 @@
|
||||||
from qpms_cdefs cimport *
|
from .qpms_cdefs cimport *
|
||||||
|
|
||||||
cimport numpy as np
|
cimport numpy as np
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import enum
|
import enum
|
||||||
import cycommon
|
from .cycommon import get_mn_y, tlm2uvswfi
|
||||||
|
|
||||||
class VSWFNorm(enum.IntEnum):
|
class VSWFNorm(enum.IntEnum):
|
||||||
# TODO try to make this an enum.IntFlag if supported
|
# TODO try to make this an enum.IntFlag if supported
|
||||||
|
@ -30,12 +30,12 @@ cdef class BaseSpec:
|
||||||
if len(args) == 0:
|
if len(args) == 0:
|
||||||
if 'lMax' in kwargs.keys(): # if only lMax is specified, create the 'usual' definition in ('E','M') order
|
if 'lMax' in kwargs.keys(): # if only lMax is specified, create the 'usual' definition in ('E','M') order
|
||||||
lMax = kwargs['lMax']
|
lMax = kwargs['lMax']
|
||||||
my, ny = cycommon.get_mn_y(lMax)
|
my, ny = get_mn_y(lMax)
|
||||||
nelem = len(my)
|
nelem = len(my)
|
||||||
tlist = nelem * (QPMS_VSWF_ELECTRIC,) + nelem * (QPMS_VSWF_MAGNETIC,)
|
tlist = nelem * (QPMS_VSWF_ELECTRIC,) + nelem * (QPMS_VSWF_MAGNETIC,)
|
||||||
mlist = 2*list(my)
|
mlist = 2*list(my)
|
||||||
llist = 2*list(ny)
|
llist = 2*list(ny)
|
||||||
ilist = cycommon.tlm2uvswfi(tlist,llist,mlist)
|
ilist = tlm2uvswfi(tlist,llist,mlist)
|
||||||
else:
|
else:
|
||||||
raise ValueError
|
raise ValueError
|
||||||
else: # len(args) > 0:
|
else: # len(args) > 0:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from qpms_cdefs cimport *
|
from .qpms_cdefs cimport *
|
||||||
from libc.stdlib cimport malloc
|
from libc.stdlib cimport malloc
|
||||||
cimport cython
|
cimport cython
|
||||||
import enum
|
import enum
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from qpms_cdefs cimport qpms_permittivity_interpolator_t
|
from .qpms_cdefs cimport qpms_permittivity_interpolator_t
|
||||||
|
|
||||||
cdef class MaterialInterpolator:
|
cdef class MaterialInterpolator:
|
||||||
cdef qpms_permittivity_interpolator_t *interp
|
cdef qpms_permittivity_interpolator_t *interp
|
||||||
|
|
|
@ -3,10 +3,8 @@
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import cmath
|
import cmath
|
||||||
from qpms_cdefs cimport *
|
from .qpms_cdefs cimport qpms_permittivity_interpolator_from_yml, qpms_permittivity_interpolator_free, qpms_permittivity_interpolator_omega_min, qpms_permittivity_interpolator_omega_max, gsl_interp_type, qpms_permittivity_interpolator_t, gsl_interp_cspline, qpms_permittivity_interpolator_eps_at_omega
|
||||||
from cybspec cimport *
|
from .cycommon cimport make_c_string
|
||||||
from cycommon import *
|
|
||||||
from cycommon cimport make_c_string
|
|
||||||
cimport cython
|
cimport cython
|
||||||
import enum
|
import enum
|
||||||
import warnings
|
import warnings
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from qpms_cdefs cimport *
|
from .qpms_cdefs cimport qpms_quat_t, qpms_irot3_t
|
||||||
|
|
||||||
cdef class CQuat:
|
cdef class CQuat:
|
||||||
cdef readonly qpms_quat_t q
|
cdef readonly qpms_quat_t q
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
from cybspec cimport BaseSpec
|
from .cybspec cimport BaseSpec
|
||||||
|
from .qpms_cdefs cimport *
|
||||||
import cmath
|
import cmath
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
cimport numpy as np
|
cimport numpy as np
|
||||||
from qpms_cdefs cimport qpms_tmatrix_t, cdouble, qpms_tmatrix_interpolator_t
|
from .qpms_cdefs cimport qpms_tmatrix_t, cdouble, qpms_tmatrix_interpolator_t
|
||||||
from cybspec cimport BaseSpec
|
from .cybspec cimport BaseSpec
|
||||||
|
|
||||||
cdef class TMatrixInterpolator:
|
cdef class TMatrixInterpolator:
|
||||||
#cdef readonly np.ndarray m # Numpy array holding the matrix data
|
#cdef readonly np.ndarray m # Numpy array holding the matrix data
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from qpms_cdefs cimport *
|
from .qpms_cdefs cimport *
|
||||||
from cybspec cimport BaseSpec
|
from .cybspec cimport BaseSpec
|
||||||
from cycommon import *
|
from .cycommon import *
|
||||||
from cycommon cimport make_c_string
|
from .cycommon cimport make_c_string
|
||||||
from qpms_c cimport FinitePointGroup
|
from .qpms_c cimport FinitePointGroup
|
||||||
import warnings
|
import warnings
|
||||||
import os
|
import os
|
||||||
from libc.stdlib cimport free
|
from libc.stdlib cimport free
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import cmath
|
import cmath
|
||||||
from qpms_cdefs cimport *
|
from .qpms_cdefs cimport *
|
||||||
from .cycommon import *
|
from .cycommon import *
|
||||||
from .cybspec cimport *
|
from .cybspec cimport *
|
||||||
cimport cython
|
cimport cython
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from qpms_cdefs cimport qpms_finite_group_t
|
from .qpms_cdefs cimport qpms_finite_group_t
|
||||||
|
|
||||||
cdef class FinitePointGroup:
|
cdef class FinitePointGroup:
|
||||||
cdef readonly bint owns_data
|
cdef readonly bint owns_data
|
||||||
|
|
|
@ -8,13 +8,12 @@ to make them available in Python.
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from qpms_cdefs cimport *
|
from .qpms_cdefs cimport *
|
||||||
from cyquaternions cimport IRot3, CQuat
|
from .cyquaternions cimport IRot3, CQuat
|
||||||
from cybspec cimport BaseSpec
|
from .cybspec cimport BaseSpec
|
||||||
from cycommon cimport make_c_string
|
from .cycommon cimport make_c_string
|
||||||
from cycommon import string_c2py, PointGroupClass
|
from .cycommon import string_c2py, PointGroupClass
|
||||||
#import cycommon # Just to link make_c_string
|
from .cytmatrices cimport CTMatrix
|
||||||
from cytmatrices cimport CTMatrix
|
|
||||||
from libc.stdlib cimport malloc, free, calloc
|
from libc.stdlib cimport malloc, free, calloc
|
||||||
|
|
||||||
cdef class PointGroup:
|
cdef class PointGroup:
|
||||||
|
|
Loading…
Reference in New Issue