cytmatrix interpolator: access frequency table from python

Former-commit-id: 69a85dba08347f0c0543ecb7913e0b8e2c20473c
This commit is contained in:
Marek Nečada 2019-12-09 20:18:40 +02:00
parent f1f2c821df
commit 4c7dd1ee61
1 changed files with 9 additions and 0 deletions

View File

@ -57,6 +57,15 @@ cdef class TMatrixInterpolator:
property freq_interval: property freq_interval:
def __get__(self): def __get__(self):
return [self.freqs[0], self.freqs[self.nfreqs-1]] return [self.freqs[0], self.freqs[self.nfreqs-1]]
property omega_table:
def __get__(self):
cdef size_t i
omegas = np.empty((self.nfreqs,), dtype=float)
cdef double[:] omegas_view = omegas
for i in range(self.nfreqs):
omegas_view[i] = self.freqs[i]
return omegas
cdef class CTMatrix: # N.B. there is another type called TMatrix in tmatrices.py! cdef class CTMatrix: # N.B. there is another type called TMatrix in tmatrices.py!
''' '''