2 from .qpms_cdefs cimport qpms_tmatrix_t, cdouble, qpms_tmatrix_interpolator_t, qpms_tmatrix_generator_t, qpms_tmatrix_function_t
3 from .cybspec cimport BaseSpec
5 cdef class TMatrixInterpolator:
6 #cdef readonly np.ndarray m # Numpy array holding the matrix data
7 cdef readonly BaseSpec spec # Here we hold the base spec for the correct reference counting; TODO check if it gets copied
8 cdef qpms_tmatrix_t *tmatrices_array
13 cdef qpms_tmatrix_interpolator_t *interp
14 cdef inline qpms_tmatrix_interpolator_t *rawpointer(self):
17 cdef class TMatrixGenerator:
18 cdef qpms_tmatrix_generator_t g
20 cdef inline qpms_tmatrix_generator_t raw(self):
22 cdef inline qpms_tmatrix_generator_t *rawpointer(self):
25 cdef class TMatrixFunction:
26 cdef qpms_tmatrix_function_t f
27 cdef readonly TMatrixGenerator generator # reference holder
28 cdef readonly BaseSpec spec # reference holder
29 cdef inline qpms_tmatrix_function_t raw(self):
31 cdef inline qpms_tmatrix_function_t *rawpointer(self):
35 cdef class TMatrixGeneratorTransformed:
38 cdef class CTMatrix: # N.B. there is another type called TMatrix in tmatrices.py!
39 cdef readonly np.ndarray m # Numpy array holding the matrix data
40 cdef readonly BaseSpec spec # Here we hold the base spec for the correct reference counting; TODO check if it gets copied
44 cdef inline qpms_tmatrix_t *rawpointer(CTMatrix self):
45 '''Pointer to the qpms_tmatrix_t structure.
46 Don't forget to reference the BaseSpec object itself when storing the pointer anywhere!!!