Add bc to CI common prerequisities (required to run examples)
[qpms.git] / qpms / cywaves.pyx
blobbd1877de703d77fe09b4c80b1b89008d5e7228af
1 from qpms_cdefs cimport *
3 from .cybspec cimport BaseSpec
4 from .cybspec import VSWFNorm, default_bspec
5 from .cycommon import VSWFType, BesselType
7 def vswf_single(kr_csph, qpms_vswf_type_t t, qpms_l_t l, qpms_m_t m,
8 qpms_bessel_t btyp = QPMS_BESSEL_REGULAR, qpms_normalisation_t norm = default_bspec.norm):
9 cdef csph_t kr
10 kr.r, kr.theta, kr.phi = kr_csph
11 if t == QPMS_VSWF_ELECTRIC:
12 return qpms_vswf_single_el_csph(m, l, kr, btyp, norm)
13 elif t == QPMS_VSWF_MAGNETIC:
14 return qpms_vswf_single_mg_csph(m, l, kr, btyp, norm)
15 elif t == QPMS_VSWF_LONGITUDINAL:
16 raise NotImplementedError("Longitudinal single waves not yet implemented, sorry.")
17 else:
18 raise ValueError("Invalid wave type specified")