/* Generated by Cython 0.29.33 */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_33"
#define CYTHON_HEX_VERSION 0x001D21F0
#define CYTHON_FUTURE_DIVISION 0
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PY_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 0
  #elif !defined(CYTHON_FAST_THREAD_STATE)
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef __cplusplus
  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
#endif
#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #else
    #define CYTHON_INLINE inline
  #endif
#endif
template<typename T>
void __Pyx_call_destructor(T& x) {
    x.~T();
}
template<typename T>
class __Pyx_FakeReference {
  public:
    __Pyx_FakeReference() : ptr(NULL) { }
    __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
    T *operator->() { return ptr; }
    T *operator&() { return ptr; }
    operator T&() { return *ptr; }
    template<typename U> bool operator ==(U other) { return *ptr == other; }
    template<typename U> bool operator !=(U other) { return *ptr != other; }
  private:
    T *ptr;
};

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if PY_VERSION_HEX >= 0x030B00A1
    static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
        PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
        PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
        const char *fn_cstr=NULL;
        const char *name_cstr=NULL;
        PyCodeObject* co=NULL;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        if (!(kwds=PyDict_New())) goto end;
        if (!(argcount=PyLong_FromLong(a))) goto end;
        if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
        if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
        if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
        if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
        if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
        if (!(nlocals=PyLong_FromLong(l))) goto end;
        if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
        if (!(stacksize=PyLong_FromLong(s))) goto end;
        if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
        if (!(flags=PyLong_FromLong(f))) goto end;
        if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
        if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
        if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
        if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
        if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
        if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
        if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
        Py_XDECREF((PyObject*)co);
        co = (PyCodeObject*)call_result;
        call_result = NULL;
        if (0) {
            cleanup_code_too:
            Py_XDECREF((PyObject*)co);
            co = NULL;
        }
        end:
        Py_XDECREF(kwds);
        Py_XDECREF(argcount);
        Py_XDECREF(posonlyargcount);
        Py_XDECREF(kwonlyargcount);
        Py_XDECREF(nlocals);
        Py_XDECREF(stacksize);
        Py_XDECREF(replace);
        Py_XDECREF(call_result);
        Py_XDECREF(empty);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return co;
    }
#else
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #if !defined(_USE_MATH_DEFINES)
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__fisx___fisx
#define __PYX_HAVE_API__fisx___fisx
/* Early includes */
#include <string.h>
#include <string>
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#include <vector>
#include <utility>

    #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)
    // move should be defined for these versions of MSVC, but __cplusplus isn't set usefully
    #include <type_traits>

    namespace cython_std {
    template <typename T> typename std::remove_reference<T>::type&& move(T& t) noexcept { return std::move(t); }
    template <typename T> typename std::remove_reference<T>::type&& move(T&& t) noexcept { return std::move(t); }
    }

    #endif
    
#include <map>
#include "fisx_material.h"
#include "fisx_elements.h"
#include "fisx_detector.h"
#include "fisx_shell.h"
#include "fisx_element.h"
#include "fisx_epdl97.h"
#include "fisx_layer.h"
#include "fisx_math.h"
#include "fisx_simpleini.h"
#include "fisx_simplespecfile.h"
#include "fisx_transmissiontable.h"
#include "fisx_version.h"
#include "fisx_xrf.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "stringsource",
  "python\\cython\\_fisx.pyx",
};

/*--- Type declarations ---*/
struct __pyx_obj_4fisx_5_fisx_PyDetector;
struct __pyx_obj_4fisx_5_fisx_PyElement;
struct __pyx_obj_4fisx_5_fisx_PyElements;
struct __pyx_obj_4fisx_5_fisx_PyEPDL97;
struct __pyx_obj_4fisx_5_fisx_PyLayer;
struct __pyx_obj_4fisx_5_fisx_PyMaterial;
struct __pyx_obj_4fisx_5_fisx_PyMath;
struct __pyx_obj_4fisx_5_fisx_PyShell;
struct __pyx_obj_4fisx_5_fisx_PySimpleIni;
struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile;
struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable;
struct __pyx_obj_4fisx_5_fisx_PyXRF;

/* "python/cython/_fisx.pyx":41
 * from fisx.FisxCythonTools import toBytes, toBytesKeys, toBytesKeysAndValues, toString,  toStringKeys, toStringKeysAndValues, toStringList
 * 
 * cdef class PyDetector:             # <<<<<<<<<<<<<<
 *     cdef Detector *thisptr
 * 
 */
struct __pyx_obj_4fisx_5_fisx_PyDetector {
  PyObject_HEAD
  fisx::Detector *thisptr;
};


/* "python/cython/_fisx.pyx":147
 * from Element cimport *
 * 
 * cdef class PyElement:             # <<<<<<<<<<<<<<
 *     cdef Element *thisptr
 * 
 */
struct __pyx_obj_4fisx_5_fisx_PyElement {
  PyObject_HEAD
  fisx::Element *thisptr;
};


/* "python/cython/_fisx.pyx":281
 * 
 * """
 * cdef class PyElements:             # <<<<<<<<<<<<<<
 *     cdef Elements *thisptr
 * 
 */
struct __pyx_obj_4fisx_5_fisx_PyElements {
  PyObject_HEAD
  fisx::Elements *thisptr;
};


/* "python/cython/_fisx.pyx":767
 * from EPDL97 cimport *
 * 
 * cdef class PyEPDL97:             # <<<<<<<<<<<<<<
 *     cdef EPDL97 *thisptr
 * 
 */
struct __pyx_obj_4fisx_5_fisx_PyEPDL97 {
  PyObject_HEAD
  fisx::EPDL97 *thisptr;
};


/* "python/cython/_fisx.pyx":858
 * from Layer cimport *
 * 
 * cdef class PyLayer:             # <<<<<<<<<<<<<<
 *     cdef Layer *thisptr
 * 
 */
struct __pyx_obj_4fisx_5_fisx_PyLayer {
  PyObject_HEAD
  fisx::Layer *thisptr;
};


/* "python/cython/_fisx.pyx":942
 * from Material cimport *
 * 
 * cdef class PyMaterial:             # <<<<<<<<<<<<<<
 *     cdef Material *thisptr
 * 
 */
struct __pyx_obj_4fisx_5_fisx_PyMaterial {
  PyObject_HEAD
  fisx::Material *thisptr;
};


/* "python/cython/_fisx.pyx":1007
 * from Math cimport *
 * 
 * cdef class PyMath:             # <<<<<<<<<<<<<<
 *     cdef Math *thisptr
 * 
 */
struct __pyx_obj_4fisx_5_fisx_PyMath {
  PyObject_HEAD
  fisx::Math *thisptr;
};


/* "python/cython/_fisx.pyx":1094
 * from Shell cimport *
 * 
 * cdef class PyShell:             # <<<<<<<<<<<<<<
 *     cdef Shell *thisptr
 * 
 */
struct __pyx_obj_4fisx_5_fisx_PyShell {
  PyObject_HEAD
  fisx::Shell *thisptr;
};


/* "python/cython/_fisx.pyx":1176
 * from SimpleIni cimport *
 * 
 * cdef class PySimpleIni:             # <<<<<<<<<<<<<<
 *     cdef SimpleIni *thisptr
 * 
 */
struct __pyx_obj_4fisx_5_fisx_PySimpleIni {
  PyObject_HEAD
  fisx::SimpleIni *thisptr;
};


/* "python/cython/_fisx.pyx":1229
 * from SimpleSpecfile cimport *
 * 
 * cdef class PySimpleSpecfile:             # <<<<<<<<<<<<<<
 *     cdef SimpleSpecfile *thisptr
 * 
 */
struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile {
  PyObject_HEAD
  fisx::SimpleSpecfile *thisptr;
};


/* "python/cython/_fisx.pyx":1291
 * from TransmissionTable cimport *
 * 
 * cdef class PyTransmissionTable:             # <<<<<<<<<<<<<<
 *     cdef TransmissionTable *thisptr
 * 
 */
struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable {
  PyObject_HEAD
  fisx::TransmissionTable *thisptr;
};


/* "python/cython/_fisx.pyx":1425
 * from TransmissionTable cimport *
 * 
 * cdef class PyXRF:             # <<<<<<<<<<<<<<
 *     cdef XRF *thisptr
 * 
 */
struct __pyx_obj_4fisx_5_fisx_PyXRF {
  PyObject_HEAD
  fisx::XRF *thisptr;
};


/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
    const char* function_name);

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  do {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if CYTHON_FAST_PYCALL
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif // CYTHON_FAST_PYCALL
#endif

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyObjectCall2Args.proto */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* KeywordStringCheck.proto */
static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* IncludeStringH.proto */
#include <string.h>

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

/* UnpackTupleError.proto */
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);

/* UnpackTuple2.proto */
#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
    (likely(is_tuple || PyTuple_Check(tuple)) ?\
        (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
            __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
            (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
        __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
    PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);

/* dict_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* GCCDiagnostics.proto */
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* CppExceptionConversion.proto */
#ifndef __Pyx_CppExn2PyErr
#include <new>
#include <typeinfo>
#include <stdexcept>
#include <ios>
static void __Pyx_CppExn2PyErr() {
  try {
    if (PyErr_Occurred())
      ; // let the latest Python exn pass through and ignore the current one
    else
      throw;
  } catch (const std::bad_alloc& exn) {
    PyErr_SetString(PyExc_MemoryError, exn.what());
  } catch (const std::bad_cast& exn) {
    PyErr_SetString(PyExc_TypeError, exn.what());
  } catch (const std::bad_typeid& exn) {
    PyErr_SetString(PyExc_TypeError, exn.what());
  } catch (const std::domain_error& exn) {
    PyErr_SetString(PyExc_ValueError, exn.what());
  } catch (const std::invalid_argument& exn) {
    PyErr_SetString(PyExc_ValueError, exn.what());
  } catch (const std::ios_base::failure& exn) {
    PyErr_SetString(PyExc_IOError, exn.what());
  } catch (const std::out_of_range& exn) {
    PyErr_SetString(PyExc_IndexError, exn.what());
  } catch (const std::overflow_error& exn) {
    PyErr_SetString(PyExc_OverflowError, exn.what());
  } catch (const std::range_error& exn) {
    PyErr_SetString(PyExc_ArithmeticError, exn.what());
  } catch (const std::underflow_error& exn) {
    PyErr_SetString(PyExc_ArithmeticError, exn.what());
  } catch (const std::exception& exn) {
    PyErr_SetString(PyExc_RuntimeError, exn.what());
  }
  catch (...)
  {
    PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
  }
}
#endif

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntFromPy.proto */
static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntFromPy.proto */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);


/* Module declarations from 'cython' */

/* Module declarations from 'libc.string' */

/* Module declarations from 'libcpp.string' */

/* Module declarations from 'libcpp.vector' */

/* Module declarations from 'libcpp.utility' */

/* Module declarations from 'libcpp.map' */

/* Module declarations from 'libcpp.pair' */

/* Module declarations from 'Material' */

/* Module declarations from 'Elements' */

/* Module declarations from 'Detector' */

/* Module declarations from 'Shell' */

/* Module declarations from 'Element' */

/* Module declarations from 'EPDL97' */

/* Module declarations from 'Layer' */

/* Module declarations from 'Math' */

/* Module declarations from 'SimpleIni' */

/* Module declarations from 'SimpleSpecfile' */

/* Module declarations from 'TransmissionTable' */

/* Module declarations from 'Version' */

/* Module declarations from 'XRF' */

/* Module declarations from 'fisx._fisx' */
static PyTypeObject *__pyx_ptype_4fisx_5_fisx_PyDetector = 0;
static PyTypeObject *__pyx_ptype_4fisx_5_fisx_PyElement = 0;
static PyTypeObject *__pyx_ptype_4fisx_5_fisx_PyElements = 0;
static PyTypeObject *__pyx_ptype_4fisx_5_fisx_PyEPDL97 = 0;
static PyTypeObject *__pyx_ptype_4fisx_5_fisx_PyLayer = 0;
static PyTypeObject *__pyx_ptype_4fisx_5_fisx_PyMaterial = 0;
static PyTypeObject *__pyx_ptype_4fisx_5_fisx_PyMath = 0;
static PyTypeObject *__pyx_ptype_4fisx_5_fisx_PyShell = 0;
static PyTypeObject *__pyx_ptype_4fisx_5_fisx_PySimpleIni = 0;
static PyTypeObject *__pyx_ptype_4fisx_5_fisx_PySimpleSpecfile = 0;
static PyTypeObject *__pyx_ptype_4fisx_5_fisx_PyTransmissionTable = 0;
static PyTypeObject *__pyx_ptype_4fisx_5_fisx_PyXRF = 0;
static std::string __pyx_convert_string_from_py_std__in_string(PyObject *); /*proto*/
static std::map<std::string,double>  __pyx_convert_map_from_py_std_3a__3a_string__and_double(PyObject *); /*proto*/
static std::vector<double>  __pyx_convert_vector_from_py_double(PyObject *); /*proto*/
static std::vector<std::string>  __pyx_convert_vector_from_py_std_3a__3a_string(PyObject *); /*proto*/
static std::map<double,double>  __pyx_convert_map_from_py_double__and_double(PyObject *); /*proto*/
static std::vector<int>  __pyx_convert_vector_from_py_int(PyObject *); /*proto*/
static PyObject *__pyx_convert_vector_to_py_double(const std::vector<double>  &); /*proto*/
static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &); /*proto*/
static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &); /*proto*/
static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &); /*proto*/
static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &); /*proto*/
static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &); /*proto*/
static PyObject *__pyx_convert_map_to_py_std_3a__3a_string____double(std::map<std::string,double>  const &); /*proto*/
static PyObject *__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___(std::map<std::string,std::map<std::string,double> >  const &); /*proto*/
static PyObject *__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___(std::map<std::string,std::vector<double> >  const &); /*proto*/
static PyObject *__pyx_convert_vector_to_py_std_3a__3a_string(const std::vector<std::string>  &); /*proto*/
static PyObject *__pyx_convert_vector_to_py_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___(const std::vector<std::map<std::string,std::map<std::string,double> > >  &); /*proto*/
static PyObject *__pyx_convert_pair_to_py_std_3a__3a_string____double(std::pair<std::string,double>  const &); /*proto*/
static PyObject *__pyx_convert_vector_to_py_std_3a__3a_pair_3c_std_3a__3a_string_2c_double_3e___(const std::vector<std::pair<std::string,double> >  &); /*proto*/
static PyObject *__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(std::map<std::string,std::string>  const &); /*proto*/
static PyObject *__pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___(const std::vector<std::vector<double> >  &); /*proto*/
static PyObject *__pyx_convert_map_to_py_double____double(std::map<double,double>  const &); /*proto*/
static PyObject *__pyx_convert_map_to_py_int____std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___(std::map<int,std::map<std::string,std::map<std::string,double> > >  const &); /*proto*/
static PyObject *__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_int_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e____3e___(std::map<std::string,std::map<int,std::map<std::string,std::map<std::string,double> > > >  const &); /*proto*/
#define __Pyx_MODULE_NAME "fisx._fisx"
extern int __pyx_module_is_main_fisx___fisx;
int __pyx_module_is_main_fisx___fisx = 0;

/* Implementation of 'fisx._fisx' */
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_sorted;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_range;
static const char __pyx_k_[] = "";
static const char __pyx_k_3[] = "3";
static const char __pyx_k_K[] = "K";
static const char __pyx_k_L[] = "L";
static const char __pyx_k_M[] = "M";
static const char __pyx_k_n[] = "n";
static const char __pyx_k_p[] = "p";
static const char __pyx_k_q[] = "q";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_z[] = "z";
static const char __pyx_k_d1[] = "d1";
static const char __pyx_k_d2[] = "d2";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_3_0[] = "3.0";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_len[] = "__len__";
static const char __pyx_k_mu1[] = "mu1";
static const char __pyx_k_mu2[] = "mu2";
static const char __pyx_k_muj[] = "muj";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_fisx[] = "fisx";
static const char __pyx_k_flag[] = "flag";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_pair[] = "pair";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_PyXRF[] = "PyXRF";
static const char __pyx_k_angle[] = "angle";
static const char __pyx_k_array[] = "array";
static const char __pyx_k_funny[] = "funny";
static const char __pyx_k_label[] = "label";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_photo[] = "photo";
static const char __pyx_k_pymca[] = "pymca";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_shell[] = "shell";
static const char __pyx_k_PyMath[] = "PyMath";
static const char __pyx_k_PyMca5[] = "PyMca5";
static const char __pyx_k_energy[] = "energy";
static const char __pyx_k_filter[] = "filter";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_labels[] = "labels";
static const char __pyx_k_mu_1_j[] = "mu_1_j";
static const char __pyx_k_mu_2_j[] = "mu_2_j";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_sorted[] = "sorted";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_weight[] = "weight";
static const char __pyx_k_DataDir[] = "DataDir";
static const char __pyx_k_PyLayer[] = "PyLayer";
static const char __pyx_k_PyShell[] = "PyShell";
static const char __pyx_k_alphaIn[] = "alphaIn";
static const char __pyx_k_cascade[] = "cascade";
static const char __pyx_k_comment[] = "comment";
static const char __pyx_k_compton[] = "compton";
static const char __pyx_k_density[] = "density";
static const char __pyx_k_element[] = "element";
static const char __pyx_k_float64[] = "float64";
static const char __pyx_k_getName[] = "getName";
static const char __pyx_k_setBeam[] = "_setBeam";
static const char __pyx_k_toBytes[] = "toBytes";
static const char __pyx_k_version[] = "version";
static const char __pyx_k_weights[] = "weights";
static const char __pyx_k_PyEPDL97[] = "PyEPDL97";
static const char __pyx_k_alphaOut[] = "alphaOut";
static const char __pyx_k_coherent[] = "coherent";
static const char __pyx_k_energies[] = "energies";
static const char __pyx_k_fileName[] = "fileName";
static const char __pyx_k_function[] = "function";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_material[] = "material";
static const char __pyx_k_mu_b_d_t[] = "mu_b_d_t";
static const char __pyx_k_operator[] = "operator";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_subshell[] = "subshell";
static const char __pyx_k_toString[] = "toString";
static const char __pyx_k_PyElement[] = "PyElement";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_iteritems[] = "iteritems";
static const char __pyx_k_layerList[] = "layerList";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_secondary[] = "secondary";
static const char __pyx_k_thickness[] = "thickness";
static const char __pyx_k_PyDetector[] = "PyDetector";
static const char __pyx_k_PyElements[] = "PyElements";
static const char __pyx_k_PyMaterial[] = "PyMaterial";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_attenuator[] = "attenuator";
static const char __pyx_k_divergency[] = "divergency";
static const char __pyx_k_energyList[] = "energyList";
static const char __pyx_k_fisx__fisx[] = "fisx._fisx";
static const char __pyx_k_getComment[] = "getComment";
static const char __pyx_k_itemgetter[] = "itemgetter";
static const char __pyx_k_layerIndex[] = "layerIndex";
static const char __pyx_k_lineFamily[] = "lineFamily";
static const char __pyx_k_nThreshold[] = "nThreshold";
static const char __pyx_k_valuesDict[] = "valuesDict";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_PySimpleIni[] = "PySimpleIni";
static const char __pyx_k_composition[] = "composition";
static const char __pyx_k_elementDict[] = "elementDict";
static const char __pyx_k_elementList[] = "elementList";
static const char __pyx_k_elementName[] = "elementName";
static const char __pyx_k_elementsLib[] = "elementsLib";
static const char __pyx_k_fisxVersion[] = "fisxVersion";
static const char __pyx_k_getDataFile[] = "getDataFile";
static const char __pyx_k_sampleLayer[] = "sampleLayer";
static const char __pyx_k_toBytesKeys[] = "toBytesKeys";
static const char __pyx_k_transitions[] = "transitions";
static const char __pyx_k_PyMcaDataDir[] = "PyMcaDataDir";
static const char __pyx_k_distribution[] = "distribution";
static const char __pyx_k_materialName[] = "materialName";
static const char __pyx_k_nameOrVector[] = "nameOrVector";
static const char __pyx_k_toStringKeys[] = "toStringKeys";
static const char __pyx_k_toStringList[] = "toStringList";
static const char __pyx_k_transmission[] = "transmission";
static const char __pyx_k_version_info[] = "version_info";
static const char __pyx_k_FISX_DATA_DIR[] = "FISX_DATA_DIR";
static const char __pyx_k_directoryName[] = "directoryName";
static const char __pyx_k_mainShellName[] = "mainShellName";
static const char __pyx_k_massFractions[] = "massFractions";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_PYMCA_DATA_DIR[] = "PYMCA_DATA_DIR";
static const char __pyx_k_ShellRates_dat[] = "ShellRates.dat";
static const char __pyx_k_characteristic[] = "characteristic";
static const char __pyx_k_errorOnReplace[] = "errorOnReplace";
static const char __pyx_k_referenceLayer[] = "referenceLayer";
static const char __pyx_k_elementsLibrary[] = "elementsLibrary";
static const char __pyx_k_energyThreshold[] = "energyThreshold";
static const char __pyx_k_getPeakFamilies[] = "_getPeakFamilies";
static const char __pyx_k_scatteringAngle[] = "scatteringAngle";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_PySimpleSpecfile[] = "PySimpleSpecfile";
static const char __pyx_k_useMassFractions[] = "useMassFractions";
static const char __pyx_k_configurationFile[] = "configurationFile";
static const char __pyx_k_crossSectionsFile[] = "crossSectionsFile";
static const char __pyx_k_transmissionTable[] = "transmissionTable";
static const char __pyx_k_ShellConstants_dat[] = "ShellConstants.dat";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_elementFamilyLayer[] = "elementFamilyLayer";
static const char __pyx_k_intensityThreshold[] = "intensityThreshold";
static const char __pyx_k_BindingEnergies_dat[] = "BindingEnergies.dat";
static const char __pyx_k_PyTransmissionTable[] = "PyTransmissionTable";
static const char __pyx_k_bindingEnergiesFile[] = "bindingEnergiesFile";
static const char __pyx_k_setSingleEnergyBeam[] = "_setSingleEnergyBeam";
static const char __pyx_k_fisx_FisxCythonTools[] = "fisx.FisxCythonTools";
static const char __pyx_k_getExcitationFactors[] = "_getExcitationFactors";
static const char __pyx_k_getTransmissionTable[] = "getTransmissionTable";
static const char __pyx_k_initializeAsPyMcaOld[] = "__initializeAsPyMcaOld";
static const char __pyx_k_toBytesKeysAndValues[] = "toBytesKeysAndValues";
static const char __pyx_k_useFluorescenceYield[] = "useFluorescenceYield";
static const char __pyx_k_fillTransmissionTable[] = "_fillTransmissionTable";
static const char __pyx_k_getTransmissionSingle[] = "_getTransmissionSingle";
static const char __pyx_k_toStringKeysAndValues[] = "toStringKeysAndValues";
static const char __pyx_k_XCOM_CrossSections_dat[] = "XCOM_CrossSections.dat";
static const char __pyx_k_useGeometricEfficiency[] = "useGeometricEfficiency";
static const char __pyx_k_getTransmissionMultiple[] = "_getTransmissionMultiple";
static const char __pyx_k_pyTransmissionTableList[] = "pyTransmissionTableList";
static const char __pyx_k_python_cython__fisx_pyx[] = "python\\cython\\_fisx.pyx";
static const char __pyx_k_secondaryCalculationLimit[] = "secondaryCalculationLimit";
static const char __pyx_k_getMassAttenuationCoefficients[] = "_getMassAttenuationCoefficients";
static const char __pyx_k_Initialization_with_XCOM_mass_a[] = "\n\nInitialization with XCOM mass attenuation cross sections:\n\nimport os\nfrom fisx import DataDir\ndataDir = DataDir.FISX_DATA_DIR\nbindingEnergies = os.path.join(dataDir, \"BindingEnergies.dat\")\nxcomFile = os.path.join(dataDir, \"XCOM_CrossSections.dat\")\nxcom = Elements(dataDir, bindingEnergies, xcomFile)\n\n";
static const char __pyx_k_getCascadeModifiedVacancyDistri[] = "_getCascadeModifiedVacancyDistribution";
static const char __pyx_k_getDefaultMassAttenuationCoeffi[] = "_getDefaultMassAttenuationCoefficients";
static const char __pyx_k_getElementDefaultMassAttenuatio[] = "_getElementDefaultMassAttenuationCoefficients";
static const char __pyx_k_getMaterialMassAttenuationCoeff[] = "_getMaterialMassAttenuationCoefficients";
static const char __pyx_k_getMultipleMassAttenuationCoeff[] = "_getMultipleMassAttenuationCoefficients";
static const char __pyx_k_getMultiplePhotoelectricWeights[] = "_getMultiplePhotoelectricWeights";
static const char __pyx_k_getPeakFamiliesFromVectorOfElem[] = "_getPeakFamiliesFromVectorOfElements";
static const char __pyx_k_getXRayLinesFromVacancyDistribu[] = "_getXRayLinesFromVacancyDistribution";
static const char __pyx_k_Not_appropriate_input_type_or_le[] = "Not appropriate input type or length";
static const char __pyx_k_Please_specify_usage_as_filter_o[] = "Please specify usage as filter or as attenuator";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static PyObject *__pyx_kp_b_;
static PyObject *__pyx_kp_s_;
static PyObject *__pyx_kp_s_3;
static PyObject *__pyx_kp_s_3_0;
static PyObject *__pyx_kp_s_BindingEnergies_dat;
static PyObject *__pyx_n_s_DataDir;
static PyObject *__pyx_n_s_FISX_DATA_DIR;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_kp_s_Initialization_with_XCOM_mass_a;
static PyObject *__pyx_n_s_K;
static PyObject *__pyx_n_s_L;
static PyObject *__pyx_n_s_M;
static PyObject *__pyx_kp_s_Not_appropriate_input_type_or_le;
static PyObject *__pyx_n_s_PYMCA_DATA_DIR;
static PyObject *__pyx_kp_s_Please_specify_usage_as_filter_o;
static PyObject *__pyx_n_s_PyDetector;
static PyObject *__pyx_n_s_PyEPDL97;
static PyObject *__pyx_n_s_PyElement;
static PyObject *__pyx_n_s_PyElements;
static PyObject *__pyx_n_s_PyLayer;
static PyObject *__pyx_n_s_PyMaterial;
static PyObject *__pyx_n_s_PyMath;
static PyObject *__pyx_n_s_PyMca5;
static PyObject *__pyx_n_s_PyMcaDataDir;
static PyObject *__pyx_n_s_PyShell;
static PyObject *__pyx_n_s_PySimpleIni;
static PyObject *__pyx_n_s_PySimpleSpecfile;
static PyObject *__pyx_n_s_PyTransmissionTable;
static PyObject *__pyx_n_s_PyXRF;
static PyObject *__pyx_kp_s_ShellConstants_dat;
static PyObject *__pyx_kp_s_ShellRates_dat;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_kp_s_XCOM_CrossSections_dat;
static PyObject *__pyx_n_s_alphaIn;
static PyObject *__pyx_n_s_alphaOut;
static PyObject *__pyx_n_s_angle;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_n_s_attenuator;
static PyObject *__pyx_n_s_bindingEnergiesFile;
static PyObject *__pyx_n_s_cascade;
static PyObject *__pyx_n_s_characteristic;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_coherent;
static PyObject *__pyx_n_s_comment;
static PyObject *__pyx_n_s_composition;
static PyObject *__pyx_n_s_compton;
static PyObject *__pyx_n_s_configurationFile;
static PyObject *__pyx_n_s_crossSectionsFile;
static PyObject *__pyx_n_s_d1;
static PyObject *__pyx_n_s_d2;
static PyObject *__pyx_n_s_density;
static PyObject *__pyx_n_s_directoryName;
static PyObject *__pyx_n_s_distribution;
static PyObject *__pyx_n_s_divergency;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_element;
static PyObject *__pyx_n_s_elementDict;
static PyObject *__pyx_n_s_elementFamilyLayer;
static PyObject *__pyx_n_s_elementList;
static PyObject *__pyx_n_s_elementName;
static PyObject *__pyx_n_s_elementsLib;
static PyObject *__pyx_n_s_elementsLibrary;
static PyObject *__pyx_n_s_energies;
static PyObject *__pyx_n_s_energy;
static PyObject *__pyx_n_s_energyList;
static PyObject *__pyx_n_s_energyThreshold;
static PyObject *__pyx_n_s_errorOnReplace;
static PyObject *__pyx_n_s_fileName;
static PyObject *__pyx_n_s_fillTransmissionTable;
static PyObject *__pyx_n_s_filter;
static PyObject *__pyx_n_s_fisx;
static PyObject *__pyx_n_s_fisxVersion;
static PyObject *__pyx_n_s_fisx_FisxCythonTools;
static PyObject *__pyx_n_s_fisx__fisx;
static PyObject *__pyx_n_s_flag;
static PyObject *__pyx_n_s_float64;
static PyObject *__pyx_n_s_function;
static PyObject *__pyx_n_s_funny;
static PyObject *__pyx_n_s_getCascadeModifiedVacancyDistri;
static PyObject *__pyx_n_s_getComment;
static PyObject *__pyx_n_s_getDataFile;
static PyObject *__pyx_n_s_getDefaultMassAttenuationCoeffi;
static PyObject *__pyx_n_s_getElementDefaultMassAttenuatio;
static PyObject *__pyx_n_s_getExcitationFactors;
static PyObject *__pyx_n_s_getMassAttenuationCoefficients;
static PyObject *__pyx_n_s_getMaterialMassAttenuationCoeff;
static PyObject *__pyx_n_s_getMultipleMassAttenuationCoeff;
static PyObject *__pyx_n_s_getMultiplePhotoelectricWeights;
static PyObject *__pyx_n_s_getName;
static PyObject *__pyx_n_s_getPeakFamilies;
static PyObject *__pyx_n_s_getPeakFamiliesFromVectorOfElem;
static PyObject *__pyx_n_s_getTransmissionMultiple;
static PyObject *__pyx_n_s_getTransmissionSingle;
static PyObject *__pyx_n_s_getTransmissionTable;
static PyObject *__pyx_n_s_getXRayLinesFromVacancyDistribu;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_initializeAsPyMcaOld;
static PyObject *__pyx_n_s_intensityThreshold;
static PyObject *__pyx_n_s_itemgetter;
static PyObject *__pyx_n_s_iteritems;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_s_label;
static PyObject *__pyx_n_s_labels;
static PyObject *__pyx_n_s_layerIndex;
static PyObject *__pyx_n_s_layerList;
static PyObject *__pyx_n_s_len;
static PyObject *__pyx_n_s_lineFamily;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_mainShellName;
static PyObject *__pyx_n_s_massFractions;
static PyObject *__pyx_n_s_material;
static PyObject *__pyx_n_s_materialName;
static PyObject *__pyx_n_s_mu1;
static PyObject *__pyx_n_s_mu2;
static PyObject *__pyx_n_s_mu_1_j;
static PyObject *__pyx_n_s_mu_2_j;
static PyObject *__pyx_n_s_mu_b_d_t;
static PyObject *__pyx_n_s_muj;
static PyObject *__pyx_n_s_n;
static PyObject *__pyx_n_s_nThreshold;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_nameOrVector;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_n_s_operator;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_p;
static PyObject *__pyx_n_s_pair;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_photo;
static PyObject *__pyx_n_s_pyTransmissionTableList;
static PyObject *__pyx_n_s_pymca;
static PyObject *__pyx_kp_s_python_cython__fisx_pyx;
static PyObject *__pyx_n_s_q;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_referenceLayer;
static PyObject *__pyx_n_s_sampleLayer;
static PyObject *__pyx_n_s_scatteringAngle;
static PyObject *__pyx_n_s_secondary;
static PyObject *__pyx_n_s_secondaryCalculationLimit;
static PyObject *__pyx_n_s_setBeam;
static PyObject *__pyx_n_s_setSingleEnergyBeam;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_shell;
static PyObject *__pyx_n_s_sorted;
static PyObject *__pyx_n_s_subshell;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_thickness;
static PyObject *__pyx_n_s_toBytes;
static PyObject *__pyx_n_s_toBytesKeys;
static PyObject *__pyx_n_s_toBytesKeysAndValues;
static PyObject *__pyx_n_s_toString;
static PyObject *__pyx_n_s_toStringKeys;
static PyObject *__pyx_n_s_toStringKeysAndValues;
static PyObject *__pyx_n_s_toStringList;
static PyObject *__pyx_n_s_transitions;
static PyObject *__pyx_n_s_transmission;
static PyObject *__pyx_n_s_transmissionTable;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_useFluorescenceYield;
static PyObject *__pyx_n_s_useGeometricEfficiency;
static PyObject *__pyx_n_s_useMassFractions;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_valuesDict;
static PyObject *__pyx_n_s_version;
static PyObject *__pyx_n_s_version_info;
static PyObject *__pyx_n_s_weight;
static PyObject *__pyx_n_s_weights;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_n_s_z;
static int __pyx_pf_4fisx_5_fisx_10PyDetector___cinit__(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, PyObject *__pyx_v_materialName, double __pyx_v_density, double __pyx_v_thickness, double __pyx_v_funny); /* proto */
static void __pyx_pf_4fisx_5_fisx_10PyDetector_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_4getTransmission(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, PyObject *__pyx_v_energies, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib, double __pyx_v_angle); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_6setActiveArea(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, double __pyx_v_area); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_8setDiameter(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, double __pyx_v_value); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_10getActiveArea(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_12getDiameter(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_14setDistance(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, double __pyx_v_value); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_16getDistance(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_18setMaximumNumberOfEscapePeaks(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, int __pyx_v_n); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_20getEscape(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, double __pyx_v_energy, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib, PyObject *__pyx_v_label, int __pyx_v_update); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_22getEscapePeakEnergyThreshold(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_24getEscapePeakIntensityThreshold(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_26getEscapePeakNThreshold(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_28getEscapePeakAlphaIn(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_30getThickness(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_32getDensity(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_34getComposition(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_36__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_38__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4fisx_5_fisx_9PyElement___cinit__(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_z); /* proto */
static void __pyx_pf_4fisx_5_fisx_9PyElement_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_4setName(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_6setAtomicNumber(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, int __pyx_v_z); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_8getAtomicNumber(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_10setBindingEnergies(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, std::map<std::string,double>  __pyx_v_energies); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_12getBindingEnergies(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_14setMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, std::vector<double>  __pyx_v_energies, std::vector<double>  __pyx_v_photo, std::vector<double>  __pyx_v_coherent, std::vector<double>  __pyx_v_compton, std::vector<double>  __pyx_v_pair); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_16_getDefaultMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_18_getSingleMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, double __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_20getMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_22_getMultipleMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, std::vector<double>  __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_24setRadiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_shell, std::vector<std::string>  __pyx_v_labels, std::vector<double>  __pyx_v_values); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_26getRadiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_shell); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_28setNonradiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_shell, std::vector<std::string>  __pyx_v_labels, std::vector<double>  __pyx_v_values); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_30getNonradiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_shell); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_32setShellConstants(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_shell, std::map<std::string,double>  __pyx_v_valuesDict); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_34getShellConstants(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_shell); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_36getXRayLinesFromVacancyDistribution(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, std::map<std::string,double>  __pyx_v_vacancyDict); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_38__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_40__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4fisx_5_fisx_10PyElements___cinit__(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_directoryName, PyObject *__pyx_v_bindingEnergiesFile, PyObject *__pyx_v_crossSectionsFile, PyObject *__pyx_v_pymca); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_2initializeAsPyMca(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_4__initializeAsPyMcaOld(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_6getElementNames(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_8getAtomicMass(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_element); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_10getAtomicNumber(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_element); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_12getDensity(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_element); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_14getLongName(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_element); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_16getColumn(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_element); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_18getRow(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_element); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_20getMaterialNames(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_22getComposition(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_materialOrFormula); /* proto */
static void __pyx_pf_4fisx_5_fisx_10PyElements_24__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_26addMaterial(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_material, int __pyx_v_errorOnReplace); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_28setShellConstantsFile(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_mainShellName, PyObject *__pyx_v_fileName); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_30getShellConstantsFile(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_mainShellName); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_32setShellRadiativeTransitionsFile(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_mainShellName, PyObject *__pyx_v_fileName); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_34getShellRadiativeTransitionsFile(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_mainShellName); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_36getShellNonradiativeTransitionsFile(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_mainShellName); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_38setMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_element, std::vector<double>  __pyx_v_energies, std::vector<double>  __pyx_v_photo, std::vector<double>  __pyx_v_coherent, std::vector<double>  __pyx_v_compton, std::vector<double>  __pyx_v_pair); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_40setMassAttenuationCoefficientsFile(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_crossSectionsFile); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_42_getSingleMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_element, double __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_44_getElementDefaultMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_element); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_46getElementMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_element, PyObject *__pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_48_getMultipleMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_element, std::vector<double>  __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_50getMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_52getExcitationFactors(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_energy, PyObject *__pyx_v_weight); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_54_getMaterialMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementDict, PyObject *__pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_56_getMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::map<std::string,double>  __pyx_v_elementDict, std::vector<double>  __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_58_getExcitationFactors(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_element, std::vector<double>  __pyx_v_energies, std::vector<double>  __pyx_v_weights); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_60getPeakFamilies(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_nameOrVector, PyObject *__pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_62_getPeakFamilies(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_name, double __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_64_getPeakFamiliesFromVectorOfElements(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::vector<std::string>  __pyx_v_elementList, double __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_66getBindingEnergies(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_68getEscape(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_composition, double __pyx_v_energy, double __pyx_v_energyThreshold, double __pyx_v_intensityThreshold, int __pyx_v_nThreshold, double __pyx_v_alphaIn, double __pyx_v_thickness); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_70updateEscapeCache(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_composition, std::vector<double>  __pyx_v_energyList, double __pyx_v_energyThreshold, double __pyx_v_intensityThreshold, int __pyx_v_nThreshold, double __pyx_v_alphaIn, double __pyx_v_thickness); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_72getShellConstants(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, PyObject *__pyx_v_subshell); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_74getEmittedXRayLines(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, double __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_76getRadiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, PyObject *__pyx_v_subshell); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_78getNonradiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, PyObject *__pyx_v_subshell); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_80setElementCascadeCacheEnabled(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, int __pyx_v_flag); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_82emptyElementCascadeCache(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_84fillCache(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, std::vector<double>  __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_86updateCache(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, std::vector<double>  __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_88setCacheEnabled(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, int __pyx_v_flag); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_90setEscapeCacheEnabled(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, int __pyx_v_flag); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_92clearCache(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_94isCacheEnabled(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_96isEscapeCacheEnabled(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_98getCacheSize(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_100removeMaterials(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_102getInitialPhotoelectricVacancyDistribution(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, PyObject *__pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_104getCascadeModifiedVacancyDistribution(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, PyObject *__pyx_v_distribution); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_106_getCascadeModifiedVacancyDistribution(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_elementName, std::map<std::string,double>  __pyx_v_distribution); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_108getXRayLinesFromVacancyDistribution(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, PyObject *__pyx_v_distribution, PyObject *__pyx_v_cascade, PyObject *__pyx_v_useFluorescenceYield); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_110_getXRayLinesFromVacancyDistribution(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_elementName, std::map<std::string,double>  __pyx_v_distribution, int __pyx_v_cascade, int __pyx_v_useFluorescenceYield); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_112__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_114__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4fisx_5_fisx_8PyEPDL97___cinit__(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static void __pyx_pf_4fisx_5_fisx_8PyEPDL97_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_4setDataDirectory(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_6setBindingEnergies(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, int __pyx_v_z, std::map<std::string,double>  __pyx_v_energies); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_8getBindingEnergies(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, int __pyx_v_z); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_10getMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, PyObject *__pyx_v_z, PyObject *__pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_12_getDefaultMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, int __pyx_v_z); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_14_getSingleMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, int __pyx_v_z, double __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_16_getMultipleMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, int __pyx_v_z, std::vector<double>  __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_18getPhotoelectricWeights(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, PyObject *__pyx_v_z, PyObject *__pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_20_getSinglePhotoelectricWeights(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, int __pyx_v_z, double __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_22_getMultiplePhotoelectricWeights(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, int __pyx_v_z, std::vector<double>  __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4fisx_5_fisx_7PyLayer___cinit__(struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self, PyObject *__pyx_v_materialName, double __pyx_v_density, double __pyx_v_thickness, double __pyx_v_funny); /* proto */
static void __pyx_pf_4fisx_5_fisx_7PyLayer_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyLayer_4getComposition(struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyLayer_6getTransmission(struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self, PyObject *__pyx_v_energies, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib, double __pyx_v_angle); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyLayer_8setMaterial(struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self, struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_material); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyLayer_10getPeakFamilies(struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self, double __pyx_v_energy, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyLayer_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyLayer_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4fisx_5_fisx_10PyMaterial___cinit__(struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self, PyObject *__pyx_v_materialName, double __pyx_v_density, double __pyx_v_thickness, PyObject *__pyx_v_comment); /* proto */
static void __pyx_pf_4fisx_5_fisx_10PyMaterial_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyMaterial_4getName(struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyMaterial_6setName(struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyMaterial_8setCompositionFromLists(struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self, PyObject *__pyx_v_elementList, std::vector<double>  __pyx_v_massFractions); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyMaterial_10setComposition(struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self, PyObject *__pyx_v_composition); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyMaterial_12getComposition(struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyMaterial_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_10PyMaterial_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4fisx_5_fisx_6PyMath___cinit__(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self); /* proto */
static void __pyx_pf_4fisx_5_fisx_6PyMath_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_4E1(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_6En(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, int __pyx_v_n, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_8deBoerD(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_10deBoerL0(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, double __pyx_v_mu1, double __pyx_v_mu2, double __pyx_v_muj, double __pyx_v_density, double __pyx_v_thickness); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_12deBoerX(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, double __pyx_v_p, double __pyx_v_q, double __pyx_v_d1, double __pyx_v_d2, double __pyx_v_mu_1_j, double __pyx_v_mu_2_j, double __pyx_v_mu_b_d_t); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_14erf(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_16erfc(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4fisx_5_fisx_7PyShell___cinit__(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static void __pyx_pf_4fisx_5_fisx_7PyShell_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_4setRadiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self, PyObject *__pyx_v_transitions, std::vector<double>  __pyx_v_values); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_6setNonradiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self, PyObject *__pyx_v_transitions, std::vector<double>  __pyx_v_values); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_8getAugerRatios(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_10getCosterKronigRatios(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_12getFluorescenceRatios(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_14getRadiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_16getNonradiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_18getDirectVacancyTransferRatios(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self, PyObject *__pyx_v_subshell); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_20setShellConstants(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self, PyObject *__pyx_v_shellConstants); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_22getShellConstants(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4fisx_5_fisx_11PySimpleIni___cinit__(struct __pyx_obj_4fisx_5_fisx_PySimpleIni *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static void __pyx_pf_4fisx_5_fisx_11PySimpleIni_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PySimpleIni *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_11PySimpleIni_4getKeys(struct __pyx_obj_4fisx_5_fisx_PySimpleIni *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_11PySimpleIni_6readKey(struct __pyx_obj_4fisx_5_fisx_PySimpleIni *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_11PySimpleIni_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PySimpleIni *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_11PySimpleIni_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PySimpleIni *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4fisx_5_fisx_16PySimpleSpecfile___cinit__(struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static void __pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_4getNumberOfScans(struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_6getScanLabels(struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *__pyx_v_self, int __pyx_v_scanIndex); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_8getScanData(struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *__pyx_v_self, int __pyx_v_scanIndex); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4fisx_5_fisx_19PyTransmissionTable___cinit__(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self); /* proto */
static void __pyx_pf_4fisx_5_fisx_19PyTransmissionTable_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_4getName(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_6setName(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_8getComment(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_10setComment(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, PyObject *__pyx_v_comment); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_12setTransmissionTableFromLists(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, std::vector<double>  __pyx_v_energy, std::vector<double>  __pyx_v_transmission, PyObject *__pyx_v_name, PyObject *__pyx_v_comment); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_14setTransmissionTable(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, std::map<double,double>  __pyx_v_transmissionTable, PyObject *__pyx_v_name, PyObject *__pyx_v_comment); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_16getTransmissionTable(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_18getTransmission(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, PyObject *__pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_20_getTransmissionSingle(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, double __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_22_getTransmissionMultiple(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, std::vector<double>  __pyx_v_energy); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_fisxVersion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_4fisx_5_fisx_5PyXRF___cinit__(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, std::string __pyx_v_configurationFile); /* proto */
static void __pyx_pf_4fisx_5_fisx_5PyXRF_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_4readConfigurationFromFile(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, std::string __pyx_v_fileName); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_6setBeam(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_energies, PyObject *__pyx_v_weights, PyObject *__pyx_v_characteristic, PyObject *__pyx_v_divergency); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_8_setSingleEnergyBeam(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, double __pyx_v_energy, double __pyx_v_divergency); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_10_setBeam(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, std::vector<double>  __pyx_v_energies, std::vector<double>  __pyx_v_weights, std::vector<int>  __pyx_v_characteristic, std::vector<double>  __pyx_v_divergency); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_12setBeamFilters(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_layerList); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_14setUserBeamFilters(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_pyTransmissionTableList); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_16_fillTransmissionTable(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_pyTransmissionTableList, PyObject *__pyx_v_function); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_18setSample(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_layerList, PyObject *__pyx_v_referenceLayer); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_20setAttenuators(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_layerList); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_22setUserAttenuators(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_pyTransmissionTableList); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_24setDetector(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_detector); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_26setGeometry(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, double __pyx_v_alphaIn, double __pyx_v_alphaOut, double __pyx_v_scatteringAngle); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_28getMultilayerFluorescence(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_elementFamilyLayer, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLibrary, int __pyx_v_secondary, int __pyx_v_useGeometricEfficiency, int __pyx_v_useMassFractions, PyObject *__pyx_v_secondaryCalculationLimit); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_30getFluorescence(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_elementName, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLibrary, int __pyx_v_sampleLayer, PyObject *__pyx_v_lineFamily, int __pyx_v_secondary, int __pyx_v_useGeometricEfficiency, int __pyx_v_useMassFractions, double __pyx_v_secondaryCalculationLimit); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_32getGeometricEfficiency(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, int __pyx_v_layerIndex); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_34__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_36__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_4fisx_5_fisx_PyDetector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4fisx_5_fisx_PyElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4fisx_5_fisx_PyElements(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4fisx_5_fisx_PyEPDL97(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4fisx_5_fisx_PyLayer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4fisx_5_fisx_PyMaterial(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4fisx_5_fisx_PyMath(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4fisx_5_fisx_PyShell(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4fisx_5_fisx_PySimpleIni(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4fisx_5_fisx_PySimpleSpecfile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4fisx_5_fisx_PyTransmissionTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4fisx_5_fisx_PyXRF(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_float_0_0;
static PyObject *__pyx_float_1_0;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_3;
static std::string __pyx_k__26;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_codeobj__31;
/* Late includes */

/* "python/cython/_fisx.pyx":44
 *     cdef Detector *thisptr
 * 
 *     def __cinit__(self, materialName, double density=1.0, double thickness=1.0, double funny=1.0):             # <<<<<<<<<<<<<<
 *         self.thisptr = new Detector(toBytes(materialName), density, thickness, funny)
 * 
 */

/* Python wrapper */
static int __pyx_pw_4fisx_5_fisx_10PyDetector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4fisx_5_fisx_10PyDetector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_materialName = 0;
  double __pyx_v_density;
  double __pyx_v_thickness;
  double __pyx_v_funny;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_materialName,&__pyx_n_s_density,&__pyx_n_s_thickness,&__pyx_n_s_funny,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_materialName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_thickness);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_funny);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 44, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_materialName = values[0];
    if (values[1]) {
      __pyx_v_density = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_density == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 44, __pyx_L3_error)
    } else {
      __pyx_v_density = ((double)1.0);
    }
    if (values[2]) {
      __pyx_v_thickness = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_thickness == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 44, __pyx_L3_error)
    } else {
      __pyx_v_thickness = ((double)1.0);
    }
    if (values[3]) {
      __pyx_v_funny = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_funny == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 44, __pyx_L3_error)
    } else {
      __pyx_v_funny = ((double)1.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 44, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyDetector.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector___cinit__(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self), __pyx_v_materialName, __pyx_v_density, __pyx_v_thickness, __pyx_v_funny);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4fisx_5_fisx_10PyDetector___cinit__(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, PyObject *__pyx_v_materialName, double __pyx_v_density, double __pyx_v_thickness, double __pyx_v_funny) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  fisx::Detector *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "python/cython/_fisx.pyx":45
 * 
 *     def __cinit__(self, materialName, double density=1.0, double thickness=1.0, double funny=1.0):
 *         self.thisptr = new Detector(toBytes(materialName), density, thickness, funny)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_materialName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_materialName);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_5 = new fisx::Detector(__pyx_t_4, __pyx_v_density, __pyx_v_thickness, __pyx_v_funny);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 45, __pyx_L1_error)
  }
  __pyx_v_self->thisptr = __pyx_t_5;

  /* "python/cython/_fisx.pyx":44
 *     cdef Detector *thisptr
 * 
 *     def __cinit__(self, materialName, double density=1.0, double thickness=1.0, double funny=1.0):             # <<<<<<<<<<<<<<
 *         self.thisptr = new Detector(toBytes(materialName), density, thickness, funny)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyDetector.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":47
 *         self.thisptr = new Detector(toBytes(materialName), density, thickness, funny)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_4fisx_5_fisx_10PyDetector_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4fisx_5_fisx_10PyDetector_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4fisx_5_fisx_10PyDetector_2__dealloc__(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4fisx_5_fisx_10PyDetector_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "python/cython/_fisx.pyx":48
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     def getTransmission(self, energies, PyElements elementsLib, double angle=90.):
 */
  delete __pyx_v_self->thisptr;

  /* "python/cython/_fisx.pyx":47
 *         self.thisptr = new Detector(toBytes(materialName), density, thickness, funny)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "python/cython/_fisx.pyx":50
 *         del self.thisptr
 * 
 *     def getTransmission(self, energies, PyElements elementsLib, double angle=90.):             # <<<<<<<<<<<<<<
 *         if not hasattr(energies, "__len__"):
 *             energies = numpy.array([energies], numpy.float64)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_5getTransmission(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_5getTransmission(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_energies = 0;
  struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib = 0;
  double __pyx_v_angle;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTransmission (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_energies,&__pyx_n_s_elementsLib,&__pyx_n_s_angle,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energies)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementsLib)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getTransmission", 0, 2, 3, 1); __PYX_ERR(1, 50, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_angle);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getTransmission") < 0)) __PYX_ERR(1, 50, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_energies = values[0];
    __pyx_v_elementsLib = ((struct __pyx_obj_4fisx_5_fisx_PyElements *)values[1]);
    if (values[2]) {
      __pyx_v_angle = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_angle == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 50, __pyx_L3_error)
    } else {
      __pyx_v_angle = ((double)90.);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getTransmission", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 50, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyDetector.getTransmission", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementsLib), __pyx_ptype_4fisx_5_fisx_PyElements, 1, "elementsLib", 0))) __PYX_ERR(1, 50, __pyx_L1_error)
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_4getTransmission(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self), __pyx_v_energies, __pyx_v_elementsLib, __pyx_v_angle);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_4getTransmission(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, PyObject *__pyx_v_energies, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib, double __pyx_v_angle) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  std::vector<double>  __pyx_t_10;
  std::vector<double>  __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getTransmission", 0);
  __Pyx_INCREF(__pyx_v_energies);

  /* "python/cython/_fisx.pyx":51
 * 
 *     def getTransmission(self, energies, PyElements elementsLib, double angle=90.):
 *         if not hasattr(energies, "__len__"):             # <<<<<<<<<<<<<<
 *             energies = numpy.array([energies], numpy.float64)
 *         return self.thisptr.getTransmission(energies, deref(elementsLib.thisptr), angle)
 */
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_energies, __pyx_n_s_len); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 51, __pyx_L1_error)
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":52
 *     def getTransmission(self, energies, PyElements elementsLib, double angle=90.):
 *         if not hasattr(energies, "__len__"):
 *             energies = numpy.array([energies], numpy.float64)             # <<<<<<<<<<<<<<
 *         return self.thisptr.getTransmission(energies, deref(elementsLib.thisptr), angle)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_energies);
    __Pyx_GIVEREF(__pyx_v_energies);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_energies);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 52, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 52, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_7);
      __pyx_t_4 = 0;
      __pyx_t_7 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_energies, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "python/cython/_fisx.pyx":51
 * 
 *     def getTransmission(self, energies, PyElements elementsLib, double angle=90.):
 *         if not hasattr(energies, "__len__"):             # <<<<<<<<<<<<<<
 *             energies = numpy.array([energies], numpy.float64)
 *         return self.thisptr.getTransmission(energies, deref(elementsLib.thisptr), angle)
 */
  }

  /* "python/cython/_fisx.pyx":53
 *         if not hasattr(energies, "__len__"):
 *             energies = numpy.array([energies], numpy.float64)
 *         return self.thisptr.getTransmission(energies, deref(elementsLib.thisptr), angle)             # <<<<<<<<<<<<<<
 * 
 *     def setActiveArea(self, double area):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_10 = __pyx_convert_vector_from_py_double(__pyx_v_energies); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 53, __pyx_L1_error)
  try {
    __pyx_t_11 = __pyx_v_self->thisptr->getTransmission(__pyx_t_10, (*__pyx_v_elementsLib->thisptr), __pyx_v_angle);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 53, __pyx_L1_error)
  }
  __pyx_t_3 = __pyx_convert_vector_to_py_double(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":50
 *         del self.thisptr
 * 
 *     def getTransmission(self, energies, PyElements elementsLib, double angle=90.):             # <<<<<<<<<<<<<<
 *         if not hasattr(energies, "__len__"):
 *             energies = numpy.array([energies], numpy.float64)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("fisx._fisx.PyDetector.getTransmission", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_energies);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":55
 *         return self.thisptr.getTransmission(energies, deref(elementsLib.thisptr), angle)
 * 
 *     def setActiveArea(self, double area):             # <<<<<<<<<<<<<<
 *         self.thisptr.setActiveArea(area)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_7setActiveArea(PyObject *__pyx_v_self, PyObject *__pyx_arg_area); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_7setActiveArea(PyObject *__pyx_v_self, PyObject *__pyx_arg_area) {
  double __pyx_v_area;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setActiveArea (wrapper)", 0);
  assert(__pyx_arg_area); {
    __pyx_v_area = __pyx_PyFloat_AsDouble(__pyx_arg_area); if (unlikely((__pyx_v_area == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 55, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyDetector.setActiveArea", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_6setActiveArea(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self), ((double)__pyx_v_area));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_6setActiveArea(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, double __pyx_v_area) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setActiveArea", 0);

  /* "python/cython/_fisx.pyx":56
 * 
 *     def setActiveArea(self, double area):
 *         self.thisptr.setActiveArea(area)             # <<<<<<<<<<<<<<
 * 
 *     def setDiameter(self, double value):
 */
  try {
    __pyx_v_self->thisptr->setActiveArea(__pyx_v_area);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 56, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":55
 *         return self.thisptr.getTransmission(energies, deref(elementsLib.thisptr), angle)
 * 
 *     def setActiveArea(self, double area):             # <<<<<<<<<<<<<<
 *         self.thisptr.setActiveArea(area)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyDetector.setActiveArea", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":58
 *         self.thisptr.setActiveArea(area)
 * 
 *     def setDiameter(self, double value):             # <<<<<<<<<<<<<<
 *         self.thisptr.setDiameter(value)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_9setDiameter(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_9setDiameter(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  double __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setDiameter (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __pyx_PyFloat_AsDouble(__pyx_arg_value); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 58, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyDetector.setDiameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_8setDiameter(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self), ((double)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_8setDiameter(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, double __pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setDiameter", 0);

  /* "python/cython/_fisx.pyx":59
 * 
 *     def setDiameter(self, double value):
 *         self.thisptr.setDiameter(value)             # <<<<<<<<<<<<<<
 * 
 *     def getActiveArea(self):
 */
  try {
    __pyx_v_self->thisptr->setDiameter(__pyx_v_value);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 59, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":58
 *         self.thisptr.setActiveArea(area)
 * 
 *     def setDiameter(self, double value):             # <<<<<<<<<<<<<<
 *         self.thisptr.setDiameter(value)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyDetector.setDiameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":61
 *         self.thisptr.setDiameter(value)
 * 
 *     def getActiveArea(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getActiveArea()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_11getActiveArea(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_11getActiveArea(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getActiveArea (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_10getActiveArea(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_10getActiveArea(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getActiveArea", 0);

  /* "python/cython/_fisx.pyx":62
 * 
 *     def getActiveArea(self):
 *         return self.thisptr.getActiveArea()             # <<<<<<<<<<<<<<
 * 
 *     def getDiameter(self):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getActiveArea();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 62, __pyx_L1_error)
  }
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":61
 *         self.thisptr.setDiameter(value)
 * 
 *     def getActiveArea(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getActiveArea()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyDetector.getActiveArea", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":64
 *         return self.thisptr.getActiveArea()
 * 
 *     def getDiameter(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getDiameter()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_13getDiameter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_13getDiameter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDiameter (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_12getDiameter(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_12getDiameter(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getDiameter", 0);

  /* "python/cython/_fisx.pyx":65
 * 
 *     def getDiameter(self):
 *         return self.thisptr.getDiameter()             # <<<<<<<<<<<<<<
 * 
 *     def setDistance(self, double value):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getDiameter();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 65, __pyx_L1_error)
  }
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":64
 *         return self.thisptr.getActiveArea()
 * 
 *     def getDiameter(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getDiameter()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyDetector.getDiameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":67
 *         return self.thisptr.getDiameter()
 * 
 *     def setDistance(self, double value):             # <<<<<<<<<<<<<<
 *         self.thisptr.setDistance(value)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_15setDistance(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_15setDistance(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  double __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setDistance (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __pyx_PyFloat_AsDouble(__pyx_arg_value); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 67, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyDetector.setDistance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_14setDistance(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self), ((double)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_14setDistance(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, double __pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setDistance", 0);

  /* "python/cython/_fisx.pyx":68
 * 
 *     def setDistance(self, double value):
 *         self.thisptr.setDistance(value)             # <<<<<<<<<<<<<<
 * 
 *     def getDistance(self):
 */
  try {
    __pyx_v_self->thisptr->setDistance(__pyx_v_value);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 68, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":67
 *         return self.thisptr.getDiameter()
 * 
 *     def setDistance(self, double value):             # <<<<<<<<<<<<<<
 *         self.thisptr.setDistance(value)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyDetector.setDistance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":70
 *         self.thisptr.setDistance(value)
 * 
 *     def getDistance(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getDistance()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_17getDistance(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_17getDistance(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDistance (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_16getDistance(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_16getDistance(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getDistance", 0);

  /* "python/cython/_fisx.pyx":71
 * 
 *     def getDistance(self):
 *         return self.thisptr.getDistance()             # <<<<<<<<<<<<<<
 * 
 *     def setMaximumNumberOfEscapePeaks(self, int n):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getDistance();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 71, __pyx_L1_error)
  }
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":70
 *         self.thisptr.setDistance(value)
 * 
 *     def getDistance(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getDistance()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyDetector.getDistance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":73
 *         return self.thisptr.getDistance()
 * 
 *     def setMaximumNumberOfEscapePeaks(self, int n):             # <<<<<<<<<<<<<<
 *         self.thisptr.setMaximumNumberOfEscapePeaks(n)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_19setMaximumNumberOfEscapePeaks(PyObject *__pyx_v_self, PyObject *__pyx_arg_n); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_19setMaximumNumberOfEscapePeaks(PyObject *__pyx_v_self, PyObject *__pyx_arg_n) {
  int __pyx_v_n;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setMaximumNumberOfEscapePeaks (wrapper)", 0);
  assert(__pyx_arg_n); {
    __pyx_v_n = __Pyx_PyInt_As_int(__pyx_arg_n); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 73, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyDetector.setMaximumNumberOfEscapePeaks", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_18setMaximumNumberOfEscapePeaks(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self), ((int)__pyx_v_n));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_18setMaximumNumberOfEscapePeaks(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, int __pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setMaximumNumberOfEscapePeaks", 0);

  /* "python/cython/_fisx.pyx":74
 * 
 *     def setMaximumNumberOfEscapePeaks(self, int n):
 *         self.thisptr.setMaximumNumberOfEscapePeaks(n)             # <<<<<<<<<<<<<<
 * 
 *     def getEscape(self, double energy, PyElements elementsLib, label="", int update=1):
 */
  try {
    __pyx_v_self->thisptr->setMaximumNumberOfEscapePeaks(__pyx_v_n);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 74, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":73
 *         return self.thisptr.getDistance()
 * 
 *     def setMaximumNumberOfEscapePeaks(self, int n):             # <<<<<<<<<<<<<<
 *         self.thisptr.setMaximumNumberOfEscapePeaks(n)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyDetector.setMaximumNumberOfEscapePeaks", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":76
 *         self.thisptr.setMaximumNumberOfEscapePeaks(n)
 * 
 *     def getEscape(self, double energy, PyElements elementsLib, label="", int update=1):             # <<<<<<<<<<<<<<
 *         label_ = toBytes(label)
 *         if sys.version < "3.0":
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_21getEscape(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_21getEscape(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_energy;
  struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib = 0;
  PyObject *__pyx_v_label = 0;
  int __pyx_v_update;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEscape (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_energy,&__pyx_n_s_elementsLib,&__pyx_n_s_label,&__pyx_n_s_update,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)__pyx_kp_s_);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementsLib)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getEscape", 0, 2, 4, 1); __PYX_ERR(1, 76, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_label);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_update);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEscape") < 0)) __PYX_ERR(1, 76, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_energy = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_energy == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 76, __pyx_L3_error)
    __pyx_v_elementsLib = ((struct __pyx_obj_4fisx_5_fisx_PyElements *)values[1]);
    __pyx_v_label = values[2];
    if (values[3]) {
      __pyx_v_update = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_update == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 76, __pyx_L3_error)
    } else {
      __pyx_v_update = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getEscape", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 76, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyDetector.getEscape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementsLib), __pyx_ptype_4fisx_5_fisx_PyElements, 1, "elementsLib", 0))) __PYX_ERR(1, 76, __pyx_L1_error)
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_20getEscape(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self), __pyx_v_energy, __pyx_v_elementsLib, __pyx_v_label, __pyx_v_update);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_20getEscape(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, double __pyx_v_energy, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib, PyObject *__pyx_v_label, int __pyx_v_update) {
  PyObject *__pyx_v_label_ = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  std::string __pyx_t_5;
  std::map<std::string,std::map<std::string,double> >  __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getEscape", 0);

  /* "python/cython/_fisx.pyx":77
 * 
 *     def getEscape(self, double energy, PyElements elementsLib, label="", int update=1):
 *         label_ = toBytes(label)             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             if update:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_label) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_label);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_label_ = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":78
 *     def getEscape(self, double energy, PyElements elementsLib, label="", int update=1):
 *         label_ = toBytes(label)
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             if update:
 *                 return self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "python/cython/_fisx.pyx":79
 *         label_ = toBytes(label)
 *         if sys.version < "3.0":
 *             if update:             # <<<<<<<<<<<<<<
 *                 return self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 1)
 *             else:
 */
    __pyx_t_4 = (__pyx_v_update != 0);
    if (__pyx_t_4) {

      /* "python/cython/_fisx.pyx":80
 *         if sys.version < "3.0":
 *             if update:
 *                 return self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 1)             # <<<<<<<<<<<<<<
 *             else:
 *                 return self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 0)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_label_); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 80, __pyx_L1_error)
      try {
        __pyx_t_6 = __pyx_v_self->thisptr->getEscape(__pyx_v_energy, (*__pyx_v_elementsLib->thisptr), __pyx_t_5, 1);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(1, 80, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 80, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "python/cython/_fisx.pyx":79
 *         label_ = toBytes(label)
 *         if sys.version < "3.0":
 *             if update:             # <<<<<<<<<<<<<<
 *                 return self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 1)
 *             else:
 */
    }

    /* "python/cython/_fisx.pyx":82
 *                 return self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 1)
 *             else:
 *                 return self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 0)             # <<<<<<<<<<<<<<
 *         else:
 *             if update:
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_label_); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 82, __pyx_L1_error)
      try {
        __pyx_t_6 = __pyx_v_self->thisptr->getEscape(__pyx_v_energy, (*__pyx_v_elementsLib->thisptr), __pyx_t_5, 0);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(1, 82, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 82, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
    }

    /* "python/cython/_fisx.pyx":78
 *     def getEscape(self, double energy, PyElements elementsLib, label="", int update=1):
 *         label_ = toBytes(label)
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             if update:
 *                 return self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 1)
 */
  }

  /* "python/cython/_fisx.pyx":84
 *                 return self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 0)
 *         else:
 *             if update:             # <<<<<<<<<<<<<<
 *                 return toStringKeysAndValues(self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 1))
 *             else:
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_update != 0);
    if (__pyx_t_4) {

      /* "python/cython/_fisx.pyx":85
 *         else:
 *             if update:
 *                 return toStringKeysAndValues(self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 1))             # <<<<<<<<<<<<<<
 *             else:
 *                 return toStringKeysAndValues(self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 0))
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeysAndValues); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_label_); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 85, __pyx_L1_error)
      try {
        __pyx_t_6 = __pyx_v_self->thisptr->getEscape(__pyx_v_energy, (*__pyx_v_elementsLib->thisptr), __pyx_t_5, 1);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(1, 85, __pyx_L1_error)
      }
      __pyx_t_3 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "python/cython/_fisx.pyx":84
 *                 return self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 0)
 *         else:
 *             if update:             # <<<<<<<<<<<<<<
 *                 return toStringKeysAndValues(self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 1))
 *             else:
 */
    }

    /* "python/cython/_fisx.pyx":87
 *                 return toStringKeysAndValues(self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 1))
 *             else:
 *                 return toStringKeysAndValues(self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 0))             # <<<<<<<<<<<<<<
 * 
 *     def getEscapePeakEnergyThreshold(self):
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeysAndValues); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 87, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_label_); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 87, __pyx_L1_error)
      try {
        __pyx_t_6 = __pyx_v_self->thisptr->getEscape(__pyx_v_energy, (*__pyx_v_elementsLib->thisptr), __pyx_t_5, 0);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(1, 87, __pyx_L1_error)
      }
      __pyx_t_3 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 87, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 87, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }

  /* "python/cython/_fisx.pyx":76
 *         self.thisptr.setMaximumNumberOfEscapePeaks(n)
 * 
 *     def getEscape(self, double energy, PyElements elementsLib, label="", int update=1):             # <<<<<<<<<<<<<<
 *         label_ = toBytes(label)
 *         if sys.version < "3.0":
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("fisx._fisx.PyDetector.getEscape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_label_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":89
 *                 return toStringKeysAndValues(self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 0))
 * 
 *     def getEscapePeakEnergyThreshold(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getEscapePeakEnergyThreshold()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_23getEscapePeakEnergyThreshold(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_23getEscapePeakEnergyThreshold(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEscapePeakEnergyThreshold (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_22getEscapePeakEnergyThreshold(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_22getEscapePeakEnergyThreshold(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getEscapePeakEnergyThreshold", 0);

  /* "python/cython/_fisx.pyx":90
 * 
 *     def getEscapePeakEnergyThreshold(self):
 *         return self.thisptr.getEscapePeakEnergyThreshold()             # <<<<<<<<<<<<<<
 * 
 *     def getEscapePeakIntensityThreshold(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->thisptr->getEscapePeakEnergyThreshold()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":89
 *                 return toStringKeysAndValues(self.thisptr.getEscape(energy, deref(elementsLib.thisptr), label_, 0))
 * 
 *     def getEscapePeakEnergyThreshold(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getEscapePeakEnergyThreshold()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyDetector.getEscapePeakEnergyThreshold", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":92
 *         return self.thisptr.getEscapePeakEnergyThreshold()
 * 
 *     def getEscapePeakIntensityThreshold(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getEscapePeakIntensityThreshold()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_25getEscapePeakIntensityThreshold(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_25getEscapePeakIntensityThreshold(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEscapePeakIntensityThreshold (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_24getEscapePeakIntensityThreshold(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_24getEscapePeakIntensityThreshold(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getEscapePeakIntensityThreshold", 0);

  /* "python/cython/_fisx.pyx":93
 * 
 *     def getEscapePeakIntensityThreshold(self):
 *         return self.thisptr.getEscapePeakIntensityThreshold()             # <<<<<<<<<<<<<<
 * 
 *     def getEscapePeakNThreshold(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->thisptr->getEscapePeakIntensityThreshold()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":92
 *         return self.thisptr.getEscapePeakEnergyThreshold()
 * 
 *     def getEscapePeakIntensityThreshold(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getEscapePeakIntensityThreshold()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyDetector.getEscapePeakIntensityThreshold", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":95
 *         return self.thisptr.getEscapePeakIntensityThreshold()
 * 
 *     def getEscapePeakNThreshold(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getEscapePeakNThreshold()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_27getEscapePeakNThreshold(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_27getEscapePeakNThreshold(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEscapePeakNThreshold (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_26getEscapePeakNThreshold(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_26getEscapePeakNThreshold(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getEscapePeakNThreshold", 0);

  /* "python/cython/_fisx.pyx":96
 * 
 *     def getEscapePeakNThreshold(self):
 *         return self.thisptr.getEscapePeakNThreshold()             # <<<<<<<<<<<<<<
 * 
 *     def getEscapePeakAlphaIn(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->thisptr->getEscapePeakNThreshold()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":95
 *         return self.thisptr.getEscapePeakIntensityThreshold()
 * 
 *     def getEscapePeakNThreshold(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getEscapePeakNThreshold()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyDetector.getEscapePeakNThreshold", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":98
 *         return self.thisptr.getEscapePeakNThreshold()
 * 
 *     def getEscapePeakAlphaIn(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getEscapePeakAlphaIn()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_29getEscapePeakAlphaIn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_29getEscapePeakAlphaIn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEscapePeakAlphaIn (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_28getEscapePeakAlphaIn(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_28getEscapePeakAlphaIn(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getEscapePeakAlphaIn", 0);

  /* "python/cython/_fisx.pyx":99
 * 
 *     def getEscapePeakAlphaIn(self):
 *         return self.thisptr.getEscapePeakAlphaIn()             # <<<<<<<<<<<<<<
 * 
 *     def getThickness(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->thisptr->getEscapePeakAlphaIn()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":98
 *         return self.thisptr.getEscapePeakNThreshold()
 * 
 *     def getEscapePeakAlphaIn(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getEscapePeakAlphaIn()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyDetector.getEscapePeakAlphaIn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":101
 *         return self.thisptr.getEscapePeakAlphaIn()
 * 
 *     def getThickness(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getThickness()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_31getThickness(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_31getThickness(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getThickness (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_30getThickness(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_30getThickness(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getThickness", 0);

  /* "python/cython/_fisx.pyx":102
 * 
 *     def getThickness(self):
 *         return self.thisptr.getThickness()             # <<<<<<<<<<<<<<
 * 
 *     def getDensity(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->thisptr->getThickness()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":101
 *         return self.thisptr.getEscapePeakAlphaIn()
 * 
 *     def getThickness(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getThickness()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyDetector.getThickness", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":104
 *         return self.thisptr.getThickness()
 * 
 *     def getDensity(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getDensity()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_33getDensity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_33getDensity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDensity (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_32getDensity(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_32getDensity(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getDensity", 0);

  /* "python/cython/_fisx.pyx":105
 * 
 *     def getDensity(self):
 *         return self.thisptr.getDensity()             # <<<<<<<<<<<<<<
 * 
 *     def getComposition(self, PyElements elementsLib):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->thisptr->getDensity()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":104
 *         return self.thisptr.getThickness()
 * 
 *     def getDensity(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getDensity()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyDetector.getDensity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":107
 *         return self.thisptr.getDensity()
 * 
 *     def getComposition(self, PyElements elementsLib):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getComposition(deref(elementsLib.thisptr))
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_35getComposition(PyObject *__pyx_v_self, PyObject *__pyx_v_elementsLib); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_35getComposition(PyObject *__pyx_v_self, PyObject *__pyx_v_elementsLib) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getComposition (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementsLib), __pyx_ptype_4fisx_5_fisx_PyElements, 1, "elementsLib", 0))) __PYX_ERR(1, 107, __pyx_L1_error)
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_34getComposition(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self), ((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_elementsLib));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_34getComposition(struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  std::map<std::string,double>  __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getComposition", 0);

  /* "python/cython/_fisx.pyx":108
 * 
 *     def getComposition(self, PyElements elementsLib):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getComposition(deref(elementsLib.thisptr))
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":109
 *     def getComposition(self, PyElements elementsLib):
 *         if sys.version < "3.0":
 *             return self.thisptr.getComposition(deref(elementsLib.thisptr))             # <<<<<<<<<<<<<<
 *         else:
 *             return toStringKeysAndValues(self.thisptr.getComposition(deref(elementsLib.thisptr)))
 */
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_4 = __pyx_v_self->thisptr->getComposition((*__pyx_v_elementsLib->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 109, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":108
 * 
 *     def getComposition(self, PyElements elementsLib):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getComposition(deref(elementsLib.thisptr))
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":111
 *             return self.thisptr.getComposition(deref(elementsLib.thisptr))
 *         else:
 *             return toStringKeysAndValues(self.thisptr.getComposition(deref(elementsLib.thisptr)))             # <<<<<<<<<<<<<<
 * #/[inserted by cython to avoid comment start]*##########################################################################
 * #
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeysAndValues); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    try {
      __pyx_t_4 = __pyx_v_self->thisptr->getComposition((*__pyx_v_elementsLib->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 111, __pyx_L1_error)
    }
    __pyx_t_5 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":107
 *         return self.thisptr.getDensity()
 * 
 *     def getComposition(self, PyElements elementsLib):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getComposition(deref(elementsLib.thisptr))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("fisx._fisx.PyDetector.getComposition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_37__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_37__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_36__reduce_cython__(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_36__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyDetector.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_39__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyDetector_39__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyDetector_38__setstate_cython__(((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyDetector_38__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyDetector.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":150
 *     cdef Element *thisptr
 * 
 *     def __cinit__(self, name, z = 0):             # <<<<<<<<<<<<<<
 *         self.thisptr = new Element(toBytes(name), z)
 * 
 */

/* Python wrapper */
static int __pyx_pw_4fisx_5_fisx_9PyElement_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4fisx_5_fisx_9PyElement_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_z = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_z,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)__pyx_int_0);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 150, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_name = values[0];
    __pyx_v_z = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 150, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElement.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement___cinit__(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), __pyx_v_name, __pyx_v_z);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4fisx_5_fisx_9PyElement___cinit__(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_z) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_t_5;
  fisx::Element *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "python/cython/_fisx.pyx":151
 * 
 *     def __cinit__(self, name, z = 0):
 *         self.thisptr = new Element(toBytes(name), z)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 151, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_z); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 151, __pyx_L1_error)
  try {
    __pyx_t_6 = new fisx::Element(__pyx_t_4, __pyx_t_5);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 151, __pyx_L1_error)
  }
  __pyx_v_self->thisptr = __pyx_t_6;

  /* "python/cython/_fisx.pyx":150
 *     cdef Element *thisptr
 * 
 *     def __cinit__(self, name, z = 0):             # <<<<<<<<<<<<<<
 *         self.thisptr = new Element(toBytes(name), z)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElement.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":153
 *         self.thisptr = new Element(toBytes(name), z)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_4fisx_5_fisx_9PyElement_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4fisx_5_fisx_9PyElement_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4fisx_5_fisx_9PyElement_2__dealloc__(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4fisx_5_fisx_9PyElement_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "python/cython/_fisx.pyx":154
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     def setName(self, name):
 */
  delete __pyx_v_self->thisptr;

  /* "python/cython/_fisx.pyx":153
 *         self.thisptr = new Element(toBytes(name), z)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "python/cython/_fisx.pyx":156
 *         del self.thisptr
 * 
 *     def setName(self, name):             # <<<<<<<<<<<<<<
 *         self.thisptr.setName(toBytes(name))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_5setName(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_5setName(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setName (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_4setName(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), ((PyObject *)__pyx_v_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_4setName(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setName", 0);

  /* "python/cython/_fisx.pyx":157
 * 
 *     def setName(self, name):
 *         self.thisptr.setName(toBytes(name))             # <<<<<<<<<<<<<<
 * 
 *     def setAtomicNumber(self, int z):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_v_self->thisptr->setName(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 157, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":156
 *         del self.thisptr
 * 
 *     def setName(self, name):             # <<<<<<<<<<<<<<
 *         self.thisptr.setName(toBytes(name))
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElement.setName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":159
 *         self.thisptr.setName(toBytes(name))
 * 
 *     def setAtomicNumber(self, int z):             # <<<<<<<<<<<<<<
 *         self.thisptr.setAtomicNumber(z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_7setAtomicNumber(PyObject *__pyx_v_self, PyObject *__pyx_arg_z); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_7setAtomicNumber(PyObject *__pyx_v_self, PyObject *__pyx_arg_z) {
  int __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setAtomicNumber (wrapper)", 0);
  assert(__pyx_arg_z); {
    __pyx_v_z = __Pyx_PyInt_As_int(__pyx_arg_z); if (unlikely((__pyx_v_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElement.setAtomicNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_6setAtomicNumber(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), ((int)__pyx_v_z));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_6setAtomicNumber(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, int __pyx_v_z) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setAtomicNumber", 0);

  /* "python/cython/_fisx.pyx":160
 * 
 *     def setAtomicNumber(self, int z):
 *         self.thisptr.setAtomicNumber(z)             # <<<<<<<<<<<<<<
 * 
 *     def getAtomicNumber(self):
 */
  try {
    __pyx_v_self->thisptr->setAtomicNumber(__pyx_v_z);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 160, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":159
 *         self.thisptr.setName(toBytes(name))
 * 
 *     def setAtomicNumber(self, int z):             # <<<<<<<<<<<<<<
 *         self.thisptr.setAtomicNumber(z)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElement.setAtomicNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":162
 *         self.thisptr.setAtomicNumber(z)
 * 
 *     def getAtomicNumber(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getAtomicNumber()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_9getAtomicNumber(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_9getAtomicNumber(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getAtomicNumber (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_8getAtomicNumber(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_8getAtomicNumber(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getAtomicNumber", 0);

  /* "python/cython/_fisx.pyx":163
 * 
 *     def getAtomicNumber(self):
 *         return self.thisptr.getAtomicNumber()             # <<<<<<<<<<<<<<
 * 
 *     def setBindingEnergies(self, std_map[std_string, double] energies):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->thisptr->getAtomicNumber()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":162
 *         self.thisptr.setAtomicNumber(z)
 * 
 *     def getAtomicNumber(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getAtomicNumber()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyElement.getAtomicNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":165
 *         return self.thisptr.getAtomicNumber()
 * 
 *     def setBindingEnergies(self, std_map[std_string, double] energies):             # <<<<<<<<<<<<<<
 *         self.thisptr.setBindingEnergies(energies)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_11setBindingEnergies(PyObject *__pyx_v_self, PyObject *__pyx_arg_energies); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_11setBindingEnergies(PyObject *__pyx_v_self, PyObject *__pyx_arg_energies) {
  std::map<std::string,double>  __pyx_v_energies;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setBindingEnergies (wrapper)", 0);
  assert(__pyx_arg_energies); {
    __pyx_v_energies = __pyx_convert_map_from_py_std_3a__3a_string__and_double(__pyx_arg_energies); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 165, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElement.setBindingEnergies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_10setBindingEnergies(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), ((std::map<std::string,double> )__pyx_v_energies));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_10setBindingEnergies(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, std::map<std::string,double>  __pyx_v_energies) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setBindingEnergies", 0);

  /* "python/cython/_fisx.pyx":166
 * 
 *     def setBindingEnergies(self, std_map[std_string, double] energies):
 *         self.thisptr.setBindingEnergies(energies)             # <<<<<<<<<<<<<<
 * 
 *     def getBindingEnergies(self):
 */
  try {
    __pyx_v_self->thisptr->setBindingEnergies(__pyx_v_energies);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 166, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":165
 *         return self.thisptr.getAtomicNumber()
 * 
 *     def setBindingEnergies(self, std_map[std_string, double] energies):             # <<<<<<<<<<<<<<
 *         self.thisptr.setBindingEnergies(energies)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElement.setBindingEnergies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":168
 *         self.thisptr.setBindingEnergies(energies)
 * 
 *     def getBindingEnergies(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getBindingEnergies()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_13getBindingEnergies(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_13getBindingEnergies(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getBindingEnergies (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_12getBindingEnergies(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_12getBindingEnergies(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getBindingEnergies", 0);

  /* "python/cython/_fisx.pyx":169
 * 
 *     def getBindingEnergies(self):
 *         return self.thisptr.getBindingEnergies()             # <<<<<<<<<<<<<<
 * 
 *     def setMassAttenuationCoefficients(self,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_v_self->thisptr->getBindingEnergies()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":168
 *         self.thisptr.setBindingEnergies(energies)
 * 
 *     def getBindingEnergies(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getBindingEnergies()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyElement.getBindingEnergies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":171
 *         return self.thisptr.getBindingEnergies()
 * 
 *     def setMassAttenuationCoefficients(self,             # <<<<<<<<<<<<<<
 *                                        std_vector[double] energies,
 *                                        std_vector[double] photo,
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_15setMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_15setMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  std::vector<double>  __pyx_v_energies;
  std::vector<double>  __pyx_v_photo;
  std::vector<double>  __pyx_v_coherent;
  std::vector<double>  __pyx_v_compton;
  std::vector<double>  __pyx_v_pair;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setMassAttenuationCoefficients (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_energies,&__pyx_n_s_photo,&__pyx_n_s_coherent,&__pyx_n_s_compton,&__pyx_n_s_pair,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energies)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_photo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setMassAttenuationCoefficients", 1, 5, 5, 1); __PYX_ERR(1, 171, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coherent)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setMassAttenuationCoefficients", 1, 5, 5, 2); __PYX_ERR(1, 171, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_compton)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setMassAttenuationCoefficients", 1, 5, 5, 3); __PYX_ERR(1, 171, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pair)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setMassAttenuationCoefficients", 1, 5, 5, 4); __PYX_ERR(1, 171, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setMassAttenuationCoefficients") < 0)) __PYX_ERR(1, 171, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_energies = __pyx_convert_vector_from_py_double(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 172, __pyx_L3_error)
    __pyx_v_photo = __pyx_convert_vector_from_py_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 173, __pyx_L3_error)
    __pyx_v_coherent = __pyx_convert_vector_from_py_double(values[2]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 174, __pyx_L3_error)
    __pyx_v_compton = __pyx_convert_vector_from_py_double(values[3]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 175, __pyx_L3_error)
    __pyx_v_pair = __pyx_convert_vector_from_py_double(values[4]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 176, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setMassAttenuationCoefficients", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 171, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElement.setMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_14setMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), __pyx_v_energies, __pyx_v_photo, __pyx_v_coherent, __pyx_v_compton, __pyx_v_pair);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_14setMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, std::vector<double>  __pyx_v_energies, std::vector<double>  __pyx_v_photo, std::vector<double>  __pyx_v_coherent, std::vector<double>  __pyx_v_compton, std::vector<double>  __pyx_v_pair) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":177
 *                                        std_vector[double] compton,
 *                                        std_vector[double] pair):
 *         self.thisptr.setMassAttenuationCoefficients(energies,             # <<<<<<<<<<<<<<
 *                                                     photo,
 *                                                     coherent,
 */
  try {
    __pyx_v_self->thisptr->setMassAttenuationCoefficients(__pyx_v_energies, __pyx_v_photo, __pyx_v_coherent, __pyx_v_compton, __pyx_v_pair);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 177, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":171
 *         return self.thisptr.getBindingEnergies()
 * 
 *     def setMassAttenuationCoefficients(self,             # <<<<<<<<<<<<<<
 *                                        std_vector[double] energies,
 *                                        std_vector[double] photo,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElement.setMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":183
 *                                                     pair)
 * 
 *     def _getDefaultMassAttenuationCoefficients(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getMassAttenuationCoefficients()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_17_getDefaultMassAttenuationCoefficients(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_17_getDefaultMassAttenuationCoefficients(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getDefaultMassAttenuationCoefficients (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_16_getDefaultMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_16_getDefaultMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::map<std::string,std::vector<double> >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getDefaultMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":184
 * 
 *     def _getDefaultMassAttenuationCoefficients(self):
 *         return self.thisptr.getMassAttenuationCoefficients()             # <<<<<<<<<<<<<<
 * 
 *     def _getSingleMassAttenuationCoefficients(self, double energy):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getMassAttenuationCoefficients();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 184, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":183
 *                                                     pair)
 * 
 *     def _getDefaultMassAttenuationCoefficients(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getMassAttenuationCoefficients()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyElement._getDefaultMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":186
 *         return self.thisptr.getMassAttenuationCoefficients()
 * 
 *     def _getSingleMassAttenuationCoefficients(self, double energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getMassAttenuationCoefficients(energy)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_19_getSingleMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_arg_energy); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_19_getSingleMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_arg_energy) {
  double __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getSingleMassAttenuationCoefficients (wrapper)", 0);
  assert(__pyx_arg_energy); {
    __pyx_v_energy = __pyx_PyFloat_AsDouble(__pyx_arg_energy); if (unlikely((__pyx_v_energy == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 186, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElement._getSingleMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_18_getSingleMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), ((double)__pyx_v_energy));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_18_getSingleMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, double __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::map<std::string,double>  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getSingleMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":187
 * 
 *     def _getSingleMassAttenuationCoefficients(self, double energy):
 *         return self.thisptr.getMassAttenuationCoefficients(energy)             # <<<<<<<<<<<<<<
 * 
 *     def getMassAttenuationCoefficients(self, energy=None):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getMassAttenuationCoefficients(__pyx_v_energy);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 187, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":186
 *         return self.thisptr.getMassAttenuationCoefficients()
 * 
 *     def _getSingleMassAttenuationCoefficients(self, double energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getMassAttenuationCoefficients(energy)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyElement._getSingleMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":189
 *         return self.thisptr.getMassAttenuationCoefficients(energy)
 * 
 *     def getMassAttenuationCoefficients(self, energy=None):             # <<<<<<<<<<<<<<
 *         if energy is None:
 *             return self._getDefaultMassAttenuationCoefficients()
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_21getMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_21getMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_energy = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMassAttenuationCoefficients (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_energy,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getMassAttenuationCoefficients") < 0)) __PYX_ERR(1, 189, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_energy = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getMassAttenuationCoefficients", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 189, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElement.getMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_20getMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_20getMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":190
 * 
 *     def getMassAttenuationCoefficients(self, energy=None):
 *         if energy is None:             # <<<<<<<<<<<<<<
 *             return self._getDefaultMassAttenuationCoefficients()
 *         elif hasattr(energy, "__len__"):
 */
  __pyx_t_1 = (__pyx_v_energy == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":191
 *     def getMassAttenuationCoefficients(self, energy=None):
 *         if energy is None:
 *             return self._getDefaultMassAttenuationCoefficients()             # <<<<<<<<<<<<<<
 *         elif hasattr(energy, "__len__"):
 *             return self._getMultipleMassAttenuationCoefficients(energy)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getDefaultMassAttenuationCoeffi); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":190
 * 
 *     def getMassAttenuationCoefficients(self, energy=None):
 *         if energy is None:             # <<<<<<<<<<<<<<
 *             return self._getDefaultMassAttenuationCoefficients()
 *         elif hasattr(energy, "__len__"):
 */
  }

  /* "python/cython/_fisx.pyx":192
 *         if energy is None:
 *             return self._getDefaultMassAttenuationCoefficients()
 *         elif hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             return self._getMultipleMassAttenuationCoefficients(energy)
 *         else:
 */
  __pyx_t_2 = __Pyx_HasAttr(__pyx_v_energy, __pyx_n_s_len); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 192, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "python/cython/_fisx.pyx":193
 *             return self._getDefaultMassAttenuationCoefficients()
 *         elif hasattr(energy, "__len__"):
 *             return self._getMultipleMassAttenuationCoefficients(energy)             # <<<<<<<<<<<<<<
 *         else:
 *             return self._getMultipleMassAttenuationCoefficients([energy])
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMultipleMassAttenuationCoeff); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_energy) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_energy);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":192
 *         if energy is None:
 *             return self._getDefaultMassAttenuationCoefficients()
 *         elif hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             return self._getMultipleMassAttenuationCoefficients(energy)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":195
 *             return self._getMultipleMassAttenuationCoefficients(energy)
 *         else:
 *             return self._getMultipleMassAttenuationCoefficients([energy])             # <<<<<<<<<<<<<<
 * 
 *     def _getMultipleMassAttenuationCoefficients(self, std_vector[double] energy):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMultipleMassAttenuationCoeff); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_energy);
    __Pyx_GIVEREF(__pyx_v_energy);
    PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_energy);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":189
 *         return self.thisptr.getMassAttenuationCoefficients(energy)
 * 
 *     def getMassAttenuationCoefficients(self, energy=None):             # <<<<<<<<<<<<<<
 *         if energy is None:
 *             return self._getDefaultMassAttenuationCoefficients()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("fisx._fisx.PyElement.getMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":197
 *             return self._getMultipleMassAttenuationCoefficients([energy])
 * 
 *     def _getMultipleMassAttenuationCoefficients(self, std_vector[double] energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getMassAttenuationCoefficients(energy)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_23_getMultipleMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_arg_energy); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_23_getMultipleMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_arg_energy) {
  std::vector<double>  __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getMultipleMassAttenuationCoefficients (wrapper)", 0);
  assert(__pyx_arg_energy); {
    __pyx_v_energy = __pyx_convert_vector_from_py_double(__pyx_arg_energy); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 197, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElement._getMultipleMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_22_getMultipleMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), ((std::vector<double> )__pyx_v_energy));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_22_getMultipleMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, std::vector<double>  __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::map<std::string,std::vector<double> >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getMultipleMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":198
 * 
 *     def _getMultipleMassAttenuationCoefficients(self, std_vector[double] energy):
 *         return self.thisptr.getMassAttenuationCoefficients(energy)             # <<<<<<<<<<<<<<
 * 
 *     def setRadiativeTransitions(self, shell,
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getMassAttenuationCoefficients(__pyx_v_energy);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 198, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":197
 *             return self._getMultipleMassAttenuationCoefficients([energy])
 * 
 *     def _getMultipleMassAttenuationCoefficients(self, std_vector[double] energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getMassAttenuationCoefficients(energy)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyElement._getMultipleMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":200
 *         return self.thisptr.getMassAttenuationCoefficients(energy)
 * 
 *     def setRadiativeTransitions(self, shell,             # <<<<<<<<<<<<<<
 *                                 std_vector[std_string] labels,
 *                                 std_vector[double] values):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_25setRadiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_25setRadiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_shell = 0;
  std::vector<std::string>  __pyx_v_labels;
  std::vector<double>  __pyx_v_values;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRadiativeTransitions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shell,&__pyx_n_s_labels,&__pyx_n_s_values,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shell)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setRadiativeTransitions", 1, 3, 3, 1); __PYX_ERR(1, 200, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setRadiativeTransitions", 1, 3, 3, 2); __PYX_ERR(1, 200, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRadiativeTransitions") < 0)) __PYX_ERR(1, 200, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_shell = values[0];
    __pyx_v_labels = __pyx_convert_vector_from_py_std_3a__3a_string(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 201, __pyx_L3_error)
    __pyx_v_values = __pyx_convert_vector_from_py_double(values[2]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 202, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setRadiativeTransitions", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 200, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElement.setRadiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_24setRadiativeTransitions(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), __pyx_v_shell, __pyx_v_labels, __pyx_v_values);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_24setRadiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_shell, std::vector<std::string>  __pyx_v_labels, std::vector<double>  __pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setRadiativeTransitions", 0);

  /* "python/cython/_fisx.pyx":203
 *                                 std_vector[std_string] labels,
 *                                 std_vector[double] values):
 *         self.thisptr.setRadiativeTransitions(toBytes(shell), labels, values)             # <<<<<<<<<<<<<<
 * 
 *     def getRadiativeTransitions(self, shell):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_shell) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_shell);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 203, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_v_self->thisptr->setRadiativeTransitions(__pyx_t_4, __pyx_v_labels, __pyx_v_values);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 203, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":200
 *         return self.thisptr.getMassAttenuationCoefficients(energy)
 * 
 *     def setRadiativeTransitions(self, shell,             # <<<<<<<<<<<<<<
 *                                 std_vector[std_string] labels,
 *                                 std_vector[double] values):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElement.setRadiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":205
 *         self.thisptr.setRadiativeTransitions(toBytes(shell), labels, values)
 * 
 *     def getRadiativeTransitions(self, shell):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getRadiativeTransitions(toBytes(shell))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_27getRadiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_v_shell); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_27getRadiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_v_shell) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRadiativeTransitions (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_26getRadiativeTransitions(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), ((PyObject *)__pyx_v_shell));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_26getRadiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_shell) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  std::map<std::string,double>  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getRadiativeTransitions", 0);

  /* "python/cython/_fisx.pyx":206
 * 
 *     def getRadiativeTransitions(self, shell):
 *         return self.thisptr.getRadiativeTransitions(toBytes(shell))             # <<<<<<<<<<<<<<
 * 
 *     def setNonradiativeTransitions(self, shell,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_shell) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_shell);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_5 = __pyx_v_self->thisptr->getRadiativeTransitions(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 206, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":205
 *         self.thisptr.setRadiativeTransitions(toBytes(shell), labels, values)
 * 
 *     def getRadiativeTransitions(self, shell):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getRadiativeTransitions(toBytes(shell))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElement.getRadiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":208
 *         return self.thisptr.getRadiativeTransitions(toBytes(shell))
 * 
 *     def setNonradiativeTransitions(self, shell,             # <<<<<<<<<<<<<<
 *                                    std_vector[std_string] labels,
 *                                    std_vector[double] values):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_29setNonradiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_29setNonradiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_shell = 0;
  std::vector<std::string>  __pyx_v_labels;
  std::vector<double>  __pyx_v_values;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setNonradiativeTransitions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shell,&__pyx_n_s_labels,&__pyx_n_s_values,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shell)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setNonradiativeTransitions", 1, 3, 3, 1); __PYX_ERR(1, 208, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setNonradiativeTransitions", 1, 3, 3, 2); __PYX_ERR(1, 208, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNonradiativeTransitions") < 0)) __PYX_ERR(1, 208, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_shell = values[0];
    __pyx_v_labels = __pyx_convert_vector_from_py_std_3a__3a_string(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 209, __pyx_L3_error)
    __pyx_v_values = __pyx_convert_vector_from_py_double(values[2]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 210, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setNonradiativeTransitions", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 208, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElement.setNonradiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_28setNonradiativeTransitions(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), __pyx_v_shell, __pyx_v_labels, __pyx_v_values);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_28setNonradiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_shell, std::vector<std::string>  __pyx_v_labels, std::vector<double>  __pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setNonradiativeTransitions", 0);

  /* "python/cython/_fisx.pyx":211
 *                                    std_vector[std_string] labels,
 *                                    std_vector[double] values):
 *         self.thisptr.setNonradiativeTransitions(toBytes(shell), labels, values)             # <<<<<<<<<<<<<<
 * 
 *     def getNonradiativeTransitions(self, shell):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_shell) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_shell);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_v_self->thisptr->setNonradiativeTransitions(__pyx_t_4, __pyx_v_labels, __pyx_v_values);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 211, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":208
 *         return self.thisptr.getRadiativeTransitions(toBytes(shell))
 * 
 *     def setNonradiativeTransitions(self, shell,             # <<<<<<<<<<<<<<
 *                                    std_vector[std_string] labels,
 *                                    std_vector[double] values):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElement.setNonradiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":213
 *         self.thisptr.setNonradiativeTransitions(toBytes(shell), labels, values)
 * 
 *     def getNonradiativeTransitions(self, shell):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getNonradiativeTransitions(toBytes(shell))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_31getNonradiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_v_shell); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_31getNonradiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_v_shell) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getNonradiativeTransitions (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_30getNonradiativeTransitions(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), ((PyObject *)__pyx_v_shell));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_30getNonradiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_shell) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  std::map<std::string,double>  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getNonradiativeTransitions", 0);

  /* "python/cython/_fisx.pyx":214
 * 
 *     def getNonradiativeTransitions(self, shell):
 *         return self.thisptr.getNonradiativeTransitions(toBytes(shell))             # <<<<<<<<<<<<<<
 * 
 *     def setShellConstants(self, shell,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_shell) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_shell);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_5 = __pyx_v_self->thisptr->getNonradiativeTransitions(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 214, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":213
 *         self.thisptr.setNonradiativeTransitions(toBytes(shell), labels, values)
 * 
 *     def getNonradiativeTransitions(self, shell):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getNonradiativeTransitions(toBytes(shell))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElement.getNonradiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":216
 *         return self.thisptr.getNonradiativeTransitions(toBytes(shell))
 * 
 *     def setShellConstants(self, shell,             # <<<<<<<<<<<<<<
 *                           std_map[std_string, double] valuesDict):
 *         self.thisptr.setShellConstants(toBytes(shell), valuesDict)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_33setShellConstants(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_33setShellConstants(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_shell = 0;
  std::map<std::string,double>  __pyx_v_valuesDict;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setShellConstants (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shell,&__pyx_n_s_valuesDict,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shell)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valuesDict)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setShellConstants", 1, 2, 2, 1); __PYX_ERR(1, 216, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setShellConstants") < 0)) __PYX_ERR(1, 216, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_shell = values[0];
    __pyx_v_valuesDict = __pyx_convert_map_from_py_std_3a__3a_string__and_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 217, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setShellConstants", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 216, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElement.setShellConstants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_32setShellConstants(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), __pyx_v_shell, __pyx_v_valuesDict);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_32setShellConstants(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_shell, std::map<std::string,double>  __pyx_v_valuesDict) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setShellConstants", 0);

  /* "python/cython/_fisx.pyx":218
 *     def setShellConstants(self, shell,
 *                           std_map[std_string, double] valuesDict):
 *         self.thisptr.setShellConstants(toBytes(shell), valuesDict)             # <<<<<<<<<<<<<<
 * 
 *     def getShellConstants(self, shell):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_shell) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_shell);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_v_self->thisptr->setShellConstants(__pyx_t_4, __pyx_v_valuesDict);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 218, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":216
 *         return self.thisptr.getNonradiativeTransitions(toBytes(shell))
 * 
 *     def setShellConstants(self, shell,             # <<<<<<<<<<<<<<
 *                           std_map[std_string, double] valuesDict):
 *         self.thisptr.setShellConstants(toBytes(shell), valuesDict)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElement.setShellConstants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":220
 *         self.thisptr.setShellConstants(toBytes(shell), valuesDict)
 * 
 *     def getShellConstants(self, shell):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getShellConstants(toBytes(shell))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_35getShellConstants(PyObject *__pyx_v_self, PyObject *__pyx_v_shell); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_35getShellConstants(PyObject *__pyx_v_self, PyObject *__pyx_v_shell) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getShellConstants (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_34getShellConstants(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), ((PyObject *)__pyx_v_shell));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_34getShellConstants(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, PyObject *__pyx_v_shell) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  std::map<std::string,double>  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getShellConstants", 0);

  /* "python/cython/_fisx.pyx":221
 * 
 *     def getShellConstants(self, shell):
 *         return self.thisptr.getShellConstants(toBytes(shell))             # <<<<<<<<<<<<<<
 * 
 *     #def getXRayLines(self, std_string shell):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_shell) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_shell);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 221, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_5 = __pyx_v_self->thisptr->getShellConstants(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 221, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":220
 *         self.thisptr.setShellConstants(toBytes(shell), valuesDict)
 * 
 *     def getShellConstants(self, shell):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getShellConstants(toBytes(shell))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElement.getShellConstants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":226
 *     #    return self.thisptr.getXRayLines(shell)
 * 
 *     def getXRayLinesFromVacancyDistribution(self,             # <<<<<<<<<<<<<<
 *                             std_map[std_string, double] vacancyDict):
 *         return self.thisptr.getXRayLinesFromVacancyDistribution(\
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_37getXRayLinesFromVacancyDistribution(PyObject *__pyx_v_self, PyObject *__pyx_arg_vacancyDict); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_37getXRayLinesFromVacancyDistribution(PyObject *__pyx_v_self, PyObject *__pyx_arg_vacancyDict) {
  std::map<std::string,double>  __pyx_v_vacancyDict;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getXRayLinesFromVacancyDistribution (wrapper)", 0);
  assert(__pyx_arg_vacancyDict); {
    __pyx_v_vacancyDict = __pyx_convert_map_from_py_std_3a__3a_string__and_double(__pyx_arg_vacancyDict); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 227, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElement.getXRayLinesFromVacancyDistribution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_36getXRayLinesFromVacancyDistribution(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), ((std::map<std::string,double> )__pyx_v_vacancyDict));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_36getXRayLinesFromVacancyDistribution(struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, std::map<std::string,double>  __pyx_v_vacancyDict) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::map<std::string,std::map<std::string,double> >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getXRayLinesFromVacancyDistribution", 0);

  /* "python/cython/_fisx.pyx":228
 *     def getXRayLinesFromVacancyDistribution(self,
 *                             std_map[std_string, double] vacancyDict):
 *         return self.thisptr.getXRayLinesFromVacancyDistribution(\             # <<<<<<<<<<<<<<
 *                                 vacancyDict)
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "python/cython/_fisx.pyx":229
 *                             std_map[std_string, double] vacancyDict):
 *         return self.thisptr.getXRayLinesFromVacancyDistribution(\
 *                                 vacancyDict)             # <<<<<<<<<<<<<<
 * 
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getXRayLinesFromVacancyDistribution(__pyx_v_vacancyDict);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 228, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":228
 *     def getXRayLinesFromVacancyDistribution(self,
 *                             std_map[std_string, double] vacancyDict):
 *         return self.thisptr.getXRayLinesFromVacancyDistribution(\             # <<<<<<<<<<<<<<
 *                                 vacancyDict)
 * 
 */
  __pyx_t_2 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":226
 *     #    return self.thisptr.getXRayLines(shell)
 * 
 *     def getXRayLinesFromVacancyDistribution(self,             # <<<<<<<<<<<<<<
 *                             std_map[std_string, double] vacancyDict):
 *         return self.thisptr.getXRayLinesFromVacancyDistribution(\
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyElement.getXRayLinesFromVacancyDistribution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_39__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_39__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_38__reduce_cython__(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_38__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyElement.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_41__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_9PyElement_41__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_9PyElement_40__setstate_cython__(((struct __pyx_obj_4fisx_5_fisx_PyElement *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_9PyElement_40__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyElement *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyElement.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":284
 *     cdef Elements *thisptr
 * 
 *     def __cinit__(self, directoryName="",             # <<<<<<<<<<<<<<
 *                         bindingEnergiesFile="",
 *                         crossSectionsFile="",
 */

/* Python wrapper */
static int __pyx_pw_4fisx_5_fisx_10PyElements_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4fisx_5_fisx_10PyElements_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_directoryName = 0;
  PyObject *__pyx_v_bindingEnergiesFile = 0;
  PyObject *__pyx_v_crossSectionsFile = 0;
  PyObject *__pyx_v_pymca = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_directoryName,&__pyx_n_s_bindingEnergiesFile,&__pyx_n_s_crossSectionsFile,&__pyx_n_s_pymca,0};
    PyObject* values[4] = {0,0,0,0};
    values[0] = ((PyObject *)__pyx_kp_s_);
    values[1] = ((PyObject *)__pyx_kp_s_);
    values[2] = ((PyObject *)__pyx_kp_s_);
    values[3] = ((PyObject *)__pyx_int_0);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_directoryName);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bindingEnergiesFile);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_crossSectionsFile);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pymca);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 284, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_directoryName = values[0];
    __pyx_v_bindingEnergiesFile = values[1];
    __pyx_v_crossSectionsFile = values[2];
    __pyx_v_pymca = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 284, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements___cinit__(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_directoryName, __pyx_v_bindingEnergiesFile, __pyx_v_crossSectionsFile, __pyx_v_pymca);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4fisx_5_fisx_10PyElements___cinit__(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_directoryName, PyObject *__pyx_v_bindingEnergiesFile, PyObject *__pyx_v_crossSectionsFile, PyObject *__pyx_v_pymca) {
  PyObject *__pyx_v_DataDir = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  std::string __pyx_t_6;
  short __pyx_t_7;
  fisx::Elements *__pyx_t_8;
  std::string __pyx_t_9;
  std::string __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_directoryName);
  __Pyx_INCREF(__pyx_v_bindingEnergiesFile);
  __Pyx_INCREF(__pyx_v_crossSectionsFile);
  __Pyx_INCREF(__pyx_v_pymca);

  /* "python/cython/_fisx.pyx":288
 *                         crossSectionsFile="",
 *                         pymca=0):
 *         if len(directoryName) == 0:             # <<<<<<<<<<<<<<
 *             from fisx import DataDir
 *             directoryName = DataDir.FISX_DATA_DIR
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_directoryName); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 288, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":289
 *                         pymca=0):
 *         if len(directoryName) == 0:
 *             from fisx import DataDir             # <<<<<<<<<<<<<<
 *             directoryName = DataDir.FISX_DATA_DIR
 *         directoryName = toBytes(directoryName)
 */
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_n_s_DataDir);
    __Pyx_GIVEREF(__pyx_n_s_DataDir);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_DataDir);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_fisx, __pyx_t_3, -1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_DataDir); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_DataDir = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "python/cython/_fisx.pyx":290
 *         if len(directoryName) == 0:
 *             from fisx import DataDir
 *             directoryName = DataDir.FISX_DATA_DIR             # <<<<<<<<<<<<<<
 *         directoryName = toBytes(directoryName)
 *         if pymca:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_DataDir, __pyx_n_s_FISX_DATA_DIR); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_directoryName, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "python/cython/_fisx.pyx":288
 *                         crossSectionsFile="",
 *                         pymca=0):
 *         if len(directoryName) == 0:             # <<<<<<<<<<<<<<
 *             from fisx import DataDir
 *             directoryName = DataDir.FISX_DATA_DIR
 */
  }

  /* "python/cython/_fisx.pyx":291
 *             from fisx import DataDir
 *             directoryName = DataDir.FISX_DATA_DIR
 *         directoryName = toBytes(directoryName)             # <<<<<<<<<<<<<<
 *         if pymca:
 *             pymca = 1
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_v_directoryName) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_directoryName);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_directoryName, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "python/cython/_fisx.pyx":292
 *             directoryName = DataDir.FISX_DATA_DIR
 *         directoryName = toBytes(directoryName)
 *         if pymca:             # <<<<<<<<<<<<<<
 *             pymca = 1
 *             self.thisptr = new Elements(directoryName, pymca)
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_pymca); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 292, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":293
 *         directoryName = toBytes(directoryName)
 *         if pymca:
 *             pymca = 1             # <<<<<<<<<<<<<<
 *             self.thisptr = new Elements(directoryName, pymca)
 *         else:
 */
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_DECREF_SET(__pyx_v_pymca, __pyx_int_1);

    /* "python/cython/_fisx.pyx":294
 *         if pymca:
 *             pymca = 1
 *             self.thisptr = new Elements(directoryName, pymca)             # <<<<<<<<<<<<<<
 *         else:
 *             bindingEnergiesFile = toBytes(bindingEnergiesFile)
 */
    __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_directoryName); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 294, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyInt_As_short(__pyx_v_pymca); if (unlikely((__pyx_t_7 == (short)-1) && PyErr_Occurred())) __PYX_ERR(1, 294, __pyx_L1_error)
    try {
      __pyx_t_8 = new fisx::Elements(__pyx_t_6, __pyx_t_7);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 294, __pyx_L1_error)
    }
    __pyx_v_self->thisptr = __pyx_t_8;

    /* "python/cython/_fisx.pyx":292
 *             directoryName = DataDir.FISX_DATA_DIR
 *         directoryName = toBytes(directoryName)
 *         if pymca:             # <<<<<<<<<<<<<<
 *             pymca = 1
 *             self.thisptr = new Elements(directoryName, pymca)
 */
    goto __pyx_L4;
  }

  /* "python/cython/_fisx.pyx":296
 *             self.thisptr = new Elements(directoryName, pymca)
 *         else:
 *             bindingEnergiesFile = toBytes(bindingEnergiesFile)             # <<<<<<<<<<<<<<
 *             crossSectionsFile = toBytes(crossSectionsFile)
 *             if len(bindingEnergiesFile):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_v_bindingEnergiesFile) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_bindingEnergiesFile);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_bindingEnergiesFile, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "python/cython/_fisx.pyx":297
 *         else:
 *             bindingEnergiesFile = toBytes(bindingEnergiesFile)
 *             crossSectionsFile = toBytes(crossSectionsFile)             # <<<<<<<<<<<<<<
 *             if len(bindingEnergiesFile):
 *                 self.thisptr = new Elements(directoryName, bindingEnergiesFile, crossSectionsFile)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_v_crossSectionsFile) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_crossSectionsFile);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_crossSectionsFile, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "python/cython/_fisx.pyx":298
 *             bindingEnergiesFile = toBytes(bindingEnergiesFile)
 *             crossSectionsFile = toBytes(crossSectionsFile)
 *             if len(bindingEnergiesFile):             # <<<<<<<<<<<<<<
 *                 self.thisptr = new Elements(directoryName, bindingEnergiesFile, crossSectionsFile)
 *             else:
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_bindingEnergiesFile); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 298, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "python/cython/_fisx.pyx":299
 *             crossSectionsFile = toBytes(crossSectionsFile)
 *             if len(bindingEnergiesFile):
 *                 self.thisptr = new Elements(directoryName, bindingEnergiesFile, crossSectionsFile)             # <<<<<<<<<<<<<<
 *             else:
 *                 self.thisptr = new Elements(directoryName)
 */
      __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_directoryName); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 299, __pyx_L1_error)
      __pyx_t_9 = __pyx_convert_string_from_py_std__in_string(__pyx_v_bindingEnergiesFile); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 299, __pyx_L1_error)
      __pyx_t_10 = __pyx_convert_string_from_py_std__in_string(__pyx_v_crossSectionsFile); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 299, __pyx_L1_error)
      try {
        __pyx_t_8 = new fisx::Elements(__pyx_t_6, __pyx_t_9, __pyx_t_10);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(1, 299, __pyx_L1_error)
      }
      __pyx_v_self->thisptr = __pyx_t_8;

      /* "python/cython/_fisx.pyx":298
 *             bindingEnergiesFile = toBytes(bindingEnergiesFile)
 *             crossSectionsFile = toBytes(crossSectionsFile)
 *             if len(bindingEnergiesFile):             # <<<<<<<<<<<<<<
 *                 self.thisptr = new Elements(directoryName, bindingEnergiesFile, crossSectionsFile)
 *             else:
 */
      goto __pyx_L5;
    }

    /* "python/cython/_fisx.pyx":301
 *                 self.thisptr = new Elements(directoryName, bindingEnergiesFile, crossSectionsFile)
 *             else:
 *                 self.thisptr = new Elements(directoryName)             # <<<<<<<<<<<<<<
 *                 if len(crossSectionsFile):
 *                     self.thisptr.setMassAttenuationCoefficientsFile(crossSectionsFile)
 */
    /*else*/ {
      __pyx_t_10 = __pyx_convert_string_from_py_std__in_string(__pyx_v_directoryName); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 301, __pyx_L1_error)
      try {
        __pyx_t_8 = new fisx::Elements(__pyx_t_10);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(1, 301, __pyx_L1_error)
      }
      __pyx_v_self->thisptr = __pyx_t_8;

      /* "python/cython/_fisx.pyx":302
 *             else:
 *                 self.thisptr = new Elements(directoryName)
 *                 if len(crossSectionsFile):             # <<<<<<<<<<<<<<
 *                     self.thisptr.setMassAttenuationCoefficientsFile(crossSectionsFile)
 * 
 */
      __pyx_t_1 = PyObject_Length(__pyx_v_crossSectionsFile); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 302, __pyx_L1_error)
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "python/cython/_fisx.pyx":303
 *                 self.thisptr = new Elements(directoryName)
 *                 if len(crossSectionsFile):
 *                     self.thisptr.setMassAttenuationCoefficientsFile(crossSectionsFile)             # <<<<<<<<<<<<<<
 * 
 *     def initializeAsPyMca(self):
 */
        __pyx_t_10 = __pyx_convert_string_from_py_std__in_string(__pyx_v_crossSectionsFile); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 303, __pyx_L1_error)
        try {
          __pyx_v_self->thisptr->setMassAttenuationCoefficientsFile(__pyx_t_10);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(1, 303, __pyx_L1_error)
        }

        /* "python/cython/_fisx.pyx":302
 *             else:
 *                 self.thisptr = new Elements(directoryName)
 *                 if len(crossSectionsFile):             # <<<<<<<<<<<<<<
 *                     self.thisptr.setMassAttenuationCoefficientsFile(crossSectionsFile)
 * 
 */
      }
    }
    __pyx_L5:;
  }
  __pyx_L4:;

  /* "python/cython/_fisx.pyx":284
 *     cdef Elements *thisptr
 * 
 *     def __cinit__(self, directoryName="",             # <<<<<<<<<<<<<<
 *                         bindingEnergiesFile="",
 *                         crossSectionsFile="",
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("fisx._fisx.PyElements.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_DataDir);
  __Pyx_XDECREF(__pyx_v_directoryName);
  __Pyx_XDECREF(__pyx_v_bindingEnergiesFile);
  __Pyx_XDECREF(__pyx_v_crossSectionsFile);
  __Pyx_XDECREF(__pyx_v_pymca);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":305
 *                     self.thisptr.setMassAttenuationCoefficientsFile(crossSectionsFile)
 * 
 *     def initializeAsPyMca(self):             # <<<<<<<<<<<<<<
 *         """
 *         Configure the instance to use the same set of data as PyMca.
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_3initializeAsPyMca(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_2initializeAsPyMca[] = "\n        Configure the instance to use the same set of data as PyMca.\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_3initializeAsPyMca(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("initializeAsPyMca (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_2initializeAsPyMca(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_2initializeAsPyMca(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self) {
  CYTHON_UNUSED PyObject *__pyx_v_os = NULL;
  PyObject *__pyx_v_getDataFile = NULL;
  PyObject *__pyx_v_DataDir = NULL;
  PyObject *__pyx_v_directoryName = NULL;
  PyObject *__pyx_v_bindingEnergies = NULL;
  PyObject *__pyx_v_xcomFile = NULL;
  PyObject *__pyx_v_shell = NULL;
  PyObject *__pyx_v_shellConstantsFile = NULL;
  PyObject *__pyx_v_radiativeRatesFile = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  std::string __pyx_t_11;
  std::string __pyx_t_12;
  std::string __pyx_t_13;
  fisx::Elements *__pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("initializeAsPyMca", 0);

  /* "python/cython/_fisx.pyx":309
 *         Configure the instance to use the same set of data as PyMca.
 *         """
 *         import os             # <<<<<<<<<<<<<<
 *         try:
 *             from PyMca5 import getDataFile
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_os = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":310
 *         """
 *         import os
 *         try:             # <<<<<<<<<<<<<<
 *             from PyMca5 import getDataFile
 *         except ImportError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "python/cython/_fisx.pyx":311
 *         import os
 *         try:
 *             from PyMca5 import getDataFile             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             # old fashion way with duplicated data in PyMca and in fisx
 */
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 311, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_n_s_getDataFile);
      __Pyx_GIVEREF(__pyx_n_s_getDataFile);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_getDataFile);
      __pyx_t_5 = __Pyx_Import(__pyx_n_s_PyMca5, __pyx_t_1, -1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 311, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_getDataFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 311, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_getDataFile = __pyx_t_1;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "python/cython/_fisx.pyx":310
 *         """
 *         import os
 *         try:             # <<<<<<<<<<<<<<
 *             from PyMca5 import getDataFile
 *         except ImportError:
 */
    }
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "python/cython/_fisx.pyx":312
 *         try:
 *             from PyMca5 import getDataFile
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             # old fashion way with duplicated data in PyMca and in fisx
 *             return self.__initializeAsPyMcaOld()
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("fisx._fisx.PyElements.initializeAsPyMca", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(1, 312, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_7);

      /* "python/cython/_fisx.pyx":314
 *         except ImportError:
 *             # old fashion way with duplicated data in PyMca and in fisx
 *             return self.__initializeAsPyMcaOld()             # <<<<<<<<<<<<<<
 * 
 *         from fisx import DataDir
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_initializeAsPyMcaOld); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 314, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 314, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "python/cython/_fisx.pyx":310
 *         """
 *         import os
 *         try:             # <<<<<<<<<<<<<<
 *             from PyMca5 import getDataFile
 *         except ImportError:
 */
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "python/cython/_fisx.pyx":316
 *             return self.__initializeAsPyMcaOld()
 * 
 *         from fisx import DataDir             # <<<<<<<<<<<<<<
 *         directoryName = DataDir.FISX_DATA_DIR
 *         bindingEnergies = getDataFile("BindingEnergies.dat")
 */
  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_n_s_DataDir);
  __Pyx_GIVEREF(__pyx_n_s_DataDir);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_DataDir);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_fisx, __pyx_t_7, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_DataDir); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_t_7);
  __pyx_v_DataDir = __pyx_t_7;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":317
 * 
 *         from fisx import DataDir
 *         directoryName = DataDir.FISX_DATA_DIR             # <<<<<<<<<<<<<<
 *         bindingEnergies = getDataFile("BindingEnergies.dat")
 *         xcomFile = getDataFile("XCOM_CrossSections.dat")
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_DataDir, __pyx_n_s_FISX_DATA_DIR); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_directoryName = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":318
 *         from fisx import DataDir
 *         directoryName = DataDir.FISX_DATA_DIR
 *         bindingEnergies = getDataFile("BindingEnergies.dat")             # <<<<<<<<<<<<<<
 *         xcomFile = getDataFile("XCOM_CrossSections.dat")
 *         del self.thisptr
 */
  __Pyx_INCREF(__pyx_v_getDataFile);
  __pyx_t_7 = __pyx_v_getDataFile; __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_kp_s_BindingEnergies_dat) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_s_BindingEnergies_dat);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_bindingEnergies = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":319
 *         directoryName = DataDir.FISX_DATA_DIR
 *         bindingEnergies = getDataFile("BindingEnergies.dat")
 *         xcomFile = getDataFile("XCOM_CrossSections.dat")             # <<<<<<<<<<<<<<
 *         del self.thisptr
 *         self.thisptr = new Elements(toBytes(directoryName), toBytes(bindingEnergies), toBytes(xcomFile))
 */
  __Pyx_INCREF(__pyx_v_getDataFile);
  __pyx_t_7 = __pyx_v_getDataFile; __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_kp_s_XCOM_CrossSections_dat) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_s_XCOM_CrossSections_dat);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_xcomFile = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":320
 *         bindingEnergies = getDataFile("BindingEnergies.dat")
 *         xcomFile = getDataFile("XCOM_CrossSections.dat")
 *         del self.thisptr             # <<<<<<<<<<<<<<
 *         self.thisptr = new Elements(toBytes(directoryName), toBytes(bindingEnergies), toBytes(xcomFile))
 *         for shell in ["K", "L", "M"]:
 */
  delete __pyx_v_self->thisptr;

  /* "python/cython/_fisx.pyx":321
 *         xcomFile = getDataFile("XCOM_CrossSections.dat")
 *         del self.thisptr
 *         self.thisptr = new Elements(toBytes(directoryName), toBytes(bindingEnergies), toBytes(xcomFile))             # <<<<<<<<<<<<<<
 *         for shell in ["K", "L", "M"]:
 *             shellConstantsFile = getDataFile(shell+"ShellConstants.dat")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_directoryName) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_directoryName);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 321, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_bindingEnergies) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_bindingEnergies);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_12 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 321, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_xcomFile) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_xcomFile);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_13 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 321, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_14 = new fisx::Elements(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 321, __pyx_L1_error)
  }
  __pyx_v_self->thisptr = __pyx_t_14;

  /* "python/cython/_fisx.pyx":322
 *         del self.thisptr
 *         self.thisptr = new Elements(toBytes(directoryName), toBytes(bindingEnergies), toBytes(xcomFile))
 *         for shell in ["K", "L", "M"]:             # <<<<<<<<<<<<<<
 *             shellConstantsFile = getDataFile(shell+"ShellConstants.dat")
 *             self.thisptr.setShellConstantsFile(toBytes(shell),
 */
  __pyx_t_1 = __pyx_tuple__6; __Pyx_INCREF(__pyx_t_1); __pyx_t_15 = 0;
  for (;;) {
    if (__pyx_t_15 >= 3) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_15); __Pyx_INCREF(__pyx_t_7); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(1, 322, __pyx_L1_error)
    #else
    __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_shell, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "python/cython/_fisx.pyx":323
 *         self.thisptr = new Elements(toBytes(directoryName), toBytes(bindingEnergies), toBytes(xcomFile))
 *         for shell in ["K", "L", "M"]:
 *             shellConstantsFile = getDataFile(shell+"ShellConstants.dat")             # <<<<<<<<<<<<<<
 *             self.thisptr.setShellConstantsFile(toBytes(shell),
 *                                                toBytes(shellConstantsFile))
 */
    __pyx_t_5 = PyNumber_Add(__pyx_v_shell, __pyx_kp_s_ShellConstants_dat); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_getDataFile);
    __pyx_t_8 = __pyx_v_getDataFile; __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF_SET(__pyx_v_shellConstantsFile, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "python/cython/_fisx.pyx":324
 *         for shell in ["K", "L", "M"]:
 *             shellConstantsFile = getDataFile(shell+"ShellConstants.dat")
 *             self.thisptr.setShellConstantsFile(toBytes(shell),             # <<<<<<<<<<<<<<
 *                                                toBytes(shellConstantsFile))
 *         for shell in ["K", "L", "M"]:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_5, __pyx_v_shell) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_shell);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_13 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 324, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "python/cython/_fisx.pyx":325
 *             shellConstantsFile = getDataFile(shell+"ShellConstants.dat")
 *             self.thisptr.setShellConstantsFile(toBytes(shell),
 *                                                toBytes(shellConstantsFile))             # <<<<<<<<<<<<<<
 *         for shell in ["K", "L", "M"]:
 *             radiativeRatesFile = getDataFile(shell+"ShellRates.dat")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_5, __pyx_v_shellConstantsFile) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_shellConstantsFile);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_12 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 325, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "python/cython/_fisx.pyx":324
 *         for shell in ["K", "L", "M"]:
 *             shellConstantsFile = getDataFile(shell+"ShellConstants.dat")
 *             self.thisptr.setShellConstantsFile(toBytes(shell),             # <<<<<<<<<<<<<<
 *                                                toBytes(shellConstantsFile))
 *         for shell in ["K", "L", "M"]:
 */
    try {
      __pyx_v_self->thisptr->setShellConstantsFile(__pyx_t_13, __pyx_t_12);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 324, __pyx_L1_error)
    }

    /* "python/cython/_fisx.pyx":322
 *         del self.thisptr
 *         self.thisptr = new Elements(toBytes(directoryName), toBytes(bindingEnergies), toBytes(xcomFile))
 *         for shell in ["K", "L", "M"]:             # <<<<<<<<<<<<<<
 *             shellConstantsFile = getDataFile(shell+"ShellConstants.dat")
 *             self.thisptr.setShellConstantsFile(toBytes(shell),
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":326
 *             self.thisptr.setShellConstantsFile(toBytes(shell),
 *                                                toBytes(shellConstantsFile))
 *         for shell in ["K", "L", "M"]:             # <<<<<<<<<<<<<<
 *             radiativeRatesFile = getDataFile(shell+"ShellRates.dat")
 *             self.thisptr.setShellRadiativeTransitionsFile(toBytes(shell), toBytes(radiativeRatesFile))
 */
  __pyx_t_1 = __pyx_tuple__6; __Pyx_INCREF(__pyx_t_1); __pyx_t_15 = 0;
  for (;;) {
    if (__pyx_t_15 >= 3) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_15); __Pyx_INCREF(__pyx_t_7); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(1, 326, __pyx_L1_error)
    #else
    __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_shell, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "python/cython/_fisx.pyx":327
 *                                                toBytes(shellConstantsFile))
 *         for shell in ["K", "L", "M"]:
 *             radiativeRatesFile = getDataFile(shell+"ShellRates.dat")             # <<<<<<<<<<<<<<
 *             self.thisptr.setShellRadiativeTransitionsFile(toBytes(shell), toBytes(radiativeRatesFile))
 * 
 */
    __pyx_t_8 = PyNumber_Add(__pyx_v_shell, __pyx_kp_s_ShellRates_dat); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_getDataFile);
    __pyx_t_5 = __pyx_v_getDataFile; __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_radiativeRatesFile, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "python/cython/_fisx.pyx":328
 *         for shell in ["K", "L", "M"]:
 *             radiativeRatesFile = getDataFile(shell+"ShellRates.dat")
 *             self.thisptr.setShellRadiativeTransitionsFile(toBytes(shell), toBytes(radiativeRatesFile))             # <<<<<<<<<<<<<<
 * 
 *     def __initializeAsPyMcaOld(self):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_v_shell) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_shell);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_12 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 328, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_v_radiativeRatesFile) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_radiativeRatesFile);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_13 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 328, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    try {
      __pyx_v_self->thisptr->setShellRadiativeTransitionsFile(__pyx_t_12, __pyx_t_13);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 328, __pyx_L1_error)
    }

    /* "python/cython/_fisx.pyx":326
 *             self.thisptr.setShellConstantsFile(toBytes(shell),
 *                                                toBytes(shellConstantsFile))
 *         for shell in ["K", "L", "M"]:             # <<<<<<<<<<<<<<
 *             radiativeRatesFile = getDataFile(shell+"ShellRates.dat")
 *             self.thisptr.setShellRadiativeTransitionsFile(toBytes(shell), toBytes(radiativeRatesFile))
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":305
 *                     self.thisptr.setMassAttenuationCoefficientsFile(crossSectionsFile)
 * 
 *     def initializeAsPyMca(self):             # <<<<<<<<<<<<<<
 *         """
 *         Configure the instance to use the same set of data as PyMca.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("fisx._fisx.PyElements.initializeAsPyMca", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_os);
  __Pyx_XDECREF(__pyx_v_getDataFile);
  __Pyx_XDECREF(__pyx_v_DataDir);
  __Pyx_XDECREF(__pyx_v_directoryName);
  __Pyx_XDECREF(__pyx_v_bindingEnergies);
  __Pyx_XDECREF(__pyx_v_xcomFile);
  __Pyx_XDECREF(__pyx_v_shell);
  __Pyx_XDECREF(__pyx_v_shellConstantsFile);
  __Pyx_XDECREF(__pyx_v_radiativeRatesFile);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":330
 *             self.thisptr.setShellRadiativeTransitionsFile(toBytes(shell), toBytes(radiativeRatesFile))
 * 
 *     def __initializeAsPyMcaOld(self):             # <<<<<<<<<<<<<<
 *         """
 *         Configure the instance to use the same set of data as PyMca.
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_5__initializeAsPyMcaOld(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_4__initializeAsPyMcaOld[] = "\n        Configure the instance to use the same set of data as PyMca.\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_5__initializeAsPyMcaOld(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__initializeAsPyMcaOld (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_4__initializeAsPyMcaOld(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_4__initializeAsPyMcaOld(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self) {
  PyObject *__pyx_v_os = NULL;
  PyObject *__pyx_v_DataDir = NULL;
  PyObject *__pyx_v_directoryName = NULL;
  PyObject *__pyx_v_PyMcaDataDir = NULL;
  PyObject *__pyx_v_dataDir = NULL;
  PyObject *__pyx_v_bindingEnergies = NULL;
  PyObject *__pyx_v_xcomFile = NULL;
  PyObject *__pyx_v_shell = NULL;
  PyObject *__pyx_v_shellConstantsFile = NULL;
  PyObject *__pyx_v_radiativeRatesFile = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  std::string __pyx_t_10;
  std::string __pyx_t_11;
  std::string __pyx_t_12;
  fisx::Elements *__pyx_t_13;
  Py_ssize_t __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__initializeAsPyMcaOld", 0);

  /* "python/cython/_fisx.pyx":334
 *         Configure the instance to use the same set of data as PyMca.
 *         """
 *         import os             # <<<<<<<<<<<<<<
 *         try:
 *             from fisx import DataDir
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_os = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":335
 *         """
 *         import os
 *         try:             # <<<<<<<<<<<<<<
 *             from fisx import DataDir
 *             directoryName = DataDir.FISX_DATA_DIR
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "python/cython/_fisx.pyx":336
 *         import os
 *         try:
 *             from fisx import DataDir             # <<<<<<<<<<<<<<
 *             directoryName = DataDir.FISX_DATA_DIR
 *             from PyMca5 import PyMcaDataDir
 */
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 336, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_n_s_DataDir);
      __Pyx_GIVEREF(__pyx_n_s_DataDir);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_DataDir);
      __pyx_t_5 = __Pyx_Import(__pyx_n_s_fisx, __pyx_t_1, -1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 336, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_DataDir); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 336, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_DataDir = __pyx_t_1;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "python/cython/_fisx.pyx":337
 *         try:
 *             from fisx import DataDir
 *             directoryName = DataDir.FISX_DATA_DIR             # <<<<<<<<<<<<<<
 *             from PyMca5 import PyMcaDataDir
 *             dataDir = PyMcaDataDir.PYMCA_DATA_DIR
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_DataDir, __pyx_n_s_FISX_DATA_DIR); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 337, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_directoryName = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "python/cython/_fisx.pyx":338
 *             from fisx import DataDir
 *             directoryName = DataDir.FISX_DATA_DIR
 *             from PyMca5 import PyMcaDataDir             # <<<<<<<<<<<<<<
 *             dataDir = PyMcaDataDir.PYMCA_DATA_DIR
 *         except ImportError:
 */
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 338, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_n_s_PyMcaDataDir);
      __Pyx_GIVEREF(__pyx_n_s_PyMcaDataDir);
      PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_PyMcaDataDir);
      __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyMca5, __pyx_t_5, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 338, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_PyMcaDataDir); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 338, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_PyMcaDataDir = __pyx_t_5;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "python/cython/_fisx.pyx":339
 *             directoryName = DataDir.FISX_DATA_DIR
 *             from PyMca5 import PyMcaDataDir
 *             dataDir = PyMcaDataDir.PYMCA_DATA_DIR             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             from fisx import DataDir
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_PyMcaDataDir, __pyx_n_s_PYMCA_DATA_DIR); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 339, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_dataDir = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "python/cython/_fisx.pyx":335
 *         """
 *         import os
 *         try:             # <<<<<<<<<<<<<<
 *             from fisx import DataDir
 *             directoryName = DataDir.FISX_DATA_DIR
 */
    }
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "python/cython/_fisx.pyx":340
 *             from PyMca5 import PyMcaDataDir
 *             dataDir = PyMcaDataDir.PYMCA_DATA_DIR
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             from fisx import DataDir
 *             directoryName = DataDir.FISX_DATA_DIR
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("fisx._fisx.PyElements.__initializeAsPyMcaOld", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(1, 340, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_7);

      /* "python/cython/_fisx.pyx":341
 *             dataDir = PyMcaDataDir.PYMCA_DATA_DIR
 *         except ImportError:
 *             from fisx import DataDir             # <<<<<<<<<<<<<<
 *             directoryName = DataDir.FISX_DATA_DIR
 *             dataDir = directoryName
 */
      __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 341, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_n_s_DataDir);
      __Pyx_GIVEREF(__pyx_n_s_DataDir);
      PyList_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_DataDir);
      __pyx_t_9 = __Pyx_Import(__pyx_n_s_fisx, __pyx_t_8, -1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 341, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_9, __pyx_n_s_DataDir); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 341, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_v_DataDir, __pyx_t_8);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "python/cython/_fisx.pyx":342
 *         except ImportError:
 *             from fisx import DataDir
 *             directoryName = DataDir.FISX_DATA_DIR             # <<<<<<<<<<<<<<
 *             dataDir = directoryName
 *         bindingEnergies = os.path.join(dataDir, "BindingEnergies.dat")
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_DataDir, __pyx_n_s_FISX_DATA_DIR); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 342, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_v_directoryName, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "python/cython/_fisx.pyx":343
 *             from fisx import DataDir
 *             directoryName = DataDir.FISX_DATA_DIR
 *             dataDir = directoryName             # <<<<<<<<<<<<<<
 *         bindingEnergies = os.path.join(dataDir, "BindingEnergies.dat")
 *         xcomFile = os.path.join(dataDir, "XCOM_CrossSections.dat")
 */
      __Pyx_INCREF(__pyx_v_directoryName);
      __Pyx_XDECREF_SET(__pyx_v_dataDir, __pyx_v_directoryName);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "python/cython/_fisx.pyx":335
 *         """
 *         import os
 *         try:             # <<<<<<<<<<<<<<
 *             from fisx import DataDir
 *             directoryName = DataDir.FISX_DATA_DIR
 */
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    __pyx_L8_try_end:;
  }

  /* "python/cython/_fisx.pyx":344
 *             directoryName = DataDir.FISX_DATA_DIR
 *             dataDir = directoryName
 *         bindingEnergies = os.path.join(dataDir, "BindingEnergies.dat")             # <<<<<<<<<<<<<<
 *         xcomFile = os.path.join(dataDir, "XCOM_CrossSections.dat")
 *         del self.thisptr
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_os, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_join); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_dataDir, __pyx_kp_s_BindingEnergies_dat};
    __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 344, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_7);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_dataDir, __pyx_kp_s_BindingEnergies_dat};
    __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 344, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_7);
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_v_dataDir);
    __Pyx_GIVEREF(__pyx_v_dataDir);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_v_dataDir);
    __Pyx_INCREF(__pyx_kp_s_BindingEnergies_dat);
    __Pyx_GIVEREF(__pyx_kp_s_BindingEnergies_dat);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_kp_s_BindingEnergies_dat);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_bindingEnergies = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "python/cython/_fisx.pyx":345
 *             dataDir = directoryName
 *         bindingEnergies = os.path.join(dataDir, "BindingEnergies.dat")
 *         xcomFile = os.path.join(dataDir, "XCOM_CrossSections.dat")             # <<<<<<<<<<<<<<
 *         del self.thisptr
 *         self.thisptr = new Elements(toBytes(directoryName), toBytes(bindingEnergies), toBytes(xcomFile))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_os, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_join); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_9)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_dataDir, __pyx_kp_s_XCOM_CrossSections_dat};
    __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 345, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_7);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_dataDir, __pyx_kp_s_XCOM_CrossSections_dat};
    __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 345, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_7);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_INCREF(__pyx_v_dataDir);
    __Pyx_GIVEREF(__pyx_v_dataDir);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_dataDir);
    __Pyx_INCREF(__pyx_kp_s_XCOM_CrossSections_dat);
    __Pyx_GIVEREF(__pyx_kp_s_XCOM_CrossSections_dat);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_kp_s_XCOM_CrossSections_dat);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_xcomFile = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "python/cython/_fisx.pyx":346
 *         bindingEnergies = os.path.join(dataDir, "BindingEnergies.dat")
 *         xcomFile = os.path.join(dataDir, "XCOM_CrossSections.dat")
 *         del self.thisptr             # <<<<<<<<<<<<<<
 *         self.thisptr = new Elements(toBytes(directoryName), toBytes(bindingEnergies), toBytes(xcomFile))
 *         for shell in ["K", "L", "M"]:
 */
  delete __pyx_v_self->thisptr;

  /* "python/cython/_fisx.pyx":347
 *         xcomFile = os.path.join(dataDir, "XCOM_CrossSections.dat")
 *         del self.thisptr
 *         self.thisptr = new Elements(toBytes(directoryName), toBytes(bindingEnergies), toBytes(xcomFile))             # <<<<<<<<<<<<<<
 *         for shell in ["K", "L", "M"]:
 *             shellConstantsFile = os.path.join(dataDir, shell+"ShellConstants.dat")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_5, __pyx_v_directoryName) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_directoryName);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_10 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 347, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_5, __pyx_v_bindingEnergies) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_bindingEnergies);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 347, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_5, __pyx_v_xcomFile) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_xcomFile);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_12 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 347, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  try {
    __pyx_t_13 = new fisx::Elements(__pyx_t_10, __pyx_t_11, __pyx_t_12);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 347, __pyx_L1_error)
  }
  __pyx_v_self->thisptr = __pyx_t_13;

  /* "python/cython/_fisx.pyx":348
 *         del self.thisptr
 *         self.thisptr = new Elements(toBytes(directoryName), toBytes(bindingEnergies), toBytes(xcomFile))
 *         for shell in ["K", "L", "M"]:             # <<<<<<<<<<<<<<
 *             shellConstantsFile = os.path.join(dataDir, shell+"ShellConstants.dat")
 *             self.thisptr.setShellConstantsFile(toBytes(shell), toBytes(shellConstantsFile))
 */
  __pyx_t_7 = __pyx_tuple__6; __Pyx_INCREF(__pyx_t_7); __pyx_t_14 = 0;
  for (;;) {
    if (__pyx_t_14 >= 3) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_14); __Pyx_INCREF(__pyx_t_9); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(1, 348, __pyx_L1_error)
    #else
    __pyx_t_9 = PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_shell, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "python/cython/_fisx.pyx":349
 *         self.thisptr = new Elements(toBytes(directoryName), toBytes(bindingEnergies), toBytes(xcomFile))
 *         for shell in ["K", "L", "M"]:
 *             shellConstantsFile = os.path.join(dataDir, shell+"ShellConstants.dat")             # <<<<<<<<<<<<<<
 *             self.thisptr.setShellConstantsFile(toBytes(shell), toBytes(shellConstantsFile))
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_os, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_join); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_v_shell, __pyx_kp_s_ShellConstants_dat); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_dataDir, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 349, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_dataDir, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 349, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_15 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      if (__pyx_t_8) {
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8); __pyx_t_8 = NULL;
      }
      __Pyx_INCREF(__pyx_v_dataDir);
      __Pyx_GIVEREF(__pyx_v_dataDir);
      PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_6, __pyx_v_dataDir);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_6, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_15, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_shellConstantsFile, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "python/cython/_fisx.pyx":350
 *         for shell in ["K", "L", "M"]:
 *             shellConstantsFile = os.path.join(dataDir, shell+"ShellConstants.dat")
 *             self.thisptr.setShellConstantsFile(toBytes(shell), toBytes(shellConstantsFile))             # <<<<<<<<<<<<<<
 * 
 *         for shell in ["K", "L", "M"]:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_15 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_15)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_9 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_15, __pyx_v_shell) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_shell);
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = __pyx_convert_string_from_py_std__in_string(__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 350, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_15 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_15)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_9 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_15, __pyx_v_shellConstantsFile) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_shellConstantsFile);
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 350, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    try {
      __pyx_v_self->thisptr->setShellConstantsFile(__pyx_t_12, __pyx_t_11);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 350, __pyx_L1_error)
    }

    /* "python/cython/_fisx.pyx":348
 *         del self.thisptr
 *         self.thisptr = new Elements(toBytes(directoryName), toBytes(bindingEnergies), toBytes(xcomFile))
 *         for shell in ["K", "L", "M"]:             # <<<<<<<<<<<<<<
 *             shellConstantsFile = os.path.join(dataDir, shell+"ShellConstants.dat")
 *             self.thisptr.setShellConstantsFile(toBytes(shell), toBytes(shellConstantsFile))
 */
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "python/cython/_fisx.pyx":352
 *             self.thisptr.setShellConstantsFile(toBytes(shell), toBytes(shellConstantsFile))
 * 
 *         for shell in ["K", "L", "M"]:             # <<<<<<<<<<<<<<
 *             radiativeRatesFile = os.path.join(dataDir, shell+"ShellRates.dat")
 *             self.thisptr.setShellRadiativeTransitionsFile(toBytes(shell), toBytes(radiativeRatesFile))
 */
  __pyx_t_7 = __pyx_tuple__6; __Pyx_INCREF(__pyx_t_7); __pyx_t_14 = 0;
  for (;;) {
    if (__pyx_t_14 >= 3) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_14); __Pyx_INCREF(__pyx_t_9); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(1, 352, __pyx_L1_error)
    #else
    __pyx_t_9 = PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_shell, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "python/cython/_fisx.pyx":353
 * 
 *         for shell in ["K", "L", "M"]:
 *             radiativeRatesFile = os.path.join(dataDir, shell+"ShellRates.dat")             # <<<<<<<<<<<<<<
 *             self.thisptr.setShellRadiativeTransitionsFile(toBytes(shell), toBytes(radiativeRatesFile))
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_os, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_join); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_v_shell, __pyx_kp_s_ShellRates_dat); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_15)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_dataDir, __pyx_t_1};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 353, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_dataDir, __pyx_t_1};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 353, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_dataDir);
      __Pyx_GIVEREF(__pyx_v_dataDir);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_6, __pyx_v_dataDir);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_6, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_XDECREF_SET(__pyx_v_radiativeRatesFile, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "python/cython/_fisx.pyx":354
 *         for shell in ["K", "L", "M"]:
 *             radiativeRatesFile = os.path.join(dataDir, shell+"ShellRates.dat")
 *             self.thisptr.setShellRadiativeTransitionsFile(toBytes(shell), toBytes(radiativeRatesFile))             # <<<<<<<<<<<<<<
 * 
 *     def getElementNames(self):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
      }
    }
    __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_8, __pyx_v_shell) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_v_shell);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 354, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
      }
    }
    __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_8, __pyx_v_radiativeRatesFile) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_v_radiativeRatesFile);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_12 = __pyx_convert_string_from_py_std__in_string(__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 354, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    try {
      __pyx_v_self->thisptr->setShellRadiativeTransitionsFile(__pyx_t_11, __pyx_t_12);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 354, __pyx_L1_error)
    }

    /* "python/cython/_fisx.pyx":352
 *             self.thisptr.setShellConstantsFile(toBytes(shell), toBytes(shellConstantsFile))
 * 
 *         for shell in ["K", "L", "M"]:             # <<<<<<<<<<<<<<
 *             radiativeRatesFile = os.path.join(dataDir, shell+"ShellRates.dat")
 *             self.thisptr.setShellRadiativeTransitionsFile(toBytes(shell), toBytes(radiativeRatesFile))
 */
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "python/cython/_fisx.pyx":330
 *             self.thisptr.setShellRadiativeTransitionsFile(toBytes(shell), toBytes(radiativeRatesFile))
 * 
 *     def __initializeAsPyMcaOld(self):             # <<<<<<<<<<<<<<
 *         """
 *         Configure the instance to use the same set of data as PyMca.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("fisx._fisx.PyElements.__initializeAsPyMcaOld", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_os);
  __Pyx_XDECREF(__pyx_v_DataDir);
  __Pyx_XDECREF(__pyx_v_directoryName);
  __Pyx_XDECREF(__pyx_v_PyMcaDataDir);
  __Pyx_XDECREF(__pyx_v_dataDir);
  __Pyx_XDECREF(__pyx_v_bindingEnergies);
  __Pyx_XDECREF(__pyx_v_xcomFile);
  __Pyx_XDECREF(__pyx_v_shell);
  __Pyx_XDECREF(__pyx_v_shellConstantsFile);
  __Pyx_XDECREF(__pyx_v_radiativeRatesFile);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":356
 *             self.thisptr.setShellRadiativeTransitionsFile(toBytes(shell), toBytes(radiativeRatesFile))
 * 
 *     def getElementNames(self):             # <<<<<<<<<<<<<<
 *         return toStringList(self.thisptr.getElementNames())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_7getElementNames(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_7getElementNames(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getElementNames (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_6getElementNames(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_6getElementNames(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getElementNames", 0);

  /* "python/cython/_fisx.pyx":357
 * 
 *     def getElementNames(self):
 *         return toStringList(self.thisptr.getElementNames())             # <<<<<<<<<<<<<<
 * 
 *     def getAtomicMass(self, element):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringList); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_self->thisptr->getElementNames()); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":356
 *             self.thisptr.setShellRadiativeTransitionsFile(toBytes(shell), toBytes(radiativeRatesFile))
 * 
 *     def getElementNames(self):             # <<<<<<<<<<<<<<
 *         return toStringList(self.thisptr.getElementNames())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getElementNames", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":359
 *         return toStringList(self.thisptr.getElementNames())
 * 
 *     def getAtomicMass(self, element):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getAtomicMass(toBytes(element))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_9getAtomicMass(PyObject *__pyx_v_self, PyObject *__pyx_v_element); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_9getAtomicMass(PyObject *__pyx_v_self, PyObject *__pyx_v_element) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getAtomicMass (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_8getAtomicMass(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v_element));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_8getAtomicMass(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_element) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  double __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getAtomicMass", 0);

  /* "python/cython/_fisx.pyx":360
 * 
 *     def getAtomicMass(self, element):
 *         return self.thisptr.getAtomicMass(toBytes(element))             # <<<<<<<<<<<<<<
 * 
 *     def getAtomicNumber(self, element):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_element) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_element);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 360, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_5 = __pyx_v_self->thisptr->getAtomicMass(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 360, __pyx_L1_error)
  }
  __pyx_t_1 = PyFloat_FromDouble(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":359
 *         return toStringList(self.thisptr.getElementNames())
 * 
 *     def getAtomicMass(self, element):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getAtomicMass(toBytes(element))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getAtomicMass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":362
 *         return self.thisptr.getAtomicMass(toBytes(element))
 * 
 *     def getAtomicNumber(self, element):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getAtomicNumber(toBytes(element))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_11getAtomicNumber(PyObject *__pyx_v_self, PyObject *__pyx_v_element); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_11getAtomicNumber(PyObject *__pyx_v_self, PyObject *__pyx_v_element) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getAtomicNumber (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_10getAtomicNumber(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v_element));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_10getAtomicNumber(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_element) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getAtomicNumber", 0);

  /* "python/cython/_fisx.pyx":363
 * 
 *     def getAtomicNumber(self, element):
 *         return self.thisptr.getAtomicNumber(toBytes(element))             # <<<<<<<<<<<<<<
 * 
 *     def getDensity(self, element):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_element) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_element);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 363, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_5 = __pyx_v_self->thisptr->getAtomicNumber(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 363, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":362
 *         return self.thisptr.getAtomicMass(toBytes(element))
 * 
 *     def getAtomicNumber(self, element):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getAtomicNumber(toBytes(element))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getAtomicNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":365
 *         return self.thisptr.getAtomicNumber(toBytes(element))
 * 
 *     def getDensity(self, element):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getDensity(toBytes(element))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_13getDensity(PyObject *__pyx_v_self, PyObject *__pyx_v_element); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_13getDensity(PyObject *__pyx_v_self, PyObject *__pyx_v_element) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDensity (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_12getDensity(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v_element));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_12getDensity(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_element) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  double __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getDensity", 0);

  /* "python/cython/_fisx.pyx":366
 * 
 *     def getDensity(self, element):
 *         return self.thisptr.getDensity(toBytes(element))             # <<<<<<<<<<<<<<
 * 
 *     def getLongName(self, element):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_element) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_element);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_5 = __pyx_v_self->thisptr->getDensity(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 366, __pyx_L1_error)
  }
  __pyx_t_1 = PyFloat_FromDouble(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":365
 *         return self.thisptr.getAtomicNumber(toBytes(element))
 * 
 *     def getDensity(self, element):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getDensity(toBytes(element))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getDensity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":368
 *         return self.thisptr.getDensity(toBytes(element))
 * 
 *     def getLongName(self, element):             # <<<<<<<<<<<<<<
 *         return toString(self.thisptr.getLongName(toBytes(element)))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_15getLongName(PyObject *__pyx_v_self, PyObject *__pyx_v_element); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_15getLongName(PyObject *__pyx_v_self, PyObject *__pyx_v_element) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getLongName (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_14getLongName(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v_element));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_14getLongName(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_element) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  std::string __pyx_t_6;
  std::string __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getLongName", 0);

  /* "python/cython/_fisx.pyx":369
 * 
 *     def getLongName(self, element):
 *         return toString(self.thisptr.getLongName(toBytes(element)))             # <<<<<<<<<<<<<<
 * 
 *     def getColumn(self, element):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toString); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_element) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_element);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 369, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  try {
    __pyx_t_7 = __pyx_v_self->thisptr->getLongName(__pyx_t_6);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 369, __pyx_L1_error)
  }
  __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":368
 *         return self.thisptr.getDensity(toBytes(element))
 * 
 *     def getLongName(self, element):             # <<<<<<<<<<<<<<
 *         return toString(self.thisptr.getLongName(toBytes(element)))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getLongName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":371
 *         return toString(self.thisptr.getLongName(toBytes(element)))
 * 
 *     def getColumn(self, element):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getColumn(toBytes(element))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_17getColumn(PyObject *__pyx_v_self, PyObject *__pyx_v_element); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_17getColumn(PyObject *__pyx_v_self, PyObject *__pyx_v_element) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getColumn (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_16getColumn(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v_element));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_16getColumn(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_element) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getColumn", 0);

  /* "python/cython/_fisx.pyx":372
 * 
 *     def getColumn(self, element):
 *         return self.thisptr.getColumn(toBytes(element))             # <<<<<<<<<<<<<<
 * 
 *     def getRow(self, std_string element):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_element) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_element);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_5 = __pyx_v_self->thisptr->getColumn(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 372, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":371
 *         return toString(self.thisptr.getLongName(toBytes(element)))
 * 
 *     def getColumn(self, element):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getColumn(toBytes(element))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getColumn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":374
 *         return self.thisptr.getColumn(toBytes(element))
 * 
 *     def getRow(self, std_string element):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getRow(toBytes(element))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_19getRow(PyObject *__pyx_v_self, PyObject *__pyx_arg_element); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_19getRow(PyObject *__pyx_v_self, PyObject *__pyx_arg_element) {
  std::string __pyx_v_element;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRow (wrapper)", 0);
  assert(__pyx_arg_element); {
    __pyx_v_element = __pyx_convert_string_from_py_std__in_string(__pyx_arg_element); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 374, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.getRow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_18getRow(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((std::string)__pyx_v_element));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_18getRow(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_element) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  std::string __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getRow", 0);

  /* "python/cython/_fisx.pyx":375
 * 
 *     def getRow(self, std_string element):
 *         return self.thisptr.getRow(toBytes(element))             # <<<<<<<<<<<<<<
 * 
 *     def getMaterialNames(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_element); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 375, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_6 = __pyx_v_self->thisptr->getRow(__pyx_t_5);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 375, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":374
 *         return self.thisptr.getColumn(toBytes(element))
 * 
 *     def getRow(self, std_string element):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getRow(toBytes(element))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getRow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":377
 *         return self.thisptr.getRow(toBytes(element))
 * 
 *     def getMaterialNames(self):             # <<<<<<<<<<<<<<
 *         return toStringList(self.thisptr.getMaterialNames())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_21getMaterialNames(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_21getMaterialNames(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMaterialNames (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_20getMaterialNames(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_20getMaterialNames(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getMaterialNames", 0);

  /* "python/cython/_fisx.pyx":378
 * 
 *     def getMaterialNames(self):
 *         return toStringList(self.thisptr.getMaterialNames())             # <<<<<<<<<<<<<<
 * 
 *     def getComposition(self, materialOrFormula):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringList); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_self->thisptr->getMaterialNames()); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":377
 *         return self.thisptr.getRow(toBytes(element))
 * 
 *     def getMaterialNames(self):             # <<<<<<<<<<<<<<
 *         return toStringList(self.thisptr.getMaterialNames())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getMaterialNames", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":380
 *         return toStringList(self.thisptr.getMaterialNames())
 * 
 *     def getComposition(self, materialOrFormula):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getComposition(toBytes(materialOrFormula))
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_23getComposition(PyObject *__pyx_v_self, PyObject *__pyx_v_materialOrFormula); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_23getComposition(PyObject *__pyx_v_self, PyObject *__pyx_v_materialOrFormula) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getComposition (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_22getComposition(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v_materialOrFormula));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_22getComposition(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_materialOrFormula) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  std::string __pyx_t_5;
  std::map<std::string,double>  __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getComposition", 0);

  /* "python/cython/_fisx.pyx":381
 * 
 *     def getComposition(self, materialOrFormula):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getComposition(toBytes(materialOrFormula))
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":382
 *     def getComposition(self, materialOrFormula):
 *         if sys.version < "3.0":
 *             return self.thisptr.getComposition(toBytes(materialOrFormula))             # <<<<<<<<<<<<<<
 *         else:
 *             return toStringKeys(self.thisptr.getComposition(toBytes(materialOrFormula)))
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_materialOrFormula) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_materialOrFormula);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 382, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    try {
      __pyx_t_6 = __pyx_v_self->thisptr->getComposition(__pyx_t_5);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 382, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":381
 * 
 *     def getComposition(self, materialOrFormula):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getComposition(toBytes(materialOrFormula))
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":384
 *             return self.thisptr.getComposition(toBytes(materialOrFormula))
 *         else:
 *             return toStringKeys(self.thisptr.getComposition(toBytes(materialOrFormula)))             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_materialOrFormula) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_materialOrFormula);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 384, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    try {
      __pyx_t_6 = __pyx_v_self->thisptr->getComposition(__pyx_t_5);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 384, __pyx_L1_error)
    }
    __pyx_t_4 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":380
 *         return toStringList(self.thisptr.getMaterialNames())
 * 
 *     def getComposition(self, materialOrFormula):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getComposition(toBytes(materialOrFormula))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getComposition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":386
 *             return toStringKeys(self.thisptr.getComposition(toBytes(materialOrFormula)))
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_4fisx_5_fisx_10PyElements_25__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4fisx_5_fisx_10PyElements_25__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4fisx_5_fisx_10PyElements_24__dealloc__(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4fisx_5_fisx_10PyElements_24__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "python/cython/_fisx.pyx":387
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     def addMaterial(self, PyMaterial material, int errorOnReplace=1):
 */
  delete __pyx_v_self->thisptr;

  /* "python/cython/_fisx.pyx":386
 *             return toStringKeys(self.thisptr.getComposition(toBytes(materialOrFormula)))
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "python/cython/_fisx.pyx":389
 *         del self.thisptr
 * 
 *     def addMaterial(self, PyMaterial material, int errorOnReplace=1):             # <<<<<<<<<<<<<<
 *         self.thisptr.addMaterial(deref(material.thisptr), errorOnReplace)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_27addMaterial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_27addMaterial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_material = 0;
  int __pyx_v_errorOnReplace;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("addMaterial (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_material,&__pyx_n_s_errorOnReplace,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_material)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errorOnReplace);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addMaterial") < 0)) __PYX_ERR(1, 389, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_material = ((struct __pyx_obj_4fisx_5_fisx_PyMaterial *)values[0]);
    if (values[1]) {
      __pyx_v_errorOnReplace = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_errorOnReplace == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 389, __pyx_L3_error)
    } else {
      __pyx_v_errorOnReplace = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("addMaterial", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 389, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.addMaterial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_material), __pyx_ptype_4fisx_5_fisx_PyMaterial, 1, "material", 0))) __PYX_ERR(1, 389, __pyx_L1_error)
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_26addMaterial(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_material, __pyx_v_errorOnReplace);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_26addMaterial(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_material, int __pyx_v_errorOnReplace) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("addMaterial", 0);

  /* "python/cython/_fisx.pyx":390
 * 
 *     def addMaterial(self, PyMaterial material, int errorOnReplace=1):
 *         self.thisptr.addMaterial(deref(material.thisptr), errorOnReplace)             # <<<<<<<<<<<<<<
 * 
 *     def setShellConstantsFile(self, mainShellName, fileName):
 */
  try {
    __pyx_v_self->thisptr->addMaterial((*__pyx_v_material->thisptr), __pyx_v_errorOnReplace);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 390, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":389
 *         del self.thisptr
 * 
 *     def addMaterial(self, PyMaterial material, int errorOnReplace=1):             # <<<<<<<<<<<<<<
 *         self.thisptr.addMaterial(deref(material.thisptr), errorOnReplace)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.addMaterial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":392
 *         self.thisptr.addMaterial(deref(material.thisptr), errorOnReplace)
 * 
 *     def setShellConstantsFile(self, mainShellName, fileName):             # <<<<<<<<<<<<<<
 *         """
 *         Load main shell (K, L or M) constants from file (fluorescence and Coster-Kronig yields)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_29setShellConstantsFile(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_28setShellConstantsFile[] = "\n        Load main shell (K, L or M) constants from file (fluorescence and Coster-Kronig yields)\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_29setShellConstantsFile(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_mainShellName = 0;
  PyObject *__pyx_v_fileName = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setShellConstantsFile (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mainShellName,&__pyx_n_s_fileName,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mainShellName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fileName)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setShellConstantsFile", 1, 2, 2, 1); __PYX_ERR(1, 392, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setShellConstantsFile") < 0)) __PYX_ERR(1, 392, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_mainShellName = values[0];
    __pyx_v_fileName = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setShellConstantsFile", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 392, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.setShellConstantsFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_28setShellConstantsFile(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_mainShellName, __pyx_v_fileName);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_28setShellConstantsFile(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_mainShellName, PyObject *__pyx_v_fileName) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setShellConstantsFile", 0);

  /* "python/cython/_fisx.pyx":396
 *         Load main shell (K, L or M) constants from file (fluorescence and Coster-Kronig yields)
 *         """
 *         self.thisptr.setShellConstantsFile(toBytes(mainShellName), toBytes(fileName))             # <<<<<<<<<<<<<<
 * 
 *     def getShellConstantsFile(self, mainShellName):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_mainShellName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_mainShellName);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_fileName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_fileName);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_v_self->thisptr->setShellConstantsFile(__pyx_t_4, __pyx_t_5);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 396, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":392
 *         self.thisptr.addMaterial(deref(material.thisptr), errorOnReplace)
 * 
 *     def setShellConstantsFile(self, mainShellName, fileName):             # <<<<<<<<<<<<<<
 *         """
 *         Load main shell (K, L or M) constants from file (fluorescence and Coster-Kronig yields)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.setShellConstantsFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":398
 *         self.thisptr.setShellConstantsFile(toBytes(mainShellName), toBytes(fileName))
 * 
 *     def getShellConstantsFile(self, mainShellName):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getShellConstantsFile(mainShellName)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_31getShellConstantsFile(PyObject *__pyx_v_self, PyObject *__pyx_v_mainShellName); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_31getShellConstantsFile(PyObject *__pyx_v_self, PyObject *__pyx_v_mainShellName) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getShellConstantsFile (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_30getShellConstantsFile(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v_mainShellName));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_30getShellConstantsFile(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_mainShellName) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  std::string __pyx_t_4;
  std::string __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getShellConstantsFile", 0);

  /* "python/cython/_fisx.pyx":399
 * 
 *     def getShellConstantsFile(self, mainShellName):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getShellConstantsFile(mainShellName)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":400
 *     def getShellConstantsFile(self, mainShellName):
 *         if sys.version < "3.0":
 *             return self.thisptr.getShellConstantsFile(mainShellName)             # <<<<<<<<<<<<<<
 *         else:
 *             return toString(self.thisptr.getShellConstantsFile(toBytes(mainShellName)))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_mainShellName); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 400, __pyx_L1_error)
    try {
      __pyx_t_5 = __pyx_v_self->thisptr->getShellConstantsFile(__pyx_t_4);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 400, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":399
 * 
 *     def getShellConstantsFile(self, mainShellName):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getShellConstantsFile(mainShellName)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":402
 *             return self.thisptr.getShellConstantsFile(mainShellName)
 *         else:
 *             return toString(self.thisptr.getShellConstantsFile(toBytes(mainShellName)))             # <<<<<<<<<<<<<<
 * 
 *     def setShellRadiativeTransitionsFile(self, mainShellName, fileName):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toString); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_mainShellName) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_mainShellName);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 402, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    try {
      __pyx_t_4 = __pyx_v_self->thisptr->getShellConstantsFile(__pyx_t_5);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 402, __pyx_L1_error)
    }
    __pyx_t_6 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":398
 *         self.thisptr.setShellConstantsFile(toBytes(mainShellName), toBytes(fileName))
 * 
 *     def getShellConstantsFile(self, mainShellName):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getShellConstantsFile(mainShellName)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getShellConstantsFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":404
 *             return toString(self.thisptr.getShellConstantsFile(toBytes(mainShellName)))
 * 
 *     def setShellRadiativeTransitionsFile(self, mainShellName, fileName):             # <<<<<<<<<<<<<<
 *         """
 *         Load main shell (K, L or M) X-ray emission rates from file.
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_33setShellRadiativeTransitionsFile(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_32setShellRadiativeTransitionsFile[] = "\n        Load main shell (K, L or M) X-ray emission rates from file.\n        The library normalizes internally.\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_33setShellRadiativeTransitionsFile(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_mainShellName = 0;
  PyObject *__pyx_v_fileName = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setShellRadiativeTransitionsFile (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mainShellName,&__pyx_n_s_fileName,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mainShellName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fileName)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setShellRadiativeTransitionsFile", 1, 2, 2, 1); __PYX_ERR(1, 404, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setShellRadiativeTransitionsFile") < 0)) __PYX_ERR(1, 404, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_mainShellName = values[0];
    __pyx_v_fileName = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setShellRadiativeTransitionsFile", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 404, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.setShellRadiativeTransitionsFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_32setShellRadiativeTransitionsFile(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_mainShellName, __pyx_v_fileName);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_32setShellRadiativeTransitionsFile(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_mainShellName, PyObject *__pyx_v_fileName) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setShellRadiativeTransitionsFile", 0);

  /* "python/cython/_fisx.pyx":409
 *         The library normalizes internally.
 *         """
 *         self.thisptr.setShellRadiativeTransitionsFile(toBytes(mainShellName), toBytes(fileName))             # <<<<<<<<<<<<<<
 * 
 *     def getShellRadiativeTransitionsFile(self, mainShellName):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_mainShellName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_mainShellName);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 409, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_fileName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_fileName);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 409, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_v_self->thisptr->setShellRadiativeTransitionsFile(__pyx_t_4, __pyx_t_5);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 409, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":404
 *             return toString(self.thisptr.getShellConstantsFile(toBytes(mainShellName)))
 * 
 *     def setShellRadiativeTransitionsFile(self, mainShellName, fileName):             # <<<<<<<<<<<<<<
 *         """
 *         Load main shell (K, L or M) X-ray emission rates from file.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.setShellRadiativeTransitionsFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":411
 *         self.thisptr.setShellRadiativeTransitionsFile(toBytes(mainShellName), toBytes(fileName))
 * 
 *     def getShellRadiativeTransitionsFile(self, mainShellName):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getShellRadiativeTransitionsFile(mainShellName)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_35getShellRadiativeTransitionsFile(PyObject *__pyx_v_self, PyObject *__pyx_v_mainShellName); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_35getShellRadiativeTransitionsFile(PyObject *__pyx_v_self, PyObject *__pyx_v_mainShellName) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getShellRadiativeTransitionsFile (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_34getShellRadiativeTransitionsFile(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v_mainShellName));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_34getShellRadiativeTransitionsFile(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_mainShellName) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  std::string __pyx_t_4;
  std::string __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getShellRadiativeTransitionsFile", 0);

  /* "python/cython/_fisx.pyx":412
 * 
 *     def getShellRadiativeTransitionsFile(self, mainShellName):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getShellRadiativeTransitionsFile(mainShellName)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 412, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 412, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":413
 *     def getShellRadiativeTransitionsFile(self, mainShellName):
 *         if sys.version < "3.0":
 *             return self.thisptr.getShellRadiativeTransitionsFile(mainShellName)             # <<<<<<<<<<<<<<
 *         else:
 *             return toString(self.thisptr.getShellRadiativeTransitionsFile(toBytes(mainShellName)))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_mainShellName); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 413, __pyx_L1_error)
    try {
      __pyx_t_5 = __pyx_v_self->thisptr->getShellRadiativeTransitionsFile(__pyx_t_4);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 413, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":412
 * 
 *     def getShellRadiativeTransitionsFile(self, mainShellName):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getShellRadiativeTransitionsFile(mainShellName)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":415
 *             return self.thisptr.getShellRadiativeTransitionsFile(mainShellName)
 *         else:
 *             return toString(self.thisptr.getShellRadiativeTransitionsFile(toBytes(mainShellName)))             # <<<<<<<<<<<<<<
 * 
 *     def getShellNonradiativeTransitionsFile(self, mainShellName):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toString); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_mainShellName) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_mainShellName);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 415, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    try {
      __pyx_t_4 = __pyx_v_self->thisptr->getShellRadiativeTransitionsFile(__pyx_t_5);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 415, __pyx_L1_error)
    }
    __pyx_t_6 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":411
 *         self.thisptr.setShellRadiativeTransitionsFile(toBytes(mainShellName), toBytes(fileName))
 * 
 *     def getShellRadiativeTransitionsFile(self, mainShellName):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getShellRadiativeTransitionsFile(mainShellName)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getShellRadiativeTransitionsFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":417
 *             return toString(self.thisptr.getShellRadiativeTransitionsFile(toBytes(mainShellName)))
 * 
 *     def getShellNonradiativeTransitionsFile(self, mainShellName):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getShellNonradiativeTransitionsFile(mainShellName)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_37getShellNonradiativeTransitionsFile(PyObject *__pyx_v_self, PyObject *__pyx_v_mainShellName); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_37getShellNonradiativeTransitionsFile(PyObject *__pyx_v_self, PyObject *__pyx_v_mainShellName) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getShellNonradiativeTransitionsFile (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_36getShellNonradiativeTransitionsFile(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v_mainShellName));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_36getShellNonradiativeTransitionsFile(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_mainShellName) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  std::string __pyx_t_4;
  std::string __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getShellNonradiativeTransitionsFile", 0);

  /* "python/cython/_fisx.pyx":418
 * 
 *     def getShellNonradiativeTransitionsFile(self, mainShellName):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getShellNonradiativeTransitionsFile(mainShellName)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":419
 *     def getShellNonradiativeTransitionsFile(self, mainShellName):
 *         if sys.version < "3.0":
 *             return self.thisptr.getShellNonradiativeTransitionsFile(mainShellName)             # <<<<<<<<<<<<<<
 *         else:
 *             return toString(self.thisptr.getShellNonradiativeTransitionsFile(toBytes(mainShellName)))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_mainShellName); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 419, __pyx_L1_error)
    try {
      __pyx_t_5 = __pyx_v_self->thisptr->getShellNonradiativeTransitionsFile(__pyx_t_4);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 419, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":418
 * 
 *     def getShellNonradiativeTransitionsFile(self, mainShellName):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getShellNonradiativeTransitionsFile(mainShellName)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":421
 *             return self.thisptr.getShellNonradiativeTransitionsFile(mainShellName)
 *         else:
 *             return toString(self.thisptr.getShellNonradiativeTransitionsFile(toBytes(mainShellName)))             # <<<<<<<<<<<<<<
 * 
 *     def setMassAttenuationCoefficients(self,
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toString); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_mainShellName) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_mainShellName);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 421, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    try {
      __pyx_t_4 = __pyx_v_self->thisptr->getShellNonradiativeTransitionsFile(__pyx_t_5);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 421, __pyx_L1_error)
    }
    __pyx_t_6 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":417
 *             return toString(self.thisptr.getShellRadiativeTransitionsFile(toBytes(mainShellName)))
 * 
 *     def getShellNonradiativeTransitionsFile(self, mainShellName):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getShellNonradiativeTransitionsFile(mainShellName)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getShellNonradiativeTransitionsFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":423
 *             return toString(self.thisptr.getShellNonradiativeTransitionsFile(toBytes(mainShellName)))
 * 
 *     def setMassAttenuationCoefficients(self,             # <<<<<<<<<<<<<<
 *                                        std_string element,
 *                                        std_vector[double] energies,
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_39setMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_39setMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  std::string __pyx_v_element;
  std::vector<double>  __pyx_v_energies;
  std::vector<double>  __pyx_v_photo;
  std::vector<double>  __pyx_v_coherent;
  std::vector<double>  __pyx_v_compton;
  std::vector<double>  __pyx_v_pair;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setMassAttenuationCoefficients (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_element,&__pyx_n_s_energies,&__pyx_n_s_photo,&__pyx_n_s_coherent,&__pyx_n_s_compton,&__pyx_n_s_pair,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setMassAttenuationCoefficients", 1, 6, 6, 1); __PYX_ERR(1, 423, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_photo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setMassAttenuationCoefficients", 1, 6, 6, 2); __PYX_ERR(1, 423, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coherent)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setMassAttenuationCoefficients", 1, 6, 6, 3); __PYX_ERR(1, 423, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_compton)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setMassAttenuationCoefficients", 1, 6, 6, 4); __PYX_ERR(1, 423, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pair)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setMassAttenuationCoefficients", 1, 6, 6, 5); __PYX_ERR(1, 423, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setMassAttenuationCoefficients") < 0)) __PYX_ERR(1, 423, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_element = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 424, __pyx_L3_error)
    __pyx_v_energies = __pyx_convert_vector_from_py_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 425, __pyx_L3_error)
    __pyx_v_photo = __pyx_convert_vector_from_py_double(values[2]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 426, __pyx_L3_error)
    __pyx_v_coherent = __pyx_convert_vector_from_py_double(values[3]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 427, __pyx_L3_error)
    __pyx_v_compton = __pyx_convert_vector_from_py_double(values[4]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 428, __pyx_L3_error)
    __pyx_v_pair = __pyx_convert_vector_from_py_double(values[5]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 429, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setMassAttenuationCoefficients", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 423, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.setMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_38setMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_element, __pyx_v_energies, __pyx_v_photo, __pyx_v_coherent, __pyx_v_compton, __pyx_v_pair);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_38setMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_element, std::vector<double>  __pyx_v_energies, std::vector<double>  __pyx_v_photo, std::vector<double>  __pyx_v_coherent, std::vector<double>  __pyx_v_compton, std::vector<double>  __pyx_v_pair) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":430
 *                                        std_vector[double] compton,
 *                                        std_vector[double] pair):
 *         self.thisptr.setMassAttenuationCoefficients(element,             # <<<<<<<<<<<<<<
 *                                                     energies,
 *                                                     photo,
 */
  try {
    __pyx_v_self->thisptr->setMassAttenuationCoefficients(__pyx_v_element, __pyx_v_energies, __pyx_v_photo, __pyx_v_coherent, __pyx_v_compton, __pyx_v_pair);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 430, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":423
 *             return toString(self.thisptr.getShellNonradiativeTransitionsFile(toBytes(mainShellName)))
 * 
 *     def setMassAttenuationCoefficients(self,             # <<<<<<<<<<<<<<
 *                                        std_string element,
 *                                        std_vector[double] energies,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.setMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":436
 *                                                     compton,
 *                                                     pair)
 *     def setMassAttenuationCoefficientsFile(self, crossSectionsFile):             # <<<<<<<<<<<<<<
 *         self.thisptr.setMassAttenuationCoefficientsFile(toBytes(crossSectionsFile))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_41setMassAttenuationCoefficientsFile(PyObject *__pyx_v_self, PyObject *__pyx_v_crossSectionsFile); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_41setMassAttenuationCoefficientsFile(PyObject *__pyx_v_self, PyObject *__pyx_v_crossSectionsFile) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setMassAttenuationCoefficientsFile (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_40setMassAttenuationCoefficientsFile(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v_crossSectionsFile));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_40setMassAttenuationCoefficientsFile(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_crossSectionsFile) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setMassAttenuationCoefficientsFile", 0);

  /* "python/cython/_fisx.pyx":437
 *                                                     pair)
 *     def setMassAttenuationCoefficientsFile(self, crossSectionsFile):
 *         self.thisptr.setMassAttenuationCoefficientsFile(toBytes(crossSectionsFile))             # <<<<<<<<<<<<<<
 * 
 *     def _getSingleMassAttenuationCoefficients(self, std_string element,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_crossSectionsFile) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_crossSectionsFile);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 437, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_v_self->thisptr->setMassAttenuationCoefficientsFile(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 437, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":436
 *                                                     compton,
 *                                                     pair)
 *     def setMassAttenuationCoefficientsFile(self, crossSectionsFile):             # <<<<<<<<<<<<<<
 *         self.thisptr.setMassAttenuationCoefficientsFile(toBytes(crossSectionsFile))
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.setMassAttenuationCoefficientsFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":439
 *         self.thisptr.setMassAttenuationCoefficientsFile(toBytes(crossSectionsFile))
 * 
 *     def _getSingleMassAttenuationCoefficients(self, std_string element,             # <<<<<<<<<<<<<<
 *                                                      double energy):
 *         if sys.version < "3.0":
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_43_getSingleMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_43_getSingleMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  std::string __pyx_v_element;
  double __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getSingleMassAttenuationCoefficients (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_element,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getSingleMassAttenuationCoefficients", 1, 2, 2, 1); __PYX_ERR(1, 439, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getSingleMassAttenuationCoefficients") < 0)) __PYX_ERR(1, 439, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_element = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 439, __pyx_L3_error)
    __pyx_v_energy = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_energy == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 440, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getSingleMassAttenuationCoefficients", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 439, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements._getSingleMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_42_getSingleMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_element, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_42_getSingleMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_element, double __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  std::map<std::string,double>  __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getSingleMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":441
 *     def _getSingleMassAttenuationCoefficients(self, std_string element,
 *                                                      double energy):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getMassAttenuationCoefficients(element, energy)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":442
 *                                                      double energy):
 *         if sys.version < "3.0":
 *             return self.thisptr.getMassAttenuationCoefficients(element, energy)             # <<<<<<<<<<<<<<
 *         else:
 *             return toStringKeys(self.thisptr.getMassAttenuationCoefficients(element, energy))
 */
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_4 = __pyx_v_self->thisptr->getMassAttenuationCoefficients(__pyx_v_element, __pyx_v_energy);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 442, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":441
 *     def _getSingleMassAttenuationCoefficients(self, std_string element,
 *                                                      double energy):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getMassAttenuationCoefficients(element, energy)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":444
 *             return self.thisptr.getMassAttenuationCoefficients(element, energy)
 *         else:
 *             return toStringKeys(self.thisptr.getMassAttenuationCoefficients(element, energy))             # <<<<<<<<<<<<<<
 * 
 *     def _getElementDefaultMassAttenuationCoefficients(self, std_string element):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    try {
      __pyx_t_4 = __pyx_v_self->thisptr->getMassAttenuationCoefficients(__pyx_v_element, __pyx_v_energy);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 444, __pyx_L1_error)
    }
    __pyx_t_5 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":439
 *         self.thisptr.setMassAttenuationCoefficientsFile(toBytes(crossSectionsFile))
 * 
 *     def _getSingleMassAttenuationCoefficients(self, std_string element,             # <<<<<<<<<<<<<<
 *                                                      double energy):
 *         if sys.version < "3.0":
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("fisx._fisx.PyElements._getSingleMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":446
 *             return toStringKeys(self.thisptr.getMassAttenuationCoefficients(element, energy))
 * 
 *     def _getElementDefaultMassAttenuationCoefficients(self, std_string element):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getMassAttenuationCoefficients(element)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_45_getElementDefaultMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_arg_element); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_45_getElementDefaultMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_arg_element) {
  std::string __pyx_v_element;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getElementDefaultMassAttenuationCoefficients (wrapper)", 0);
  assert(__pyx_arg_element); {
    __pyx_v_element = __pyx_convert_string_from_py_std__in_string(__pyx_arg_element); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 446, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements._getElementDefaultMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_44_getElementDefaultMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((std::string)__pyx_v_element));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_44_getElementDefaultMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_element) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  std::map<std::string,std::vector<double> >  __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getElementDefaultMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":447
 * 
 *     def _getElementDefaultMassAttenuationCoefficients(self, std_string element):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getMassAttenuationCoefficients(element)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":448
 *     def _getElementDefaultMassAttenuationCoefficients(self, std_string element):
 *         if sys.version < "3.0":
 *             return self.thisptr.getMassAttenuationCoefficients(element)             # <<<<<<<<<<<<<<
 *         else:
 *             return toStringKeys(self.thisptr.getMassAttenuationCoefficients(element))
 */
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_4 = __pyx_v_self->thisptr->getMassAttenuationCoefficients(__pyx_v_element);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 448, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":447
 * 
 *     def _getElementDefaultMassAttenuationCoefficients(self, std_string element):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getMassAttenuationCoefficients(element)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":450
 *             return self.thisptr.getMassAttenuationCoefficients(element)
 *         else:
 *             return toStringKeys(self.thisptr.getMassAttenuationCoefficients(element))             # <<<<<<<<<<<<<<
 * 
 *     def getElementMassAttenuationCoefficients(self, element, energy=None):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    try {
      __pyx_t_4 = __pyx_v_self->thisptr->getMassAttenuationCoefficients(__pyx_v_element);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 450, __pyx_L1_error)
    }
    __pyx_t_5 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":446
 *             return toStringKeys(self.thisptr.getMassAttenuationCoefficients(element, energy))
 * 
 *     def _getElementDefaultMassAttenuationCoefficients(self, std_string element):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getMassAttenuationCoefficients(element)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("fisx._fisx.PyElements._getElementDefaultMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":452
 *             return toStringKeys(self.thisptr.getMassAttenuationCoefficients(element))
 * 
 *     def getElementMassAttenuationCoefficients(self, element, energy=None):             # <<<<<<<<<<<<<<
 *         if energy is None:
 *             return self._getElementDefaultMassAttenuationCoefficients(toBytes(element))
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_47getElementMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_47getElementMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_element = 0;
  PyObject *__pyx_v_energy = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getElementMassAttenuationCoefficients (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_element,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getElementMassAttenuationCoefficients") < 0)) __PYX_ERR(1, 452, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_element = values[0];
    __pyx_v_energy = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getElementMassAttenuationCoefficients", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 452, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.getElementMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_46getElementMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_element, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_46getElementMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_element, PyObject *__pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getElementMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":453
 * 
 *     def getElementMassAttenuationCoefficients(self, element, energy=None):
 *         if energy is None:             # <<<<<<<<<<<<<<
 *             return self._getElementDefaultMassAttenuationCoefficients(toBytes(element))
 *         elif hasattr(energy, "__len__"):
 */
  __pyx_t_1 = (__pyx_v_energy == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":454
 *     def getElementMassAttenuationCoefficients(self, element, energy=None):
 *         if energy is None:
 *             return self._getElementDefaultMassAttenuationCoefficients(toBytes(element))             # <<<<<<<<<<<<<<
 *         elif hasattr(energy, "__len__"):
 *             return self._getMultipleMassAttenuationCoefficients(toBytes(element),
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getElementDefaultMassAttenuatio); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_element) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_element);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":453
 * 
 *     def getElementMassAttenuationCoefficients(self, element, energy=None):
 *         if energy is None:             # <<<<<<<<<<<<<<
 *             return self._getElementDefaultMassAttenuationCoefficients(toBytes(element))
 *         elif hasattr(energy, "__len__"):
 */
  }

  /* "python/cython/_fisx.pyx":455
 *         if energy is None:
 *             return self._getElementDefaultMassAttenuationCoefficients(toBytes(element))
 *         elif hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             return self._getMultipleMassAttenuationCoefficients(toBytes(element),
 *                                                                        energy)
 */
  __pyx_t_2 = __Pyx_HasAttr(__pyx_v_energy, __pyx_n_s_len); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 455, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "python/cython/_fisx.pyx":456
 *             return self._getElementDefaultMassAttenuationCoefficients(toBytes(element))
 *         elif hasattr(energy, "__len__"):
 *             return self._getMultipleMassAttenuationCoefficients(toBytes(element),             # <<<<<<<<<<<<<<
 *                                                                        energy)
 *         else:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMultipleMassAttenuationCoeff); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_element) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_element);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "python/cython/_fisx.pyx":457
 *         elif hasattr(energy, "__len__"):
 *             return self._getMultipleMassAttenuationCoefficients(toBytes(element),
 *                                                                        energy)             # <<<<<<<<<<<<<<
 *         else:
 *             return self._getMultipleMassAttenuationCoefficients(toBytes(element),
 */
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_v_energy};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 456, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_v_energy};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 456, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 456, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_t_5);
      __Pyx_INCREF(__pyx_v_energy);
      __Pyx_GIVEREF(__pyx_v_energy);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_energy);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 456, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":455
 *         if energy is None:
 *             return self._getElementDefaultMassAttenuationCoefficients(toBytes(element))
 *         elif hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             return self._getMultipleMassAttenuationCoefficients(toBytes(element),
 *                                                                        energy)
 */
  }

  /* "python/cython/_fisx.pyx":459
 *                                                                        energy)
 *         else:
 *             return self._getMultipleMassAttenuationCoefficients(toBytes(element),             # <<<<<<<<<<<<<<
 *                                                                        [energy])
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMultipleMassAttenuationCoeff); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_element) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_element);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "python/cython/_fisx.pyx":460
 *         else:
 *             return self._getMultipleMassAttenuationCoefficients(toBytes(element),
 *                                                                        [energy])             # <<<<<<<<<<<<<<
 * 
 *     def _getMultipleMassAttenuationCoefficients(self, std_string element,
 */
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_energy);
    __Pyx_GIVEREF(__pyx_v_energy);
    PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_energy);
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 459, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 459, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 459, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5);
      __pyx_t_7 = 0;
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 459, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":452
 *             return toStringKeys(self.thisptr.getMassAttenuationCoefficients(element))
 * 
 *     def getElementMassAttenuationCoefficients(self, element, energy=None):             # <<<<<<<<<<<<<<
 *         if energy is None:
 *             return self._getElementDefaultMassAttenuationCoefficients(toBytes(element))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getElementMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":462
 *                                                                        [energy])
 * 
 *     def _getMultipleMassAttenuationCoefficients(self, std_string element,             # <<<<<<<<<<<<<<
 *                                                        std_vector[double] energy):
 *         if sys.version < "3.0":
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_49_getMultipleMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_49_getMultipleMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  std::string __pyx_v_element;
  std::vector<double>  __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getMultipleMassAttenuationCoefficients (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_element,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getMultipleMassAttenuationCoefficients", 1, 2, 2, 1); __PYX_ERR(1, 462, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getMultipleMassAttenuationCoefficients") < 0)) __PYX_ERR(1, 462, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_element = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 462, __pyx_L3_error)
    __pyx_v_energy = __pyx_convert_vector_from_py_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 463, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getMultipleMassAttenuationCoefficients", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 462, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements._getMultipleMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_48_getMultipleMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_element, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_48_getMultipleMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_element, std::vector<double>  __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  std::map<std::string,std::vector<double> >  __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getMultipleMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":464
 *     def _getMultipleMassAttenuationCoefficients(self, std_string element,
 *                                                        std_vector[double] energy):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getMassAttenuationCoefficients(element, energy)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":465
 *                                                        std_vector[double] energy):
 *         if sys.version < "3.0":
 *             return self.thisptr.getMassAttenuationCoefficients(element, energy)             # <<<<<<<<<<<<<<
 *         else:
 *             return toStringKeys(self.thisptr.getMassAttenuationCoefficients(element, energy))
 */
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_4 = __pyx_v_self->thisptr->getMassAttenuationCoefficients(__pyx_v_element, __pyx_v_energy);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 465, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":464
 *     def _getMultipleMassAttenuationCoefficients(self, std_string element,
 *                                                        std_vector[double] energy):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getMassAttenuationCoefficients(element, energy)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":467
 *             return self.thisptr.getMassAttenuationCoefficients(element, energy)
 *         else:
 *             return toStringKeys(self.thisptr.getMassAttenuationCoefficients(element, energy))             # <<<<<<<<<<<<<<
 * 
 *     def getMassAttenuationCoefficients(self, name, energy=None):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    try {
      __pyx_t_4 = __pyx_v_self->thisptr->getMassAttenuationCoefficients(__pyx_v_element, __pyx_v_energy);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 467, __pyx_L1_error)
    }
    __pyx_t_5 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":462
 *                                                                        [energy])
 * 
 *     def _getMultipleMassAttenuationCoefficients(self, std_string element,             # <<<<<<<<<<<<<<
 *                                                        std_vector[double] energy):
 *         if sys.version < "3.0":
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("fisx._fisx.PyElements._getMultipleMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":469
 *             return toStringKeys(self.thisptr.getMassAttenuationCoefficients(element, energy))
 * 
 *     def getMassAttenuationCoefficients(self, name, energy=None):             # <<<<<<<<<<<<<<
 *         """
 *         name can be an element, a formula or a material composition given as a dictionary:
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_51getMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_50getMassAttenuationCoefficients[] = "\n        name can be an element, a formula or a material composition given as a dictionary:\n            key is the element name\n            fraction is the mass fraction of the element.\n\n        WARNING: The library renormalizes in order to make sure the sum of mass\n                 fractions is 1.\n\n        It gives back the mass attenuation coefficients at the given energies as a map where\n        the keys are the different physical processes and the values are lists of the\n        calculated values via log-log interpolation in the internal table.\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_51getMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_energy = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMassAttenuationCoefficients (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getMassAttenuationCoefficients") < 0)) __PYX_ERR(1, 469, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_name = values[0];
    __pyx_v_energy = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getMassAttenuationCoefficients", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 469, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.getMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_50getMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_name, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_50getMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":482
 *         calculated values via log-log interpolation in the internal table.
 *         """
 *         if hasattr(name, "keys"):             # <<<<<<<<<<<<<<
 *             return self._getMaterialMassAttenuationCoefficients(toBytes(name), energy)
 *         elif energy is None:
 */
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_name, __pyx_n_s_keys); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 482, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":483
 *         """
 *         if hasattr(name, "keys"):
 *             return self._getMaterialMassAttenuationCoefficients(toBytes(name), energy)             # <<<<<<<<<<<<<<
 *         elif energy is None:
 *             return self._getElementDefaultMassAttenuationCoefficients(toBytes(name))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMaterialMassAttenuationCoeff); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_name);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_v_energy};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 483, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_v_energy};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 483, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 483, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_t_5);
      __Pyx_INCREF(__pyx_v_energy);
      __Pyx_GIVEREF(__pyx_v_energy);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_energy);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 483, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":482
 *         calculated values via log-log interpolation in the internal table.
 *         """
 *         if hasattr(name, "keys"):             # <<<<<<<<<<<<<<
 *             return self._getMaterialMassAttenuationCoefficients(toBytes(name), energy)
 *         elif energy is None:
 */
  }

  /* "python/cython/_fisx.pyx":484
 *         if hasattr(name, "keys"):
 *             return self._getMaterialMassAttenuationCoefficients(toBytes(name), energy)
 *         elif energy is None:             # <<<<<<<<<<<<<<
 *             return self._getElementDefaultMassAttenuationCoefficients(toBytes(name))
 *         elif hasattr(energy, "__len__"):
 */
  __pyx_t_2 = (__pyx_v_energy == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "python/cython/_fisx.pyx":485
 *             return self._getMaterialMassAttenuationCoefficients(toBytes(name), energy)
 *         elif energy is None:
 *             return self._getElementDefaultMassAttenuationCoefficients(toBytes(name))             # <<<<<<<<<<<<<<
 *         elif hasattr(energy, "__len__"):
 *             return self._getMultipleMassAttenuationCoefficients(toBytes(name), energy)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getElementDefaultMassAttenuatio); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_name);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":484
 *         if hasattr(name, "keys"):
 *             return self._getMaterialMassAttenuationCoefficients(toBytes(name), energy)
 *         elif energy is None:             # <<<<<<<<<<<<<<
 *             return self._getElementDefaultMassAttenuationCoefficients(toBytes(name))
 *         elif hasattr(energy, "__len__"):
 */
  }

  /* "python/cython/_fisx.pyx":486
 *         elif energy is None:
 *             return self._getElementDefaultMassAttenuationCoefficients(toBytes(name))
 *         elif hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             return self._getMultipleMassAttenuationCoefficients(toBytes(name), energy)
 *         else:
 */
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_energy, __pyx_n_s_len); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 486, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":487
 *             return self._getElementDefaultMassAttenuationCoefficients(toBytes(name))
 *         elif hasattr(energy, "__len__"):
 *             return self._getMultipleMassAttenuationCoefficients(toBytes(name), energy)             # <<<<<<<<<<<<<<
 *         else:
 *             # do not use the "single" version to have always the same signature
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMultipleMassAttenuationCoeff); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_name);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_v_energy};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 487, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_v_energy};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 487, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 487, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_t_7);
      __Pyx_INCREF(__pyx_v_energy);
      __Pyx_GIVEREF(__pyx_v_energy);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_v_energy);
      __pyx_t_7 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 487, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":486
 *         elif energy is None:
 *             return self._getElementDefaultMassAttenuationCoefficients(toBytes(name))
 *         elif hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             return self._getMultipleMassAttenuationCoefficients(toBytes(name), energy)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":490
 *         else:
 *             # do not use the "single" version to have always the same signature
 *             return self._getMultipleMassAttenuationCoefficients(toBytes(name), [energy])             # <<<<<<<<<<<<<<
 * 
 *     def getExcitationFactors(self, name, energy, weight=None):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMultipleMassAttenuationCoeff); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_name);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_energy);
    __Pyx_GIVEREF(__pyx_v_energy);
    PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_energy);
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 490, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 490, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 490, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_7);
      __pyx_t_6 = 0;
      __pyx_t_7 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 490, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":469
 *             return toStringKeys(self.thisptr.getMassAttenuationCoefficients(element, energy))
 * 
 *     def getMassAttenuationCoefficients(self, name, energy=None):             # <<<<<<<<<<<<<<
 *         """
 *         name can be an element, a formula or a material composition given as a dictionary:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":492
 *             return self._getMultipleMassAttenuationCoefficients(toBytes(name), [energy])
 * 
 *     def getExcitationFactors(self, name, energy, weight=None):             # <<<<<<<<<<<<<<
 *         """
 *         getExcitationFactors(name, energy, weight=None)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_53getExcitationFactors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_52getExcitationFactors[] = "\n        getExcitationFactors(name, energy, weight=None)\n        Given energy(s) and (optional) weight(s), for the specfified element, this method returns\n        the emitted X-ray already corrected for cascade and fluorescence yield.\n        It is the equivalent of the excitation factor in D.K.G. de Boer's paper.\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_53getExcitationFactors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_energy = 0;
  PyObject *__pyx_v_weight = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getExcitationFactors (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_energy,&__pyx_n_s_weight,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getExcitationFactors", 0, 2, 3, 1); __PYX_ERR(1, 492, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getExcitationFactors") < 0)) __PYX_ERR(1, 492, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_name = values[0];
    __pyx_v_energy = values[1];
    __pyx_v_weight = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getExcitationFactors", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 492, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.getExcitationFactors", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_52getExcitationFactors(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_name, __pyx_v_energy, __pyx_v_weight);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_52getExcitationFactors(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_energy, PyObject *__pyx_v_weight) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getExcitationFactors", 0);
  __Pyx_INCREF(__pyx_v_energy);
  __Pyx_INCREF(__pyx_v_weight);

  /* "python/cython/_fisx.pyx":499
 *         It is the equivalent of the excitation factor in D.K.G. de Boer's paper.
 *         """
 *         if hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             if weight is None:
 *                 weight = [1.0] * len(energy)
 */
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_energy, __pyx_n_s_len); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 499, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":500
 *         """
 *         if hasattr(energy, "__len__"):
 *             if weight is None:             # <<<<<<<<<<<<<<
 *                 weight = [1.0] * len(energy)
 *             return self._getExcitationFactors(toBytes(name), energy, weight)[0]
 */
    __pyx_t_2 = (__pyx_v_weight == Py_None);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "python/cython/_fisx.pyx":501
 *         if hasattr(energy, "__len__"):
 *             if weight is None:
 *                 weight = [1.0] * len(energy)             # <<<<<<<<<<<<<<
 *             return self._getExcitationFactors(toBytes(name), energy, weight)[0]
 *         else:
 */
      __pyx_t_3 = PyObject_Length(__pyx_v_energy); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 501, __pyx_L1_error)
      __pyx_t_4 = PyList_New(1 * ((__pyx_t_3<0) ? 0:__pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      { Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < __pyx_t_3; __pyx_temp++) {
          __Pyx_INCREF(__pyx_float_1_0);
          __Pyx_GIVEREF(__pyx_float_1_0);
          PyList_SET_ITEM(__pyx_t_4, __pyx_temp, __pyx_float_1_0);
        }
      }
      __Pyx_DECREF_SET(__pyx_v_weight, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "python/cython/_fisx.pyx":500
 *         """
 *         if hasattr(energy, "__len__"):
 *             if weight is None:             # <<<<<<<<<<<<<<
 *                 weight = [1.0] * len(energy)
 *             return self._getExcitationFactors(toBytes(name), energy, weight)[0]
 */
    }

    /* "python/cython/_fisx.pyx":502
 *             if weight is None:
 *                 weight = [1.0] * len(energy)
 *             return self._getExcitationFactors(toBytes(name), energy, weight)[0]             # <<<<<<<<<<<<<<
 *         else:
 *             energy = [energy]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getExcitationFactors); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_name);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_6, __pyx_v_energy, __pyx_v_weight};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 502, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_6, __pyx_v_energy, __pyx_v_weight};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 502, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 502, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_6);
      __Pyx_INCREF(__pyx_v_energy);
      __Pyx_GIVEREF(__pyx_v_energy);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_v_energy);
      __Pyx_INCREF(__pyx_v_weight);
      __Pyx_GIVEREF(__pyx_v_weight);
      PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_9, __pyx_v_weight);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 502, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":499
 *         It is the equivalent of the excitation factor in D.K.G. de Boer's paper.
 *         """
 *         if hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             if weight is None:
 *                 weight = [1.0] * len(energy)
 */
  }

  /* "python/cython/_fisx.pyx":504
 *             return self._getExcitationFactors(toBytes(name), energy, weight)[0]
 *         else:
 *             energy = [energy]             # <<<<<<<<<<<<<<
 *             if weight is None:
 *                 weight = [1.0]
 */
  /*else*/ {
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_energy);
    __Pyx_GIVEREF(__pyx_v_energy);
    PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_energy);
    __Pyx_DECREF_SET(__pyx_v_energy, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "python/cython/_fisx.pyx":505
 *         else:
 *             energy = [energy]
 *             if weight is None:             # <<<<<<<<<<<<<<
 *                 weight = [1.0]
 *             else:
 */
    __pyx_t_1 = (__pyx_v_weight == Py_None);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "python/cython/_fisx.pyx":506
 *             energy = [energy]
 *             if weight is None:
 *                 weight = [1.0]             # <<<<<<<<<<<<<<
 *             else:
 *                 weight = [weight]
 */
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 506, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_float_1_0);
      __Pyx_GIVEREF(__pyx_float_1_0);
      PyList_SET_ITEM(__pyx_t_5, 0, __pyx_float_1_0);
      __Pyx_DECREF_SET(__pyx_v_weight, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "python/cython/_fisx.pyx":505
 *         else:
 *             energy = [energy]
 *             if weight is None:             # <<<<<<<<<<<<<<
 *                 weight = [1.0]
 *             else:
 */
      goto __pyx_L5;
    }

    /* "python/cython/_fisx.pyx":508
 *                 weight = [1.0]
 *             else:
 *                 weight = [weight]             # <<<<<<<<<<<<<<
 *             return self._getExcitationFactors(toBytes(name), energy, weight)
 * 
 */
    /*else*/ {
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 508, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_weight);
      __Pyx_GIVEREF(__pyx_v_weight);
      PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_weight);
      __Pyx_DECREF_SET(__pyx_v_weight, __pyx_t_5);
      __pyx_t_5 = 0;
    }
    __pyx_L5:;

    /* "python/cython/_fisx.pyx":509
 *             else:
 *                 weight = [weight]
 *             return self._getExcitationFactors(toBytes(name), energy, weight)             # <<<<<<<<<<<<<<
 * 
 *     def _getMaterialMassAttenuationCoefficients(self, elementDict, energy):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getExcitationFactors); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_8 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_name);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_8, __pyx_v_energy, __pyx_v_weight};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 509, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_8, __pyx_v_energy, __pyx_v_weight};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 509, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 509, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, __pyx_t_8);
      __Pyx_INCREF(__pyx_v_energy);
      __Pyx_GIVEREF(__pyx_v_energy);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_v_energy);
      __Pyx_INCREF(__pyx_v_weight);
      __Pyx_GIVEREF(__pyx_v_weight);
      PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_9, __pyx_v_weight);
      __pyx_t_8 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 509, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":492
 *             return self._getMultipleMassAttenuationCoefficients(toBytes(name), [energy])
 * 
 *     def getExcitationFactors(self, name, energy, weight=None):             # <<<<<<<<<<<<<<
 *         """
 *         getExcitationFactors(name, energy, weight=None)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getExcitationFactors", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_energy);
  __Pyx_XDECREF(__pyx_v_weight);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":511
 *             return self._getExcitationFactors(toBytes(name), energy, weight)
 * 
 *     def _getMaterialMassAttenuationCoefficients(self, elementDict, energy):             # <<<<<<<<<<<<<<
 *         """
 *         elementDict is a dictionary of the form:
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_55_getMaterialMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_54_getMaterialMassAttenuationCoefficients[] = "\n        elementDict is a dictionary of the form:\n        elmentDict[key] = fraction where:\n            key is the element name\n            fraction is the mass fraction of the element.\n\n        WARNING: The library renormalizes in order to make sure the sum of mass\n                 fractions is 1.\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_55_getMaterialMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elementDict = 0;
  PyObject *__pyx_v_energy = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getMaterialMassAttenuationCoefficients (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDict,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDict)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getMaterialMassAttenuationCoefficients", 1, 2, 2, 1); __PYX_ERR(1, 511, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getMaterialMassAttenuationCoefficients") < 0)) __PYX_ERR(1, 511, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_elementDict = values[0];
    __pyx_v_energy = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getMaterialMassAttenuationCoefficients", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 511, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements._getMaterialMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_54_getMaterialMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementDict, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_54_getMaterialMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementDict, PyObject *__pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getMaterialMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":522
 *         """
 * 
 *         if hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             return self._getMassAttenuationCoefficients(elementDict, energy)
 *         else:
 */
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_energy, __pyx_n_s_len); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 522, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":523
 * 
 *         if hasattr(energy, "__len__"):
 *             return self._getMassAttenuationCoefficients(elementDict, energy)             # <<<<<<<<<<<<<<
 *         else:
 *             return self._getMassAttenuationCoefficients(elementDict, [energy])
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMassAttenuationCoefficients); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_elementDict, __pyx_v_energy};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 523, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_elementDict, __pyx_v_energy};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 523, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_elementDict);
      __Pyx_GIVEREF(__pyx_v_elementDict);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_elementDict);
      __Pyx_INCREF(__pyx_v_energy);
      __Pyx_GIVEREF(__pyx_v_energy);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_energy);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":522
 *         """
 * 
 *         if hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             return self._getMassAttenuationCoefficients(elementDict, energy)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":525
 *             return self._getMassAttenuationCoefficients(elementDict, energy)
 *         else:
 *             return self._getMassAttenuationCoefficients(elementDict, [energy])             # <<<<<<<<<<<<<<
 * 
 *     def _getMassAttenuationCoefficients(self, std_map[std_string, double] elementDict,
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMassAttenuationCoefficients); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_energy);
    __Pyx_GIVEREF(__pyx_v_energy);
    PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_energy);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_elementDict, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 525, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_elementDict, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 525, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 525, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_elementDict);
      __Pyx_GIVEREF(__pyx_v_elementDict);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_6, __pyx_v_elementDict);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_6, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 525, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":511
 *             return self._getExcitationFactors(toBytes(name), energy, weight)
 * 
 *     def _getMaterialMassAttenuationCoefficients(self, elementDict, energy):             # <<<<<<<<<<<<<<
 *         """
 *         elementDict is a dictionary of the form:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("fisx._fisx.PyElements._getMaterialMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":527
 *             return self._getMassAttenuationCoefficients(elementDict, [energy])
 * 
 *     def _getMassAttenuationCoefficients(self, std_map[std_string, double] elementDict,             # <<<<<<<<<<<<<<
 *                                               std_vector[double] energy):
 *         return self.thisptr.getMassAttenuationCoefficients(elementDict, energy)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_57_getMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_57_getMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  std::map<std::string,double>  __pyx_v_elementDict;
  std::vector<double>  __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getMassAttenuationCoefficients (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDict,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDict)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getMassAttenuationCoefficients", 1, 2, 2, 1); __PYX_ERR(1, 527, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getMassAttenuationCoefficients") < 0)) __PYX_ERR(1, 527, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_elementDict = __pyx_convert_map_from_py_std_3a__3a_string__and_double(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 527, __pyx_L3_error)
    __pyx_v_energy = __pyx_convert_vector_from_py_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 528, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getMassAttenuationCoefficients", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 527, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements._getMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_56_getMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementDict, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_56_getMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::map<std::string,double>  __pyx_v_elementDict, std::vector<double>  __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::map<std::string,std::vector<double> >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":529
 *     def _getMassAttenuationCoefficients(self, std_map[std_string, double] elementDict,
 *                                               std_vector[double] energy):
 *         return self.thisptr.getMassAttenuationCoefficients(elementDict, energy)             # <<<<<<<<<<<<<<
 * 
 *     def _getExcitationFactors(self, std_string element,
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getMassAttenuationCoefficients(__pyx_v_elementDict, __pyx_v_energy);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 529, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":527
 *             return self._getMassAttenuationCoefficients(elementDict, [energy])
 * 
 *     def _getMassAttenuationCoefficients(self, std_map[std_string, double] elementDict,             # <<<<<<<<<<<<<<
 *                                               std_vector[double] energy):
 *         return self.thisptr.getMassAttenuationCoefficients(elementDict, energy)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyElements._getMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":531
 *         return self.thisptr.getMassAttenuationCoefficients(elementDict, energy)
 * 
 *     def _getExcitationFactors(self, std_string element,             # <<<<<<<<<<<<<<
 *                                    std_vector[double] energies,
 *                                    std_vector[double] weights):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_59_getExcitationFactors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_59_getExcitationFactors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  std::string __pyx_v_element;
  std::vector<double>  __pyx_v_energies;
  std::vector<double>  __pyx_v_weights;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getExcitationFactors (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_element,&__pyx_n_s_energies,&__pyx_n_s_weights,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getExcitationFactors", 1, 3, 3, 1); __PYX_ERR(1, 531, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getExcitationFactors", 1, 3, 3, 2); __PYX_ERR(1, 531, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getExcitationFactors") < 0)) __PYX_ERR(1, 531, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_element = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 531, __pyx_L3_error)
    __pyx_v_energies = __pyx_convert_vector_from_py_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 532, __pyx_L3_error)
    __pyx_v_weights = __pyx_convert_vector_from_py_double(values[2]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 533, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getExcitationFactors", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 531, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements._getExcitationFactors", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_58_getExcitationFactors(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_element, __pyx_v_energies, __pyx_v_weights);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_58_getExcitationFactors(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_element, std::vector<double>  __pyx_v_energies, std::vector<double>  __pyx_v_weights) {
  std::map<std::string,std::map<std::string,double> >  __pyx_v_x;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  std::vector<std::map<std::string,std::map<std::string,double> > >  __pyx_t_4;
  std::vector<std::map<std::string,std::map<std::string,double> > > ::iterator __pyx_t_5;
  std::vector<std::map<std::string,std::map<std::string,double> > >  *__pyx_t_6;
  std::map<std::string,std::map<std::string,double> >  __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getExcitationFactors", 0);

  /* "python/cython/_fisx.pyx":534
 *                                    std_vector[double] energies,
 *                                    std_vector[double] weights):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getExcitationFactors(element, energies, weights)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":535
 *                                    std_vector[double] weights):
 *         if sys.version < "3.0":
 *             return self.thisptr.getExcitationFactors(element, energies, weights)             # <<<<<<<<<<<<<<
 *         else:
 *             return [toStringKeysAndValues(x) for x in self.thisptr.getExcitationFactors(element, energies, weights)]
 */
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_4 = __pyx_v_self->thisptr->getExcitationFactors(__pyx_v_element, __pyx_v_energies, __pyx_v_weights);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 535, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":534
 *                                    std_vector[double] energies,
 *                                    std_vector[double] weights):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getExcitationFactors(element, energies, weights)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":537
 *             return self.thisptr.getExcitationFactors(element, energies, weights)
 *         else:
 *             return [toStringKeysAndValues(x) for x in self.thisptr.getExcitationFactors(element, energies, weights)]             # <<<<<<<<<<<<<<
 * 
 *     def getPeakFamilies(self, nameOrVector, energy):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    try {
      __pyx_t_4 = __pyx_v_self->thisptr->getExcitationFactors(__pyx_v_element, __pyx_v_energies, __pyx_v_weights);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 537, __pyx_L1_error)
    }
    __pyx_t_6 = &__pyx_t_4;
    __pyx_t_5 = __pyx_t_6->begin();
    for (;;) {
      if (!(__pyx_t_5 != __pyx_t_6->end())) break;
      __pyx_t_7 = *__pyx_t_5;
      ++__pyx_t_5;
      __pyx_v_x = __pyx_t_7;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_toStringKeysAndValues); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 537, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___(__pyx_v_x); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 537, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 537, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 537, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":531
 *         return self.thisptr.getMassAttenuationCoefficients(elementDict, energy)
 * 
 *     def _getExcitationFactors(self, std_string element,             # <<<<<<<<<<<<<<
 *                                    std_vector[double] energies,
 *                                    std_vector[double] weights):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("fisx._fisx.PyElements._getExcitationFactors", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":539
 *             return [toStringKeysAndValues(x) for x in self.thisptr.getExcitationFactors(element, energies, weights)]
 * 
 *     def getPeakFamilies(self, nameOrVector, energy):             # <<<<<<<<<<<<<<
 *         """
 *         getPeakFamilies(nameOrVector, energy)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_61getPeakFamilies(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_60getPeakFamilies[] = "\n        getPeakFamilies(nameOrVector, energy)\n\n        Given an energy and a reference to an elements library return dictionarys.\n        The key is the peak family (\"Si K\", \"Pb L1\", ...) and the value the binding energy.\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_61getPeakFamilies(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_nameOrVector = 0;
  PyObject *__pyx_v_energy = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPeakFamilies (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nameOrVector,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nameOrVector)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getPeakFamilies", 1, 2, 2, 1); __PYX_ERR(1, 539, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPeakFamilies") < 0)) __PYX_ERR(1, 539, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_nameOrVector = values[0];
    __pyx_v_energy = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getPeakFamilies", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 539, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.getPeakFamilies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_60getPeakFamilies(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_nameOrVector, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_60getPeakFamilies(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_nameOrVector, PyObject *__pyx_v_energy) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getPeakFamilies", 0);
  __Pyx_INCREF(__pyx_v_nameOrVector);

  /* "python/cython/_fisx.pyx":546
 *         The key is the peak family ("Si K", "Pb L1", ...) and the value the binding energy.
 *         """
 *         if type(nameOrVector) in [type([]), type(())]:             # <<<<<<<<<<<<<<
 *             if sys.version < "3.0":
 *                 return sorted(self._getPeakFamiliesFromVectorOfElements(nameOrVector, energy), key=itemgetter(1))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_1)));
  __pyx_t_2 = ((PyObject *)Py_TYPE(__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_empty_tuple)));
  __pyx_t_1 = ((PyObject *)Py_TYPE(__pyx_empty_tuple));
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_nameOrVector)));
  __pyx_t_3 = ((PyObject *)Py_TYPE(__pyx_v_nameOrVector));
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 546, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 546, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_4 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = (__pyx_t_4 != 0);
  if (__pyx_t_6) {

    /* "python/cython/_fisx.pyx":547
 *         """
 *         if type(nameOrVector) in [type([]), type(())]:
 *             if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *                 return sorted(self._getPeakFamiliesFromVectorOfElements(nameOrVector, energy), key=itemgetter(1))
 *             else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 547, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 547, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_6) {

      /* "python/cython/_fisx.pyx":548
 *         if type(nameOrVector) in [type([]), type(())]:
 *             if sys.version < "3.0":
 *                 return sorted(self._getPeakFamiliesFromVectorOfElements(nameOrVector, energy), key=itemgetter(1))             # <<<<<<<<<<<<<<
 *             else:
 *                 nameOrVector = [toBytes(x) for x in nameOrVector]
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPeakFamiliesFromVectorOfElem); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_nameOrVector, __pyx_v_energy};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 548, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_nameOrVector, __pyx_v_energy};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 548, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 548, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__pyx_t_3) {
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
        }
        __Pyx_INCREF(__pyx_v_nameOrVector);
        __Pyx_GIVEREF(__pyx_v_nameOrVector);
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_v_nameOrVector);
        __Pyx_INCREF(__pyx_v_energy);
        __Pyx_GIVEREF(__pyx_v_energy);
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_v_energy);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 548, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_itemgetter); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_1);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_5) < 0) __PYX_ERR(1, 548, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "python/cython/_fisx.pyx":547
 *         """
 *         if type(nameOrVector) in [type([]), type(())]:
 *             if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *                 return sorted(self._getPeakFamiliesFromVectorOfElements(nameOrVector, energy), key=itemgetter(1))
 *             else:
 */
    }

    /* "python/cython/_fisx.pyx":550
 *                 return sorted(self._getPeakFamiliesFromVectorOfElements(nameOrVector, energy), key=itemgetter(1))
 *             else:
 *                 nameOrVector = [toBytes(x) for x in nameOrVector]             # <<<<<<<<<<<<<<
 *                 return [(toString(x[0]), x[1]) for x in \
 *                         sorted(self._getPeakFamiliesFromVectorOfElements(nameOrVector, energy), key=itemgetter(1))]
 */
    /*else*/ {
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (likely(PyList_CheckExact(__pyx_v_nameOrVector)) || PyTuple_CheckExact(__pyx_v_nameOrVector)) {
        __pyx_t_2 = __pyx_v_nameOrVector; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_nameOrVector); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 550, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 550, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 550, __pyx_L1_error)
            #else
            __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 550, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          } else {
            if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 550, __pyx_L1_error)
            #else
            __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 550, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          }
        } else {
          __pyx_t_1 = __pyx_t_10(__pyx_t_2);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(1, 550, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_1);
        __pyx_t_1 = 0;
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 550, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_v_x) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_x);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 550, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_1))) __PYX_ERR(1, 550, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_nameOrVector, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "python/cython/_fisx.pyx":551
 *             else:
 *                 nameOrVector = [toBytes(x) for x in nameOrVector]
 *                 return [(toString(x[0]), x[1]) for x in \             # <<<<<<<<<<<<<<
 *                         sorted(self._getPeakFamiliesFromVectorOfElements(nameOrVector, energy), key=itemgetter(1))]
 *         else:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 551, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "python/cython/_fisx.pyx":552
 *                 nameOrVector = [toBytes(x) for x in nameOrVector]
 *                 return [(toString(x[0]), x[1]) for x in \
 *                         sorted(self._getPeakFamiliesFromVectorOfElements(nameOrVector, energy), key=itemgetter(1))]             # <<<<<<<<<<<<<<
 *         else:
 *             if sys.version < "3.0":
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPeakFamiliesFromVectorOfElem); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_nameOrVector, __pyx_v_energy};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 552, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_nameOrVector, __pyx_v_energy};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 552, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 552, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_3) {
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL;
        }
        __Pyx_INCREF(__pyx_v_nameOrVector);
        __Pyx_GIVEREF(__pyx_v_nameOrVector);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_nameOrVector);
        __Pyx_INCREF(__pyx_v_energy);
        __Pyx_GIVEREF(__pyx_v_energy);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_energy);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 552, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_itemgetter); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_11, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_1);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_8) < 0) __PYX_ERR(1, 552, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
        __pyx_t_2 = __pyx_t_8; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 552, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 552, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 552, __pyx_L1_error)
            #else
            __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 552, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          } else {
            if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 552, __pyx_L1_error)
            #else
            __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 552, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          }
        } else {
          __pyx_t_8 = __pyx_t_10(__pyx_t_2);
          if (unlikely(!__pyx_t_8)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(1, 552, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_8);
        }
        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "python/cython/_fisx.pyx":551
 *             else:
 *                 nameOrVector = [toBytes(x) for x in nameOrVector]
 *                 return [(toString(x[0]), x[1]) for x in \             # <<<<<<<<<<<<<<
 *                         sorted(self._getPeakFamiliesFromVectorOfElements(nameOrVector, energy), key=itemgetter(1))]
 *         else:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_toString); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 551, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_x, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 551, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_11, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 551, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 551, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 551, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
        __pyx_t_8 = 0;
        __pyx_t_1 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_3))) __PYX_ERR(1, 551, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;
    }

    /* "python/cython/_fisx.pyx":546
 *         The key is the peak family ("Si K", "Pb L1", ...) and the value the binding energy.
 *         """
 *         if type(nameOrVector) in [type([]), type(())]:             # <<<<<<<<<<<<<<
 *             if sys.version < "3.0":
 *                 return sorted(self._getPeakFamiliesFromVectorOfElements(nameOrVector, energy), key=itemgetter(1))
 */
  }

  /* "python/cython/_fisx.pyx":554
 *                         sorted(self._getPeakFamiliesFromVectorOfElements(nameOrVector, energy), key=itemgetter(1))]
 *         else:
 *             if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *                 return sorted(self._getPeakFamilies(toBytes(nameOrVector), energy), key=itemgetter(1))
 *             else:
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sys); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 554, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 554, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {

      /* "python/cython/_fisx.pyx":555
 *         else:
 *             if sys.version < "3.0":
 *                 return sorted(self._getPeakFamilies(toBytes(nameOrVector), energy), key=itemgetter(1))             # <<<<<<<<<<<<<<
 *             else:
 *                 return [(toString(x[0]), x[1]) for x in \
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPeakFamilies); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_v_nameOrVector) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_nameOrVector);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_3, __pyx_v_energy};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 555, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_3, __pyx_v_energy};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 555, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 555, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_1) {
          __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
        __Pyx_INCREF(__pyx_v_energy);
        __Pyx_GIVEREF(__pyx_v_energy);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_energy);
        __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 555, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_itemgetter); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_8 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_1);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_key, __pyx_t_8) < 0) __PYX_ERR(1, 555, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;

      /* "python/cython/_fisx.pyx":554
 *                         sorted(self._getPeakFamiliesFromVectorOfElements(nameOrVector, energy), key=itemgetter(1))]
 *         else:
 *             if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *                 return sorted(self._getPeakFamilies(toBytes(nameOrVector), energy), key=itemgetter(1))
 *             else:
 */
    }

    /* "python/cython/_fisx.pyx":557
 *                 return sorted(self._getPeakFamilies(toBytes(nameOrVector), energy), key=itemgetter(1))
 *             else:
 *                 return [(toString(x[0]), x[1]) for x in \             # <<<<<<<<<<<<<<
 *                         sorted(self._getPeakFamilies(toBytes(nameOrVector), energy), key=itemgetter(1))]
 * 
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 557, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);

      /* "python/cython/_fisx.pyx":558
 *             else:
 *                 return [(toString(x[0]), x[1]) for x in \
 *                         sorted(self._getPeakFamilies(toBytes(nameOrVector), energy), key=itemgetter(1))]             # <<<<<<<<<<<<<<
 * 
 *     def _getPeakFamilies(self, std_string name, double energy):
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPeakFamilies); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_3 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_11, __pyx_v_nameOrVector) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_nameOrVector);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_3, __pyx_v_energy};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 558, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_3, __pyx_v_energy};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 558, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 558, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__pyx_t_1) {
          __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_7, __pyx_t_3);
        __Pyx_INCREF(__pyx_v_energy);
        __Pyx_GIVEREF(__pyx_v_energy);
        PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_7, __pyx_v_energy);
        __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 558, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_itemgetter); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_11 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_1);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_key, __pyx_t_11) < 0) __PYX_ERR(1, 558, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
        __pyx_t_5 = __pyx_t_11; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 558, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 558, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_5))) {
            if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_11 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 558, __pyx_L1_error)
            #else
            __pyx_t_11 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 558, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            #endif
          } else {
            if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 558, __pyx_L1_error)
            #else
            __pyx_t_11 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 558, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            #endif
          }
        } else {
          __pyx_t_11 = __pyx_t_10(__pyx_t_5);
          if (unlikely(!__pyx_t_11)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(1, 558, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_11);
        __pyx_t_11 = 0;

        /* "python/cython/_fisx.pyx":557
 *                 return sorted(self._getPeakFamilies(toBytes(nameOrVector), energy), key=itemgetter(1))
 *             else:
 *                 return [(toString(x[0]), x[1]) for x in \             # <<<<<<<<<<<<<<
 *                         sorted(self._getPeakFamilies(toBytes(nameOrVector), energy), key=itemgetter(1))]
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toString); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 557, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_x, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 557, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        __pyx_t_11 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 557, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_x, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 557, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 557, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
        __pyx_t_11 = 0;
        __pyx_t_2 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_3))) __PYX_ERR(1, 557, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;
    }
  }

  /* "python/cython/_fisx.pyx":539
 *             return [toStringKeysAndValues(x) for x in self.thisptr.getExcitationFactors(element, energies, weights)]
 * 
 *     def getPeakFamilies(self, nameOrVector, energy):             # <<<<<<<<<<<<<<
 *         """
 *         getPeakFamilies(nameOrVector, energy)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getPeakFamilies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_nameOrVector);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":560
 *                         sorted(self._getPeakFamilies(toBytes(nameOrVector), energy), key=itemgetter(1))]
 * 
 *     def _getPeakFamilies(self, std_string name, double energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getPeakFamilies(name, energy)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_63_getPeakFamilies(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_63_getPeakFamilies(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  std::string __pyx_v_name;
  double __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getPeakFamilies (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getPeakFamilies", 1, 2, 2, 1); __PYX_ERR(1, 560, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getPeakFamilies") < 0)) __PYX_ERR(1, 560, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_name = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 560, __pyx_L3_error)
    __pyx_v_energy = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_energy == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 560, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getPeakFamilies", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 560, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements._getPeakFamilies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_62_getPeakFamilies(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_name, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_62_getPeakFamilies(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_name, double __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::vector<std::pair<std::string,double> >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getPeakFamilies", 0);

  /* "python/cython/_fisx.pyx":561
 * 
 *     def _getPeakFamilies(self, std_string name, double energy):
 *         return self.thisptr.getPeakFamilies(name, energy)             # <<<<<<<<<<<<<<
 * 
 *     def _getPeakFamiliesFromVectorOfElements(self, std_vector[std_string] elementList, double energy):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getPeakFamilies(__pyx_v_name, __pyx_v_energy);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 561, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_pair_3c_std_3a__3a_string_2c_double_3e___(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":560
 *                         sorted(self._getPeakFamilies(toBytes(nameOrVector), energy), key=itemgetter(1))]
 * 
 *     def _getPeakFamilies(self, std_string name, double energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getPeakFamilies(name, energy)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyElements._getPeakFamilies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":563
 *         return self.thisptr.getPeakFamilies(name, energy)
 * 
 *     def _getPeakFamiliesFromVectorOfElements(self, std_vector[std_string] elementList, double energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getPeakFamilies(elementList, energy)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_65_getPeakFamiliesFromVectorOfElements(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_65_getPeakFamiliesFromVectorOfElements(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  std::vector<std::string>  __pyx_v_elementList;
  double __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getPeakFamiliesFromVectorOfElements (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementList,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementList)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getPeakFamiliesFromVectorOfElements", 1, 2, 2, 1); __PYX_ERR(1, 563, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getPeakFamiliesFromVectorOfElements") < 0)) __PYX_ERR(1, 563, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_elementList = __pyx_convert_vector_from_py_std_3a__3a_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 563, __pyx_L3_error)
    __pyx_v_energy = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_energy == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 563, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getPeakFamiliesFromVectorOfElements", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 563, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements._getPeakFamiliesFromVectorOfElements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_64_getPeakFamiliesFromVectorOfElements(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementList, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_64_getPeakFamiliesFromVectorOfElements(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::vector<std::string>  __pyx_v_elementList, double __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::vector<std::pair<std::string,double> >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getPeakFamiliesFromVectorOfElements", 0);

  /* "python/cython/_fisx.pyx":564
 * 
 *     def _getPeakFamiliesFromVectorOfElements(self, std_vector[std_string] elementList, double energy):
 *         return self.thisptr.getPeakFamilies(elementList, energy)             # <<<<<<<<<<<<<<
 * 
 *     def getBindingEnergies(self, elementName):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getPeakFamilies(__pyx_v_elementList, __pyx_v_energy);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 564, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_pair_3c_std_3a__3a_string_2c_double_3e___(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":563
 *         return self.thisptr.getPeakFamilies(name, energy)
 * 
 *     def _getPeakFamiliesFromVectorOfElements(self, std_vector[std_string] elementList, double energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getPeakFamilies(elementList, energy)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyElements._getPeakFamiliesFromVectorOfElements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":566
 *         return self.thisptr.getPeakFamilies(elementList, energy)
 * 
 *     def getBindingEnergies(self, elementName):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getBindingEnergies(elementName)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_67getBindingEnergies(PyObject *__pyx_v_self, PyObject *__pyx_v_elementName); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_67getBindingEnergies(PyObject *__pyx_v_self, PyObject *__pyx_v_elementName) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getBindingEnergies (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_66getBindingEnergies(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v_elementName));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_66getBindingEnergies(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  std::string __pyx_t_4;
  std::map<std::string,double>  __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getBindingEnergies", 0);

  /* "python/cython/_fisx.pyx":567
 * 
 *     def getBindingEnergies(self, elementName):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getBindingEnergies(elementName)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":568
 *     def getBindingEnergies(self, elementName):
 *         if sys.version < "3.0":
 *             return self.thisptr.getBindingEnergies(elementName)             # <<<<<<<<<<<<<<
 *         else:
 *             return toStringKeys(self.thisptr.getBindingEnergies(toBytes(elementName)))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_elementName); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 568, __pyx_L1_error)
    try {
      __pyx_t_5 = __pyx_v_self->thisptr->getBindingEnergies(__pyx_t_4);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 568, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":567
 * 
 *     def getBindingEnergies(self, elementName):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getBindingEnergies(elementName)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":570
 *             return self.thisptr.getBindingEnergies(elementName)
 *         else:
 *             return toStringKeys(self.thisptr.getBindingEnergies(toBytes(elementName)))             # <<<<<<<<<<<<<<
 * 
 *     def getEscape(self, composition, double energy, double energyThreshold=0.010,
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_elementName);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 570, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    try {
      __pyx_t_5 = __pyx_v_self->thisptr->getBindingEnergies(__pyx_t_4);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 570, __pyx_L1_error)
    }
    __pyx_t_6 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":566
 *         return self.thisptr.getPeakFamilies(elementList, energy)
 * 
 *     def getBindingEnergies(self, elementName):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getBindingEnergies(elementName)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getBindingEnergies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":572
 *             return toStringKeys(self.thisptr.getBindingEnergies(toBytes(elementName)))
 * 
 *     def getEscape(self, composition, double energy, double energyThreshold=0.010,             # <<<<<<<<<<<<<<
 *                                         double intensityThreshold=1.0e-7,
 *                                         int nThreshold=4 ,
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_69getEscape(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_69getEscape(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_composition = 0;
  double __pyx_v_energy;
  double __pyx_v_energyThreshold;
  double __pyx_v_intensityThreshold;
  int __pyx_v_nThreshold;
  double __pyx_v_alphaIn;
  double __pyx_v_thickness;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEscape (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_composition,&__pyx_n_s_energy,&__pyx_n_s_energyThreshold,&__pyx_n_s_intensityThreshold,&__pyx_n_s_nThreshold,&__pyx_n_s_alphaIn,&__pyx_n_s_thickness,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_composition)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getEscape", 0, 2, 7, 1); __PYX_ERR(1, 572, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energyThreshold);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_intensityThreshold);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nThreshold);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alphaIn);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_thickness);
          if (value) { values[6] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEscape") < 0)) __PYX_ERR(1, 572, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_composition = values[0];
    __pyx_v_energy = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_energy == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 572, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_energyThreshold = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_energyThreshold == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 572, __pyx_L3_error)
    } else {
      __pyx_v_energyThreshold = ((double)0.010);
    }
    if (values[3]) {
      __pyx_v_intensityThreshold = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_intensityThreshold == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 573, __pyx_L3_error)
    } else {
      __pyx_v_intensityThreshold = ((double)1.0e-7);
    }
    if (values[4]) {
      __pyx_v_nThreshold = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nThreshold == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 574, __pyx_L3_error)
    } else {
      __pyx_v_nThreshold = ((int)4);
    }
    if (values[5]) {
      __pyx_v_alphaIn = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_alphaIn == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 575, __pyx_L3_error)
    } else {
      __pyx_v_alphaIn = ((double)90.);
    }
    if (values[6]) {
      __pyx_v_thickness = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_thickness == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 576, __pyx_L3_error)
    } else {
      __pyx_v_thickness = ((double)0.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getEscape", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 572, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.getEscape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_68getEscape(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_composition, __pyx_v_energy, __pyx_v_energyThreshold, __pyx_v_intensityThreshold, __pyx_v_nThreshold, __pyx_v_alphaIn, __pyx_v_thickness);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_68getEscape(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_composition, double __pyx_v_energy, double __pyx_v_energyThreshold, double __pyx_v_intensityThreshold, int __pyx_v_nThreshold, double __pyx_v_alphaIn, double __pyx_v_thickness) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_keyList = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  std::map<std::string,double>  __pyx_t_5;
  std::map<std::string,std::map<std::string,double> >  __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getEscape", 0);

  /* "python/cython/_fisx.pyx":577
 *                                         double alphaIn=90.,
 *                                         double thickness=0.0):
 *         if sys.version_info < (3, ):             # <<<<<<<<<<<<<<
 *             return self.thisptr.getEscape(toBytesKeys(composition), energy, energyThreshold, intensityThreshold, nThreshold,
 *                                          alphaIn, thickness)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_tuple__7, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":578
 *                                         double thickness=0.0):
 *         if sys.version_info < (3, ):
 *             return self.thisptr.getEscape(toBytesKeys(composition), energy, energyThreshold, intensityThreshold, nThreshold,             # <<<<<<<<<<<<<<
 *                                          alphaIn, thickness)
 *         else:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytesKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_composition) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_composition);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = __pyx_convert_map_from_py_std_3a__3a_string__and_double(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 578, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "python/cython/_fisx.pyx":579
 *         if sys.version_info < (3, ):
 *             return self.thisptr.getEscape(toBytesKeys(composition), energy, energyThreshold, intensityThreshold, nThreshold,
 *                                          alphaIn, thickness)             # <<<<<<<<<<<<<<
 *         else:
 *             result = toStringKeys(self.thisptr.getEscape(toBytesKeys(composition), energy, energyThreshold,
 */
    try {
      __pyx_t_6 = __pyx_v_self->thisptr->getEscape(__pyx_t_5, __pyx_v_energy, __pyx_v_energyThreshold, __pyx_v_intensityThreshold, __pyx_v_nThreshold, __pyx_v_alphaIn, __pyx_v_thickness);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 578, __pyx_L1_error)
    }

    /* "python/cython/_fisx.pyx":578
 *                                         double thickness=0.0):
 *         if sys.version_info < (3, ):
 *             return self.thisptr.getEscape(toBytesKeys(composition), energy, energyThreshold, intensityThreshold, nThreshold,             # <<<<<<<<<<<<<<
 *                                          alphaIn, thickness)
 *         else:
 */
    __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":577
 *                                         double alphaIn=90.,
 *                                         double thickness=0.0):
 *         if sys.version_info < (3, ):             # <<<<<<<<<<<<<<
 *             return self.thisptr.getEscape(toBytesKeys(composition), energy, energyThreshold, intensityThreshold, nThreshold,
 *                                          alphaIn, thickness)
 */
  }

  /* "python/cython/_fisx.pyx":581
 *                                          alphaIn, thickness)
 *         else:
 *             result = toStringKeys(self.thisptr.getEscape(toBytesKeys(composition), energy, energyThreshold,             # <<<<<<<<<<<<<<
 *                                 intensityThreshold, nThreshold, alphaIn, thickness))
 *             keyList =list(result.keys())
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytesKeys); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_composition) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_composition);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = __pyx_convert_map_from_py_std_3a__3a_string__and_double(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 581, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "python/cython/_fisx.pyx":582
 *         else:
 *             result = toStringKeys(self.thisptr.getEscape(toBytesKeys(composition), energy, energyThreshold,
 *                                 intensityThreshold, nThreshold, alphaIn, thickness))             # <<<<<<<<<<<<<<
 *             keyList =list(result.keys())
 *             for key in keyList:
 */
    try {
      __pyx_t_6 = __pyx_v_self->thisptr->getEscape(__pyx_t_5, __pyx_v_energy, __pyx_v_energyThreshold, __pyx_v_intensityThreshold, __pyx_v_nThreshold, __pyx_v_alphaIn, __pyx_v_thickness);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 581, __pyx_L1_error)
    }

    /* "python/cython/_fisx.pyx":581
 *                                          alphaIn, thickness)
 *         else:
 *             result = toStringKeys(self.thisptr.getEscape(toBytesKeys(composition), energy, energyThreshold,             # <<<<<<<<<<<<<<
 *                                 intensityThreshold, nThreshold, alphaIn, thickness))
 *             keyList =list(result.keys())
 */
    __pyx_t_4 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_result = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "python/cython/_fisx.pyx":583
 *             result = toStringKeys(self.thisptr.getEscape(toBytesKeys(composition), energy, energyThreshold,
 *                                 intensityThreshold, nThreshold, alphaIn, thickness))
 *             keyList =list(result.keys())             # <<<<<<<<<<<<<<
 *             for key in keyList:
 *                 result[key] = toStringKeys(result[key])
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_keyList = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "python/cython/_fisx.pyx":584
 *                                 intensityThreshold, nThreshold, alphaIn, thickness))
 *             keyList =list(result.keys())
 *             for key in keyList:             # <<<<<<<<<<<<<<
 *                 result[key] = toStringKeys(result[key])
 *             return result
 */
    __pyx_t_2 = __pyx_v_keyList; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
    for (;;) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 584, __pyx_L1_error)
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 584, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "python/cython/_fisx.pyx":585
 *             keyList =list(result.keys())
 *             for key in keyList:
 *                 result[key] = toStringKeys(result[key])             # <<<<<<<<<<<<<<
 *             return result
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 585, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_result, __pyx_v_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 585, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 585, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_result, __pyx_v_key, __pyx_t_1) < 0)) __PYX_ERR(1, 585, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "python/cython/_fisx.pyx":584
 *                                 intensityThreshold, nThreshold, alphaIn, thickness))
 *             keyList =list(result.keys())
 *             for key in keyList:             # <<<<<<<<<<<<<<
 *                 result[key] = toStringKeys(result[key])
 *             return result
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "python/cython/_fisx.pyx":586
 *             for key in keyList:
 *                 result[key] = toStringKeys(result[key])
 *             return result             # <<<<<<<<<<<<<<
 * 
 *     def updateEscapeCache(self, composition, std_vector[double] energyList, double energyThreshold=0.010,
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":572
 *             return toStringKeys(self.thisptr.getBindingEnergies(toBytes(elementName)))
 * 
 *     def getEscape(self, composition, double energy, double energyThreshold=0.010,             # <<<<<<<<<<<<<<
 *                                         double intensityThreshold=1.0e-7,
 *                                         int nThreshold=4 ,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getEscape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_keyList);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":588
 *             return result
 * 
 *     def updateEscapeCache(self, composition, std_vector[double] energyList, double energyThreshold=0.010,             # <<<<<<<<<<<<<<
 *                                         double intensityThreshold=1.0e-7,
 *                                         int nThreshold=4 ,
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_71updateEscapeCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_71updateEscapeCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_composition = 0;
  std::vector<double>  __pyx_v_energyList;
  double __pyx_v_energyThreshold;
  double __pyx_v_intensityThreshold;
  int __pyx_v_nThreshold;
  double __pyx_v_alphaIn;
  double __pyx_v_thickness;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateEscapeCache (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_composition,&__pyx_n_s_energyList,&__pyx_n_s_energyThreshold,&__pyx_n_s_intensityThreshold,&__pyx_n_s_nThreshold,&__pyx_n_s_alphaIn,&__pyx_n_s_thickness,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_composition)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energyList)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("updateEscapeCache", 0, 2, 7, 1); __PYX_ERR(1, 588, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energyThreshold);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_intensityThreshold);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nThreshold);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alphaIn);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_thickness);
          if (value) { values[6] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateEscapeCache") < 0)) __PYX_ERR(1, 588, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_composition = values[0];
    __pyx_v_energyList = __pyx_convert_vector_from_py_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 588, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_energyThreshold = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_energyThreshold == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 588, __pyx_L3_error)
    } else {
      __pyx_v_energyThreshold = ((double)0.010);
    }
    if (values[3]) {
      __pyx_v_intensityThreshold = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_intensityThreshold == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 589, __pyx_L3_error)
    } else {
      __pyx_v_intensityThreshold = ((double)1.0e-7);
    }
    if (values[4]) {
      __pyx_v_nThreshold = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nThreshold == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 590, __pyx_L3_error)
    } else {
      __pyx_v_nThreshold = ((int)4);
    }
    if (values[5]) {
      __pyx_v_alphaIn = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_alphaIn == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 591, __pyx_L3_error)
    } else {
      __pyx_v_alphaIn = ((double)90.);
    }
    if (values[6]) {
      __pyx_v_thickness = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_thickness == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 592, __pyx_L3_error)
    } else {
      __pyx_v_thickness = ((double)0.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateEscapeCache", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 588, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.updateEscapeCache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_70updateEscapeCache(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_composition, __pyx_v_energyList, __pyx_v_energyThreshold, __pyx_v_intensityThreshold, __pyx_v_nThreshold, __pyx_v_alphaIn, __pyx_v_thickness);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_70updateEscapeCache(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_composition, std::vector<double>  __pyx_v_energyList, double __pyx_v_energyThreshold, double __pyx_v_intensityThreshold, int __pyx_v_nThreshold, double __pyx_v_alphaIn, double __pyx_v_thickness) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::map<std::string,double>  __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateEscapeCache", 0);

  /* "python/cython/_fisx.pyx":593
 *                                         double alphaIn=90.,
 *                                         double thickness=0.0):
 *         self.thisptr.updateEscapeCache(toBytesKeys(composition), energyList, energyThreshold, intensityThreshold, nThreshold,             # <<<<<<<<<<<<<<
 *                                       alphaIn, thickness)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytesKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_composition) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_composition);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_map_from_py_std_3a__3a_string__and_double(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":594
 *                                         double thickness=0.0):
 *         self.thisptr.updateEscapeCache(toBytesKeys(composition), energyList, energyThreshold, intensityThreshold, nThreshold,
 *                                       alphaIn, thickness)             # <<<<<<<<<<<<<<
 * 
 *     def getShellConstants(self, elementName, subshell):
 */
  try {
    __pyx_v_self->thisptr->updateEscapeCache(__pyx_t_4, __pyx_v_energyList, __pyx_v_energyThreshold, __pyx_v_intensityThreshold, __pyx_v_nThreshold, __pyx_v_alphaIn, __pyx_v_thickness);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 593, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":588
 *             return result
 * 
 *     def updateEscapeCache(self, composition, std_vector[double] energyList, double energyThreshold=0.010,             # <<<<<<<<<<<<<<
 *                                         double intensityThreshold=1.0e-7,
 *                                         int nThreshold=4 ,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.updateEscapeCache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":596
 *                                       alphaIn, thickness)
 * 
 *     def getShellConstants(self, elementName, subshell):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getShellConstants(elementName, subshell)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_73getShellConstants(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_73getShellConstants(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elementName = 0;
  PyObject *__pyx_v_subshell = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getShellConstants (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementName,&__pyx_n_s_subshell,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subshell)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getShellConstants", 1, 2, 2, 1); __PYX_ERR(1, 596, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getShellConstants") < 0)) __PYX_ERR(1, 596, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_elementName = values[0];
    __pyx_v_subshell = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getShellConstants", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 596, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.getShellConstants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_72getShellConstants(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementName, __pyx_v_subshell);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_72getShellConstants(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, PyObject *__pyx_v_subshell) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  std::string __pyx_t_4;
  std::string __pyx_t_5;
  std::map<std::string,double>  __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getShellConstants", 0);

  /* "python/cython/_fisx.pyx":597
 * 
 *     def getShellConstants(self, elementName, subshell):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getShellConstants(elementName, subshell)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":598
 *     def getShellConstants(self, elementName, subshell):
 *         if sys.version < "3.0":
 *             return self.thisptr.getShellConstants(elementName, subshell)             # <<<<<<<<<<<<<<
 *         else:
 *             return toStringKeys(self.thisptr.getShellConstants(toBytes(elementName), toBytes(subshell)))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_elementName); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 598, __pyx_L1_error)
    __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_subshell); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 598, __pyx_L1_error)
    try {
      __pyx_t_6 = __pyx_v_self->thisptr->getShellConstants(__pyx_t_4, __pyx_t_5);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 598, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":597
 * 
 *     def getShellConstants(self, elementName, subshell):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getShellConstants(elementName, subshell)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":600
 *             return self.thisptr.getShellConstants(elementName, subshell)
 *         else:
 *             return toStringKeys(self.thisptr.getShellConstants(toBytes(elementName), toBytes(subshell)))             # <<<<<<<<<<<<<<
 * 
 *     def getEmittedXRayLines(self, elementName, double energy=1000.):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_elementName);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 600, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_subshell) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_subshell);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 600, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    try {
      __pyx_t_6 = __pyx_v_self->thisptr->getShellConstants(__pyx_t_5, __pyx_t_4);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 600, __pyx_L1_error)
    }
    __pyx_t_7 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":596
 *                                       alphaIn, thickness)
 * 
 *     def getShellConstants(self, elementName, subshell):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getShellConstants(elementName, subshell)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getShellConstants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":602
 *             return toStringKeys(self.thisptr.getShellConstants(toBytes(elementName), toBytes(subshell)))
 * 
 *     def getEmittedXRayLines(self, elementName, double energy=1000.):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getEmittedXRayLines(elementName, energy)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_75getEmittedXRayLines(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_75getEmittedXRayLines(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elementName = 0;
  double __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEmittedXRayLines (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementName,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEmittedXRayLines") < 0)) __PYX_ERR(1, 602, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_elementName = values[0];
    if (values[1]) {
      __pyx_v_energy = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_energy == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 602, __pyx_L3_error)
    } else {
      __pyx_v_energy = ((double)1000.);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getEmittedXRayLines", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 602, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.getEmittedXRayLines", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_74getEmittedXRayLines(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementName, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_74getEmittedXRayLines(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, double __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  std::string __pyx_t_4;
  std::map<std::string,double>  __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getEmittedXRayLines", 0);

  /* "python/cython/_fisx.pyx":603
 * 
 *     def getEmittedXRayLines(self, elementName, double energy=1000.):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getEmittedXRayLines(elementName, energy)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 603, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 603, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":604
 *     def getEmittedXRayLines(self, elementName, double energy=1000.):
 *         if sys.version < "3.0":
 *             return self.thisptr.getEmittedXRayLines(elementName, energy)             # <<<<<<<<<<<<<<
 *         else:
 *             return toStringKeys(self.thisptr.getEmittedXRayLines(toBytes(elementName), energy))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_elementName); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 604, __pyx_L1_error)
    try {
      __pyx_t_5 = __pyx_v_self->thisptr->getEmittedXRayLines(__pyx_t_4, __pyx_v_energy);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 604, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":603
 * 
 *     def getEmittedXRayLines(self, elementName, double energy=1000.):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getEmittedXRayLines(elementName, energy)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":606
 *             return self.thisptr.getEmittedXRayLines(elementName, energy)
 *         else:
 *             return toStringKeys(self.thisptr.getEmittedXRayLines(toBytes(elementName), energy))             # <<<<<<<<<<<<<<
 * 
 *     def getRadiativeTransitions(self, elementName, subshell):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_elementName);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 606, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    try {
      __pyx_t_5 = __pyx_v_self->thisptr->getEmittedXRayLines(__pyx_t_4, __pyx_v_energy);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 606, __pyx_L1_error)
    }
    __pyx_t_6 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":602
 *             return toStringKeys(self.thisptr.getShellConstants(toBytes(elementName), toBytes(subshell)))
 * 
 *     def getEmittedXRayLines(self, elementName, double energy=1000.):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getEmittedXRayLines(elementName, energy)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getEmittedXRayLines", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":608
 *             return toStringKeys(self.thisptr.getEmittedXRayLines(toBytes(elementName), energy))
 * 
 *     def getRadiativeTransitions(self, elementName, subshell):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getRadiativeTransitions(elementName, subshell)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_77getRadiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_77getRadiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elementName = 0;
  PyObject *__pyx_v_subshell = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRadiativeTransitions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementName,&__pyx_n_s_subshell,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subshell)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getRadiativeTransitions", 1, 2, 2, 1); __PYX_ERR(1, 608, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getRadiativeTransitions") < 0)) __PYX_ERR(1, 608, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_elementName = values[0];
    __pyx_v_subshell = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getRadiativeTransitions", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 608, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.getRadiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_76getRadiativeTransitions(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementName, __pyx_v_subshell);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_76getRadiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, PyObject *__pyx_v_subshell) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  std::string __pyx_t_4;
  std::string __pyx_t_5;
  std::map<std::string,double>  __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getRadiativeTransitions", 0);

  /* "python/cython/_fisx.pyx":609
 * 
 *     def getRadiativeTransitions(self, elementName, subshell):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getRadiativeTransitions(elementName, subshell)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":610
 *     def getRadiativeTransitions(self, elementName, subshell):
 *         if sys.version < "3.0":
 *             return self.thisptr.getRadiativeTransitions(elementName, subshell)             # <<<<<<<<<<<<<<
 *         else:
 *             return toStringKeys(self.thisptr.getRadiativeTransitions(toBytes(elementName), toBytes(subshell)))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_elementName); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 610, __pyx_L1_error)
    __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_subshell); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 610, __pyx_L1_error)
    try {
      __pyx_t_6 = __pyx_v_self->thisptr->getRadiativeTransitions(__pyx_t_4, __pyx_t_5);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 610, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":609
 * 
 *     def getRadiativeTransitions(self, elementName, subshell):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getRadiativeTransitions(elementName, subshell)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":612
 *             return self.thisptr.getRadiativeTransitions(elementName, subshell)
 *         else:
 *             return toStringKeys(self.thisptr.getRadiativeTransitions(toBytes(elementName), toBytes(subshell)))             # <<<<<<<<<<<<<<
 * 
 *     def getNonradiativeTransitions(self, elementName, subshell):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_elementName);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 612, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_subshell) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_subshell);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 612, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    try {
      __pyx_t_6 = __pyx_v_self->thisptr->getRadiativeTransitions(__pyx_t_5, __pyx_t_4);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 612, __pyx_L1_error)
    }
    __pyx_t_7 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":608
 *             return toStringKeys(self.thisptr.getEmittedXRayLines(toBytes(elementName), energy))
 * 
 *     def getRadiativeTransitions(self, elementName, subshell):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getRadiativeTransitions(elementName, subshell)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getRadiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":614
 *             return toStringKeys(self.thisptr.getRadiativeTransitions(toBytes(elementName), toBytes(subshell)))
 * 
 *     def getNonradiativeTransitions(self, elementName, subshell):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getNonradiativeTransitions(elementName, subshell)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_79getNonradiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_79getNonradiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elementName = 0;
  PyObject *__pyx_v_subshell = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getNonradiativeTransitions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementName,&__pyx_n_s_subshell,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subshell)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getNonradiativeTransitions", 1, 2, 2, 1); __PYX_ERR(1, 614, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getNonradiativeTransitions") < 0)) __PYX_ERR(1, 614, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_elementName = values[0];
    __pyx_v_subshell = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getNonradiativeTransitions", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 614, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.getNonradiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_78getNonradiativeTransitions(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementName, __pyx_v_subshell);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_78getNonradiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, PyObject *__pyx_v_subshell) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  std::string __pyx_t_4;
  std::string __pyx_t_5;
  std::map<std::string,double>  __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getNonradiativeTransitions", 0);

  /* "python/cython/_fisx.pyx":615
 * 
 *     def getNonradiativeTransitions(self, elementName, subshell):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getNonradiativeTransitions(elementName, subshell)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":616
 *     def getNonradiativeTransitions(self, elementName, subshell):
 *         if sys.version < "3.0":
 *             return self.thisptr.getNonradiativeTransitions(elementName, subshell)             # <<<<<<<<<<<<<<
 *         else:
 *             return toStringKeys(self.thisptr.getNonradiativeTransitions(toBytes(elementName), toBytes(subshell)))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_elementName); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 616, __pyx_L1_error)
    __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_subshell); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 616, __pyx_L1_error)
    try {
      __pyx_t_6 = __pyx_v_self->thisptr->getNonradiativeTransitions(__pyx_t_4, __pyx_t_5);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 616, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":615
 * 
 *     def getNonradiativeTransitions(self, elementName, subshell):
 *         if sys.version < "3.0":             # <<<<<<<<<<<<<<
 *             return self.thisptr.getNonradiativeTransitions(elementName, subshell)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":618
 *             return self.thisptr.getNonradiativeTransitions(elementName, subshell)
 *         else:
 *             return toStringKeys(self.thisptr.getNonradiativeTransitions(toBytes(elementName), toBytes(subshell)))             # <<<<<<<<<<<<<<
 * 
 *     def setElementCascadeCacheEnabled(self, elementName, int flag = 1):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_elementName);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 618, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_subshell) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_subshell);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 618, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    try {
      __pyx_t_6 = __pyx_v_self->thisptr->getNonradiativeTransitions(__pyx_t_5, __pyx_t_4);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 618, __pyx_L1_error)
    }
    __pyx_t_7 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":614
 *             return toStringKeys(self.thisptr.getRadiativeTransitions(toBytes(elementName), toBytes(subshell)))
 * 
 *     def getNonradiativeTransitions(self, elementName, subshell):             # <<<<<<<<<<<<<<
 *         if sys.version < "3.0":
 *             return self.thisptr.getNonradiativeTransitions(elementName, subshell)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getNonradiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":620
 *             return toStringKeys(self.thisptr.getNonradiativeTransitions(toBytes(elementName), toBytes(subshell)))
 * 
 *     def setElementCascadeCacheEnabled(self, elementName, int flag = 1):             # <<<<<<<<<<<<<<
 *         self.thisptr.setElementCascadeCacheEnabled(toBytes(elementName), flag)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_81setElementCascadeCacheEnabled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_81setElementCascadeCacheEnabled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elementName = 0;
  int __pyx_v_flag;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setElementCascadeCacheEnabled (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementName,&__pyx_n_s_flag,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setElementCascadeCacheEnabled") < 0)) __PYX_ERR(1, 620, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_elementName = values[0];
    if (values[1]) {
      __pyx_v_flag = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 620, __pyx_L3_error)
    } else {
      __pyx_v_flag = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setElementCascadeCacheEnabled", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 620, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.setElementCascadeCacheEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_80setElementCascadeCacheEnabled(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementName, __pyx_v_flag);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_80setElementCascadeCacheEnabled(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, int __pyx_v_flag) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setElementCascadeCacheEnabled", 0);

  /* "python/cython/_fisx.pyx":621
 * 
 *     def setElementCascadeCacheEnabled(self, elementName, int flag = 1):
 *         self.thisptr.setElementCascadeCacheEnabled(toBytes(elementName), flag)             # <<<<<<<<<<<<<<
 * 
 *     def emptyElementCascadeCache(self, elementName):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_elementName);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_v_self->thisptr->setElementCascadeCacheEnabled(__pyx_t_4, __pyx_v_flag);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 621, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":620
 *             return toStringKeys(self.thisptr.getNonradiativeTransitions(toBytes(elementName), toBytes(subshell)))
 * 
 *     def setElementCascadeCacheEnabled(self, elementName, int flag = 1):             # <<<<<<<<<<<<<<
 *         self.thisptr.setElementCascadeCacheEnabled(toBytes(elementName), flag)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.setElementCascadeCacheEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":623
 *         self.thisptr.setElementCascadeCacheEnabled(toBytes(elementName), flag)
 * 
 *     def emptyElementCascadeCache(self, elementName):             # <<<<<<<<<<<<<<
 *         self.thisptr.emptyElementCascadeCache(toBytes(elementName))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_83emptyElementCascadeCache(PyObject *__pyx_v_self, PyObject *__pyx_v_elementName); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_83emptyElementCascadeCache(PyObject *__pyx_v_self, PyObject *__pyx_v_elementName) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("emptyElementCascadeCache (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_82emptyElementCascadeCache(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v_elementName));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_82emptyElementCascadeCache(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("emptyElementCascadeCache", 0);

  /* "python/cython/_fisx.pyx":624
 * 
 *     def emptyElementCascadeCache(self, elementName):
 *         self.thisptr.emptyElementCascadeCache(toBytes(elementName))             # <<<<<<<<<<<<<<
 * 
 *     def fillCache(self, elementName, std_vector[double] energy):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_elementName);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_v_self->thisptr->emptyElementCascadeCache(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 624, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":623
 *         self.thisptr.setElementCascadeCacheEnabled(toBytes(elementName), flag)
 * 
 *     def emptyElementCascadeCache(self, elementName):             # <<<<<<<<<<<<<<
 *         self.thisptr.emptyElementCascadeCache(toBytes(elementName))
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.emptyElementCascadeCache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":626
 *         self.thisptr.emptyElementCascadeCache(toBytes(elementName))
 * 
 *     def fillCache(self, elementName, std_vector[double] energy):             # <<<<<<<<<<<<<<
 *         """
 *         Optimization methods to keep the calculations at a set of energies
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_85fillCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_84fillCache[] = "\n        Optimization methods to keep the calculations at a set of energies\n        in cache.\n        Clear the calculation cache of given element and fill it at the\n        selected energies\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_85fillCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elementName = 0;
  std::vector<double>  __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fillCache (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementName,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fillCache", 1, 2, 2, 1); __PYX_ERR(1, 626, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fillCache") < 0)) __PYX_ERR(1, 626, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_elementName = values[0];
    __pyx_v_energy = __pyx_convert_vector_from_py_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 626, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fillCache", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 626, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.fillCache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_84fillCache(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementName, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_84fillCache(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, std::vector<double>  __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fillCache", 0);

  /* "python/cython/_fisx.pyx":633
 *         selected energies
 *         """
 *         self.thisptr.fillCache(toBytes(elementName), energy)             # <<<<<<<<<<<<<<
 * 
 *     def updateCache(self, elementName, std_vector[double] energy):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_elementName);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_v_self->thisptr->fillCache(__pyx_t_4, __pyx_v_energy);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 633, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":626
 *         self.thisptr.emptyElementCascadeCache(toBytes(elementName))
 * 
 *     def fillCache(self, elementName, std_vector[double] energy):             # <<<<<<<<<<<<<<
 *         """
 *         Optimization methods to keep the calculations at a set of energies
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.fillCache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":635
 *         self.thisptr.fillCache(toBytes(elementName), energy)
 * 
 *     def updateCache(self, elementName, std_vector[double] energy):             # <<<<<<<<<<<<<<
 *         """
 *         Update the element cache with those energy values not already present.
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_87updateCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_86updateCache[] = "\n        Update the element cache with those energy values not already present.\n        The existing values will be kept.\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_87updateCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elementName = 0;
  std::vector<double>  __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateCache (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementName,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("updateCache", 1, 2, 2, 1); __PYX_ERR(1, 635, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateCache") < 0)) __PYX_ERR(1, 635, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_elementName = values[0];
    __pyx_v_energy = __pyx_convert_vector_from_py_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 635, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateCache", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 635, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.updateCache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_86updateCache(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementName, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_86updateCache(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, std::vector<double>  __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateCache", 0);

  /* "python/cython/_fisx.pyx":640
 *         The existing values will be kept.
 *         """
 *         self.thisptr.updateCache(toBytes(elementName), energy)             # <<<<<<<<<<<<<<
 * 
 *     def setCacheEnabled(self, elementName, int flag = 1):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_elementName);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_v_self->thisptr->updateCache(__pyx_t_4, __pyx_v_energy);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 640, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":635
 *         self.thisptr.fillCache(toBytes(elementName), energy)
 * 
 *     def updateCache(self, elementName, std_vector[double] energy):             # <<<<<<<<<<<<<<
 *         """
 *         Update the element cache with those energy values not already present.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.updateCache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":642
 *         self.thisptr.updateCache(toBytes(elementName), energy)
 * 
 *     def setCacheEnabled(self, elementName, int flag = 1):             # <<<<<<<<<<<<<<
 *         """
 *         Enable or disable the use of the stored calculations (if any).
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_89setCacheEnabled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_88setCacheEnabled[] = "\n        Enable or disable the use of the stored calculations (if any).\n        It does not clear the cache when disabling.\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_89setCacheEnabled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elementName = 0;
  int __pyx_v_flag;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setCacheEnabled (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementName,&__pyx_n_s_flag,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCacheEnabled") < 0)) __PYX_ERR(1, 642, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_elementName = values[0];
    if (values[1]) {
      __pyx_v_flag = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 642, __pyx_L3_error)
    } else {
      __pyx_v_flag = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setCacheEnabled", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 642, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.setCacheEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_88setCacheEnabled(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementName, __pyx_v_flag);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_88setCacheEnabled(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, int __pyx_v_flag) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setCacheEnabled", 0);

  /* "python/cython/_fisx.pyx":647
 *         It does not clear the cache when disabling.
 *         """
 *         self.thisptr.setCacheEnabled(toBytes(elementName), flag)             # <<<<<<<<<<<<<<
 * 
 *     def setEscapeCacheEnabled(self, int flag = 1):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_elementName);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 647, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_v_self->thisptr->setCacheEnabled(__pyx_t_4, __pyx_v_flag);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 647, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":642
 *         self.thisptr.updateCache(toBytes(elementName), energy)
 * 
 *     def setCacheEnabled(self, elementName, int flag = 1):             # <<<<<<<<<<<<<<
 *         """
 *         Enable or disable the use of the stored calculations (if any).
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.setCacheEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":649
 *         self.thisptr.setCacheEnabled(toBytes(elementName), flag)
 * 
 *     def setEscapeCacheEnabled(self, int flag = 1):             # <<<<<<<<<<<<<<
 *         """
 *         Enable or disable the use of the stored calculations (if any).
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_91setEscapeCacheEnabled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_90setEscapeCacheEnabled[] = "\n        Enable or disable the use of the stored calculations (if any).\n        It does not clear the cache when disabling.\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_91setEscapeCacheEnabled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_flag;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setEscapeCacheEnabled (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setEscapeCacheEnabled") < 0)) __PYX_ERR(1, 649, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_flag = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 649, __pyx_L3_error)
    } else {
      __pyx_v_flag = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setEscapeCacheEnabled", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 649, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.setEscapeCacheEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_90setEscapeCacheEnabled(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_flag);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_90setEscapeCacheEnabled(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, int __pyx_v_flag) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setEscapeCacheEnabled", 0);

  /* "python/cython/_fisx.pyx":654
 *         It does not clear the cache when disabling.
 *         """
 *         self.thisptr.setEscapeCacheEnabled(flag)             # <<<<<<<<<<<<<<
 * 
 *     def clearCache(self, elementName):
 */
  try {
    __pyx_v_self->thisptr->setEscapeCacheEnabled(__pyx_v_flag);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 654, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":649
 *         self.thisptr.setCacheEnabled(toBytes(elementName), flag)
 * 
 *     def setEscapeCacheEnabled(self, int flag = 1):             # <<<<<<<<<<<<<<
 *         """
 *         Enable or disable the use of the stored calculations (if any).
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.setEscapeCacheEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":656
 *         self.thisptr.setEscapeCacheEnabled(flag)
 * 
 *     def clearCache(self, elementName):             # <<<<<<<<<<<<<<
 *         """
 *         Clear the calculation cache
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_93clearCache(PyObject *__pyx_v_self, PyObject *__pyx_v_elementName); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_92clearCache[] = "\n        Clear the calculation cache\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_93clearCache(PyObject *__pyx_v_self, PyObject *__pyx_v_elementName) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clearCache (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_92clearCache(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v_elementName));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_92clearCache(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clearCache", 0);

  /* "python/cython/_fisx.pyx":660
 *         Clear the calculation cache
 *         """
 *         self.thisptr.clearCache(toBytes(elementName))             # <<<<<<<<<<<<<<
 * 
 *     def isCacheEnabled(self, elementName):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_elementName);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 660, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_v_self->thisptr->clearCache(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 660, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":656
 *         self.thisptr.setEscapeCacheEnabled(flag)
 * 
 *     def clearCache(self, elementName):             # <<<<<<<<<<<<<<
 *         """
 *         Clear the calculation cache
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.clearCache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":662
 *         self.thisptr.clearCache(toBytes(elementName))
 * 
 *     def isCacheEnabled(self, elementName):             # <<<<<<<<<<<<<<
 *         """
 *         Return 1 or 0 if the calculation cache is enabled or not
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_95isCacheEnabled(PyObject *__pyx_v_self, PyObject *__pyx_v_elementName); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_94isCacheEnabled[] = "\n        Return 1 or 0 if the calculation cache is enabled or not\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_95isCacheEnabled(PyObject *__pyx_v_self, PyObject *__pyx_v_elementName) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isCacheEnabled (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_94isCacheEnabled(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v_elementName));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_94isCacheEnabled(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isCacheEnabled", 0);

  /* "python/cython/_fisx.pyx":666
 *         Return 1 or 0 if the calculation cache is enabled or not
 *         """
 *         return self.thisptr.isCacheEnabled(toBytes(elementName))             # <<<<<<<<<<<<<<
 * 
 *     def isEscapeCacheEnabled(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_elementName);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_5 = __pyx_v_self->thisptr->isCacheEnabled(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 666, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":662
 *         self.thisptr.clearCache(toBytes(elementName))
 * 
 *     def isCacheEnabled(self, elementName):             # <<<<<<<<<<<<<<
 *         """
 *         Return 1 or 0 if the calculation cache is enabled or not
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.isCacheEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":668
 *         return self.thisptr.isCacheEnabled(toBytes(elementName))
 * 
 *     def isEscapeCacheEnabled(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return 1 or 0 if the calculation cache is enabled or not
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_97isEscapeCacheEnabled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_96isEscapeCacheEnabled[] = "\n        Return 1 or 0 if the calculation cache is enabled or not\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_97isEscapeCacheEnabled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isEscapeCacheEnabled (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_96isEscapeCacheEnabled(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_96isEscapeCacheEnabled(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isEscapeCacheEnabled", 0);

  /* "python/cython/_fisx.pyx":672
 *         Return 1 or 0 if the calculation cache is enabled or not
 *         """
 *         return self.thisptr.isEscapeCacheEnabled()             # <<<<<<<<<<<<<<
 * 
 *     def getCacheSize(self, elementName):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->isEscapeCacheEnabled();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 672, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":668
 *         return self.thisptr.isCacheEnabled(toBytes(elementName))
 * 
 *     def isEscapeCacheEnabled(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return 1 or 0 if the calculation cache is enabled or not
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyElements.isEscapeCacheEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":674
 *         return self.thisptr.isEscapeCacheEnabled()
 * 
 *     def getCacheSize(self, elementName):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of energies for which the calculations are stored
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_99getCacheSize(PyObject *__pyx_v_self, PyObject *__pyx_v_elementName); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_98getCacheSize[] = "\n        Return the number of energies for which the calculations are stored\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_99getCacheSize(PyObject *__pyx_v_self, PyObject *__pyx_v_elementName) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getCacheSize (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_98getCacheSize(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v_elementName));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_98getCacheSize(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getCacheSize", 0);

  /* "python/cython/_fisx.pyx":678
 *         Return the number of energies for which the calculations are stored
 *         """
 *         return self.thisptr.getCacheSize(toBytes(elementName))             # <<<<<<<<<<<<<<
 * 
 *     def removeMaterials(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_elementName);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_5 = __pyx_v_self->thisptr->getCacheSize(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 678, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":674
 *         return self.thisptr.isEscapeCacheEnabled()
 * 
 *     def getCacheSize(self, elementName):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of energies for which the calculations are stored
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getCacheSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":680
 *         return self.thisptr.getCacheSize(toBytes(elementName))
 * 
 *     def removeMaterials(self):             # <<<<<<<<<<<<<<
 *         self.thisptr.removeMaterials()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_101removeMaterials(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_101removeMaterials(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("removeMaterials (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_100removeMaterials(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_100removeMaterials(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("removeMaterials", 0);

  /* "python/cython/_fisx.pyx":681
 * 
 *     def removeMaterials(self):
 *         self.thisptr.removeMaterials()             # <<<<<<<<<<<<<<
 * 
 *     def getInitialPhotoelectricVacancyDistribution(self, elementName, energy):
 */
  __pyx_v_self->thisptr->removeMaterials();

  /* "python/cython/_fisx.pyx":680
 *         return self.thisptr.getCacheSize(toBytes(elementName))
 * 
 *     def removeMaterials(self):             # <<<<<<<<<<<<<<
 *         self.thisptr.removeMaterials()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":683
 *         self.thisptr.removeMaterials()
 * 
 *     def getInitialPhotoelectricVacancyDistribution(self, elementName, energy):             # <<<<<<<<<<<<<<
 *         """
 *         Given one energy, give the initial distribution of vacancies (before cascade) due to
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_103getInitialPhotoelectricVacancyDistribution(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_102getInitialPhotoelectricVacancyDistribution[] = "\n        Given one energy, give the initial distribution of vacancies (before cascade) due to\n        photoelectric effect.\n        The output map keys correspond to the different subshells and the values are just\n        mu_photoelectric(shell, E)/mu_photoelectric(total, E).\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_103getInitialPhotoelectricVacancyDistribution(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elementName = 0;
  PyObject *__pyx_v_energy = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getInitialPhotoelectricVacancyDistribution (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementName,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getInitialPhotoelectricVacancyDistribution", 1, 2, 2, 1); __PYX_ERR(1, 683, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getInitialPhotoelectricVacancyDistribution") < 0)) __PYX_ERR(1, 683, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_elementName = values[0];
    __pyx_v_energy = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getInitialPhotoelectricVacancyDistribution", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 683, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.getInitialPhotoelectricVacancyDistribution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_102getInitialPhotoelectricVacancyDistribution(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementName, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_102getInitialPhotoelectricVacancyDistribution(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, PyObject *__pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  std::string __pyx_t_6;
  double __pyx_t_7;
  std::map<std::string,double>  __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getInitialPhotoelectricVacancyDistribution", 0);

  /* "python/cython/_fisx.pyx":690
 *         mu_photoelectric(shell, E)/mu_photoelectric(total, E).
 *         """
 *         return toStringKeys(self.thisptr.getInitialPhotoelectricVacancyDistribution( \             # <<<<<<<<<<<<<<
 *                                     toBytes(elementName), energy))
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "python/cython/_fisx.pyx":691
 *         """
 *         return toStringKeys(self.thisptr.getInitialPhotoelectricVacancyDistribution( \
 *                                     toBytes(elementName), energy))             # <<<<<<<<<<<<<<
 * 
 *     def getCascadeModifiedVacancyDistribution(self, elementName, distribution):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_elementName);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 691, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_energy); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 691, __pyx_L1_error)

  /* "python/cython/_fisx.pyx":690
 *         mu_photoelectric(shell, E)/mu_photoelectric(total, E).
 *         """
 *         return toStringKeys(self.thisptr.getInitialPhotoelectricVacancyDistribution( \             # <<<<<<<<<<<<<<
 *                                     toBytes(elementName), energy))
 * 
 */
  try {
    __pyx_t_8 = __pyx_v_self->thisptr->getInitialPhotoelectricVacancyDistribution(__pyx_t_6, __pyx_t_7);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 690, __pyx_L1_error)
  }
  __pyx_t_3 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":683
 *         self.thisptr.removeMaterials()
 * 
 *     def getInitialPhotoelectricVacancyDistribution(self, elementName, energy):             # <<<<<<<<<<<<<<
 *         """
 *         Given one energy, give the initial distribution of vacancies (before cascade) due to
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getInitialPhotoelectricVacancyDistribution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":693
 *                                     toBytes(elementName), energy))
 * 
 *     def getCascadeModifiedVacancyDistribution(self, elementName, distribution):             # <<<<<<<<<<<<<<
 *         return self._getCascadeModifiedVacancyDistribution(toBytes(elementName),
 *                                                     toBytesKeys(distribution))
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_105getCascadeModifiedVacancyDistribution(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_105getCascadeModifiedVacancyDistribution(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elementName = 0;
  PyObject *__pyx_v_distribution = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getCascadeModifiedVacancyDistribution (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementName,&__pyx_n_s_distribution,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_distribution)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getCascadeModifiedVacancyDistribution", 1, 2, 2, 1); __PYX_ERR(1, 693, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getCascadeModifiedVacancyDistribution") < 0)) __PYX_ERR(1, 693, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_elementName = values[0];
    __pyx_v_distribution = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getCascadeModifiedVacancyDistribution", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 693, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.getCascadeModifiedVacancyDistribution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_104getCascadeModifiedVacancyDistribution(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementName, __pyx_v_distribution);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_104getCascadeModifiedVacancyDistribution(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, PyObject *__pyx_v_distribution) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getCascadeModifiedVacancyDistribution", 0);

  /* "python/cython/_fisx.pyx":694
 * 
 *     def getCascadeModifiedVacancyDistribution(self, elementName, distribution):
 *         return self._getCascadeModifiedVacancyDistribution(toBytes(elementName),             # <<<<<<<<<<<<<<
 *                                                     toBytesKeys(distribution))
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCascadeModifiedVacancyDistri); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_elementName);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "python/cython/_fisx.pyx":695
 *     def getCascadeModifiedVacancyDistribution(self, elementName, distribution):
 *         return self._getCascadeModifiedVacancyDistribution(toBytes(elementName),
 *                                                     toBytesKeys(distribution))             # <<<<<<<<<<<<<<
 * 
 *     def _getCascadeModifiedVacancyDistribution(self, std_string elementName,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_toBytesKeys); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_distribution) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_distribution);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 694, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 694, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_4);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":693
 *                                     toBytes(elementName), energy))
 * 
 *     def getCascadeModifiedVacancyDistribution(self, elementName, distribution):             # <<<<<<<<<<<<<<
 *         return self._getCascadeModifiedVacancyDistribution(toBytes(elementName),
 *                                                     toBytesKeys(distribution))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getCascadeModifiedVacancyDistribution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":697
 *                                                     toBytesKeys(distribution))
 * 
 *     def _getCascadeModifiedVacancyDistribution(self, std_string elementName,             # <<<<<<<<<<<<<<
 *                                                     std_map[std_string, double] distribution):
 *         return toStringKeysAndValues(self.thisptr.getCascadeModifiedVacancyDistribution( \
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_107_getCascadeModifiedVacancyDistribution(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_107_getCascadeModifiedVacancyDistribution(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  std::string __pyx_v_elementName;
  std::map<std::string,double>  __pyx_v_distribution;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getCascadeModifiedVacancyDistribution (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementName,&__pyx_n_s_distribution,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_distribution)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getCascadeModifiedVacancyDistribution", 1, 2, 2, 1); __PYX_ERR(1, 697, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getCascadeModifiedVacancyDistribution") < 0)) __PYX_ERR(1, 697, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_elementName = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 697, __pyx_L3_error)
    __pyx_v_distribution = __pyx_convert_map_from_py_std_3a__3a_string__and_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 698, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getCascadeModifiedVacancyDistribution", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 697, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements._getCascadeModifiedVacancyDistribution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_106_getCascadeModifiedVacancyDistribution(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementName, __pyx_v_distribution);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_106_getCascadeModifiedVacancyDistribution(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_elementName, std::map<std::string,double>  __pyx_v_distribution) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  std::map<std::string,double>  __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getCascadeModifiedVacancyDistribution", 0);

  /* "python/cython/_fisx.pyx":699
 *     def _getCascadeModifiedVacancyDistribution(self, std_string elementName,
 *                                                     std_map[std_string, double] distribution):
 *         return toStringKeysAndValues(self.thisptr.getCascadeModifiedVacancyDistribution( \             # <<<<<<<<<<<<<<
 *                                     elementName, distribution))
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeysAndValues); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "python/cython/_fisx.pyx":700
 *                                                     std_map[std_string, double] distribution):
 *         return toStringKeysAndValues(self.thisptr.getCascadeModifiedVacancyDistribution( \
 *                                     elementName, distribution))             # <<<<<<<<<<<<<<
 * 
 *     def getXRayLinesFromVacancyDistribution(self, elementName, distribution,
 */
  try {
    __pyx_t_3 = __pyx_v_self->thisptr->getCascadeModifiedVacancyDistribution(__pyx_v_elementName, __pyx_v_distribution);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 699, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":699
 *     def _getCascadeModifiedVacancyDistribution(self, std_string elementName,
 *                                                     std_map[std_string, double] distribution):
 *         return toStringKeysAndValues(self.thisptr.getCascadeModifiedVacancyDistribution( \             # <<<<<<<<<<<<<<
 *                                     elementName, distribution))
 * 
 */
  __pyx_t_4 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":697
 *                                                     toBytesKeys(distribution))
 * 
 *     def _getCascadeModifiedVacancyDistribution(self, std_string elementName,             # <<<<<<<<<<<<<<
 *                                                     std_map[std_string, double] distribution):
 *         return toStringKeysAndValues(self.thisptr.getCascadeModifiedVacancyDistribution( \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("fisx._fisx.PyElements._getCascadeModifiedVacancyDistribution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":702
 *                                     elementName, distribution))
 * 
 *     def getXRayLinesFromVacancyDistribution(self, elementName, distribution,             # <<<<<<<<<<<<<<
 *                                             cascade=1, useFluorescenceYield=1):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_109getXRayLinesFromVacancyDistribution(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_10PyElements_108getXRayLinesFromVacancyDistribution[] = " \n        Given an initial vacancy distribution, returns the emitted X-rays.\n\n        Input:\n        distribution - Map[key, double] of the form [(sub)shell][amount of vacancies]\n        cascade - Consider de-excitation cascade (default is 1 = true)\n        useFluorescenceYield - Correct by fluorescence yield (default is 1 = true)\n\n        Output:\n        map[key][\"rate\"] - emission rate where key is the transition line (ex. KL3)\n        map[key][\"energy\"] - emission energy where key is the transition line (ex. KL3)\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_109getXRayLinesFromVacancyDistribution(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elementName = 0;
  PyObject *__pyx_v_distribution = 0;
  PyObject *__pyx_v_cascade = 0;
  PyObject *__pyx_v_useFluorescenceYield = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getXRayLinesFromVacancyDistribution (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementName,&__pyx_n_s_distribution,&__pyx_n_s_cascade,&__pyx_n_s_useFluorescenceYield,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)__pyx_int_1);
    values[3] = ((PyObject *)__pyx_int_1);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_distribution)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getXRayLinesFromVacancyDistribution", 0, 2, 4, 1); __PYX_ERR(1, 702, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cascade);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_useFluorescenceYield);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getXRayLinesFromVacancyDistribution") < 0)) __PYX_ERR(1, 702, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_elementName = values[0];
    __pyx_v_distribution = values[1];
    __pyx_v_cascade = values[2];
    __pyx_v_useFluorescenceYield = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getXRayLinesFromVacancyDistribution", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 702, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements.getXRayLinesFromVacancyDistribution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_108getXRayLinesFromVacancyDistribution(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementName, __pyx_v_distribution, __pyx_v_cascade, __pyx_v_useFluorescenceYield);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_108getXRayLinesFromVacancyDistribution(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, PyObject *__pyx_v_elementName, PyObject *__pyx_v_distribution, PyObject *__pyx_v_cascade, PyObject *__pyx_v_useFluorescenceYield) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getXRayLinesFromVacancyDistribution", 0);

  /* "python/cython/_fisx.pyx":716
 *         map[key]["energy"] - emission energy where key is the transition line (ex. KL3)
 *         """
 *         return self._getXRayLinesFromVacancyDistribution(toBytes(elementName),             # <<<<<<<<<<<<<<
 *                                                          toBytesKeysAndValues(distribution),
 *                                                          cascade,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getXRayLinesFromVacancyDistribu); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_elementName);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "python/cython/_fisx.pyx":717
 *         """
 *         return self._getXRayLinesFromVacancyDistribution(toBytes(elementName),
 *                                                          toBytesKeysAndValues(distribution),             # <<<<<<<<<<<<<<
 *                                                          cascade,
 *                                                          useFluorescenceYield)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_toBytesKeysAndValues); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_distribution) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_distribution);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "python/cython/_fisx.pyx":719
 *                                                          toBytesKeysAndValues(distribution),
 *                                                          cascade,
 *                                                          useFluorescenceYield)             # <<<<<<<<<<<<<<
 * 
 *     def _getXRayLinesFromVacancyDistribution(self, std_string elementName,
 */
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_3, __pyx_t_4, __pyx_v_cascade, __pyx_v_useFluorescenceYield};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 716, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_3, __pyx_t_4, __pyx_v_cascade, __pyx_v_useFluorescenceYield};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 716, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_4);
    __Pyx_INCREF(__pyx_v_cascade);
    __Pyx_GIVEREF(__pyx_v_cascade);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_7, __pyx_v_cascade);
    __Pyx_INCREF(__pyx_v_useFluorescenceYield);
    __Pyx_GIVEREF(__pyx_v_useFluorescenceYield);
    PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_7, __pyx_v_useFluorescenceYield);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":702
 *                                     elementName, distribution))
 * 
 *     def getXRayLinesFromVacancyDistribution(self, elementName, distribution,             # <<<<<<<<<<<<<<
 *                                             cascade=1, useFluorescenceYield=1):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("fisx._fisx.PyElements.getXRayLinesFromVacancyDistribution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":721
 *                                                          useFluorescenceYield)
 * 
 *     def _getXRayLinesFromVacancyDistribution(self, std_string elementName,             # <<<<<<<<<<<<<<
 *                                              std_map[std_string, double] distribution,
 *                                              int cascade=1, int useFluorescenceYield=1):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_111_getXRayLinesFromVacancyDistribution(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_111_getXRayLinesFromVacancyDistribution(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  std::string __pyx_v_elementName;
  std::map<std::string,double>  __pyx_v_distribution;
  int __pyx_v_cascade;
  int __pyx_v_useFluorescenceYield;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getXRayLinesFromVacancyDistribution (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementName,&__pyx_n_s_distribution,&__pyx_n_s_cascade,&__pyx_n_s_useFluorescenceYield,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_distribution)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getXRayLinesFromVacancyDistribution", 0, 2, 4, 1); __PYX_ERR(1, 721, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cascade);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_useFluorescenceYield);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getXRayLinesFromVacancyDistribution") < 0)) __PYX_ERR(1, 721, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_elementName = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 721, __pyx_L3_error)
    __pyx_v_distribution = __pyx_convert_map_from_py_std_3a__3a_string__and_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 722, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_cascade = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_cascade == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 723, __pyx_L3_error)
    } else {
      __pyx_v_cascade = ((int)1);
    }
    if (values[3]) {
      __pyx_v_useFluorescenceYield = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_useFluorescenceYield == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 723, __pyx_L3_error)
    } else {
      __pyx_v_useFluorescenceYield = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getXRayLinesFromVacancyDistribution", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 721, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyElements._getXRayLinesFromVacancyDistribution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_110_getXRayLinesFromVacancyDistribution(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), __pyx_v_elementName, __pyx_v_distribution, __pyx_v_cascade, __pyx_v_useFluorescenceYield);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_110_getXRayLinesFromVacancyDistribution(struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, std::string __pyx_v_elementName, std::map<std::string,double>  __pyx_v_distribution, int __pyx_v_cascade, int __pyx_v_useFluorescenceYield) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  std::map<std::string,std::map<std::string,double> >  __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getXRayLinesFromVacancyDistribution", 0);

  /* "python/cython/_fisx.pyx":724
 *                                              std_map[std_string, double] distribution,
 *                                              int cascade=1, int useFluorescenceYield=1):
 *         return toStringKeysAndValues(self.thisptr.getXRayLinesFromVacancyDistribution( \             # <<<<<<<<<<<<<<
 *                                             elementName,
 *                                             distribution,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeysAndValues); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "python/cython/_fisx.pyx":728
 *                                             distribution,
 *                                             cascade,
 *                                             useFluorescenceYield))             # <<<<<<<<<<<<<<
 * 
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */
  try {
    __pyx_t_3 = __pyx_v_self->thisptr->getXRayLinesFromVacancyDistribution(__pyx_v_elementName, __pyx_v_distribution, __pyx_v_cascade, __pyx_v_useFluorescenceYield);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 724, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":724
 *                                              std_map[std_string, double] distribution,
 *                                              int cascade=1, int useFluorescenceYield=1):
 *         return toStringKeysAndValues(self.thisptr.getXRayLinesFromVacancyDistribution( \             # <<<<<<<<<<<<<<
 *                                             elementName,
 *                                             distribution,
 */
  __pyx_t_4 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":721
 *                                                          useFluorescenceYield)
 * 
 *     def _getXRayLinesFromVacancyDistribution(self, std_string elementName,             # <<<<<<<<<<<<<<
 *                                              std_map[std_string, double] distribution,
 *                                              int cascade=1, int useFluorescenceYield=1):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("fisx._fisx.PyElements._getXRayLinesFromVacancyDistribution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_113__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_113__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_112__reduce_cython__(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_112__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyElements.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_115__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyElements_115__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyElements_114__setstate_cython__(((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyElements_114__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyElements.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":770
 *     cdef EPDL97 *thisptr
 * 
 *     def __cinit__(self, name=None):             # <<<<<<<<<<<<<<
 *         if name is None:
 *             from fisx import DataDir
 */

/* Python wrapper */
static int __pyx_pw_4fisx_5_fisx_8PyEPDL97_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4fisx_5_fisx_8PyEPDL97_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 770, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 770, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_8PyEPDL97___cinit__(((struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *)__pyx_v_self), __pyx_v_name);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4fisx_5_fisx_8PyEPDL97___cinit__(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_DataDir = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  std::string __pyx_t_6;
  fisx::EPDL97 *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_name);

  /* "python/cython/_fisx.pyx":771
 * 
 *     def __cinit__(self, name=None):
 *         if name is None:             # <<<<<<<<<<<<<<
 *             from fisx import DataDir
 *             name = DataDir.FISX_DATA_DIR
 */
  __pyx_t_1 = (__pyx_v_name == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":772
 *     def __cinit__(self, name=None):
 *         if name is None:
 *             from fisx import DataDir             # <<<<<<<<<<<<<<
 *             name = DataDir.FISX_DATA_DIR
 *         self.thisptr = new EPDL97(toBytes(name))
 */
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_n_s_DataDir);
    __Pyx_GIVEREF(__pyx_n_s_DataDir);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_DataDir);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_fisx, __pyx_t_3, -1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_DataDir); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_DataDir = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "python/cython/_fisx.pyx":773
 *         if name is None:
 *             from fisx import DataDir
 *             name = DataDir.FISX_DATA_DIR             # <<<<<<<<<<<<<<
 *         self.thisptr = new EPDL97(toBytes(name))
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_DataDir, __pyx_n_s_FISX_DATA_DIR); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "python/cython/_fisx.pyx":771
 * 
 *     def __cinit__(self, name=None):
 *         if name is None:             # <<<<<<<<<<<<<<
 *             from fisx import DataDir
 *             name = DataDir.FISX_DATA_DIR
 */
  }

  /* "python/cython/_fisx.pyx":774
 *             from fisx import DataDir
 *             name = DataDir.FISX_DATA_DIR
 *         self.thisptr = new EPDL97(toBytes(name))             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 774, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  try {
    __pyx_t_7 = new fisx::EPDL97(__pyx_t_6);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 774, __pyx_L1_error)
  }
  __pyx_v_self->thisptr = __pyx_t_7;

  /* "python/cython/_fisx.pyx":770
 *     cdef EPDL97 *thisptr
 * 
 *     def __cinit__(self, name=None):             # <<<<<<<<<<<<<<
 *         if name is None:
 *             from fisx import DataDir
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_DataDir);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":776
 *         self.thisptr = new EPDL97(toBytes(name))
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_4fisx_5_fisx_8PyEPDL97_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4fisx_5_fisx_8PyEPDL97_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4fisx_5_fisx_8PyEPDL97_2__dealloc__(((struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4fisx_5_fisx_8PyEPDL97_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "python/cython/_fisx.pyx":777
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     def setDataDirectory(self, name):
 */
  delete __pyx_v_self->thisptr;

  /* "python/cython/_fisx.pyx":776
 *         self.thisptr = new EPDL97(toBytes(name))
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "python/cython/_fisx.pyx":779
 *         del self.thisptr
 * 
 *     def setDataDirectory(self, name):             # <<<<<<<<<<<<<<
 *         self.thisptr.setDataDirectory(toBytes(name))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_5setDataDirectory(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_5setDataDirectory(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setDataDirectory (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_8PyEPDL97_4setDataDirectory(((struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *)__pyx_v_self), ((PyObject *)__pyx_v_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_4setDataDirectory(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setDataDirectory", 0);

  /* "python/cython/_fisx.pyx":780
 * 
 *     def setDataDirectory(self, name):
 *         self.thisptr.setDataDirectory(toBytes(name))             # <<<<<<<<<<<<<<
 * 
 *     def setBindingEnergies(self, int z, std_map[std_string, double] energies):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_v_self->thisptr->setDataDirectory(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 780, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":779
 *         del self.thisptr
 * 
 *     def setDataDirectory(self, name):             # <<<<<<<<<<<<<<
 *         self.thisptr.setDataDirectory(toBytes(name))
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97.setDataDirectory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":782
 *         self.thisptr.setDataDirectory(toBytes(name))
 * 
 *     def setBindingEnergies(self, int z, std_map[std_string, double] energies):             # <<<<<<<<<<<<<<
 *         self.thisptr.setBindingEnergies(z, energies)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_7setBindingEnergies(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_7setBindingEnergies(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_z;
  std::map<std::string,double>  __pyx_v_energies;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setBindingEnergies (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_z,&__pyx_n_s_energies,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setBindingEnergies", 1, 2, 2, 1); __PYX_ERR(1, 782, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBindingEnergies") < 0)) __PYX_ERR(1, 782, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_z = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 782, __pyx_L3_error)
    __pyx_v_energies = __pyx_convert_map_from_py_std_3a__3a_string__and_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 782, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setBindingEnergies", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 782, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97.setBindingEnergies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_8PyEPDL97_6setBindingEnergies(((struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *)__pyx_v_self), __pyx_v_z, __pyx_v_energies);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_6setBindingEnergies(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, int __pyx_v_z, std::map<std::string,double>  __pyx_v_energies) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setBindingEnergies", 0);

  /* "python/cython/_fisx.pyx":783
 * 
 *     def setBindingEnergies(self, int z, std_map[std_string, double] energies):
 *         self.thisptr.setBindingEnergies(z, energies)             # <<<<<<<<<<<<<<
 * 
 *     def getBindingEnergies(self, int z):
 */
  try {
    __pyx_v_self->thisptr->setBindingEnergies(__pyx_v_z, __pyx_v_energies);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 783, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":782
 *         self.thisptr.setDataDirectory(toBytes(name))
 * 
 *     def setBindingEnergies(self, int z, std_map[std_string, double] energies):             # <<<<<<<<<<<<<<
 *         self.thisptr.setBindingEnergies(z, energies)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97.setBindingEnergies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":785
 *         self.thisptr.setBindingEnergies(z, energies)
 * 
 *     def getBindingEnergies(self, int z):             # <<<<<<<<<<<<<<
 *         return toStringKeys(self.thisptr.getBindingEnergies(z))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_9getBindingEnergies(PyObject *__pyx_v_self, PyObject *__pyx_arg_z); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_9getBindingEnergies(PyObject *__pyx_v_self, PyObject *__pyx_arg_z) {
  int __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getBindingEnergies (wrapper)", 0);
  assert(__pyx_arg_z); {
    __pyx_v_z = __Pyx_PyInt_As_int(__pyx_arg_z); if (unlikely((__pyx_v_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 785, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97.getBindingEnergies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_8PyEPDL97_8getBindingEnergies(((struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *)__pyx_v_self), ((int)__pyx_v_z));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_8getBindingEnergies(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, int __pyx_v_z) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getBindingEnergies", 0);

  /* "python/cython/_fisx.pyx":786
 * 
 *     def getBindingEnergies(self, int z):
 *         return toStringKeys(self.thisptr.getBindingEnergies(z))             # <<<<<<<<<<<<<<
 * 
 *     def getMassAttenuationCoefficients(self, z, energy=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_v_self->thisptr->getBindingEnergies(__pyx_v_z)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":785
 *         self.thisptr.setBindingEnergies(z, energies)
 * 
 *     def getBindingEnergies(self, int z):             # <<<<<<<<<<<<<<
 *         return toStringKeys(self.thisptr.getBindingEnergies(z))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97.getBindingEnergies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":788
 *         return toStringKeys(self.thisptr.getBindingEnergies(z))
 * 
 *     def getMassAttenuationCoefficients(self, z, energy=None):             # <<<<<<<<<<<<<<
 *         if energy is None:
 *             return toStringKeys(self._getDefaultMassAttenuationCoefficients(z))
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_11getMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_11getMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_z = 0;
  PyObject *__pyx_v_energy = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMassAttenuationCoefficients (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_z,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getMassAttenuationCoefficients") < 0)) __PYX_ERR(1, 788, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_z = values[0];
    __pyx_v_energy = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getMassAttenuationCoefficients", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 788, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97.getMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_8PyEPDL97_10getMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *)__pyx_v_self), __pyx_v_z, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_10getMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, PyObject *__pyx_v_z, PyObject *__pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":789
 * 
 *     def getMassAttenuationCoefficients(self, z, energy=None):
 *         if energy is None:             # <<<<<<<<<<<<<<
 *             return toStringKeys(self._getDefaultMassAttenuationCoefficients(z))
 *         elif hasattr(energy, "__len__"):
 */
  __pyx_t_1 = (__pyx_v_energy == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":790
 *     def getMassAttenuationCoefficients(self, z, energy=None):
 *         if energy is None:
 *             return toStringKeys(self._getDefaultMassAttenuationCoefficients(z))             # <<<<<<<<<<<<<<
 *         elif hasattr(energy, "__len__"):
 *             return toStringKeys(self._getMultipleMassAttenuationCoefficients(z, energy))
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getDefaultMassAttenuationCoeffi); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_z) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_z);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":789
 * 
 *     def getMassAttenuationCoefficients(self, z, energy=None):
 *         if energy is None:             # <<<<<<<<<<<<<<
 *             return toStringKeys(self._getDefaultMassAttenuationCoefficients(z))
 *         elif hasattr(energy, "__len__"):
 */
  }

  /* "python/cython/_fisx.pyx":791
 *         if energy is None:
 *             return toStringKeys(self._getDefaultMassAttenuationCoefficients(z))
 *         elif hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             return toStringKeys(self._getMultipleMassAttenuationCoefficients(z, energy))
 *         else:
 */
  __pyx_t_2 = __Pyx_HasAttr(__pyx_v_energy, __pyx_n_s_len); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 791, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "python/cython/_fisx.pyx":792
 *             return toStringKeys(self._getDefaultMassAttenuationCoefficients(z))
 *         elif hasattr(energy, "__len__"):
 *             return toStringKeys(self._getMultipleMassAttenuationCoefficients(z, energy))             # <<<<<<<<<<<<<<
 *         else:
 *             return toStringKeys(self._getMultipleMassAttenuationCoefficients(z, [energy]))
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMultipleMassAttenuationCoeff); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_z, __pyx_v_energy};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 792, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_z, __pyx_v_energy};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 792, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 792, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_z);
      __Pyx_GIVEREF(__pyx_v_z);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_z);
      __Pyx_INCREF(__pyx_v_energy);
      __Pyx_GIVEREF(__pyx_v_energy);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_energy);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 792, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":791
 *         if energy is None:
 *             return toStringKeys(self._getDefaultMassAttenuationCoefficients(z))
 *         elif hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             return toStringKeys(self._getMultipleMassAttenuationCoefficients(z, energy))
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":794
 *             return toStringKeys(self._getMultipleMassAttenuationCoefficients(z, energy))
 *         else:
 *             return toStringKeys(self._getMultipleMassAttenuationCoefficients(z, [energy]))             # <<<<<<<<<<<<<<
 * 
 *     def _getDefaultMassAttenuationCoefficients(self, int z):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMultipleMassAttenuationCoeff); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_energy);
    __Pyx_GIVEREF(__pyx_v_energy);
    PyList_SET_ITEM(__pyx_t_9, 0, __pyx_v_energy);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_z, __pyx_t_9};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 794, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_z, __pyx_t_9};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 794, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 794, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_z);
      __Pyx_GIVEREF(__pyx_v_z);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_8, __pyx_v_z);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_8, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 794, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":788
 *         return toStringKeys(self.thisptr.getBindingEnergies(z))
 * 
 *     def getMassAttenuationCoefficients(self, z, energy=None):             # <<<<<<<<<<<<<<
 *         if energy is None:
 *             return toStringKeys(self._getDefaultMassAttenuationCoefficients(z))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97.getMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":796
 *             return toStringKeys(self._getMultipleMassAttenuationCoefficients(z, [energy]))
 * 
 *     def _getDefaultMassAttenuationCoefficients(self, int z):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getMassAttenuationCoefficients(z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_13_getDefaultMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_arg_z); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_13_getDefaultMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_arg_z) {
  int __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getDefaultMassAttenuationCoefficients (wrapper)", 0);
  assert(__pyx_arg_z); {
    __pyx_v_z = __Pyx_PyInt_As_int(__pyx_arg_z); if (unlikely((__pyx_v_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 796, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97._getDefaultMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_8PyEPDL97_12_getDefaultMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *)__pyx_v_self), ((int)__pyx_v_z));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_12_getDefaultMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, int __pyx_v_z) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::map<std::string,std::vector<double> >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getDefaultMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":797
 * 
 *     def _getDefaultMassAttenuationCoefficients(self, int z):
 *         return self.thisptr.getMassAttenuationCoefficients(z)             # <<<<<<<<<<<<<<
 * 
 *     def _getSingleMassAttenuationCoefficients(self, int z, double energy):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getMassAttenuationCoefficients(__pyx_v_z);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 797, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":796
 *             return toStringKeys(self._getMultipleMassAttenuationCoefficients(z, [energy]))
 * 
 *     def _getDefaultMassAttenuationCoefficients(self, int z):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getMassAttenuationCoefficients(z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97._getDefaultMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":799
 *         return self.thisptr.getMassAttenuationCoefficients(z)
 * 
 *     def _getSingleMassAttenuationCoefficients(self, int z, double energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getMassAttenuationCoefficients(z, energy)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_15_getSingleMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_15_getSingleMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_z;
  double __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getSingleMassAttenuationCoefficients (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_z,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getSingleMassAttenuationCoefficients", 1, 2, 2, 1); __PYX_ERR(1, 799, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getSingleMassAttenuationCoefficients") < 0)) __PYX_ERR(1, 799, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_z = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 799, __pyx_L3_error)
    __pyx_v_energy = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_energy == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 799, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getSingleMassAttenuationCoefficients", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 799, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97._getSingleMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_8PyEPDL97_14_getSingleMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *)__pyx_v_self), __pyx_v_z, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_14_getSingleMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, int __pyx_v_z, double __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::map<std::string,double>  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getSingleMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":800
 * 
 *     def _getSingleMassAttenuationCoefficients(self, int z, double energy):
 *         return self.thisptr.getMassAttenuationCoefficients(z, energy)             # <<<<<<<<<<<<<<
 * 
 *     def _getMultipleMassAttenuationCoefficients(self, int z, std_vector[double] energy):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getMassAttenuationCoefficients(__pyx_v_z, __pyx_v_energy);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 800, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":799
 *         return self.thisptr.getMassAttenuationCoefficients(z)
 * 
 *     def _getSingleMassAttenuationCoefficients(self, int z, double energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getMassAttenuationCoefficients(z, energy)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97._getSingleMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":802
 *         return self.thisptr.getMassAttenuationCoefficients(z, energy)
 * 
 *     def _getMultipleMassAttenuationCoefficients(self, int z, std_vector[double] energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getMassAttenuationCoefficients(z, energy)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_17_getMultipleMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_17_getMultipleMassAttenuationCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_z;
  std::vector<double>  __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getMultipleMassAttenuationCoefficients (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_z,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getMultipleMassAttenuationCoefficients", 1, 2, 2, 1); __PYX_ERR(1, 802, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getMultipleMassAttenuationCoefficients") < 0)) __PYX_ERR(1, 802, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_z = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 802, __pyx_L3_error)
    __pyx_v_energy = __pyx_convert_vector_from_py_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 802, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getMultipleMassAttenuationCoefficients", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 802, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97._getMultipleMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_8PyEPDL97_16_getMultipleMassAttenuationCoefficients(((struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *)__pyx_v_self), __pyx_v_z, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_16_getMultipleMassAttenuationCoefficients(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, int __pyx_v_z, std::vector<double>  __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::map<std::string,std::vector<double> >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getMultipleMassAttenuationCoefficients", 0);

  /* "python/cython/_fisx.pyx":803
 * 
 *     def _getMultipleMassAttenuationCoefficients(self, int z, std_vector[double] energy):
 *         return self.thisptr.getMassAttenuationCoefficients(z, energy)             # <<<<<<<<<<<<<<
 * 
 *     def getPhotoelectricWeights(self, z, energy):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getMassAttenuationCoefficients(__pyx_v_z, __pyx_v_energy);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 803, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":802
 *         return self.thisptr.getMassAttenuationCoefficients(z, energy)
 * 
 *     def _getMultipleMassAttenuationCoefficients(self, int z, std_vector[double] energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getMassAttenuationCoefficients(z, energy)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97._getMultipleMassAttenuationCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":805
 *         return self.thisptr.getMassAttenuationCoefficients(z, energy)
 * 
 *     def getPhotoelectricWeights(self, z, energy):             # <<<<<<<<<<<<<<
 *         if hasattr(energy, "__len__"):
 *             return toStringKeys(self._getMultiplePhotoelectricWeights(z, energy))
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_19getPhotoelectricWeights(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_19getPhotoelectricWeights(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_z = 0;
  PyObject *__pyx_v_energy = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPhotoelectricWeights (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_z,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getPhotoelectricWeights", 1, 2, 2, 1); __PYX_ERR(1, 805, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPhotoelectricWeights") < 0)) __PYX_ERR(1, 805, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_z = values[0];
    __pyx_v_energy = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getPhotoelectricWeights", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 805, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97.getPhotoelectricWeights", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_8PyEPDL97_18getPhotoelectricWeights(((struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *)__pyx_v_self), __pyx_v_z, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_18getPhotoelectricWeights(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, PyObject *__pyx_v_z, PyObject *__pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getPhotoelectricWeights", 0);

  /* "python/cython/_fisx.pyx":806
 * 
 *     def getPhotoelectricWeights(self, z, energy):
 *         if hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             return toStringKeys(self._getMultiplePhotoelectricWeights(z, energy))
 *         else:
 */
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_energy, __pyx_n_s_len); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 806, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":807
 *     def getPhotoelectricWeights(self, z, energy):
 *         if hasattr(energy, "__len__"):
 *             return toStringKeys(self._getMultiplePhotoelectricWeights(z, energy))             # <<<<<<<<<<<<<<
 *         else:
 *             return toStringKeys(self._getMultiplePhotoelectricWeights(z, [energy]))
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 807, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMultiplePhotoelectricWeights); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 807, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_z, __pyx_v_energy};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 807, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_z, __pyx_v_energy};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 807, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 807, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_z);
      __Pyx_GIVEREF(__pyx_v_z);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_z);
      __Pyx_INCREF(__pyx_v_energy);
      __Pyx_GIVEREF(__pyx_v_energy);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_energy);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 807, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 807, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":806
 * 
 *     def getPhotoelectricWeights(self, z, energy):
 *         if hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             return toStringKeys(self._getMultiplePhotoelectricWeights(z, energy))
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":809
 *             return toStringKeys(self._getMultiplePhotoelectricWeights(z, energy))
 *         else:
 *             return toStringKeys(self._getMultiplePhotoelectricWeights(z, [energy]))             # <<<<<<<<<<<<<<
 * 
 *     def _getSinglePhotoelectricWeights(self, int z, double energy):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMultiplePhotoelectricWeights); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_energy);
    __Pyx_GIVEREF(__pyx_v_energy);
    PyList_SET_ITEM(__pyx_t_9, 0, __pyx_v_energy);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_z, __pyx_t_9};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 809, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_z, __pyx_t_9};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 809, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 809, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_z);
      __Pyx_GIVEREF(__pyx_v_z);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_8, __pyx_v_z);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_8, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 809, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":805
 *         return self.thisptr.getMassAttenuationCoefficients(z, energy)
 * 
 *     def getPhotoelectricWeights(self, z, energy):             # <<<<<<<<<<<<<<
 *         if hasattr(energy, "__len__"):
 *             return toStringKeys(self._getMultiplePhotoelectricWeights(z, energy))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97.getPhotoelectricWeights", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":811
 *             return toStringKeys(self._getMultiplePhotoelectricWeights(z, [energy]))
 * 
 *     def _getSinglePhotoelectricWeights(self, int z, double energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getPhotoelectricWeights(z, energy)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_21_getSinglePhotoelectricWeights(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_21_getSinglePhotoelectricWeights(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_z;
  double __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getSinglePhotoelectricWeights (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_z,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getSinglePhotoelectricWeights", 1, 2, 2, 1); __PYX_ERR(1, 811, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getSinglePhotoelectricWeights") < 0)) __PYX_ERR(1, 811, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_z = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 811, __pyx_L3_error)
    __pyx_v_energy = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_energy == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 811, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getSinglePhotoelectricWeights", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 811, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97._getSinglePhotoelectricWeights", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_8PyEPDL97_20_getSinglePhotoelectricWeights(((struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *)__pyx_v_self), __pyx_v_z, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_20_getSinglePhotoelectricWeights(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, int __pyx_v_z, double __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::map<std::string,double>  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getSinglePhotoelectricWeights", 0);

  /* "python/cython/_fisx.pyx":812
 * 
 *     def _getSinglePhotoelectricWeights(self, int z, double energy):
 *         return self.thisptr.getPhotoelectricWeights(z, energy)             # <<<<<<<<<<<<<<
 * 
 *     def _getMultiplePhotoelectricWeights(self, int z, std_vector[double] energy):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getPhotoelectricWeights(__pyx_v_z, __pyx_v_energy);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 812, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":811
 *             return toStringKeys(self._getMultiplePhotoelectricWeights(z, [energy]))
 * 
 *     def _getSinglePhotoelectricWeights(self, int z, double energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getPhotoelectricWeights(z, energy)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97._getSinglePhotoelectricWeights", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":814
 *         return self.thisptr.getPhotoelectricWeights(z, energy)
 * 
 *     def _getMultiplePhotoelectricWeights(self, int z, std_vector[double] energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getPhotoelectricWeights(z, energy)
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_23_getMultiplePhotoelectricWeights(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_23_getMultiplePhotoelectricWeights(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_z;
  std::vector<double>  __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getMultiplePhotoelectricWeights (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_z,&__pyx_n_s_energy,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getMultiplePhotoelectricWeights", 1, 2, 2, 1); __PYX_ERR(1, 814, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getMultiplePhotoelectricWeights") < 0)) __PYX_ERR(1, 814, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_z = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 814, __pyx_L3_error)
    __pyx_v_energy = __pyx_convert_vector_from_py_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 814, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getMultiplePhotoelectricWeights", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 814, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97._getMultiplePhotoelectricWeights", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_8PyEPDL97_22_getMultiplePhotoelectricWeights(((struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *)__pyx_v_self), __pyx_v_z, __pyx_v_energy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_22_getMultiplePhotoelectricWeights(struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, int __pyx_v_z, std::vector<double>  __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::map<std::string,std::vector<double> >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getMultiplePhotoelectricWeights", 0);

  /* "python/cython/_fisx.pyx":815
 * 
 *     def _getMultiplePhotoelectricWeights(self, int z, std_vector[double] energy):
 *         return self.thisptr.getPhotoelectricWeights(z, energy)             # <<<<<<<<<<<<<<
 * #/[inserted by cython to avoid comment start]*##########################################################################
 * #
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getPhotoelectricWeights(__pyx_v_z, __pyx_v_energy);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 815, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":814
 *         return self.thisptr.getPhotoelectricWeights(z, energy)
 * 
 *     def _getMultiplePhotoelectricWeights(self, int z, std_vector[double] energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getPhotoelectricWeights(z, energy)
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97._getMultiplePhotoelectricWeights", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_8PyEPDL97_24__reduce_cython__(((struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_8PyEPDL97_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_8PyEPDL97_26__setstate_cython__(((struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_8PyEPDL97_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyEPDL97 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyEPDL97.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":861
 *     cdef Layer *thisptr
 * 
 *     def __cinit__(self, materialName, double density=1.0, double thickness=1.0, double funny=1.0):             # <<<<<<<<<<<<<<
 *         self.thisptr = new Layer(toBytes(materialName), density, thickness, funny)
 * 
 */

/* Python wrapper */
static int __pyx_pw_4fisx_5_fisx_7PyLayer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4fisx_5_fisx_7PyLayer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_materialName = 0;
  double __pyx_v_density;
  double __pyx_v_thickness;
  double __pyx_v_funny;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_materialName,&__pyx_n_s_density,&__pyx_n_s_thickness,&__pyx_n_s_funny,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_materialName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_thickness);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_funny);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 861, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_materialName = values[0];
    if (values[1]) {
      __pyx_v_density = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_density == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 861, __pyx_L3_error)
    } else {
      __pyx_v_density = ((double)1.0);
    }
    if (values[2]) {
      __pyx_v_thickness = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_thickness == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 861, __pyx_L3_error)
    } else {
      __pyx_v_thickness = ((double)1.0);
    }
    if (values[3]) {
      __pyx_v_funny = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_funny == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 861, __pyx_L3_error)
    } else {
      __pyx_v_funny = ((double)1.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 861, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyLayer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyLayer___cinit__(((struct __pyx_obj_4fisx_5_fisx_PyLayer *)__pyx_v_self), __pyx_v_materialName, __pyx_v_density, __pyx_v_thickness, __pyx_v_funny);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4fisx_5_fisx_7PyLayer___cinit__(struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self, PyObject *__pyx_v_materialName, double __pyx_v_density, double __pyx_v_thickness, double __pyx_v_funny) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "python/cython/_fisx.pyx":862
 * 
 *     def __cinit__(self, materialName, double density=1.0, double thickness=1.0, double funny=1.0):
 *         self.thisptr = new Layer(toBytes(materialName), density, thickness, funny)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_materialName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_materialName);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 862, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->thisptr = new fisx::Layer(__pyx_t_4, __pyx_v_density, __pyx_v_thickness, __pyx_v_funny);

  /* "python/cython/_fisx.pyx":861
 *     cdef Layer *thisptr
 * 
 *     def __cinit__(self, materialName, double density=1.0, double thickness=1.0, double funny=1.0):             # <<<<<<<<<<<<<<
 *         self.thisptr = new Layer(toBytes(materialName), density, thickness, funny)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyLayer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":864
 *         self.thisptr = new Layer(toBytes(materialName), density, thickness, funny)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_4fisx_5_fisx_7PyLayer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4fisx_5_fisx_7PyLayer_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4fisx_5_fisx_7PyLayer_2__dealloc__(((struct __pyx_obj_4fisx_5_fisx_PyLayer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4fisx_5_fisx_7PyLayer_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "python/cython/_fisx.pyx":865
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     def getComposition(self, PyElements elementsLib):
 */
  delete __pyx_v_self->thisptr;

  /* "python/cython/_fisx.pyx":864
 *         self.thisptr = new Layer(toBytes(materialName), density, thickness, funny)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "python/cython/_fisx.pyx":867
 *         del self.thisptr
 * 
 *     def getComposition(self, PyElements elementsLib):             # <<<<<<<<<<<<<<
 *         """
 *         getComposition(elementsLib)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyLayer_5getComposition(PyObject *__pyx_v_self, PyObject *__pyx_v_elementsLib); /*proto*/
static char __pyx_doc_4fisx_5_fisx_7PyLayer_4getComposition[] = "\n        getComposition(elementsLib)\n\n        Given a reference to an elements library, it gives back a dictionary where the keys are the\n        elements and the values the mass fractions.\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_7PyLayer_5getComposition(PyObject *__pyx_v_self, PyObject *__pyx_v_elementsLib) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getComposition (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementsLib), __pyx_ptype_4fisx_5_fisx_PyElements, 1, "elementsLib", 0))) __PYX_ERR(1, 867, __pyx_L1_error)
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyLayer_4getComposition(((struct __pyx_obj_4fisx_5_fisx_PyLayer *)__pyx_v_self), ((struct __pyx_obj_4fisx_5_fisx_PyElements *)__pyx_v_elementsLib));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyLayer_4getComposition(struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getComposition", 0);

  /* "python/cython/_fisx.pyx":874
 *         elements and the values the mass fractions.
 *         """
 *         return self.thisptr.getComposition(deref(elementsLib.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def getTransmission(self, energies, PyElements elementsLib, double angle=90.):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_v_self->thisptr->getComposition((*__pyx_v_elementsLib->thisptr))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":867
 *         del self.thisptr
 * 
 *     def getComposition(self, PyElements elementsLib):             # <<<<<<<<<<<<<<
 *         """
 *         getComposition(elementsLib)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyLayer.getComposition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":876
 *         return self.thisptr.getComposition(deref(elementsLib.thisptr))
 * 
 *     def getTransmission(self, energies, PyElements elementsLib, double angle=90.):             # <<<<<<<<<<<<<<
 *         """
 *         getTransmission(energies, ElementsLibraryInstance, angle=90.)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyLayer_7getTransmission(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_7PyLayer_6getTransmission[] = "\n        getTransmission(energies, ElementsLibraryInstance, angle=90.)\n\n        Given a list of energies and a reference to an elements library returns\n        the layer transmission according to the incident angle (default 90.)\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_7PyLayer_7getTransmission(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_energies = 0;
  struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib = 0;
  double __pyx_v_angle;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTransmission (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_energies,&__pyx_n_s_elementsLib,&__pyx_n_s_angle,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energies)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementsLib)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getTransmission", 0, 2, 3, 1); __PYX_ERR(1, 876, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_angle);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getTransmission") < 0)) __PYX_ERR(1, 876, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_energies = values[0];
    __pyx_v_elementsLib = ((struct __pyx_obj_4fisx_5_fisx_PyElements *)values[1]);
    if (values[2]) {
      __pyx_v_angle = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_angle == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 876, __pyx_L3_error)
    } else {
      __pyx_v_angle = ((double)90.);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getTransmission", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 876, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyLayer.getTransmission", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementsLib), __pyx_ptype_4fisx_5_fisx_PyElements, 1, "elementsLib", 0))) __PYX_ERR(1, 876, __pyx_L1_error)
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyLayer_6getTransmission(((struct __pyx_obj_4fisx_5_fisx_PyLayer *)__pyx_v_self), __pyx_v_energies, __pyx_v_elementsLib, __pyx_v_angle);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyLayer_6getTransmission(struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self, PyObject *__pyx_v_energies, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib, double __pyx_v_angle) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  std::vector<double>  __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getTransmission", 0);
  __Pyx_INCREF(__pyx_v_energies);

  /* "python/cython/_fisx.pyx":883
 *         the layer transmission according to the incident angle (default 90.)
 *         """
 *         if not hasattr(energies, "__len__"):             # <<<<<<<<<<<<<<
 *             energies = numpy.array([energies], numpy.float64)
 *         return self.thisptr.getTransmission(energies, deref(elementsLib.thisptr), angle)
 */
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_energies, __pyx_n_s_len); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 883, __pyx_L1_error)
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":884
 *         """
 *         if not hasattr(energies, "__len__"):
 *             energies = numpy.array([energies], numpy.float64)             # <<<<<<<<<<<<<<
 *         return self.thisptr.getTransmission(energies, deref(elementsLib.thisptr), angle)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_energies);
    __Pyx_GIVEREF(__pyx_v_energies);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_energies);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 884, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 884, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_7);
      __pyx_t_4 = 0;
      __pyx_t_7 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_energies, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "python/cython/_fisx.pyx":883
 *         the layer transmission according to the incident angle (default 90.)
 *         """
 *         if not hasattr(energies, "__len__"):             # <<<<<<<<<<<<<<
 *             energies = numpy.array([energies], numpy.float64)
 *         return self.thisptr.getTransmission(energies, deref(elementsLib.thisptr), angle)
 */
  }

  /* "python/cython/_fisx.pyx":885
 *         if not hasattr(energies, "__len__"):
 *             energies = numpy.array([energies], numpy.float64)
 *         return self.thisptr.getTransmission(energies, deref(elementsLib.thisptr), angle)             # <<<<<<<<<<<<<<
 * 
 *     def setMaterial(self, PyMaterial material):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_10 = __pyx_convert_vector_from_py_double(__pyx_v_energies); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 885, __pyx_L1_error)
  __pyx_t_3 = __pyx_convert_vector_to_py_double(__pyx_v_self->thisptr->getTransmission(__pyx_t_10, (*__pyx_v_elementsLib->thisptr), __pyx_v_angle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":876
 *         return self.thisptr.getComposition(deref(elementsLib.thisptr))
 * 
 *     def getTransmission(self, energies, PyElements elementsLib, double angle=90.):             # <<<<<<<<<<<<<<
 *         """
 *         getTransmission(energies, ElementsLibraryInstance, angle=90.)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("fisx._fisx.PyLayer.getTransmission", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_energies);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":887
 *         return self.thisptr.getTransmission(energies, deref(elementsLib.thisptr), angle)
 * 
 *     def setMaterial(self, PyMaterial material):             # <<<<<<<<<<<<<<
 *         """
 *         setMaterial(MaterialInstance)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyLayer_9setMaterial(PyObject *__pyx_v_self, PyObject *__pyx_v_material); /*proto*/
static char __pyx_doc_4fisx_5_fisx_7PyLayer_8setMaterial[] = "\n        setMaterial(MaterialInstance)\n\n        Set the material of the layer. It has to be an instance!\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_7PyLayer_9setMaterial(PyObject *__pyx_v_self, PyObject *__pyx_v_material) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setMaterial (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_material), __pyx_ptype_4fisx_5_fisx_PyMaterial, 1, "material", 0))) __PYX_ERR(1, 887, __pyx_L1_error)
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyLayer_8setMaterial(((struct __pyx_obj_4fisx_5_fisx_PyLayer *)__pyx_v_self), ((struct __pyx_obj_4fisx_5_fisx_PyMaterial *)__pyx_v_material));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyLayer_8setMaterial(struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self, struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_material) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setMaterial", 0);

  /* "python/cython/_fisx.pyx":893
 *         Set the material of the layer. It has to be an instance!
 *         """
 *         self.thisptr.setMaterial(deref(material.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def getPeakFamilies(self, double energy, PyElements elementsLib):
 */
  __pyx_v_self->thisptr->setMaterial((*__pyx_v_material->thisptr));

  /* "python/cython/_fisx.pyx":887
 *         return self.thisptr.getTransmission(energies, deref(elementsLib.thisptr), angle)
 * 
 *     def setMaterial(self, PyMaterial material):             # <<<<<<<<<<<<<<
 *         """
 *         setMaterial(MaterialInstance)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":895
 *         self.thisptr.setMaterial(deref(material.thisptr))
 * 
 *     def getPeakFamilies(self, double energy, PyElements elementsLib):             # <<<<<<<<<<<<<<
 *         """
 *         getPeakFamilies(energy, ElementsLibraryInstance)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyLayer_11getPeakFamilies(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_7PyLayer_10getPeakFamilies[] = "\n        getPeakFamilies(energy, ElementsLibraryInstance)\n\n        Given an energy and a reference to an elements library return dictionarys.\n        The key is the peak family (\"Si K\", \"Pb L1\", ...) and the value the binding energy.\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_7PyLayer_11getPeakFamilies(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_energy;
  struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPeakFamilies (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_energy,&__pyx_n_s_elementsLib,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementsLib)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getPeakFamilies", 1, 2, 2, 1); __PYX_ERR(1, 895, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPeakFamilies") < 0)) __PYX_ERR(1, 895, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_energy = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_energy == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 895, __pyx_L3_error)
    __pyx_v_elementsLib = ((struct __pyx_obj_4fisx_5_fisx_PyElements *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getPeakFamilies", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 895, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyLayer.getPeakFamilies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementsLib), __pyx_ptype_4fisx_5_fisx_PyElements, 1, "elementsLib", 0))) __PYX_ERR(1, 895, __pyx_L1_error)
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyLayer_10getPeakFamilies(((struct __pyx_obj_4fisx_5_fisx_PyLayer *)__pyx_v_self), __pyx_v_energy, __pyx_v_elementsLib);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyLayer_10getPeakFamilies(struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self, double __pyx_v_energy, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLib) {
  std::vector<std::pair<std::string,double> >  __pyx_v_tmpResult;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::vector<std::pair<std::string,double> >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getPeakFamilies", 0);

  /* "python/cython/_fisx.pyx":902
 *         The key is the peak family ("Si K", "Pb L1", ...) and the value the binding energy.
 *         """
 *         tmpResult = self.thisptr.getPeakFamilies(energy, deref(elementsLib.thisptr))             # <<<<<<<<<<<<<<
 *         return sorted(tmpResult, key=itemgetter(1))
 * 
 */
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getPeakFamilies(__pyx_v_energy, (*__pyx_v_elementsLib->thisptr));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 902, __pyx_L1_error)
  }
  __pyx_v_tmpResult = __pyx_t_1;

  /* "python/cython/_fisx.pyx":903
 *         """
 *         tmpResult = self.thisptr.getPeakFamilies(energy, deref(elementsLib.thisptr))
 *         return sorted(tmpResult, key=itemgetter(1))             # <<<<<<<<<<<<<<
 * 
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_pair_3c_std_3a__3a_string_2c_double_3e___(__pyx_v_tmpResult); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_itemgetter); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_1);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_4) < 0) __PYX_ERR(1, 903, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":895
 *         self.thisptr.setMaterial(deref(material.thisptr))
 * 
 *     def getPeakFamilies(self, double energy, PyElements elementsLib):             # <<<<<<<<<<<<<<
 *         """
 *         getPeakFamilies(energy, ElementsLibraryInstance)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("fisx._fisx.PyLayer.getPeakFamilies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyLayer_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_7PyLayer_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyLayer_12__reduce_cython__(((struct __pyx_obj_4fisx_5_fisx_PyLayer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyLayer_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyLayer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyLayer_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_7PyLayer_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyLayer_14__setstate_cython__(((struct __pyx_obj_4fisx_5_fisx_PyLayer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyLayer_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyLayer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyLayer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":945
 *     cdef Material *thisptr
 * 
 *     def __cinit__(self, materialName, double density=1.0, double thickness=1.0, comment=""):             # <<<<<<<<<<<<<<
 *         materialName = toBytes(materialName)
 *         comment = toBytes(comment)
 */

/* Python wrapper */
static int __pyx_pw_4fisx_5_fisx_10PyMaterial_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4fisx_5_fisx_10PyMaterial_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_materialName = 0;
  double __pyx_v_density;
  double __pyx_v_thickness;
  PyObject *__pyx_v_comment = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_materialName,&__pyx_n_s_density,&__pyx_n_s_thickness,&__pyx_n_s_comment,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)__pyx_kp_s_);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_materialName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_thickness);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comment);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 945, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_materialName = values[0];
    if (values[1]) {
      __pyx_v_density = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_density == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 945, __pyx_L3_error)
    } else {
      __pyx_v_density = ((double)1.0);
    }
    if (values[2]) {
      __pyx_v_thickness = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_thickness == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 945, __pyx_L3_error)
    } else {
      __pyx_v_thickness = ((double)1.0);
    }
    __pyx_v_comment = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 945, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyMaterial.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyMaterial___cinit__(((struct __pyx_obj_4fisx_5_fisx_PyMaterial *)__pyx_v_self), __pyx_v_materialName, __pyx_v_density, __pyx_v_thickness, __pyx_v_comment);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4fisx_5_fisx_10PyMaterial___cinit__(struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self, PyObject *__pyx_v_materialName, double __pyx_v_density, double __pyx_v_thickness, PyObject *__pyx_v_comment) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  std::string __pyx_t_5;
  fisx::Material *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_materialName);
  __Pyx_INCREF(__pyx_v_comment);

  /* "python/cython/_fisx.pyx":946
 * 
 *     def __cinit__(self, materialName, double density=1.0, double thickness=1.0, comment=""):
 *         materialName = toBytes(materialName)             # <<<<<<<<<<<<<<
 *         comment = toBytes(comment)
 *         self.thisptr = new Material(materialName, density, thickness, comment)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_materialName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_materialName);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_materialName, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":947
 *     def __cinit__(self, materialName, double density=1.0, double thickness=1.0, comment=""):
 *         materialName = toBytes(materialName)
 *         comment = toBytes(comment)             # <<<<<<<<<<<<<<
 *         self.thisptr = new Material(materialName, density, thickness, comment)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_comment) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_comment);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_comment, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":948
 *         materialName = toBytes(materialName)
 *         comment = toBytes(comment)
 *         self.thisptr = new Material(materialName, density, thickness, comment)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_materialName); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 948, __pyx_L1_error)
  __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_comment); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 948, __pyx_L1_error)
  try {
    __pyx_t_6 = new fisx::Material(__pyx_t_4, __pyx_v_density, __pyx_v_thickness, __pyx_t_5);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 948, __pyx_L1_error)
  }
  __pyx_v_self->thisptr = __pyx_t_6;

  /* "python/cython/_fisx.pyx":945
 *     cdef Material *thisptr
 * 
 *     def __cinit__(self, materialName, double density=1.0, double thickness=1.0, comment=""):             # <<<<<<<<<<<<<<
 *         materialName = toBytes(materialName)
 *         comment = toBytes(comment)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyMaterial.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_materialName);
  __Pyx_XDECREF(__pyx_v_comment);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":950
 *         self.thisptr = new Material(materialName, density, thickness, comment)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_4fisx_5_fisx_10PyMaterial_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4fisx_5_fisx_10PyMaterial_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4fisx_5_fisx_10PyMaterial_2__dealloc__(((struct __pyx_obj_4fisx_5_fisx_PyMaterial *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4fisx_5_fisx_10PyMaterial_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "python/cython/_fisx.pyx":951
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     def getName(self):
 */
  delete __pyx_v_self->thisptr;

  /* "python/cython/_fisx.pyx":950
 *         self.thisptr = new Material(materialName, density, thickness, comment)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "python/cython/_fisx.pyx":953
 *         del self.thisptr
 * 
 *     def getName(self):             # <<<<<<<<<<<<<<
 *         return toString(self.thisptr.getName())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyMaterial_5getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyMaterial_5getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getName (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyMaterial_4getName(((struct __pyx_obj_4fisx_5_fisx_PyMaterial *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyMaterial_4getName(struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getName", 0);

  /* "python/cython/_fisx.pyx":954
 * 
 *     def getName(self):
 *         return toString(self.thisptr.getName())             # <<<<<<<<<<<<<<
 * 
 *     def setName(self, name):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toString); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->thisptr->getName()); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":953
 *         del self.thisptr
 * 
 *     def getName(self):             # <<<<<<<<<<<<<<
 *         return toString(self.thisptr.getName())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fisx._fisx.PyMaterial.getName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":956
 *         return toString(self.thisptr.getName())
 * 
 *     def setName(self, name):             # <<<<<<<<<<<<<<
 *         name = toBytes(name)
 *         self.thisptr.setName(name)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyMaterial_7setName(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyMaterial_7setName(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setName (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyMaterial_6setName(((struct __pyx_obj_4fisx_5_fisx_PyMaterial *)__pyx_v_self), ((PyObject *)__pyx_v_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyMaterial_6setName(struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setName", 0);
  __Pyx_INCREF(__pyx_v_name);

  /* "python/cython/_fisx.pyx":957
 * 
 *     def setName(self, name):
 *         name = toBytes(name)             # <<<<<<<<<<<<<<
 *         self.thisptr.setName(name)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":958
 *     def setName(self, name):
 *         name = toBytes(name)
 *         self.thisptr.setName(name)             # <<<<<<<<<<<<<<
 * 
 *     def setCompositionFromLists(self, elementList, std_vector[double] massFractions):
 */
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 958, __pyx_L1_error)
  try {
    __pyx_v_self->thisptr->setName(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 958, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":956
 *         return toString(self.thisptr.getName())
 * 
 *     def setName(self, name):             # <<<<<<<<<<<<<<
 *         name = toBytes(name)
 *         self.thisptr.setName(name)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyMaterial.setName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":960
 *         self.thisptr.setName(name)
 * 
 *     def setCompositionFromLists(self, elementList, std_vector[double] massFractions):             # <<<<<<<<<<<<<<
 *         if sys.version > "3.0":
 *             elementList = [toBytes(x) for x in elementList]
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyMaterial_9setCompositionFromLists(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyMaterial_9setCompositionFromLists(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elementList = 0;
  std::vector<double>  __pyx_v_massFractions;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setCompositionFromLists (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementList,&__pyx_n_s_massFractions,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementList)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_massFractions)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setCompositionFromLists", 1, 2, 2, 1); __PYX_ERR(1, 960, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCompositionFromLists") < 0)) __PYX_ERR(1, 960, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_elementList = values[0];
    __pyx_v_massFractions = __pyx_convert_vector_from_py_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 960, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setCompositionFromLists", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 960, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyMaterial.setCompositionFromLists", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyMaterial_8setCompositionFromLists(((struct __pyx_obj_4fisx_5_fisx_PyMaterial *)__pyx_v_self), __pyx_v_elementList, __pyx_v_massFractions);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyMaterial_8setCompositionFromLists(struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self, PyObject *__pyx_v_elementList, std::vector<double>  __pyx_v_massFractions) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  std::vector<std::string>  __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setCompositionFromLists", 0);
  __Pyx_INCREF(__pyx_v_elementList);

  /* "python/cython/_fisx.pyx":961
 * 
 *     def setCompositionFromLists(self, elementList, std_vector[double] massFractions):
 *         if sys.version > "3.0":             # <<<<<<<<<<<<<<
 *             elementList = [toBytes(x) for x in elementList]
 *         self.thisptr.setComposition(elementList, massFractions)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":962
 *     def setCompositionFromLists(self, elementList, std_vector[double] massFractions):
 *         if sys.version > "3.0":
 *             elementList = [toBytes(x) for x in elementList]             # <<<<<<<<<<<<<<
 *         self.thisptr.setComposition(elementList, massFractions)
 * 
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_elementList)) || PyTuple_CheckExact(__pyx_v_elementList)) {
      __pyx_t_2 = __pyx_v_elementList; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_elementList); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 962, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 962, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 962, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 962, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 962, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_2);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 962, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_x) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_x);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 962, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_elementList, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "python/cython/_fisx.pyx":961
 * 
 *     def setCompositionFromLists(self, elementList, std_vector[double] massFractions):
 *         if sys.version > "3.0":             # <<<<<<<<<<<<<<
 *             elementList = [toBytes(x) for x in elementList]
 *         self.thisptr.setComposition(elementList, massFractions)
 */
  }

  /* "python/cython/_fisx.pyx":963
 *         if sys.version > "3.0":
 *             elementList = [toBytes(x) for x in elementList]
 *         self.thisptr.setComposition(elementList, massFractions)             # <<<<<<<<<<<<<<
 * 
 *     def setComposition(self, composition):
 */
  __pyx_t_9 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_v_elementList); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 963, __pyx_L1_error)
  try {
    __pyx_v_self->thisptr->setComposition(__pyx_t_9, __pyx_v_massFractions);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 963, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":960
 *         self.thisptr.setName(name)
 * 
 *     def setCompositionFromLists(self, elementList, std_vector[double] massFractions):             # <<<<<<<<<<<<<<
 *         if sys.version > "3.0":
 *             elementList = [toBytes(x) for x in elementList]
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("fisx._fisx.PyMaterial.setCompositionFromLists", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_elementList);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":965
 *         self.thisptr.setComposition(elementList, massFractions)
 * 
 *     def setComposition(self, composition):             # <<<<<<<<<<<<<<
 *         if sys.version > "3.0":
 *             composition = toBytesKeys(composition)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyMaterial_11setComposition(PyObject *__pyx_v_self, PyObject *__pyx_v_composition); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyMaterial_11setComposition(PyObject *__pyx_v_self, PyObject *__pyx_v_composition) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setComposition (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyMaterial_10setComposition(((struct __pyx_obj_4fisx_5_fisx_PyMaterial *)__pyx_v_self), ((PyObject *)__pyx_v_composition));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyMaterial_10setComposition(struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self, PyObject *__pyx_v_composition) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  std::map<std::string,double>  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setComposition", 0);
  __Pyx_INCREF(__pyx_v_composition);

  /* "python/cython/_fisx.pyx":966
 * 
 *     def setComposition(self, composition):
 *         if sys.version > "3.0":             # <<<<<<<<<<<<<<
 *             composition = toBytesKeys(composition)
 *         self.thisptr.setComposition(composition)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 966, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 966, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":967
 *     def setComposition(self, composition):
 *         if sys.version > "3.0":
 *             composition = toBytesKeys(composition)             # <<<<<<<<<<<<<<
 *         self.thisptr.setComposition(composition)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytesKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_composition) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_composition);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_composition, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "python/cython/_fisx.pyx":966
 * 
 *     def setComposition(self, composition):
 *         if sys.version > "3.0":             # <<<<<<<<<<<<<<
 *             composition = toBytesKeys(composition)
 *         self.thisptr.setComposition(composition)
 */
  }

  /* "python/cython/_fisx.pyx":968
 *         if sys.version > "3.0":
 *             composition = toBytesKeys(composition)
 *         self.thisptr.setComposition(composition)             # <<<<<<<<<<<<<<
 * 
 *     def getComposition(self):
 */
  __pyx_t_5 = __pyx_convert_map_from_py_std_3a__3a_string__and_double(__pyx_v_composition); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 968, __pyx_L1_error)
  try {
    __pyx_v_self->thisptr->setComposition(__pyx_t_5);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 968, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":965
 *         self.thisptr.setComposition(elementList, massFractions)
 * 
 *     def setComposition(self, composition):             # <<<<<<<<<<<<<<
 *         if sys.version > "3.0":
 *             composition = toBytesKeys(composition)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fisx._fisx.PyMaterial.setComposition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_composition);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":970
 *         self.thisptr.setComposition(composition)
 * 
 *     def getComposition(self):             # <<<<<<<<<<<<<<
 *         return toStringKeys(self.thisptr.getComposition())
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyMaterial_13getComposition(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyMaterial_13getComposition(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getComposition (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyMaterial_12getComposition(((struct __pyx_obj_4fisx_5_fisx_PyMaterial *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyMaterial_12getComposition(struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  std::map<std::string,double>  __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getComposition", 0);

  /* "python/cython/_fisx.pyx":971
 * 
 *     def getComposition(self):
 *         return toStringKeys(self.thisptr.getComposition())             # <<<<<<<<<<<<<<
 * #/[inserted by cython to avoid comment start]*##########################################################################
 * #
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  try {
    __pyx_t_3 = __pyx_v_self->thisptr->getComposition();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 971, __pyx_L1_error)
  }
  __pyx_t_4 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":970
 *         self.thisptr.setComposition(composition)
 * 
 *     def getComposition(self):             # <<<<<<<<<<<<<<
 *         return toStringKeys(self.thisptr.getComposition())
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("fisx._fisx.PyMaterial.getComposition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyMaterial_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyMaterial_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyMaterial_14__reduce_cython__(((struct __pyx_obj_4fisx_5_fisx_PyMaterial *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyMaterial_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyMaterial.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_10PyMaterial_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_10PyMaterial_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_10PyMaterial_16__setstate_cython__(((struct __pyx_obj_4fisx_5_fisx_PyMaterial *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_10PyMaterial_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyMaterial *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyMaterial.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1010
 *     cdef Math *thisptr
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.thisptr = new Math()
 * 
 */

/* Python wrapper */
static int __pyx_pw_4fisx_5_fisx_6PyMath_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4fisx_5_fisx_6PyMath_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_4fisx_5_fisx_6PyMath___cinit__(((struct __pyx_obj_4fisx_5_fisx_PyMath *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4fisx_5_fisx_6PyMath___cinit__(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "python/cython/_fisx.pyx":1011
 * 
 *     def __cinit__(self):
 *         self.thisptr = new Math()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->thisptr = new fisx::Math();

  /* "python/cython/_fisx.pyx":1010
 *     cdef Math *thisptr
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.thisptr = new Math()
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1013
 *         self.thisptr = new Math()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_4fisx_5_fisx_6PyMath_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4fisx_5_fisx_6PyMath_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4fisx_5_fisx_6PyMath_2__dealloc__(((struct __pyx_obj_4fisx_5_fisx_PyMath *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4fisx_5_fisx_6PyMath_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "python/cython/_fisx.pyx":1014
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     def E1(self, double x):
 */
  delete __pyx_v_self->thisptr;

  /* "python/cython/_fisx.pyx":1013
 *         self.thisptr = new Math()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "python/cython/_fisx.pyx":1016
 *         del self.thisptr
 * 
 *     def E1(self, double x):             # <<<<<<<<<<<<<<
 *         return self.thisptr.E1(x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_5E1(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_5E1(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("E1 (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1016, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyMath.E1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_6PyMath_4E1(((struct __pyx_obj_4fisx_5_fisx_PyMath *)__pyx_v_self), ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_4E1(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("E1", 0);

  /* "python/cython/_fisx.pyx":1017
 * 
 *     def E1(self, double x):
 *         return self.thisptr.E1(x)             # <<<<<<<<<<<<<<
 * 
 *     def En(self, int n, double x):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->E1(__pyx_v_x);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1017, __pyx_L1_error)
  }
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1016
 *         del self.thisptr
 * 
 *     def E1(self, double x):             # <<<<<<<<<<<<<<
 *         return self.thisptr.E1(x)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyMath.E1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1019
 *         return self.thisptr.E1(x)
 * 
 *     def En(self, int n, double x):             # <<<<<<<<<<<<<<
 *         return self.thisptr.En(n, x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_7En(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_7En(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_n;
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("En (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_x,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("En", 1, 2, 2, 1); __PYX_ERR(1, 1019, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "En") < 0)) __PYX_ERR(1, 1019, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_n = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1019, __pyx_L3_error)
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1019, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("En", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1019, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyMath.En", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_6PyMath_6En(((struct __pyx_obj_4fisx_5_fisx_PyMath *)__pyx_v_self), __pyx_v_n, __pyx_v_x);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_6En(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, int __pyx_v_n, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("En", 0);

  /* "python/cython/_fisx.pyx":1020
 * 
 *     def En(self, int n, double x):
 *         return self.thisptr.En(n, x)             # <<<<<<<<<<<<<<
 * 
 *     def deBoerD(self, double x):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->En(__pyx_v_n, __pyx_v_x);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1020, __pyx_L1_error)
  }
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1019
 *         return self.thisptr.E1(x)
 * 
 *     def En(self, int n, double x):             # <<<<<<<<<<<<<<
 *         return self.thisptr.En(n, x)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyMath.En", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1022
 *         return self.thisptr.En(n, x)
 * 
 *     def deBoerD(self, double x):             # <<<<<<<<<<<<<<
 *         return self.thisptr.deBoerD(x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_9deBoerD(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_9deBoerD(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deBoerD (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1022, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyMath.deBoerD", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_6PyMath_8deBoerD(((struct __pyx_obj_4fisx_5_fisx_PyMath *)__pyx_v_self), ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_8deBoerD(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("deBoerD", 0);

  /* "python/cython/_fisx.pyx":1023
 * 
 *     def deBoerD(self, double x):
 *         return self.thisptr.deBoerD(x)             # <<<<<<<<<<<<<<
 * 
 *     def deBoerL0(self, double mu1, double mu2, double muj, double density = 0.0, double thickness = 0.0):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->deBoerD(__pyx_v_x);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1023, __pyx_L1_error)
  }
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1022
 *         return self.thisptr.En(n, x)
 * 
 *     def deBoerD(self, double x):             # <<<<<<<<<<<<<<
 *         return self.thisptr.deBoerD(x)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyMath.deBoerD", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1025
 *         return self.thisptr.deBoerD(x)
 * 
 *     def deBoerL0(self, double mu1, double mu2, double muj, double density = 0.0, double thickness = 0.0):             # <<<<<<<<<<<<<<
 *         """
 *         The case the product density * thickness is 0.0 is for calculating the thick target limit
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_11deBoerL0(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_6PyMath_10deBoerL0[] = "\n        The case the product density * thickness is 0.0 is for calculating the thick target limit\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_11deBoerL0(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_mu1;
  double __pyx_v_mu2;
  double __pyx_v_muj;
  double __pyx_v_density;
  double __pyx_v_thickness;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deBoerL0 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mu1,&__pyx_n_s_mu2,&__pyx_n_s_muj,&__pyx_n_s_density,&__pyx_n_s_thickness,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mu1)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mu2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("deBoerL0", 0, 3, 5, 1); __PYX_ERR(1, 1025, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_muj)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("deBoerL0", 0, 3, 5, 2); __PYX_ERR(1, 1025, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_thickness);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "deBoerL0") < 0)) __PYX_ERR(1, 1025, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_mu1 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_mu1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1025, __pyx_L3_error)
    __pyx_v_mu2 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_mu2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1025, __pyx_L3_error)
    __pyx_v_muj = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_muj == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1025, __pyx_L3_error)
    if (values[3]) {
      __pyx_v_density = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_density == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1025, __pyx_L3_error)
    } else {
      __pyx_v_density = ((double)0.0);
    }
    if (values[4]) {
      __pyx_v_thickness = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_thickness == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1025, __pyx_L3_error)
    } else {
      __pyx_v_thickness = ((double)0.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deBoerL0", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1025, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyMath.deBoerL0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_6PyMath_10deBoerL0(((struct __pyx_obj_4fisx_5_fisx_PyMath *)__pyx_v_self), __pyx_v_mu1, __pyx_v_mu2, __pyx_v_muj, __pyx_v_density, __pyx_v_thickness);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_10deBoerL0(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, double __pyx_v_mu1, double __pyx_v_mu2, double __pyx_v_muj, double __pyx_v_density, double __pyx_v_thickness) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("deBoerL0", 0);

  /* "python/cython/_fisx.pyx":1029
 *         The case the product density * thickness is 0.0 is for calculating the thick target limit
 *         """
 *         return self.thisptr.deBoerL0(mu1, mu2, muj, density, thickness)             # <<<<<<<<<<<<<<
 * 
 *     def deBoerX(self, double p, double q, double d1, double d2, double mu_1_j, double mu_2_j, double mu_b_d_t = 0.0):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->deBoerL0(__pyx_v_mu1, __pyx_v_mu2, __pyx_v_muj, __pyx_v_density, __pyx_v_thickness);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1029, __pyx_L1_error)
  }
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1025
 *         return self.thisptr.deBoerD(x)
 * 
 *     def deBoerL0(self, double mu1, double mu2, double muj, double density = 0.0, double thickness = 0.0):             # <<<<<<<<<<<<<<
 *         """
 *         The case the product density * thickness is 0.0 is for calculating the thick target limit
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyMath.deBoerL0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1031
 *         return self.thisptr.deBoerL0(mu1, mu2, muj, density, thickness)
 * 
 *     def deBoerX(self, double p, double q, double d1, double d2, double mu_1_j, double mu_2_j, double mu_b_d_t = 0.0):             # <<<<<<<<<<<<<<
 *         """
 *         static double deBoerX(const double & p, const double & q, \
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_13deBoerX(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_6PyMath_12deBoerX[] = "\n        static double deBoerX(const double & p, const double & q,                               const double & d1, const double & d2,                               const double & mu_1_j, const double & mu_2_j,                               const double & mu_b_j_d_t = 0.0);\n        For multilayers\n        p and q following article\n        d1 is the product density * thickness of fluorescing layer\n        d2 is the product density * thickness of layer j originating the secondary excitation\n        mu_1_j is the mass attenuation coefficient of fluorescing layer at j excitation energy\n        mu_2_j is the mass attenuation coefficient of layer j at j excitation energy\n        mu_b_d_t is the sum of the products mu * density * thickness of layers between layer i and j\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_13deBoerX(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_p;
  double __pyx_v_q;
  double __pyx_v_d1;
  double __pyx_v_d2;
  double __pyx_v_mu_1_j;
  double __pyx_v_mu_2_j;
  double __pyx_v_mu_b_d_t;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deBoerX (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,&__pyx_n_s_d1,&__pyx_n_s_d2,&__pyx_n_s_mu_1_j,&__pyx_n_s_mu_2_j,&__pyx_n_s_mu_b_d_t,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("deBoerX", 0, 6, 7, 1); __PYX_ERR(1, 1031, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("deBoerX", 0, 6, 7, 2); __PYX_ERR(1, 1031, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("deBoerX", 0, 6, 7, 3); __PYX_ERR(1, 1031, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mu_1_j)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("deBoerX", 0, 6, 7, 4); __PYX_ERR(1, 1031, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mu_2_j)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("deBoerX", 0, 6, 7, 5); __PYX_ERR(1, 1031, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mu_b_d_t);
          if (value) { values[6] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "deBoerX") < 0)) __PYX_ERR(1, 1031, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_p = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_p == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1031, __pyx_L3_error)
    __pyx_v_q = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_q == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1031, __pyx_L3_error)
    __pyx_v_d1 = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_d1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1031, __pyx_L3_error)
    __pyx_v_d2 = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_d2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1031, __pyx_L3_error)
    __pyx_v_mu_1_j = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_mu_1_j == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1031, __pyx_L3_error)
    __pyx_v_mu_2_j = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_mu_2_j == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1031, __pyx_L3_error)
    if (values[6]) {
      __pyx_v_mu_b_d_t = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_mu_b_d_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1031, __pyx_L3_error)
    } else {
      __pyx_v_mu_b_d_t = ((double)0.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deBoerX", 0, 6, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1031, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyMath.deBoerX", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_6PyMath_12deBoerX(((struct __pyx_obj_4fisx_5_fisx_PyMath *)__pyx_v_self), __pyx_v_p, __pyx_v_q, __pyx_v_d1, __pyx_v_d2, __pyx_v_mu_1_j, __pyx_v_mu_2_j, __pyx_v_mu_b_d_t);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_12deBoerX(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, double __pyx_v_p, double __pyx_v_q, double __pyx_v_d1, double __pyx_v_d2, double __pyx_v_mu_1_j, double __pyx_v_mu_2_j, double __pyx_v_mu_b_d_t) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("deBoerX", 0);

  /* "python/cython/_fisx.pyx":1045
 *         mu_b_d_t is the sum of the products mu * density * thickness of layers between layer i and j
 *         """
 *         return self.thisptr.deBoerX(p, q, d1, d2, mu_1_j, mu_2_j, mu_b_d_t)             # <<<<<<<<<<<<<<
 * 
 *     def erf(self, double x):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->deBoerX(__pyx_v_p, __pyx_v_q, __pyx_v_d1, __pyx_v_d2, __pyx_v_mu_1_j, __pyx_v_mu_2_j, __pyx_v_mu_b_d_t);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1045, __pyx_L1_error)
  }
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1031
 *         return self.thisptr.deBoerL0(mu1, mu2, muj, density, thickness)
 * 
 *     def deBoerX(self, double p, double q, double d1, double d2, double mu_1_j, double mu_2_j, double mu_b_d_t = 0.0):             # <<<<<<<<<<<<<<
 *         """
 *         static double deBoerX(const double & p, const double & q, \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyMath.deBoerX", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1047
 *         return self.thisptr.deBoerX(p, q, d1, d2, mu_1_j, mu_2_j, mu_b_d_t)
 * 
 *     def erf(self, double x):             # <<<<<<<<<<<<<<
 *         """
 *         Calculate the error function erf(x)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_15erf(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static char __pyx_doc_4fisx_5_fisx_6PyMath_14erf[] = "\n        Calculate the error function erf(x)\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_15erf(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("erf (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1047, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyMath.erf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_6PyMath_14erf(((struct __pyx_obj_4fisx_5_fisx_PyMath *)__pyx_v_self), ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_14erf(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("erf", 0);

  /* "python/cython/_fisx.pyx":1051
 *         Calculate the error function erf(x)
 *         """
 *         return self.thisptr.erf(x)             # <<<<<<<<<<<<<<
 * 
 *     def erfc(self, double x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->thisptr->erf(__pyx_v_x)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1047
 *         return self.thisptr.deBoerX(p, q, d1, d2, mu_1_j, mu_2_j, mu_b_d_t)
 * 
 *     def erf(self, double x):             # <<<<<<<<<<<<<<
 *         """
 *         Calculate the error function erf(x)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyMath.erf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1053
 *         return self.thisptr.erf(x)
 * 
 *     def erfc(self, double x):             # <<<<<<<<<<<<<<
 *         """
 *         Calculate the complementary error function erfc(x)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_17erfc(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static char __pyx_doc_4fisx_5_fisx_6PyMath_16erfc[] = "\n        Calculate the complementary error function erfc(x)\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_17erfc(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("erfc (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1053, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyMath.erfc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_6PyMath_16erfc(((struct __pyx_obj_4fisx_5_fisx_PyMath *)__pyx_v_self), ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_16erfc(struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("erfc", 0);

  /* "python/cython/_fisx.pyx":1057
 *         Calculate the complementary error function erfc(x)
 *         """
 *         return self.thisptr.erfc(x)             # <<<<<<<<<<<<<<
 * #/[inserted by cython to avoid comment start]*##########################################################################
 * #
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->thisptr->erfc(__pyx_v_x)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1053
 *         return self.thisptr.erf(x)
 * 
 *     def erfc(self, double x):             # <<<<<<<<<<<<<<
 *         """
 *         Calculate the complementary error function erfc(x)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyMath.erfc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_6PyMath_18__reduce_cython__(((struct __pyx_obj_4fisx_5_fisx_PyMath *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyMath.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_6PyMath_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_6PyMath_20__setstate_cython__(((struct __pyx_obj_4fisx_5_fisx_PyMath *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_6PyMath_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyMath *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyMath.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1097
 *     cdef Shell *thisptr
 * 
 *     def __cinit__(self, name):             # <<<<<<<<<<<<<<
 *         name = toBytes(name)
 *         self.thisptr = new Shell(name)
 */

/* Python wrapper */
static int __pyx_pw_4fisx_5_fisx_7PyShell_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4fisx_5_fisx_7PyShell_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 1097, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1097, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyShell.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyShell___cinit__(((struct __pyx_obj_4fisx_5_fisx_PyShell *)__pyx_v_self), __pyx_v_name);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4fisx_5_fisx_7PyShell___cinit__(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  fisx::Shell *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_name);

  /* "python/cython/_fisx.pyx":1098
 * 
 *     def __cinit__(self, name):
 *         name = toBytes(name)             # <<<<<<<<<<<<<<
 *         self.thisptr = new Shell(name)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":1099
 *     def __cinit__(self, name):
 *         name = toBytes(name)
 *         self.thisptr = new Shell(name)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1099, __pyx_L1_error)
  try {
    __pyx_t_5 = new fisx::Shell(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1099, __pyx_L1_error)
  }
  __pyx_v_self->thisptr = __pyx_t_5;

  /* "python/cython/_fisx.pyx":1097
 *     cdef Shell *thisptr
 * 
 *     def __cinit__(self, name):             # <<<<<<<<<<<<<<
 *         name = toBytes(name)
 *         self.thisptr = new Shell(name)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyShell.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1101
 *         self.thisptr = new Shell(name)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_4fisx_5_fisx_7PyShell_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4fisx_5_fisx_7PyShell_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4fisx_5_fisx_7PyShell_2__dealloc__(((struct __pyx_obj_4fisx_5_fisx_PyShell *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4fisx_5_fisx_7PyShell_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "python/cython/_fisx.pyx":1102
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     def setRadiativeTransitions(self, transitions, std_vector[double] values):
 */
  delete __pyx_v_self->thisptr;

  /* "python/cython/_fisx.pyx":1101
 *         self.thisptr = new Shell(name)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "python/cython/_fisx.pyx":1104
 *         del self.thisptr
 * 
 *     def setRadiativeTransitions(self, transitions, std_vector[double] values):             # <<<<<<<<<<<<<<
 *         if sys.version > "3.0":
 *             transitions = [toBytes(x) for x in transitions]
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_5setRadiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_5setRadiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_transitions = 0;
  std::vector<double>  __pyx_v_values;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRadiativeTransitions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_transitions,&__pyx_n_s_values,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transitions)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setRadiativeTransitions", 1, 2, 2, 1); __PYX_ERR(1, 1104, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRadiativeTransitions") < 0)) __PYX_ERR(1, 1104, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_transitions = values[0];
    __pyx_v_values = __pyx_convert_vector_from_py_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1104, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setRadiativeTransitions", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1104, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyShell.setRadiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyShell_4setRadiativeTransitions(((struct __pyx_obj_4fisx_5_fisx_PyShell *)__pyx_v_self), __pyx_v_transitions, __pyx_v_values);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_4setRadiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self, PyObject *__pyx_v_transitions, std::vector<double>  __pyx_v_values) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  std::vector<std::string>  __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setRadiativeTransitions", 0);
  __Pyx_INCREF(__pyx_v_transitions);

  /* "python/cython/_fisx.pyx":1105
 * 
 *     def setRadiativeTransitions(self, transitions, std_vector[double] values):
 *         if sys.version > "3.0":             # <<<<<<<<<<<<<<
 *             transitions = [toBytes(x) for x in transitions]
 *         self.thisptr.setRadiativeTransitions(transitions, values)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":1106
 *     def setRadiativeTransitions(self, transitions, std_vector[double] values):
 *         if sys.version > "3.0":
 *             transitions = [toBytes(x) for x in transitions]             # <<<<<<<<<<<<<<
 *         self.thisptr.setRadiativeTransitions(transitions, values)
 * 
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_transitions)) || PyTuple_CheckExact(__pyx_v_transitions)) {
      __pyx_t_2 = __pyx_v_transitions; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_transitions); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1106, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 1106, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1106, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 1106, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1106, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_2);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 1106, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_x) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_x);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 1106, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_transitions, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "python/cython/_fisx.pyx":1105
 * 
 *     def setRadiativeTransitions(self, transitions, std_vector[double] values):
 *         if sys.version > "3.0":             # <<<<<<<<<<<<<<
 *             transitions = [toBytes(x) for x in transitions]
 *         self.thisptr.setRadiativeTransitions(transitions, values)
 */
  }

  /* "python/cython/_fisx.pyx":1107
 *         if sys.version > "3.0":
 *             transitions = [toBytes(x) for x in transitions]
 *         self.thisptr.setRadiativeTransitions(transitions, values)             # <<<<<<<<<<<<<<
 * 
 *     def setNonradiativeTransitions(self, transitions, std_vector[double] values):
 */
  __pyx_t_9 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_v_transitions); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1107, __pyx_L1_error)
  try {
    __pyx_v_self->thisptr->setRadiativeTransitions(__pyx_t_9, __pyx_v_values);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1107, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":1104
 *         del self.thisptr
 * 
 *     def setRadiativeTransitions(self, transitions, std_vector[double] values):             # <<<<<<<<<<<<<<
 *         if sys.version > "3.0":
 *             transitions = [toBytes(x) for x in transitions]
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("fisx._fisx.PyShell.setRadiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_transitions);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1109
 *         self.thisptr.setRadiativeTransitions(transitions, values)
 * 
 *     def setNonradiativeTransitions(self, transitions, std_vector[double] values):             # <<<<<<<<<<<<<<
 *         if sys.version > "3.0":
 *             transitions = [toBytes(x) for x in transitions]
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_7setNonradiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_7setNonradiativeTransitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_transitions = 0;
  std::vector<double>  __pyx_v_values;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setNonradiativeTransitions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_transitions,&__pyx_n_s_values,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transitions)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setNonradiativeTransitions", 1, 2, 2, 1); __PYX_ERR(1, 1109, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNonradiativeTransitions") < 0)) __PYX_ERR(1, 1109, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_transitions = values[0];
    __pyx_v_values = __pyx_convert_vector_from_py_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1109, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setNonradiativeTransitions", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1109, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyShell.setNonradiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyShell_6setNonradiativeTransitions(((struct __pyx_obj_4fisx_5_fisx_PyShell *)__pyx_v_self), __pyx_v_transitions, __pyx_v_values);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_6setNonradiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self, PyObject *__pyx_v_transitions, std::vector<double>  __pyx_v_values) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  std::vector<std::string>  __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setNonradiativeTransitions", 0);
  __Pyx_INCREF(__pyx_v_transitions);

  /* "python/cython/_fisx.pyx":1110
 * 
 *     def setNonradiativeTransitions(self, transitions, std_vector[double] values):
 *         if sys.version > "3.0":             # <<<<<<<<<<<<<<
 *             transitions = [toBytes(x) for x in transitions]
 *         self.thisptr.setNonradiativeTransitions(transitions, values)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":1111
 *     def setNonradiativeTransitions(self, transitions, std_vector[double] values):
 *         if sys.version > "3.0":
 *             transitions = [toBytes(x) for x in transitions]             # <<<<<<<<<<<<<<
 *         self.thisptr.setNonradiativeTransitions(transitions, values)
 * 
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_transitions)) || PyTuple_CheckExact(__pyx_v_transitions)) {
      __pyx_t_2 = __pyx_v_transitions; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_transitions); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1111, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 1111, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1111, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 1111, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1111, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_2);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 1111, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_x) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_x);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 1111, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_transitions, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "python/cython/_fisx.pyx":1110
 * 
 *     def setNonradiativeTransitions(self, transitions, std_vector[double] values):
 *         if sys.version > "3.0":             # <<<<<<<<<<<<<<
 *             transitions = [toBytes(x) for x in transitions]
 *         self.thisptr.setNonradiativeTransitions(transitions, values)
 */
  }

  /* "python/cython/_fisx.pyx":1112
 *         if sys.version > "3.0":
 *             transitions = [toBytes(x) for x in transitions]
 *         self.thisptr.setNonradiativeTransitions(transitions, values)             # <<<<<<<<<<<<<<
 * 
 *     def getAugerRatios(self):
 */
  __pyx_t_9 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_v_transitions); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1112, __pyx_L1_error)
  try {
    __pyx_v_self->thisptr->setNonradiativeTransitions(__pyx_t_9, __pyx_v_values);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1112, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":1109
 *         self.thisptr.setRadiativeTransitions(transitions, values)
 * 
 *     def setNonradiativeTransitions(self, transitions, std_vector[double] values):             # <<<<<<<<<<<<<<
 *         if sys.version > "3.0":
 *             transitions = [toBytes(x) for x in transitions]
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("fisx._fisx.PyShell.setNonradiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_transitions);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1114
 *         self.thisptr.setNonradiativeTransitions(transitions, values)
 * 
 *     def getAugerRatios(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getAugerRatios()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_9getAugerRatios(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_9getAugerRatios(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getAugerRatios (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyShell_8getAugerRatios(((struct __pyx_obj_4fisx_5_fisx_PyShell *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_8getAugerRatios(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getAugerRatios", 0);

  /* "python/cython/_fisx.pyx":1115
 * 
 *     def getAugerRatios(self):
 *         return self.thisptr.getAugerRatios()             # <<<<<<<<<<<<<<
 * 
 *     def getCosterKronigRatios(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_v_self->thisptr->getAugerRatios()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1114
 *         self.thisptr.setNonradiativeTransitions(transitions, values)
 * 
 *     def getAugerRatios(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getAugerRatios()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyShell.getAugerRatios", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1117
 *         return self.thisptr.getAugerRatios()
 * 
 *     def getCosterKronigRatios(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getCosterKronigRatios()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_11getCosterKronigRatios(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_11getCosterKronigRatios(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getCosterKronigRatios (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyShell_10getCosterKronigRatios(((struct __pyx_obj_4fisx_5_fisx_PyShell *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_10getCosterKronigRatios(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getCosterKronigRatios", 0);

  /* "python/cython/_fisx.pyx":1118
 * 
 *     def getCosterKronigRatios(self):
 *         return self.thisptr.getCosterKronigRatios()             # <<<<<<<<<<<<<<
 * 
 *     def getFluorescenceRatios(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___(__pyx_v_self->thisptr->getCosterKronigRatios()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1117
 *         return self.thisptr.getAugerRatios()
 * 
 *     def getCosterKronigRatios(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getCosterKronigRatios()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyShell.getCosterKronigRatios", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1120
 *         return self.thisptr.getCosterKronigRatios()
 * 
 *     def getFluorescenceRatios(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getFluorescenceRatios()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_13getFluorescenceRatios(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_13getFluorescenceRatios(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getFluorescenceRatios (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyShell_12getFluorescenceRatios(((struct __pyx_obj_4fisx_5_fisx_PyShell *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_12getFluorescenceRatios(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getFluorescenceRatios", 0);

  /* "python/cython/_fisx.pyx":1121
 * 
 *     def getFluorescenceRatios(self):
 *         return self.thisptr.getFluorescenceRatios()             # <<<<<<<<<<<<<<
 * 
 *     def getRadiativeTransitions(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_v_self->thisptr->getFluorescenceRatios()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1120
 *         return self.thisptr.getCosterKronigRatios()
 * 
 *     def getFluorescenceRatios(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getFluorescenceRatios()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyShell.getFluorescenceRatios", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1123
 *         return self.thisptr.getFluorescenceRatios()
 * 
 *     def getRadiativeTransitions(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getRadiativeTransitions()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_15getRadiativeTransitions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_15getRadiativeTransitions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRadiativeTransitions (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyShell_14getRadiativeTransitions(((struct __pyx_obj_4fisx_5_fisx_PyShell *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_14getRadiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getRadiativeTransitions", 0);

  /* "python/cython/_fisx.pyx":1124
 * 
 *     def getRadiativeTransitions(self):
 *         return self.thisptr.getRadiativeTransitions()             # <<<<<<<<<<<<<<
 * 
 *     def getNonradiativeTransitions(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_v_self->thisptr->getRadiativeTransitions()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1123
 *         return self.thisptr.getFluorescenceRatios()
 * 
 *     def getRadiativeTransitions(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getRadiativeTransitions()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyShell.getRadiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1126
 *         return self.thisptr.getRadiativeTransitions()
 * 
 *     def getNonradiativeTransitions(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getNonradiativeTransitions()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_17getNonradiativeTransitions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_17getNonradiativeTransitions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getNonradiativeTransitions (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyShell_16getNonradiativeTransitions(((struct __pyx_obj_4fisx_5_fisx_PyShell *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_16getNonradiativeTransitions(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getNonradiativeTransitions", 0);

  /* "python/cython/_fisx.pyx":1127
 * 
 *     def getNonradiativeTransitions(self):
 *         return self.thisptr.getNonradiativeTransitions()             # <<<<<<<<<<<<<<
 * 
 *     def getDirectVacancyTransferRatios(self, subshell):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_v_self->thisptr->getNonradiativeTransitions()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1126
 *         return self.thisptr.getRadiativeTransitions()
 * 
 *     def getNonradiativeTransitions(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getNonradiativeTransitions()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyShell.getNonradiativeTransitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1129
 *         return self.thisptr.getNonradiativeTransitions()
 * 
 *     def getDirectVacancyTransferRatios(self, subshell):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getDirectVacancyTransferRatios(toBytes(subshell))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_19getDirectVacancyTransferRatios(PyObject *__pyx_v_self, PyObject *__pyx_v_subshell); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_19getDirectVacancyTransferRatios(PyObject *__pyx_v_self, PyObject *__pyx_v_subshell) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDirectVacancyTransferRatios (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyShell_18getDirectVacancyTransferRatios(((struct __pyx_obj_4fisx_5_fisx_PyShell *)__pyx_v_self), ((PyObject *)__pyx_v_subshell));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_18getDirectVacancyTransferRatios(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self, PyObject *__pyx_v_subshell) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  std::map<std::string,double>  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getDirectVacancyTransferRatios", 0);

  /* "python/cython/_fisx.pyx":1130
 * 
 *     def getDirectVacancyTransferRatios(self, subshell):
 *         return self.thisptr.getDirectVacancyTransferRatios(toBytes(subshell))             # <<<<<<<<<<<<<<
 * 
 *     def setShellConstants(self, shellConstants):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_subshell) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_subshell);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_5 = __pyx_v_self->thisptr->getDirectVacancyTransferRatios(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1130, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1129
 *         return self.thisptr.getNonradiativeTransitions()
 * 
 *     def getDirectVacancyTransferRatios(self, subshell):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getDirectVacancyTransferRatios(toBytes(subshell))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyShell.getDirectVacancyTransferRatios", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1132
 *         return self.thisptr.getDirectVacancyTransferRatios(toBytes(subshell))
 * 
 *     def setShellConstants(self, shellConstants):             # <<<<<<<<<<<<<<
 *         if sys.version > "3.0":
 *             shellConstants = toBytesKeys(shellConstants)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_21setShellConstants(PyObject *__pyx_v_self, PyObject *__pyx_v_shellConstants); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_21setShellConstants(PyObject *__pyx_v_self, PyObject *__pyx_v_shellConstants) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setShellConstants (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyShell_20setShellConstants(((struct __pyx_obj_4fisx_5_fisx_PyShell *)__pyx_v_self), ((PyObject *)__pyx_v_shellConstants));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_20setShellConstants(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self, PyObject *__pyx_v_shellConstants) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  std::map<std::string,double>  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setShellConstants", 0);
  __Pyx_INCREF(__pyx_v_shellConstants);

  /* "python/cython/_fisx.pyx":1133
 * 
 *     def setShellConstants(self, shellConstants):
 *         if sys.version > "3.0":             # <<<<<<<<<<<<<<
 *             shellConstants = toBytesKeys(shellConstants)
 *         self.thisptr.setShellConstants(shellConstants)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":1134
 *     def setShellConstants(self, shellConstants):
 *         if sys.version > "3.0":
 *             shellConstants = toBytesKeys(shellConstants)             # <<<<<<<<<<<<<<
 *         self.thisptr.setShellConstants(shellConstants)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytesKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_shellConstants) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_shellConstants);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_shellConstants, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "python/cython/_fisx.pyx":1133
 * 
 *     def setShellConstants(self, shellConstants):
 *         if sys.version > "3.0":             # <<<<<<<<<<<<<<
 *             shellConstants = toBytesKeys(shellConstants)
 *         self.thisptr.setShellConstants(shellConstants)
 */
  }

  /* "python/cython/_fisx.pyx":1135
 *         if sys.version > "3.0":
 *             shellConstants = toBytesKeys(shellConstants)
 *         self.thisptr.setShellConstants(shellConstants)             # <<<<<<<<<<<<<<
 * 
 *     def getShellConstants(self):
 */
  __pyx_t_5 = __pyx_convert_map_from_py_std_3a__3a_string__and_double(__pyx_v_shellConstants); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1135, __pyx_L1_error)
  try {
    __pyx_v_self->thisptr->setShellConstants(__pyx_t_5);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1135, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":1132
 *         return self.thisptr.getDirectVacancyTransferRatios(toBytes(subshell))
 * 
 *     def setShellConstants(self, shellConstants):             # <<<<<<<<<<<<<<
 *         if sys.version > "3.0":
 *             shellConstants = toBytesKeys(shellConstants)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fisx._fisx.PyShell.setShellConstants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_shellConstants);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1137
 *         self.thisptr.setShellConstants(shellConstants)
 * 
 *     def getShellConstants(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getShellConstants()
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_23getShellConstants(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_23getShellConstants(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getShellConstants (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyShell_22getShellConstants(((struct __pyx_obj_4fisx_5_fisx_PyShell *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_22getShellConstants(struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getShellConstants", 0);

  /* "python/cython/_fisx.pyx":1138
 * 
 *     def getShellConstants(self):
 *         return self.thisptr.getShellConstants()             # <<<<<<<<<<<<<<
 * #/[inserted by cython to avoid comment start]*##########################################################################
 * #
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_v_self->thisptr->getShellConstants()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1137
 *         self.thisptr.setShellConstants(shellConstants)
 * 
 *     def getShellConstants(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getShellConstants()
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyShell.getShellConstants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyShell_24__reduce_cython__(((struct __pyx_obj_4fisx_5_fisx_PyShell *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyShell.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_7PyShell_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_7PyShell_26__setstate_cython__(((struct __pyx_obj_4fisx_5_fisx_PyShell *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_7PyShell_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyShell *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyShell.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1179
 *     cdef SimpleIni *thisptr
 * 
 *     def __cinit__(self, name):             # <<<<<<<<<<<<<<
 *         name = toBytes(name)
 *         self.thisptr = new SimpleIni(name)
 */

/* Python wrapper */
static int __pyx_pw_4fisx_5_fisx_11PySimpleIni_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4fisx_5_fisx_11PySimpleIni_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 1179, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1179, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PySimpleIni.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_11PySimpleIni___cinit__(((struct __pyx_obj_4fisx_5_fisx_PySimpleIni *)__pyx_v_self), __pyx_v_name);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4fisx_5_fisx_11PySimpleIni___cinit__(struct __pyx_obj_4fisx_5_fisx_PySimpleIni *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  fisx::SimpleIni *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_name);

  /* "python/cython/_fisx.pyx":1180
 * 
 *     def __cinit__(self, name):
 *         name = toBytes(name)             # <<<<<<<<<<<<<<
 *         self.thisptr = new SimpleIni(name)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":1181
 *     def __cinit__(self, name):
 *         name = toBytes(name)
 *         self.thisptr = new SimpleIni(name)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1181, __pyx_L1_error)
  try {
    __pyx_t_5 = new fisx::SimpleIni(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1181, __pyx_L1_error)
  }
  __pyx_v_self->thisptr = __pyx_t_5;

  /* "python/cython/_fisx.pyx":1179
 *     cdef SimpleIni *thisptr
 * 
 *     def __cinit__(self, name):             # <<<<<<<<<<<<<<
 *         name = toBytes(name)
 *         self.thisptr = new SimpleIni(name)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PySimpleIni.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1183
 *         self.thisptr = new SimpleIni(name)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_4fisx_5_fisx_11PySimpleIni_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4fisx_5_fisx_11PySimpleIni_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4fisx_5_fisx_11PySimpleIni_2__dealloc__(((struct __pyx_obj_4fisx_5_fisx_PySimpleIni *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4fisx_5_fisx_11PySimpleIni_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PySimpleIni *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "python/cython/_fisx.pyx":1184
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     def getKeys(self):
 */
  delete __pyx_v_self->thisptr;

  /* "python/cython/_fisx.pyx":1183
 *         self.thisptr = new SimpleIni(name)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "python/cython/_fisx.pyx":1186
 *         del self.thisptr
 * 
 *     def getKeys(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getSections()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_11PySimpleIni_5getKeys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_11PySimpleIni_5getKeys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getKeys (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_11PySimpleIni_4getKeys(((struct __pyx_obj_4fisx_5_fisx_PySimpleIni *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_11PySimpleIni_4getKeys(struct __pyx_obj_4fisx_5_fisx_PySimpleIni *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::vector<std::string>  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getKeys", 0);

  /* "python/cython/_fisx.pyx":1187
 * 
 *     def getKeys(self):
 *         return self.thisptr.getSections()             # <<<<<<<<<<<<<<
 * 
 *     def readKey(self, key):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getSections();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1187, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1186
 *         del self.thisptr
 * 
 *     def getKeys(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getSections()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PySimpleIni.getKeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1189
 *         return self.thisptr.getSections()
 * 
 *     def readKey(self, key):             # <<<<<<<<<<<<<<
 *         key = toBytes(key)
 *         return self.thisptr.readSection(key)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_11PySimpleIni_7readKey(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_11PySimpleIni_7readKey(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("readKey (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_11PySimpleIni_6readKey(((struct __pyx_obj_4fisx_5_fisx_PySimpleIni *)__pyx_v_self), ((PyObject *)__pyx_v_key));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_11PySimpleIni_6readKey(struct __pyx_obj_4fisx_5_fisx_PySimpleIni *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  std::map<std::string,std::string>  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("readKey", 0);
  __Pyx_INCREF(__pyx_v_key);

  /* "python/cython/_fisx.pyx":1190
 * 
 *     def readKey(self, key):
 *         key = toBytes(key)             # <<<<<<<<<<<<<<
 *         return self.thisptr.readSection(key)
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_key);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":1191
 *     def readKey(self, key):
 *         key = toBytes(key)
 *         return self.thisptr.readSection(key)             # <<<<<<<<<<<<<<
 * #/[inserted by cython to avoid comment start]*##########################################################################
 * #
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1191, __pyx_L1_error)
  try {
    __pyx_t_5 = __pyx_v_self->thisptr->readSection(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1191, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1189
 *         return self.thisptr.getSections()
 * 
 *     def readKey(self, key):             # <<<<<<<<<<<<<<
 *         key = toBytes(key)
 *         return self.thisptr.readSection(key)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PySimpleIni.readKey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_11PySimpleIni_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_11PySimpleIni_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_11PySimpleIni_8__reduce_cython__(((struct __pyx_obj_4fisx_5_fisx_PySimpleIni *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_11PySimpleIni_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PySimpleIni *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PySimpleIni.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_11PySimpleIni_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_11PySimpleIni_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_11PySimpleIni_10__setstate_cython__(((struct __pyx_obj_4fisx_5_fisx_PySimpleIni *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_11PySimpleIni_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PySimpleIni *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PySimpleIni.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1232
 *     cdef SimpleSpecfile *thisptr
 * 
 *     def __cinit__(self, name):             # <<<<<<<<<<<<<<
 *         name = toBytes(name)
 *         self.thisptr = new SimpleSpecfile(name)
 */

/* Python wrapper */
static int __pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 1232, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1232, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PySimpleSpecfile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_16PySimpleSpecfile___cinit__(((struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *)__pyx_v_self), __pyx_v_name);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4fisx_5_fisx_16PySimpleSpecfile___cinit__(struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  fisx::SimpleSpecfile *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_name);

  /* "python/cython/_fisx.pyx":1233
 * 
 *     def __cinit__(self, name):
 *         name = toBytes(name)             # <<<<<<<<<<<<<<
 *         self.thisptr = new SimpleSpecfile(name)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":1234
 *     def __cinit__(self, name):
 *         name = toBytes(name)
 *         self.thisptr = new SimpleSpecfile(name)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1234, __pyx_L1_error)
  try {
    __pyx_t_5 = new fisx::SimpleSpecfile(__pyx_t_4);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1234, __pyx_L1_error)
  }
  __pyx_v_self->thisptr = __pyx_t_5;

  /* "python/cython/_fisx.pyx":1232
 *     cdef SimpleSpecfile *thisptr
 * 
 *     def __cinit__(self, name):             # <<<<<<<<<<<<<<
 *         name = toBytes(name)
 *         self.thisptr = new SimpleSpecfile(name)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PySimpleSpecfile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1236
 *         self.thisptr = new SimpleSpecfile(name)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_2__dealloc__(((struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "python/cython/_fisx.pyx":1237
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     def getNumberOfScans(self):
 */
  delete __pyx_v_self->thisptr;

  /* "python/cython/_fisx.pyx":1236
 *         self.thisptr = new SimpleSpecfile(name)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "python/cython/_fisx.pyx":1239
 *         del self.thisptr
 * 
 *     def getNumberOfScans(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getNumberOfScans()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_5getNumberOfScans(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_5getNumberOfScans(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getNumberOfScans (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_4getNumberOfScans(((struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_4getNumberOfScans(struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getNumberOfScans", 0);

  /* "python/cython/_fisx.pyx":1240
 * 
 *     def getNumberOfScans(self):
 *         return self.thisptr.getNumberOfScans()             # <<<<<<<<<<<<<<
 * 
 *     #def getScanHeader(self, int scanIndex):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getNumberOfScans();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1240, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1239
 *         del self.thisptr
 * 
 *     def getNumberOfScans(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getNumberOfScans()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PySimpleSpecfile.getNumberOfScans", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1245
 *     #    return self.thisptr.getScanHeader(scanIndex)
 * 
 *     def getScanLabels(self, int scanIndex):             # <<<<<<<<<<<<<<
 *         if sys.version < '3':
 *             return self.thisptr.getScanLabels(scanIndex)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_7getScanLabels(PyObject *__pyx_v_self, PyObject *__pyx_arg_scanIndex); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_7getScanLabels(PyObject *__pyx_v_self, PyObject *__pyx_arg_scanIndex) {
  int __pyx_v_scanIndex;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getScanLabels (wrapper)", 0);
  assert(__pyx_arg_scanIndex); {
    __pyx_v_scanIndex = __Pyx_PyInt_As_int(__pyx_arg_scanIndex); if (unlikely((__pyx_v_scanIndex == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1245, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PySimpleSpecfile.getScanLabels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_6getScanLabels(((struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *)__pyx_v_self), ((int)__pyx_v_scanIndex));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_6getScanLabels(struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *__pyx_v_self, int __pyx_v_scanIndex) {
  std::vector<std::string>  __pyx_v_bytesLabels;
  std::string __pyx_v_x;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  std::vector<std::string>  __pyx_t_4;
  std::vector<std::string> ::iterator __pyx_t_5;
  std::string __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getScanLabels", 0);

  /* "python/cython/_fisx.pyx":1246
 * 
 *     def getScanLabels(self, int scanIndex):
 *         if sys.version < '3':             # <<<<<<<<<<<<<<
 *             return self.thisptr.getScanLabels(scanIndex)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":1247
 *     def getScanLabels(self, int scanIndex):
 *         if sys.version < '3':
 *             return self.thisptr.getScanLabels(scanIndex)             # <<<<<<<<<<<<<<
 *         else:
 *             bytesLabels = self.thisptr.getScanLabels(scanIndex)
 */
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_4 = __pyx_v_self->thisptr->getScanLabels(__pyx_v_scanIndex);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 1247, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":1246
 * 
 *     def getScanLabels(self, int scanIndex):
 *         if sys.version < '3':             # <<<<<<<<<<<<<<
 *             return self.thisptr.getScanLabels(scanIndex)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":1249
 *             return self.thisptr.getScanLabels(scanIndex)
 *         else:
 *             bytesLabels = self.thisptr.getScanLabels(scanIndex)             # <<<<<<<<<<<<<<
 *             return [toString(x) for x in bytesLabels]
 * 
 */
  /*else*/ {
    try {
      __pyx_t_4 = __pyx_v_self->thisptr->getScanLabels(__pyx_v_scanIndex);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 1249, __pyx_L1_error)
    }
    __pyx_v_bytesLabels = __pyx_t_4;

    /* "python/cython/_fisx.pyx":1250
 *         else:
 *             bytesLabels = self.thisptr.getScanLabels(scanIndex)
 *             return [toString(x) for x in bytesLabels]             # <<<<<<<<<<<<<<
 * 
 *     def getScanData(self, int scanIndex):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_v_bytesLabels.begin();
    for (;;) {
      if (!(__pyx_t_5 != __pyx_v_bytesLabels.end())) break;
      __pyx_t_6 = *__pyx_t_5;
      ++__pyx_t_5;
      __pyx_v_x = __pyx_t_6;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toString); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 1250, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":1245
 *     #    return self.thisptr.getScanHeader(scanIndex)
 * 
 *     def getScanLabels(self, int scanIndex):             # <<<<<<<<<<<<<<
 *         if sys.version < '3':
 *             return self.thisptr.getScanLabels(scanIndex)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("fisx._fisx.PySimpleSpecfile.getScanLabels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1252
 *             return [toString(x) for x in bytesLabels]
 * 
 *     def getScanData(self, int scanIndex):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getScanData(scanIndex)
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_9getScanData(PyObject *__pyx_v_self, PyObject *__pyx_arg_scanIndex); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_9getScanData(PyObject *__pyx_v_self, PyObject *__pyx_arg_scanIndex) {
  int __pyx_v_scanIndex;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getScanData (wrapper)", 0);
  assert(__pyx_arg_scanIndex); {
    __pyx_v_scanIndex = __Pyx_PyInt_As_int(__pyx_arg_scanIndex); if (unlikely((__pyx_v_scanIndex == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1252, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PySimpleSpecfile.getScanData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_8getScanData(((struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *)__pyx_v_self), ((int)__pyx_v_scanIndex));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_8getScanData(struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *__pyx_v_self, int __pyx_v_scanIndex) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::vector<std::vector<double> >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getScanData", 0);

  /* "python/cython/_fisx.pyx":1253
 * 
 *     def getScanData(self, int scanIndex):
 *         return self.thisptr.getScanData(scanIndex)             # <<<<<<<<<<<<<<
 * #/[inserted by cython to avoid comment start]*##########################################################################
 * #
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getScanData(__pyx_v_scanIndex);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1253, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1252
 *             return [toString(x) for x in bytesLabels]
 * 
 *     def getScanData(self, int scanIndex):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getScanData(scanIndex)
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PySimpleSpecfile.getScanData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_10__reduce_cython__(((struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PySimpleSpecfile.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_12__setstate_cython__(((struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_16PySimpleSpecfile_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PySimpleSpecfile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1294
 *     cdef TransmissionTable *thisptr
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.thisptr = new TransmissionTable()
 * 
 */

/* Python wrapper */
static int __pyx_pw_4fisx_5_fisx_19PyTransmissionTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4fisx_5_fisx_19PyTransmissionTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_4fisx_5_fisx_19PyTransmissionTable___cinit__(((struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4fisx_5_fisx_19PyTransmissionTable___cinit__(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "python/cython/_fisx.pyx":1295
 * 
 *     def __cinit__(self):
 *         self.thisptr = new TransmissionTable()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->thisptr = new fisx::TransmissionTable();

  /* "python/cython/_fisx.pyx":1294
 *     cdef TransmissionTable *thisptr
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.thisptr = new TransmissionTable()
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1297
 *         self.thisptr = new TransmissionTable()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_4fisx_5_fisx_19PyTransmissionTable_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4fisx_5_fisx_19PyTransmissionTable_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4fisx_5_fisx_19PyTransmissionTable_2__dealloc__(((struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4fisx_5_fisx_19PyTransmissionTable_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "python/cython/_fisx.pyx":1298
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     def getName(self):
 */
  delete __pyx_v_self->thisptr;

  /* "python/cython/_fisx.pyx":1297
 *         self.thisptr = new TransmissionTable()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "python/cython/_fisx.pyx":1300
 *         del self.thisptr
 * 
 *     def getName(self):             # <<<<<<<<<<<<<<
 *         return toString(self.thisptr.getName())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_5getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_5getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getName (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_19PyTransmissionTable_4getName(((struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_4getName(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getName", 0);

  /* "python/cython/_fisx.pyx":1301
 * 
 *     def getName(self):
 *         return toString(self.thisptr.getName())             # <<<<<<<<<<<<<<
 * 
 *     def setName(self, name):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toString); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->thisptr->getName()); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1300
 *         del self.thisptr
 * 
 *     def getName(self):             # <<<<<<<<<<<<<<
 *         return toString(self.thisptr.getName())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable.getName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1303
 *         return toString(self.thisptr.getName())
 * 
 *     def setName(self, name):             # <<<<<<<<<<<<<<
 *         name = toBytes(name)
 *         self.thisptr.setName(name)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_7setName(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_7setName(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setName (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_19PyTransmissionTable_6setName(((struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *)__pyx_v_self), ((PyObject *)__pyx_v_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_6setName(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setName", 0);
  __Pyx_INCREF(__pyx_v_name);

  /* "python/cython/_fisx.pyx":1304
 * 
 *     def setName(self, name):
 *         name = toBytes(name)             # <<<<<<<<<<<<<<
 *         self.thisptr.setName(name)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":1305
 *     def setName(self, name):
 *         name = toBytes(name)
 *         self.thisptr.setName(name)             # <<<<<<<<<<<<<<
 * 
 *     def getComment(self):
 */
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1305, __pyx_L1_error)
  __pyx_v_self->thisptr->setName(__pyx_t_4);

  /* "python/cython/_fisx.pyx":1303
 *         return toString(self.thisptr.getName())
 * 
 *     def setName(self, name):             # <<<<<<<<<<<<<<
 *         name = toBytes(name)
 *         self.thisptr.setName(name)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable.setName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1307
 *         self.thisptr.setName(name)
 * 
 *     def getComment(self):             # <<<<<<<<<<<<<<
 *         return toString(self.thisptr.getComment())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_9getComment(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_9getComment(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getComment (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_19PyTransmissionTable_8getComment(((struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_8getComment(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getComment", 0);

  /* "python/cython/_fisx.pyx":1308
 * 
 *     def getComment(self):
 *         return toString(self.thisptr.getComment())             # <<<<<<<<<<<<<<
 * 
 *     def setComment(self, comment):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toString); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->thisptr->getComment()); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1307
 *         self.thisptr.setName(name)
 * 
 *     def getComment(self):             # <<<<<<<<<<<<<<
 *         return toString(self.thisptr.getComment())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable.getComment", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1310
 *         return toString(self.thisptr.getComment())
 * 
 *     def setComment(self, comment):             # <<<<<<<<<<<<<<
 *         comment = toBytes(comment)
 *         self.thisptr.setComment(comment)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_11setComment(PyObject *__pyx_v_self, PyObject *__pyx_v_comment); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_11setComment(PyObject *__pyx_v_self, PyObject *__pyx_v_comment) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setComment (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_19PyTransmissionTable_10setComment(((struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *)__pyx_v_self), ((PyObject *)__pyx_v_comment));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_10setComment(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, PyObject *__pyx_v_comment) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setComment", 0);
  __Pyx_INCREF(__pyx_v_comment);

  /* "python/cython/_fisx.pyx":1311
 * 
 *     def setComment(self, comment):
 *         comment = toBytes(comment)             # <<<<<<<<<<<<<<
 *         self.thisptr.setComment(comment)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_comment) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_comment);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_comment, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":1312
 *     def setComment(self, comment):
 *         comment = toBytes(comment)
 *         self.thisptr.setComment(comment)             # <<<<<<<<<<<<<<
 * 
 *     def setTransmissionTableFromLists(self,
 */
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_comment); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1312, __pyx_L1_error)
  __pyx_v_self->thisptr->setComment(__pyx_t_4);

  /* "python/cython/_fisx.pyx":1310
 *         return toString(self.thisptr.getComment())
 * 
 *     def setComment(self, comment):             # <<<<<<<<<<<<<<
 *         comment = toBytes(comment)
 *         self.thisptr.setComment(comment)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable.setComment", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_comment);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1314
 *         self.thisptr.setComment(comment)
 * 
 *     def setTransmissionTableFromLists(self,             # <<<<<<<<<<<<<<
 *                              std_vector[double] energy, \
 *                              std_vector[double] transmission, \
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_13setTransmissionTableFromLists(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_13setTransmissionTableFromLists(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  std::vector<double>  __pyx_v_energy;
  std::vector<double>  __pyx_v_transmission;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_comment = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTransmissionTableFromLists (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_energy,&__pyx_n_s_transmission,&__pyx_n_s_name,&__pyx_n_s_comment,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)__pyx_kp_s_);
    values[3] = ((PyObject *)__pyx_kp_s_);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transmission)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setTransmissionTableFromLists", 0, 2, 4, 1); __PYX_ERR(1, 1314, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comment);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTransmissionTableFromLists") < 0)) __PYX_ERR(1, 1314, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_energy = __pyx_convert_vector_from_py_double(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1315, __pyx_L3_error)
    __pyx_v_transmission = __pyx_convert_vector_from_py_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1316, __pyx_L3_error)
    __pyx_v_name = values[2];
    __pyx_v_comment = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setTransmissionTableFromLists", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1314, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable.setTransmissionTableFromLists", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_19PyTransmissionTable_12setTransmissionTableFromLists(((struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *)__pyx_v_self), __pyx_v_energy, __pyx_v_transmission, __pyx_v_name, __pyx_v_comment);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_12setTransmissionTableFromLists(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, std::vector<double>  __pyx_v_energy, std::vector<double>  __pyx_v_transmission, PyObject *__pyx_v_name, PyObject *__pyx_v_comment) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setTransmissionTableFromLists", 0);
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_INCREF(__pyx_v_comment);

  /* "python/cython/_fisx.pyx":1319
 *                              name="",
 *                              comment=""):
 *         name = toBytes(name)             # <<<<<<<<<<<<<<
 *         comment = toBytes(comment)
 *         self.thisptr.setTransmissionTable(energy,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":1320
 *                              comment=""):
 *         name = toBytes(name)
 *         comment = toBytes(comment)             # <<<<<<<<<<<<<<
 *         self.thisptr.setTransmissionTable(energy,
 *                                           transmission, \
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_comment) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_comment);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_comment, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":1323
 *         self.thisptr.setTransmissionTable(energy,
 *                                           transmission, \
 *                                           name,             # <<<<<<<<<<<<<<
 *                                           comment)
 * 
 */
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1323, __pyx_L1_error)

  /* "python/cython/_fisx.pyx":1324
 *                                           transmission, \
 *                                           name,
 *                                           comment)             # <<<<<<<<<<<<<<
 * 
 *     def setTransmissionTable(self,
 */
  __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_comment); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1324, __pyx_L1_error)

  /* "python/cython/_fisx.pyx":1321
 *         name = toBytes(name)
 *         comment = toBytes(comment)
 *         self.thisptr.setTransmissionTable(energy,             # <<<<<<<<<<<<<<
 *                                           transmission, \
 *                                           name,
 */
  try {
    __pyx_v_self->thisptr->setTransmissionTable(__pyx_v_energy, __pyx_v_transmission, __pyx_t_4, __pyx_t_5);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1321, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":1314
 *         self.thisptr.setComment(comment)
 * 
 *     def setTransmissionTableFromLists(self,             # <<<<<<<<<<<<<<
 *                              std_vector[double] energy, \
 *                              std_vector[double] transmission, \
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable.setTransmissionTableFromLists", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_comment);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1326
 *                                           comment)
 * 
 *     def setTransmissionTable(self,             # <<<<<<<<<<<<<<
 *                              std_map[double, double] transmissionTable, \
 *                              name="",
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_15setTransmissionTable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_15setTransmissionTable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  std::map<double,double>  __pyx_v_transmissionTable;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_comment = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTransmissionTable (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_transmissionTable,&__pyx_n_s_name,&__pyx_n_s_comment,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)__pyx_kp_s_);
    values[2] = ((PyObject *)__pyx_kp_s_);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transmissionTable)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comment);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTransmissionTable") < 0)) __PYX_ERR(1, 1326, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_transmissionTable = __pyx_convert_map_from_py_double__and_double(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1327, __pyx_L3_error)
    __pyx_v_name = values[1];
    __pyx_v_comment = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setTransmissionTable", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1326, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable.setTransmissionTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_19PyTransmissionTable_14setTransmissionTable(((struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *)__pyx_v_self), __pyx_v_transmissionTable, __pyx_v_name, __pyx_v_comment);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_14setTransmissionTable(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, std::map<double,double>  __pyx_v_transmissionTable, PyObject *__pyx_v_name, PyObject *__pyx_v_comment) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setTransmissionTable", 0);
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_INCREF(__pyx_v_comment);

  /* "python/cython/_fisx.pyx":1330
 *                              name="",
 *                              comment=""):
 *         name = toBytes(name)             # <<<<<<<<<<<<<<
 *         comment = toBytes(comment)
 *         self.thisptr.setTransmissionTable(transmissionTable,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":1331
 *                              comment=""):
 *         name = toBytes(name)
 *         comment = toBytes(comment)             # <<<<<<<<<<<<<<
 *         self.thisptr.setTransmissionTable(transmissionTable,
 *                                           name,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_comment) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_comment);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_comment, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":1333
 *         comment = toBytes(comment)
 *         self.thisptr.setTransmissionTable(transmissionTable,
 *                                           name,             # <<<<<<<<<<<<<<
 *                                           comment)
 * 
 */
  __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1333, __pyx_L1_error)

  /* "python/cython/_fisx.pyx":1334
 *         self.thisptr.setTransmissionTable(transmissionTable,
 *                                           name,
 *                                           comment)             # <<<<<<<<<<<<<<
 * 
 *     def getTransmissionTable(self):
 */
  __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_comment); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1334, __pyx_L1_error)

  /* "python/cython/_fisx.pyx":1332
 *         name = toBytes(name)
 *         comment = toBytes(comment)
 *         self.thisptr.setTransmissionTable(transmissionTable,             # <<<<<<<<<<<<<<
 *                                           name,
 *                                           comment)
 */
  try {
    __pyx_v_self->thisptr->setTransmissionTable(__pyx_v_transmissionTable, __pyx_t_4, __pyx_t_5);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1332, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":1326
 *                                           comment)
 * 
 *     def setTransmissionTable(self,             # <<<<<<<<<<<<<<
 *                              std_map[double, double] transmissionTable, \
 *                              name="",
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable.setTransmissionTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_comment);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1336
 *                                           comment)
 * 
 *     def getTransmissionTable(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getTransmissionTable()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_17getTransmissionTable(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_17getTransmissionTable(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTransmissionTable (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_19PyTransmissionTable_16getTransmissionTable(((struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_16getTransmissionTable(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getTransmissionTable", 0);

  /* "python/cython/_fisx.pyx":1337
 * 
 *     def getTransmissionTable(self):
 *         return self.thisptr.getTransmissionTable()             # <<<<<<<<<<<<<<
 * 
 *     def getTransmission(self, energy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert_map_to_py_double____double(__pyx_v_self->thisptr->getTransmissionTable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1336
 *                                           comment)
 * 
 *     def getTransmissionTable(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getTransmissionTable()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable.getTransmissionTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1339
 *         return self.thisptr.getTransmissionTable()
 * 
 *     def getTransmission(self, energy):             # <<<<<<<<<<<<<<
 *         if hasattr(energy, "__len__"):
 *             return self._getTransmissionMultiple(energy)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_19getTransmission(PyObject *__pyx_v_self, PyObject *__pyx_v_energy); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_19getTransmission(PyObject *__pyx_v_self, PyObject *__pyx_v_energy) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTransmission (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_19PyTransmissionTable_18getTransmission(((struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *)__pyx_v_self), ((PyObject *)__pyx_v_energy));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_18getTransmission(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, PyObject *__pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getTransmission", 0);

  /* "python/cython/_fisx.pyx":1340
 * 
 *     def getTransmission(self, energy):
 *         if hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             return self._getTransmissionMultiple(energy)
 *         else:
 */
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_energy, __pyx_n_s_len); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 1340, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":1341
 *     def getTransmission(self, energy):
 *         if hasattr(energy, "__len__"):
 *             return self._getTransmissionMultiple(energy)             # <<<<<<<<<<<<<<
 *         else:
 *             return self._getTransmissionSingle(energy)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTransmissionMultiple); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_energy) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_energy);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":1340
 * 
 *     def getTransmission(self, energy):
 *         if hasattr(energy, "__len__"):             # <<<<<<<<<<<<<<
 *             return self._getTransmissionMultiple(energy)
 *         else:
 */
  }

  /* "python/cython/_fisx.pyx":1343
 *             return self._getTransmissionMultiple(energy)
 *         else:
 *             return self._getTransmissionSingle(energy)             # <<<<<<<<<<<<<<
 * 
 *     def _getTransmissionSingle(self, double energy):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTransmissionSingle); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_energy) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_energy);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":1339
 *         return self.thisptr.getTransmissionTable()
 * 
 *     def getTransmission(self, energy):             # <<<<<<<<<<<<<<
 *         if hasattr(energy, "__len__"):
 *             return self._getTransmissionMultiple(energy)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable.getTransmission", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1345
 *             return self._getTransmissionSingle(energy)
 * 
 *     def _getTransmissionSingle(self, double energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getTransmission(energy)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_21_getTransmissionSingle(PyObject *__pyx_v_self, PyObject *__pyx_arg_energy); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_21_getTransmissionSingle(PyObject *__pyx_v_self, PyObject *__pyx_arg_energy) {
  double __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getTransmissionSingle (wrapper)", 0);
  assert(__pyx_arg_energy); {
    __pyx_v_energy = __pyx_PyFloat_AsDouble(__pyx_arg_energy); if (unlikely((__pyx_v_energy == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1345, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable._getTransmissionSingle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_19PyTransmissionTable_20_getTransmissionSingle(((struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *)__pyx_v_self), ((double)__pyx_v_energy));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_20_getTransmissionSingle(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, double __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getTransmissionSingle", 0);

  /* "python/cython/_fisx.pyx":1346
 * 
 *     def _getTransmissionSingle(self, double energy):
 *         return self.thisptr.getTransmission(energy)             # <<<<<<<<<<<<<<
 * 
 *     def _getTransmissionMultiple(self, std_vector[double] energy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->thisptr->getTransmission(__pyx_v_energy)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1345
 *             return self._getTransmissionSingle(energy)
 * 
 *     def _getTransmissionSingle(self, double energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getTransmission(energy)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable._getTransmissionSingle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1348
 *         return self.thisptr.getTransmission(energy)
 * 
 *     def _getTransmissionMultiple(self, std_vector[double] energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getTransmission(energy)
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_23_getTransmissionMultiple(PyObject *__pyx_v_self, PyObject *__pyx_arg_energy); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_23_getTransmissionMultiple(PyObject *__pyx_v_self, PyObject *__pyx_arg_energy) {
  std::vector<double>  __pyx_v_energy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getTransmissionMultiple (wrapper)", 0);
  assert(__pyx_arg_energy); {
    __pyx_v_energy = __pyx_convert_vector_from_py_double(__pyx_arg_energy); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1348, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable._getTransmissionMultiple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_19PyTransmissionTable_22_getTransmissionMultiple(((struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *)__pyx_v_self), ((std::vector<double> )__pyx_v_energy));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_22_getTransmissionMultiple(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, std::vector<double>  __pyx_v_energy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getTransmissionMultiple", 0);

  /* "python/cython/_fisx.pyx":1349
 * 
 *     def _getTransmissionMultiple(self, std_vector[double] energy):
 *         return self.thisptr.getTransmission(energy)             # <<<<<<<<<<<<<<
 * #/[inserted by cython to avoid comment start]*##########################################################################
 * #
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert_vector_to_py_double(__pyx_v_self->thisptr->getTransmission(__pyx_v_energy)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1348
 *         return self.thisptr.getTransmission(energy)
 * 
 *     def _getTransmissionMultiple(self, std_vector[double] energy):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getTransmission(energy)
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable._getTransmissionMultiple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_19PyTransmissionTable_24__reduce_cython__(((struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_19PyTransmissionTable_26__setstate_cython__(((struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_19PyTransmissionTable_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyTransmissionTable.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1383
 * from Version cimport fisxVersion as _fisxVersion
 * 
 * def fisxVersion():             # <<<<<<<<<<<<<<
 *     return toString(_fisxVersion())
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_1fisxVersion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_4fisx_5_fisx_1fisxVersion = {"fisxVersion", (PyCFunction)__pyx_pw_4fisx_5_fisx_1fisxVersion, METH_NOARGS, 0};
static PyObject *__pyx_pw_4fisx_5_fisx_1fisxVersion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fisxVersion (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_fisxVersion(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_fisxVersion(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fisxVersion", 0);

  /* "python/cython/_fisx.pyx":1384
 * 
 * def fisxVersion():
 *     return toString(_fisxVersion())             # <<<<<<<<<<<<<<
 * #/[inserted by cython to avoid comment start]*##########################################################################
 * #
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toString); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(fisx::fisxVersion()); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1383
 * from Version cimport fisxVersion as _fisxVersion
 * 
 * def fisxVersion():             # <<<<<<<<<<<<<<
 *     return toString(_fisxVersion())
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fisx._fisx.fisxVersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1428
 *     cdef XRF *thisptr
 * 
 *     def __cinit__(self, std_string configurationFile=""):             # <<<<<<<<<<<<<<
 *         if len(configurationFile):
 *             self.thisptr = new XRF(configurationFile)
 */

/* Python wrapper */
static int __pyx_pw_4fisx_5_fisx_5PyXRF_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4fisx_5_fisx_5PyXRF_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  std::string __pyx_v_configurationFile;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_configurationFile,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_configurationFile);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 1428, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_configurationFile = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1428, __pyx_L3_error)
    } else {
      __pyx_v_configurationFile = __pyx_k__26;
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1428, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF___cinit__(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), __pyx_v_configurationFile);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4fisx_5_fisx_5PyXRF___cinit__(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, std::string __pyx_v_configurationFile) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  fisx::XRF *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "python/cython/_fisx.pyx":1429
 * 
 *     def __cinit__(self, std_string configurationFile=""):
 *         if len(configurationFile):             # <<<<<<<<<<<<<<
 *             self.thisptr = new XRF(configurationFile)
 *         else:
 */
  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_configurationFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":1430
 *     def __cinit__(self, std_string configurationFile=""):
 *         if len(configurationFile):
 *             self.thisptr = new XRF(configurationFile)             # <<<<<<<<<<<<<<
 *         else:
 *             self.thisptr = new XRF()
 */
    try {
      __pyx_t_4 = new fisx::XRF(__pyx_v_configurationFile);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 1430, __pyx_L1_error)
    }
    __pyx_v_self->thisptr = __pyx_t_4;

    /* "python/cython/_fisx.pyx":1429
 * 
 *     def __cinit__(self, std_string configurationFile=""):
 *         if len(configurationFile):             # <<<<<<<<<<<<<<
 *             self.thisptr = new XRF(configurationFile)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "python/cython/_fisx.pyx":1432
 *             self.thisptr = new XRF(configurationFile)
 *         else:
 *             self.thisptr = new XRF()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  /*else*/ {
    try {
      __pyx_t_4 = new fisx::XRF();
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 1432, __pyx_L1_error)
    }
    __pyx_v_self->thisptr = __pyx_t_4;
  }
  __pyx_L3:;

  /* "python/cython/_fisx.pyx":1428
 *     cdef XRF *thisptr
 * 
 *     def __cinit__(self, std_string configurationFile=""):             # <<<<<<<<<<<<<<
 *         if len(configurationFile):
 *             self.thisptr = new XRF(configurationFile)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyXRF.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1434
 *             self.thisptr = new XRF()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_4fisx_5_fisx_5PyXRF_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4fisx_5_fisx_5PyXRF_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4fisx_5_fisx_5PyXRF_2__dealloc__(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4fisx_5_fisx_5PyXRF_2__dealloc__(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "python/cython/_fisx.pyx":1435
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     def readConfigurationFromFile(self, std_string fileName):
 */
  delete __pyx_v_self->thisptr;

  /* "python/cython/_fisx.pyx":1434
 *             self.thisptr = new XRF()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "python/cython/_fisx.pyx":1437
 *         del self.thisptr
 * 
 *     def readConfigurationFromFile(self, std_string fileName):             # <<<<<<<<<<<<<<
 *         self.thisptr.readConfigurationFromFile(fileName)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_5readConfigurationFromFile(PyObject *__pyx_v_self, PyObject *__pyx_arg_fileName); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_5readConfigurationFromFile(PyObject *__pyx_v_self, PyObject *__pyx_arg_fileName) {
  std::string __pyx_v_fileName;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("readConfigurationFromFile (wrapper)", 0);
  assert(__pyx_arg_fileName); {
    __pyx_v_fileName = __pyx_convert_string_from_py_std__in_string(__pyx_arg_fileName); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1437, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF.readConfigurationFromFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_4readConfigurationFromFile(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), ((std::string)__pyx_v_fileName));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_4readConfigurationFromFile(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, std::string __pyx_v_fileName) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("readConfigurationFromFile", 0);

  /* "python/cython/_fisx.pyx":1438
 * 
 *     def readConfigurationFromFile(self, std_string fileName):
 *         self.thisptr.readConfigurationFromFile(fileName)             # <<<<<<<<<<<<<<
 * 
 *     def setBeam(self, energies, weights=None, characteristic=None, divergency=None):
 */
  try {
    __pyx_v_self->thisptr->readConfigurationFromFile(__pyx_v_fileName);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1438, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":1437
 *         del self.thisptr
 * 
 *     def readConfigurationFromFile(self, std_string fileName):             # <<<<<<<<<<<<<<
 *         self.thisptr.readConfigurationFromFile(fileName)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF.readConfigurationFromFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1440
 *         self.thisptr.readConfigurationFromFile(fileName)
 * 
 *     def setBeam(self, energies, weights=None, characteristic=None, divergency=None):             # <<<<<<<<<<<<<<
 *         if not hasattr(energies, "__len__"):
 *             if divergency is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_7setBeam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_7setBeam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_energies = 0;
  PyObject *__pyx_v_weights = 0;
  PyObject *__pyx_v_characteristic = 0;
  PyObject *__pyx_v_divergency = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setBeam (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_energies,&__pyx_n_s_weights,&__pyx_n_s_characteristic,&__pyx_n_s_divergency,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energies)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_characteristic);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_divergency);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBeam") < 0)) __PYX_ERR(1, 1440, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_energies = values[0];
    __pyx_v_weights = values[1];
    __pyx_v_characteristic = values[2];
    __pyx_v_divergency = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setBeam", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1440, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF.setBeam", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_6setBeam(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), __pyx_v_energies, __pyx_v_weights, __pyx_v_characteristic, __pyx_v_divergency);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_6setBeam(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_energies, PyObject *__pyx_v_weights, PyObject *__pyx_v_characteristic, PyObject *__pyx_v_divergency) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setBeam", 0);
  __Pyx_INCREF(__pyx_v_weights);
  __Pyx_INCREF(__pyx_v_characteristic);
  __Pyx_INCREF(__pyx_v_divergency);

  /* "python/cython/_fisx.pyx":1441
 * 
 *     def setBeam(self, energies, weights=None, characteristic=None, divergency=None):
 *         if not hasattr(energies, "__len__"):             # <<<<<<<<<<<<<<
 *             if divergency is None:
 *                 divergency = 0.0
 */
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_energies, __pyx_n_s_len); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 1441, __pyx_L1_error)
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":1442
 *     def setBeam(self, energies, weights=None, characteristic=None, divergency=None):
 *         if not hasattr(energies, "__len__"):
 *             if divergency is None:             # <<<<<<<<<<<<<<
 *                 divergency = 0.0
 *             self._setSingleEnergyBeam(energies, divergency)
 */
    __pyx_t_2 = (__pyx_v_divergency == Py_None);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "python/cython/_fisx.pyx":1443
 *         if not hasattr(energies, "__len__"):
 *             if divergency is None:
 *                 divergency = 0.0             # <<<<<<<<<<<<<<
 *             self._setSingleEnergyBeam(energies, divergency)
 *         else:
 */
      __Pyx_INCREF(__pyx_float_0_0);
      __Pyx_DECREF_SET(__pyx_v_divergency, __pyx_float_0_0);

      /* "python/cython/_fisx.pyx":1442
 *     def setBeam(self, energies, weights=None, characteristic=None, divergency=None):
 *         if not hasattr(energies, "__len__"):
 *             if divergency is None:             # <<<<<<<<<<<<<<
 *                 divergency = 0.0
 *             self._setSingleEnergyBeam(energies, divergency)
 */
    }

    /* "python/cython/_fisx.pyx":1444
 *             if divergency is None:
 *                 divergency = 0.0
 *             self._setSingleEnergyBeam(energies, divergency)             # <<<<<<<<<<<<<<
 *         else:
 *             if weights is None:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setSingleEnergyBeam); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_energies, __pyx_v_divergency};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1444, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_energies, __pyx_v_divergency};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1444, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1444, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_energies);
      __Pyx_GIVEREF(__pyx_v_energies);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_energies);
      __Pyx_INCREF(__pyx_v_divergency);
      __Pyx_GIVEREF(__pyx_v_divergency);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_divergency);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1444, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "python/cython/_fisx.pyx":1441
 * 
 *     def setBeam(self, energies, weights=None, characteristic=None, divergency=None):
 *         if not hasattr(energies, "__len__"):             # <<<<<<<<<<<<<<
 *             if divergency is None:
 *                 divergency = 0.0
 */
    goto __pyx_L3;
  }

  /* "python/cython/_fisx.pyx":1446
 *             self._setSingleEnergyBeam(energies, divergency)
 *         else:
 *             if weights is None:             # <<<<<<<<<<<<<<
 *                 weights = [1.0] * len(energies)
 *             elif not hasattr(weights, "__len__"):
 */
  /*else*/ {
    __pyx_t_1 = (__pyx_v_weights == Py_None);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "python/cython/_fisx.pyx":1447
 *         else:
 *             if weights is None:
 *                 weights = [1.0] * len(energies)             # <<<<<<<<<<<<<<
 *             elif not hasattr(weights, "__len__"):
 *                 weights = [weights]
 */
      __pyx_t_8 = PyObject_Length(__pyx_v_energies); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1447, __pyx_L1_error)
      __pyx_t_3 = PyList_New(1 * ((__pyx_t_8<0) ? 0:__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      { Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < __pyx_t_8; __pyx_temp++) {
          __Pyx_INCREF(__pyx_float_1_0);
          __Pyx_GIVEREF(__pyx_float_1_0);
          PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_float_1_0);
        }
      }
      __Pyx_DECREF_SET(__pyx_v_weights, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "python/cython/_fisx.pyx":1446
 *             self._setSingleEnergyBeam(energies, divergency)
 *         else:
 *             if weights is None:             # <<<<<<<<<<<<<<
 *                 weights = [1.0] * len(energies)
 *             elif not hasattr(weights, "__len__"):
 */
      goto __pyx_L5;
    }

    /* "python/cython/_fisx.pyx":1448
 *             if weights is None:
 *                 weights = [1.0] * len(energies)
 *             elif not hasattr(weights, "__len__"):             # <<<<<<<<<<<<<<
 *                 weights = [weights]
 *             if characteristic is None:
 */
    __pyx_t_2 = __Pyx_HasAttr(__pyx_v_weights, __pyx_n_s_len); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 1448, __pyx_L1_error)
    __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
    if (__pyx_t_1) {

      /* "python/cython/_fisx.pyx":1449
 *                 weights = [1.0] * len(energies)
 *             elif not hasattr(weights, "__len__"):
 *                 weights = [weights]             # <<<<<<<<<<<<<<
 *             if characteristic is None:
 *                 characteristic = [1] * len(energies)
 */
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1449, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_weights);
      __Pyx_GIVEREF(__pyx_v_weights);
      PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_weights);
      __Pyx_DECREF_SET(__pyx_v_weights, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "python/cython/_fisx.pyx":1448
 *             if weights is None:
 *                 weights = [1.0] * len(energies)
 *             elif not hasattr(weights, "__len__"):             # <<<<<<<<<<<<<<
 *                 weights = [weights]
 *             if characteristic is None:
 */
    }
    __pyx_L5:;

    /* "python/cython/_fisx.pyx":1450
 *             elif not hasattr(weights, "__len__"):
 *                 weights = [weights]
 *             if characteristic is None:             # <<<<<<<<<<<<<<
 *                 characteristic = [1] * len(energies)
 *             if divergency is None:
 */
    __pyx_t_1 = (__pyx_v_characteristic == Py_None);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "python/cython/_fisx.pyx":1451
 *                 weights = [weights]
 *             if characteristic is None:
 *                 characteristic = [1] * len(energies)             # <<<<<<<<<<<<<<
 *             if divergency is None:
 *                 divergency = [0.0] * len(energies)
 */
      __pyx_t_8 = PyObject_Length(__pyx_v_energies); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1451, __pyx_L1_error)
      __pyx_t_3 = PyList_New(1 * ((__pyx_t_8<0) ? 0:__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1451, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      { Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < __pyx_t_8; __pyx_temp++) {
          __Pyx_INCREF(__pyx_int_1);
          __Pyx_GIVEREF(__pyx_int_1);
          PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_int_1);
        }
      }
      __Pyx_DECREF_SET(__pyx_v_characteristic, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "python/cython/_fisx.pyx":1450
 *             elif not hasattr(weights, "__len__"):
 *                 weights = [weights]
 *             if characteristic is None:             # <<<<<<<<<<<<<<
 *                 characteristic = [1] * len(energies)
 *             if divergency is None:
 */
    }

    /* "python/cython/_fisx.pyx":1452
 *             if characteristic is None:
 *                 characteristic = [1] * len(energies)
 *             if divergency is None:             # <<<<<<<<<<<<<<
 *                 divergency = [0.0] * len(energies)
 * 
 */
    __pyx_t_2 = (__pyx_v_divergency == Py_None);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "python/cython/_fisx.pyx":1453
 *                 characteristic = [1] * len(energies)
 *             if divergency is None:
 *                 divergency = [0.0] * len(energies)             # <<<<<<<<<<<<<<
 * 
 *             self._setBeam(energies, weights, characteristic, divergency)
 */
      __pyx_t_8 = PyObject_Length(__pyx_v_energies); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1453, __pyx_L1_error)
      __pyx_t_3 = PyList_New(1 * ((__pyx_t_8<0) ? 0:__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1453, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      { Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < __pyx_t_8; __pyx_temp++) {
          __Pyx_INCREF(__pyx_float_0_0);
          __Pyx_GIVEREF(__pyx_float_0_0);
          PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_float_0_0);
        }
      }
      __Pyx_DECREF_SET(__pyx_v_divergency, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "python/cython/_fisx.pyx":1452
 *             if characteristic is None:
 *                 characteristic = [1] * len(energies)
 *             if divergency is None:             # <<<<<<<<<<<<<<
 *                 divergency = [0.0] * len(energies)
 * 
 */
    }

    /* "python/cython/_fisx.pyx":1455
 *                 divergency = [0.0] * len(energies)
 * 
 *             self._setBeam(energies, weights, characteristic, divergency)             # <<<<<<<<<<<<<<
 * 
 *     def _setSingleEnergyBeam(self, double energy, double divergency):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setBeam); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_energies, __pyx_v_weights, __pyx_v_characteristic, __pyx_v_divergency};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1455, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_energies, __pyx_v_weights, __pyx_v_characteristic, __pyx_v_divergency};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1455, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1455, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_energies);
      __Pyx_GIVEREF(__pyx_v_energies);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_energies);
      __Pyx_INCREF(__pyx_v_weights);
      __Pyx_GIVEREF(__pyx_v_weights);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_weights);
      __Pyx_INCREF(__pyx_v_characteristic);
      __Pyx_GIVEREF(__pyx_v_characteristic);
      PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_6, __pyx_v_characteristic);
      __Pyx_INCREF(__pyx_v_divergency);
      __Pyx_GIVEREF(__pyx_v_divergency);
      PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_6, __pyx_v_divergency);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1455, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "python/cython/_fisx.pyx":1440
 *         self.thisptr.readConfigurationFromFile(fileName)
 * 
 *     def setBeam(self, energies, weights=None, characteristic=None, divergency=None):             # <<<<<<<<<<<<<<
 *         if not hasattr(energies, "__len__"):
 *             if divergency is None:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("fisx._fisx.PyXRF.setBeam", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_weights);
  __Pyx_XDECREF(__pyx_v_characteristic);
  __Pyx_XDECREF(__pyx_v_divergency);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1457
 *             self._setBeam(energies, weights, characteristic, divergency)
 * 
 *     def _setSingleEnergyBeam(self, double energy, double divergency):             # <<<<<<<<<<<<<<
 *         self.thisptr.setBeam(energy, divergency)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_9_setSingleEnergyBeam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_9_setSingleEnergyBeam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_energy;
  double __pyx_v_divergency;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_setSingleEnergyBeam (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_energy,&__pyx_n_s_divergency,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_divergency)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_setSingleEnergyBeam", 1, 2, 2, 1); __PYX_ERR(1, 1457, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_setSingleEnergyBeam") < 0)) __PYX_ERR(1, 1457, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_energy = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_energy == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1457, __pyx_L3_error)
    __pyx_v_divergency = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_divergency == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1457, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_setSingleEnergyBeam", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1457, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF._setSingleEnergyBeam", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_8_setSingleEnergyBeam(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), __pyx_v_energy, __pyx_v_divergency);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_8_setSingleEnergyBeam(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, double __pyx_v_energy, double __pyx_v_divergency) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_setSingleEnergyBeam", 0);

  /* "python/cython/_fisx.pyx":1458
 * 
 *     def _setSingleEnergyBeam(self, double energy, double divergency):
 *         self.thisptr.setBeam(energy, divergency)             # <<<<<<<<<<<<<<
 * 
 *     def _setBeam(self, std_vector[double] energies, std_vector[double] weights, \
 */
  try {
    __pyx_v_self->thisptr->setBeam(__pyx_v_energy, __pyx_v_divergency);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1458, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":1457
 *             self._setBeam(energies, weights, characteristic, divergency)
 * 
 *     def _setSingleEnergyBeam(self, double energy, double divergency):             # <<<<<<<<<<<<<<
 *         self.thisptr.setBeam(energy, divergency)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF._setSingleEnergyBeam", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1460
 *         self.thisptr.setBeam(energy, divergency)
 * 
 *     def _setBeam(self, std_vector[double] energies, std_vector[double] weights, \             # <<<<<<<<<<<<<<
 *                        std_vector[int] characteristic, std_vector[double] divergency):
 *         self.thisptr.setBeam(energies, weights, characteristic, divergency)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_11_setBeam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_11_setBeam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  std::vector<double>  __pyx_v_energies;
  std::vector<double>  __pyx_v_weights;
  std::vector<int>  __pyx_v_characteristic;
  std::vector<double>  __pyx_v_divergency;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_setBeam (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_energies,&__pyx_n_s_weights,&__pyx_n_s_characteristic,&__pyx_n_s_divergency,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_energies)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_setBeam", 1, 4, 4, 1); __PYX_ERR(1, 1460, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_characteristic)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_setBeam", 1, 4, 4, 2); __PYX_ERR(1, 1460, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_divergency)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_setBeam", 1, 4, 4, 3); __PYX_ERR(1, 1460, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_setBeam") < 0)) __PYX_ERR(1, 1460, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_energies = __pyx_convert_vector_from_py_double(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1460, __pyx_L3_error)
    __pyx_v_weights = __pyx_convert_vector_from_py_double(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1460, __pyx_L3_error)
    __pyx_v_characteristic = __pyx_convert_vector_from_py_int(values[2]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1461, __pyx_L3_error)
    __pyx_v_divergency = __pyx_convert_vector_from_py_double(values[3]); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1461, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_setBeam", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1460, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF._setBeam", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_10_setBeam(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), __pyx_v_energies, __pyx_v_weights, __pyx_v_characteristic, __pyx_v_divergency);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_10_setBeam(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, std::vector<double>  __pyx_v_energies, std::vector<double>  __pyx_v_weights, std::vector<int>  __pyx_v_characteristic, std::vector<double>  __pyx_v_divergency) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_setBeam", 0);

  /* "python/cython/_fisx.pyx":1462
 *     def _setBeam(self, std_vector[double] energies, std_vector[double] weights, \
 *                        std_vector[int] characteristic, std_vector[double] divergency):
 *         self.thisptr.setBeam(energies, weights, characteristic, divergency)             # <<<<<<<<<<<<<<
 * 
 *     def setBeamFilters(self, layerList):
 */
  try {
    __pyx_v_self->thisptr->setBeam(__pyx_v_energies, __pyx_v_weights, __pyx_v_characteristic, __pyx_v_divergency);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1462, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":1460
 *         self.thisptr.setBeam(energy, divergency)
 * 
 *     def _setBeam(self, std_vector[double] energies, std_vector[double] weights, \             # <<<<<<<<<<<<<<
 *                        std_vector[int] characteristic, std_vector[double] divergency):
 *         self.thisptr.setBeam(energies, weights, characteristic, divergency)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF._setBeam", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1464
 *         self.thisptr.setBeam(energies, weights, characteristic, divergency)
 * 
 *     def setBeamFilters(self, layerList):             # <<<<<<<<<<<<<<
 *         """
 *         Due to wrapping constraints, the filter list must have the form:
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_13setBeamFilters(PyObject *__pyx_v_self, PyObject *__pyx_v_layerList); /*proto*/
static char __pyx_doc_4fisx_5_fisx_5PyXRF_12setBeamFilters[] = "\n        Due to wrapping constraints, the filter list must have the form:\n        [[Material name or formula0, density0, thickness0, funny factor0],\n         [Material name or formula1, density1, thickness1, funny factor1],\n         ...\n         [Material name or formulan, densityn, thicknessn, funny factorn]]\n\n        Unless you know what you are doing, the funny factors must be 1.0\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_13setBeamFilters(PyObject *__pyx_v_self, PyObject *__pyx_v_layerList) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setBeamFilters (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_12setBeamFilters(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), ((PyObject *)__pyx_v_layerList));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_12setBeamFilters(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_layerList) {
  std::vector<fisx::Layer>  __pyx_v_container;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_density = NULL;
  PyObject *__pyx_v_thickness = NULL;
  PyObject *__pyx_v_funny = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  std::string __pyx_t_12;
  double __pyx_t_13;
  double __pyx_t_14;
  double __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setBeamFilters", 0);

  /* "python/cython/_fisx.pyx":1475
 *         """
 *         cdef std_vector[Layer] container
 *         if len(layerList):             # <<<<<<<<<<<<<<
 *             if len(layerList[0]) == 4:
 *                 for name, density, thickness, funny in layerList:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_layerList); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1475, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":1476
 *         cdef std_vector[Layer] container
 *         if len(layerList):
 *             if len(layerList[0]) == 4:             # <<<<<<<<<<<<<<
 *                 for name, density, thickness, funny in layerList:
 *                     container.push_back(Layer(toBytes(name), density, thickness, funny))
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_layerList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1476, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = ((__pyx_t_1 == 4) != 0);
    if (__pyx_t_2) {

      /* "python/cython/_fisx.pyx":1477
 *         if len(layerList):
 *             if len(layerList[0]) == 4:
 *                 for name, density, thickness, funny in layerList:             # <<<<<<<<<<<<<<
 *                     container.push_back(Layer(toBytes(name), density, thickness, funny))
 *             else:
 */
      if (likely(PyList_CheckExact(__pyx_v_layerList)) || PyTuple_CheckExact(__pyx_v_layerList)) {
        __pyx_t_3 = __pyx_v_layerList; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
        __pyx_t_4 = NULL;
      } else {
        __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_layerList); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1477, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1477, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_4)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 1477, __pyx_L1_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1477, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          } else {
            if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 1477, __pyx_L1_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1477, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          }
        } else {
          __pyx_t_5 = __pyx_t_4(__pyx_t_3);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(1, 1477, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
          PyObject* sequence = __pyx_t_5;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 4)) {
            if (size > 4) __Pyx_RaiseTooManyValuesError(4);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(1, 1477, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); 
            __pyx_t_9 = PyTuple_GET_ITEM(sequence, 3); 
          } else {
            __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
            __pyx_t_9 = PyList_GET_ITEM(sequence, 3); 
          }
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          #else
          {
            Py_ssize_t i;
            PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9};
            for (i=0; i < 4; i++) {
              PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(1, 1477, __pyx_L1_error)
              __Pyx_GOTREF(item);
              *(temps[i]) = item;
            }
          }
          #endif
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else {
          Py_ssize_t index = -1;
          PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9};
          __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1477, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
          for (index=0; index < 4; index++) {
            PyObject* item = __pyx_t_11(__pyx_t_10); if (unlikely(!item)) goto __pyx_L7_unpacking_failed;
            __Pyx_GOTREF(item);
            *(temps[index]) = item;
          }
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 4) < 0) __PYX_ERR(1, 1477, __pyx_L1_error)
          __pyx_t_11 = NULL;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L8_unpacking_done;
          __pyx_L7_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_11 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(1, 1477, __pyx_L1_error)
          __pyx_L8_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
        __pyx_t_6 = 0;
        __Pyx_XDECREF_SET(__pyx_v_density, __pyx_t_7);
        __pyx_t_7 = 0;
        __Pyx_XDECREF_SET(__pyx_v_thickness, __pyx_t_8);
        __pyx_t_8 = 0;
        __Pyx_XDECREF_SET(__pyx_v_funny, __pyx_t_9);
        __pyx_t_9 = 0;

        /* "python/cython/_fisx.pyx":1478
 *             if len(layerList[0]) == 4:
 *                 for name, density, thickness, funny in layerList:
 *                     container.push_back(Layer(toBytes(name), density, thickness, funny))             # <<<<<<<<<<<<<<
 *             else:
 *                 for name, density, thickness in layerList:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1478, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_name);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1478, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_12 = __pyx_convert_string_from_py_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1478, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_v_density); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1478, __pyx_L1_error)
        __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_v_thickness); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1478, __pyx_L1_error)
        __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_v_funny); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1478, __pyx_L1_error)
        try {
          __pyx_v_container.push_back(fisx::Layer(__pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15));
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(1, 1478, __pyx_L1_error)
        }

        /* "python/cython/_fisx.pyx":1477
 *         if len(layerList):
 *             if len(layerList[0]) == 4:
 *                 for name, density, thickness, funny in layerList:             # <<<<<<<<<<<<<<
 *                     container.push_back(Layer(toBytes(name), density, thickness, funny))
 *             else:
 */
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "python/cython/_fisx.pyx":1476
 *         cdef std_vector[Layer] container
 *         if len(layerList):
 *             if len(layerList[0]) == 4:             # <<<<<<<<<<<<<<
 *                 for name, density, thickness, funny in layerList:
 *                     container.push_back(Layer(toBytes(name), density, thickness, funny))
 */
      goto __pyx_L4;
    }

    /* "python/cython/_fisx.pyx":1480
 *                     container.push_back(Layer(toBytes(name), density, thickness, funny))
 *             else:
 *                 for name, density, thickness in layerList:             # <<<<<<<<<<<<<<
 *                     container.push_back(Layer(toBytes(name), density, thickness, 1.0))
 *         self.thisptr.setBeamFilters(container)
 */
    /*else*/ {
      if (likely(PyList_CheckExact(__pyx_v_layerList)) || PyTuple_CheckExact(__pyx_v_layerList)) {
        __pyx_t_3 = __pyx_v_layerList; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
        __pyx_t_4 = NULL;
      } else {
        __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_layerList); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1480, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1480, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_4)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 1480, __pyx_L1_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1480, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          } else {
            if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 1480, __pyx_L1_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1480, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          }
        } else {
          __pyx_t_5 = __pyx_t_4(__pyx_t_3);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(1, 1480, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
          PyObject* sequence = __pyx_t_5;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 3)) {
            if (size > 3) __Pyx_RaiseTooManyValuesError(3);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(1, 1480, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
            __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
          } else {
            __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
          }
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          #else
          __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1480, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1480, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1480, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1480, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext;
          index = 0; __pyx_t_9 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_9)) goto __pyx_L11_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_9);
          index = 1; __pyx_t_8 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_8)) goto __pyx_L11_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_8);
          index = 2; __pyx_t_7 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L11_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_7);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 3) < 0) __PYX_ERR(1, 1480, __pyx_L1_error)
          __pyx_t_11 = NULL;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          goto __pyx_L12_unpacking_done;
          __pyx_L11_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_11 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(1, 1480, __pyx_L1_error)
          __pyx_L12_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_9);
        __pyx_t_9 = 0;
        __Pyx_XDECREF_SET(__pyx_v_density, __pyx_t_8);
        __pyx_t_8 = 0;
        __Pyx_XDECREF_SET(__pyx_v_thickness, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "python/cython/_fisx.pyx":1481
 *             else:
 *                 for name, density, thickness in layerList:
 *                     container.push_back(Layer(toBytes(name), density, thickness, 1.0))             # <<<<<<<<<<<<<<
 *         self.thisptr.setBeamFilters(container)
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_name);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_12 = __pyx_convert_string_from_py_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1481, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_v_density); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1481, __pyx_L1_error)
        __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_v_thickness); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1481, __pyx_L1_error)
        try {
          __pyx_v_container.push_back(fisx::Layer(__pyx_t_12, __pyx_t_15, __pyx_t_14, 1.0));
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(1, 1481, __pyx_L1_error)
        }

        /* "python/cython/_fisx.pyx":1480
 *                     container.push_back(Layer(toBytes(name), density, thickness, funny))
 *             else:
 *                 for name, density, thickness in layerList:             # <<<<<<<<<<<<<<
 *                     container.push_back(Layer(toBytes(name), density, thickness, 1.0))
 *         self.thisptr.setBeamFilters(container)
 */
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_L4:;

    /* "python/cython/_fisx.pyx":1475
 *         """
 *         cdef std_vector[Layer] container
 *         if len(layerList):             # <<<<<<<<<<<<<<
 *             if len(layerList[0]) == 4:
 *                 for name, density, thickness, funny in layerList:
 */
  }

  /* "python/cython/_fisx.pyx":1482
 *                 for name, density, thickness in layerList:
 *                     container.push_back(Layer(toBytes(name), density, thickness, 1.0))
 *         self.thisptr.setBeamFilters(container)             # <<<<<<<<<<<<<<
 * 
 *     def setUserBeamFilters(self, pyTransmissionTableList):
 */
  try {
    __pyx_v_self->thisptr->setBeamFilters(__pyx_v_container);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1482, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":1464
 *         self.thisptr.setBeam(energies, weights, characteristic, divergency)
 * 
 *     def setBeamFilters(self, layerList):             # <<<<<<<<<<<<<<
 *         """
 *         Due to wrapping constraints, the filter list must have the form:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("fisx._fisx.PyXRF.setBeamFilters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_density);
  __Pyx_XDECREF(__pyx_v_thickness);
  __Pyx_XDECREF(__pyx_v_funny);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1484
 *         self.thisptr.setBeamFilters(container)
 * 
 *     def setUserBeamFilters(self, pyTransmissionTableList):             # <<<<<<<<<<<<<<
 *         """
 *         Provide a list of already instantiated transmision tables to be used
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_15setUserBeamFilters(PyObject *__pyx_v_self, PyObject *__pyx_v_pyTransmissionTableList); /*proto*/
static char __pyx_doc_4fisx_5_fisx_5PyXRF_14setUserBeamFilters[] = "\n        Provide a list of already instantiated transmision tables to be used\n        as filters between beam and sample\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_15setUserBeamFilters(PyObject *__pyx_v_self, PyObject *__pyx_v_pyTransmissionTableList) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setUserBeamFilters (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_14setUserBeamFilters(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), ((PyObject *)__pyx_v_pyTransmissionTableList));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_14setUserBeamFilters(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_pyTransmissionTableList) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setUserBeamFilters", 0);

  /* "python/cython/_fisx.pyx":1489
 *         as filters between beam and sample
 *         """
 *         self._fillTransmissionTable(pyTransmissionTableList, "filter")             # <<<<<<<<<<<<<<
 * 
 *     def _fillTransmissionTable(self, pyTransmissionTableList, function):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fillTransmissionTable); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_pyTransmissionTableList, __pyx_n_s_filter};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1489, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_pyTransmissionTableList, __pyx_n_s_filter};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1489, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_pyTransmissionTableList);
    __Pyx_GIVEREF(__pyx_v_pyTransmissionTableList);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_pyTransmissionTableList);
    __Pyx_INCREF(__pyx_n_s_filter);
    __Pyx_GIVEREF(__pyx_n_s_filter);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_filter);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":1484
 *         self.thisptr.setBeamFilters(container)
 * 
 *     def setUserBeamFilters(self, pyTransmissionTableList):             # <<<<<<<<<<<<<<
 *         """
 *         Provide a list of already instantiated transmision tables to be used
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("fisx._fisx.PyXRF.setUserBeamFilters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1491
 *         self._fillTransmissionTable(pyTransmissionTableList, "filter")
 * 
 *     def _fillTransmissionTable(self, pyTransmissionTableList, function):             # <<<<<<<<<<<<<<
 *         if function not in ["filter", "attenuator"]:
 *             raise ValueError("Please specify usage as filter or as attenuator")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_17_fillTransmissionTable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_17_fillTransmissionTable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_pyTransmissionTableList = 0;
  PyObject *__pyx_v_function = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_fillTransmissionTable (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyTransmissionTableList,&__pyx_n_s_function,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyTransmissionTableList)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_function)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_fillTransmissionTable", 1, 2, 2, 1); __PYX_ERR(1, 1491, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_fillTransmissionTable") < 0)) __PYX_ERR(1, 1491, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_pyTransmissionTableList = values[0];
    __pyx_v_function = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_fillTransmissionTable", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1491, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF._fillTransmissionTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_16_fillTransmissionTable(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), __pyx_v_pyTransmissionTableList, __pyx_v_function);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_16_fillTransmissionTable(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_pyTransmissionTableList, PyObject *__pyx_v_function) {
  int __pyx_v_instantiated;
  std::vector<fisx::TransmissionTable>  __pyx_v_container;
  fisx::TransmissionTable __pyx_v_t;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_comment = NULL;
  PyObject *__pyx_v_table = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  std::map<double,double>  __pyx_t_9;
  std::string __pyx_t_10;
  std::string __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  std::vector<double>  __pyx_t_13;
  std::vector<double>  __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_fillTransmissionTable", 0);

  /* "python/cython/_fisx.pyx":1492
 * 
 *     def _fillTransmissionTable(self, pyTransmissionTableList, function):
 *         if function not in ["filter", "attenuator"]:             # <<<<<<<<<<<<<<
 *             raise ValueError("Please specify usage as filter or as attenuator")
 *         if len(pyTransmissionTableList):
 */
  __Pyx_INCREF(__pyx_v_function);
  __pyx_t_1 = __pyx_v_function;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_filter, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1492, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_attenuator, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1492, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (unlikely(__pyx_t_3)) {

    /* "python/cython/_fisx.pyx":1493
 *     def _fillTransmissionTable(self, pyTransmissionTableList, function):
 *         if function not in ["filter", "attenuator"]:
 *             raise ValueError("Please specify usage as filter or as attenuator")             # <<<<<<<<<<<<<<
 *         if len(pyTransmissionTableList):
 *             if hasattr(pyTransmissionTableList[0], "getTransmissionTable"):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 1493, __pyx_L1_error)

    /* "python/cython/_fisx.pyx":1492
 * 
 *     def _fillTransmissionTable(self, pyTransmissionTableList, function):
 *         if function not in ["filter", "attenuator"]:             # <<<<<<<<<<<<<<
 *             raise ValueError("Please specify usage as filter or as attenuator")
 *         if len(pyTransmissionTableList):
 */
  }

  /* "python/cython/_fisx.pyx":1494
 *         if function not in ["filter", "attenuator"]:
 *             raise ValueError("Please specify usage as filter or as attenuator")
 *         if len(pyTransmissionTableList):             # <<<<<<<<<<<<<<
 *             if hasattr(pyTransmissionTableList[0], "getTransmissionTable"):
 *                 instantiated = True
 */
  __pyx_t_4 = PyObject_Length(__pyx_v_pyTransmissionTableList); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1494, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":1495
 *             raise ValueError("Please specify usage as filter or as attenuator")
 *         if len(pyTransmissionTableList):
 *             if hasattr(pyTransmissionTableList[0], "getTransmissionTable"):             # <<<<<<<<<<<<<<
 *                 instantiated = True
 *             else:
 */
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_pyTransmissionTableList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_HasAttr(__pyx_t_1, __pyx_n_s_getTransmissionTable); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1495, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (__pyx_t_2) {

      /* "python/cython/_fisx.pyx":1496
 *         if len(pyTransmissionTableList):
 *             if hasattr(pyTransmissionTableList[0], "getTransmissionTable"):
 *                 instantiated = True             # <<<<<<<<<<<<<<
 *             else:
 *                 instantiated = False
 */
      __pyx_v_instantiated = 1;

      /* "python/cython/_fisx.pyx":1495
 *             raise ValueError("Please specify usage as filter or as attenuator")
 *         if len(pyTransmissionTableList):
 *             if hasattr(pyTransmissionTableList[0], "getTransmissionTable"):             # <<<<<<<<<<<<<<
 *                 instantiated = True
 *             else:
 */
      goto __pyx_L7;
    }

    /* "python/cython/_fisx.pyx":1498
 *                 instantiated = True
 *             else:
 *                 instantiated = False             # <<<<<<<<<<<<<<
 *         else:
 *             instantiated = True
 */
    /*else*/ {
      __pyx_v_instantiated = 0;
    }
    __pyx_L7:;

    /* "python/cython/_fisx.pyx":1494
 *         if function not in ["filter", "attenuator"]:
 *             raise ValueError("Please specify usage as filter or as attenuator")
 *         if len(pyTransmissionTableList):             # <<<<<<<<<<<<<<
 *             if hasattr(pyTransmissionTableList[0], "getTransmissionTable"):
 *                 instantiated = True
 */
    goto __pyx_L6;
  }

  /* "python/cython/_fisx.pyx":1500
 *                 instantiated = False
 *         else:
 *             instantiated = True             # <<<<<<<<<<<<<<
 *         cdef std_vector[TransmissionTable] container
 *         cdef TransmissionTable t
 */
  /*else*/ {
    __pyx_v_instantiated = 1;
  }
  __pyx_L6:;

  /* "python/cython/_fisx.pyx":1503
 *         cdef std_vector[TransmissionTable] container
 *         cdef TransmissionTable t
 *         if instantiated:             # <<<<<<<<<<<<<<
 *             for item in pyTransmissionTableList:
 *                 name = item.getName()
 */
  __pyx_t_2 = (__pyx_v_instantiated != 0);
  if (__pyx_t_2) {

    /* "python/cython/_fisx.pyx":1504
 *         cdef TransmissionTable t
 *         if instantiated:
 *             for item in pyTransmissionTableList:             # <<<<<<<<<<<<<<
 *                 name = item.getName()
 *                 comment = item.getComment()
 */
    if (likely(PyList_CheckExact(__pyx_v_pyTransmissionTableList)) || PyTuple_CheckExact(__pyx_v_pyTransmissionTableList)) {
      __pyx_t_1 = __pyx_v_pyTransmissionTableList; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pyTransmissionTableList); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1504, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1504, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 1504, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1504, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 1504, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1504, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_1);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 1504, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "python/cython/_fisx.pyx":1505
 *         if instantiated:
 *             for item in pyTransmissionTableList:
 *                 name = item.getName()             # <<<<<<<<<<<<<<
 *                 comment = item.getComment()
 *                 table = item.getTransmissionTable()
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_getName); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1505, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1505, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "python/cython/_fisx.pyx":1506
 *             for item in pyTransmissionTableList:
 *                 name = item.getName()
 *                 comment = item.getComment()             # <<<<<<<<<<<<<<
 *                 table = item.getTransmissionTable()
 *                 t = TransmissionTable()
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_getComment); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1506, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1506, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_comment, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "python/cython/_fisx.pyx":1507
 *                 name = item.getName()
 *                 comment = item.getComment()
 *                 table = item.getTransmissionTable()             # <<<<<<<<<<<<<<
 *                 t = TransmissionTable()
 *                 t.setTransmissionTable(table, name, comment)
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_getTransmissionTable); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_table, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "python/cython/_fisx.pyx":1508
 *                 comment = item.getComment()
 *                 table = item.getTransmissionTable()
 *                 t = TransmissionTable()             # <<<<<<<<<<<<<<
 *                 t.setTransmissionTable(table, name, comment)
 *                 container.push_back(t)
 */
      __pyx_v_t = fisx::TransmissionTable();

      /* "python/cython/_fisx.pyx":1509
 *                 table = item.getTransmissionTable()
 *                 t = TransmissionTable()
 *                 t.setTransmissionTable(table, name, comment)             # <<<<<<<<<<<<<<
 *                 container.push_back(t)
 *         else:
 */
      __pyx_t_9 = __pyx_convert_map_from_py_double__and_double(__pyx_v_table); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1509, __pyx_L1_error)
      __pyx_t_10 = __pyx_convert_string_from_py_std__in_string(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1509, __pyx_L1_error)
      __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_v_comment); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1509, __pyx_L1_error)
      try {
        __pyx_v_t.setTransmissionTable(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(1, 1509, __pyx_L1_error)
      }

      /* "python/cython/_fisx.pyx":1510
 *                 t = TransmissionTable()
 *                 t.setTransmissionTable(table, name, comment)
 *                 container.push_back(t)             # <<<<<<<<<<<<<<
 *         else:
 *             for item in pyTransmissionTableList:
 */
      try {
        __pyx_v_container.push_back(__pyx_v_t);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(1, 1510, __pyx_L1_error)
      }

      /* "python/cython/_fisx.pyx":1504
 *         cdef TransmissionTable t
 *         if instantiated:
 *             for item in pyTransmissionTableList:             # <<<<<<<<<<<<<<
 *                 name = item.getName()
 *                 comment = item.getComment()
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "python/cython/_fisx.pyx":1503
 *         cdef std_vector[TransmissionTable] container
 *         cdef TransmissionTable t
 *         if instantiated:             # <<<<<<<<<<<<<<
 *             for item in pyTransmissionTableList:
 *                 name = item.getName()
 */
    goto __pyx_L8;
  }

  /* "python/cython/_fisx.pyx":1512
 *                 container.push_back(t)
 *         else:
 *             for item in pyTransmissionTableList:             # <<<<<<<<<<<<<<
 *                 t = TransmissionTable()
 *                 if len(item) == 4:
 */
  /*else*/ {
    if (likely(PyList_CheckExact(__pyx_v_pyTransmissionTableList)) || PyTuple_CheckExact(__pyx_v_pyTransmissionTableList)) {
      __pyx_t_1 = __pyx_v_pyTransmissionTableList; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pyTransmissionTableList); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1512, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1512, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 1512, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1512, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 1512, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1512, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_1);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 1512, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "python/cython/_fisx.pyx":1513
 *         else:
 *             for item in pyTransmissionTableList:
 *                 t = TransmissionTable()             # <<<<<<<<<<<<<<
 *                 if len(item) == 4:
 *                     t.setTransmissionTable(item[0],
 */
      __pyx_v_t = fisx::TransmissionTable();

      /* "python/cython/_fisx.pyx":1514
 *             for item in pyTransmissionTableList:
 *                 t = TransmissionTable()
 *                 if len(item) == 4:             # <<<<<<<<<<<<<<
 *                     t.setTransmissionTable(item[0],
 *                                            item[1],
 */
      __pyx_t_12 = PyObject_Length(__pyx_v_item); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1514, __pyx_L1_error)
      __pyx_t_2 = ((__pyx_t_12 == 4) != 0);
      if (__pyx_t_2) {

        /* "python/cython/_fisx.pyx":1515
 *                 t = TransmissionTable()
 *                 if len(item) == 4:
 *                     t.setTransmissionTable(item[0],             # <<<<<<<<<<<<<<
 *                                            item[1],
 *                                            toBytes(item[2]),
 */
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_item, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1515, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_13 = __pyx_convert_vector_from_py_double(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1515, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "python/cython/_fisx.pyx":1516
 *                 if len(item) == 4:
 *                     t.setTransmissionTable(item[0],
 *                                            item[1],             # <<<<<<<<<<<<<<
 *                                            toBytes(item[2]),
 *                                            toBytes(item[3]))
 */
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_item, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1516, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_14 = __pyx_convert_vector_from_py_double(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1516, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "python/cython/_fisx.pyx":1517
 *                     t.setTransmissionTable(item[0],
 *                                            item[1],
 *                                            toBytes(item[2]),             # <<<<<<<<<<<<<<
 *                                            toBytes(item[3]))
 *                 elif hasattr(item[0], "keys"):
 */
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1517, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_item, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1517, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_15 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_6 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_15, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1517, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1517, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "python/cython/_fisx.pyx":1518
 *                                            item[1],
 *                                            toBytes(item[2]),
 *                                            toBytes(item[3]))             # <<<<<<<<<<<<<<
 *                 elif hasattr(item[0], "keys"):
 *                     t.setTransmissionTable(item[0],
 */
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1518, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_item, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1518, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_15 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_6 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_15, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1518, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_10 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1518, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "python/cython/_fisx.pyx":1515
 *                 t = TransmissionTable()
 *                 if len(item) == 4:
 *                     t.setTransmissionTable(item[0],             # <<<<<<<<<<<<<<
 *                                            item[1],
 *                                            toBytes(item[2]),
 */
        try {
          __pyx_v_t.setTransmissionTable(__pyx_t_13, __pyx_t_14, __pyx_t_11, __pyx_t_10);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(1, 1515, __pyx_L1_error)
        }

        /* "python/cython/_fisx.pyx":1514
 *             for item in pyTransmissionTableList:
 *                 t = TransmissionTable()
 *                 if len(item) == 4:             # <<<<<<<<<<<<<<
 *                     t.setTransmissionTable(item[0],
 *                                            item[1],
 */
        goto __pyx_L13;
      }

      /* "python/cython/_fisx.pyx":1519
 *                                            toBytes(item[2]),
 *                                            toBytes(item[3]))
 *                 elif hasattr(item[0], "keys"):             # <<<<<<<<<<<<<<
 *                     t.setTransmissionTable(item[0],
 *                                            toBytes(item[1]),
 */
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_item, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1519, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = __Pyx_HasAttr(__pyx_t_6, __pyx_n_s_keys); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 1519, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_3 = (__pyx_t_2 != 0);
      if (likely(__pyx_t_3)) {

        /* "python/cython/_fisx.pyx":1520
 *                                            toBytes(item[3]))
 *                 elif hasattr(item[0], "keys"):
 *                     t.setTransmissionTable(item[0],             # <<<<<<<<<<<<<<
 *                                            toBytes(item[1]),
 *                                            toBytes(item[2]))
 */
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_item, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1520, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_9 = __pyx_convert_map_from_py_double__and_double(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1520, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "python/cython/_fisx.pyx":1521
 *                 elif hasattr(item[0], "keys"):
 *                     t.setTransmissionTable(item[0],
 *                                            toBytes(item[1]),             # <<<<<<<<<<<<<<
 *                                            toBytes(item[2]))
 *                 else:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1521, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_item, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1521, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_15 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_6 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_15, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1521, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_10 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1521, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "python/cython/_fisx.pyx":1522
 *                     t.setTransmissionTable(item[0],
 *                                            toBytes(item[1]),
 *                                            toBytes(item[2]))             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise ValueError("Not appropriate input type or length")
 */
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1522, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_item, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1522, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_15 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_6 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_15, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1522, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1522, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "python/cython/_fisx.pyx":1520
 *                                            toBytes(item[3]))
 *                 elif hasattr(item[0], "keys"):
 *                     t.setTransmissionTable(item[0],             # <<<<<<<<<<<<<<
 *                                            toBytes(item[1]),
 *                                            toBytes(item[2]))
 */
        try {
          __pyx_v_t.setTransmissionTable(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(1, 1520, __pyx_L1_error)
        }

        /* "python/cython/_fisx.pyx":1519
 *                                            toBytes(item[2]),
 *                                            toBytes(item[3]))
 *                 elif hasattr(item[0], "keys"):             # <<<<<<<<<<<<<<
 *                     t.setTransmissionTable(item[0],
 *                                            toBytes(item[1]),
 */
        goto __pyx_L13;
      }

      /* "python/cython/_fisx.pyx":1524
 *                                            toBytes(item[2]))
 *                 else:
 *                     raise ValueError("Not appropriate input type or length")             # <<<<<<<<<<<<<<
 *                 container.push_back(t)
 *         if function == "filter":
 */
      /*else*/ {
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(1, 1524, __pyx_L1_error)
      }
      __pyx_L13:;

      /* "python/cython/_fisx.pyx":1525
 *                 else:
 *                     raise ValueError("Not appropriate input type or length")
 *                 container.push_back(t)             # <<<<<<<<<<<<<<
 *         if function == "filter":
 *             self.thisptr.setUserBeamFilters(container)
 */
      try {
        __pyx_v_container.push_back(__pyx_v_t);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(1, 1525, __pyx_L1_error)
      }

      /* "python/cython/_fisx.pyx":1512
 *                 container.push_back(t)
 *         else:
 *             for item in pyTransmissionTableList:             # <<<<<<<<<<<<<<
 *                 t = TransmissionTable()
 *                 if len(item) == 4:
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L8:;

  /* "python/cython/_fisx.pyx":1526
 *                     raise ValueError("Not appropriate input type or length")
 *                 container.push_back(t)
 *         if function == "filter":             # <<<<<<<<<<<<<<
 *             self.thisptr.setUserBeamFilters(container)
 *         else:
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_function, __pyx_n_s_filter, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1526, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":1527
 *                 container.push_back(t)
 *         if function == "filter":
 *             self.thisptr.setUserBeamFilters(container)             # <<<<<<<<<<<<<<
 *         else:
 *             self.thisptr.setUserAttenuators(container)
 */
    try {
      __pyx_v_self->thisptr->setUserBeamFilters(__pyx_v_container);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 1527, __pyx_L1_error)
    }

    /* "python/cython/_fisx.pyx":1526
 *                     raise ValueError("Not appropriate input type or length")
 *                 container.push_back(t)
 *         if function == "filter":             # <<<<<<<<<<<<<<
 *             self.thisptr.setUserBeamFilters(container)
 *         else:
 */
    goto __pyx_L14;
  }

  /* "python/cython/_fisx.pyx":1529
 *             self.thisptr.setUserBeamFilters(container)
 *         else:
 *             self.thisptr.setUserAttenuators(container)             # <<<<<<<<<<<<<<
 * 
 *     def setSample(self, layerList, referenceLayer=0):
 */
  /*else*/ {
    try {
      __pyx_v_self->thisptr->setUserAttenuators(__pyx_v_container);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 1529, __pyx_L1_error)
    }
  }
  __pyx_L14:;

  /* "python/cython/_fisx.pyx":1491
 *         self._fillTransmissionTable(pyTransmissionTableList, "filter")
 * 
 *     def _fillTransmissionTable(self, pyTransmissionTableList, function):             # <<<<<<<<<<<<<<
 *         if function not in ["filter", "attenuator"]:
 *             raise ValueError("Please specify usage as filter or as attenuator")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("fisx._fisx.PyXRF._fillTransmissionTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_comment);
  __Pyx_XDECREF(__pyx_v_table);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1531
 *             self.thisptr.setUserAttenuators(container)
 * 
 *     def setSample(self, layerList, referenceLayer=0):             # <<<<<<<<<<<<<<
 *         """
 *         Due to wrapping constraints, the list must have the form:
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_19setSample(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_5PyXRF_18setSample[] = "\n        Due to wrapping constraints, the list must have the form:\n        [[Material name or formula0, density0, thickness0, funny factor0],\n         [Material name or formula1, density1, thickness1, funny factor1],\n         ...\n         [Material name or formulan, densityn, thicknessn, funny factorn]]\n\n        Unless you know what you are doing, the funny factors must be 1.0\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_19setSample(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_layerList = 0;
  PyObject *__pyx_v_referenceLayer = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setSample (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_layerList,&__pyx_n_s_referenceLayer,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)__pyx_int_0);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_layerList)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_referenceLayer);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setSample") < 0)) __PYX_ERR(1, 1531, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_layerList = values[0];
    __pyx_v_referenceLayer = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setSample", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1531, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF.setSample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_18setSample(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), __pyx_v_layerList, __pyx_v_referenceLayer);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_18setSample(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_layerList, PyObject *__pyx_v_referenceLayer) {
  std::vector<fisx::Layer>  __pyx_v_container;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_density = NULL;
  PyObject *__pyx_v_thickness = NULL;
  PyObject *__pyx_v_funny = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  std::string __pyx_t_12;
  double __pyx_t_13;
  double __pyx_t_14;
  double __pyx_t_15;
  int __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setSample", 0);

  /* "python/cython/_fisx.pyx":1542
 *         """
 *         cdef std_vector[Layer] container
 *         if len(layerList[0]) == 4:             # <<<<<<<<<<<<<<
 *             for name, density, thickness, funny in layerList:
 *                 container.push_back(Layer(toBytes(name), density, thickness, funny))
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_layerList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 == 4) != 0);
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":1543
 *         cdef std_vector[Layer] container
 *         if len(layerList[0]) == 4:
 *             for name, density, thickness, funny in layerList:             # <<<<<<<<<<<<<<
 *                 container.push_back(Layer(toBytes(name), density, thickness, funny))
 *         else:
 */
    if (likely(PyList_CheckExact(__pyx_v_layerList)) || PyTuple_CheckExact(__pyx_v_layerList)) {
      __pyx_t_1 = __pyx_v_layerList; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_layerList); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1543, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 1543, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1543, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 1543, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1543, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 1543, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
        PyObject* sequence = __pyx_t_5;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 4)) {
          if (size > 4) __Pyx_RaiseTooManyValuesError(4);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(1, 1543, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); 
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 3); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
          __pyx_t_9 = PyList_GET_ITEM(sequence, 3); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        #else
        {
          Py_ssize_t i;
          PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9};
          for (i=0; i < 4; i++) {
            PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(1, 1543, __pyx_L1_error)
            __Pyx_GOTREF(item);
            *(temps[i]) = item;
          }
        }
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        Py_ssize_t index = -1;
        PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9};
        __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1543, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
        for (index=0; index < 4; index++) {
          PyObject* item = __pyx_t_11(__pyx_t_10); if (unlikely(!item)) goto __pyx_L6_unpacking_failed;
          __Pyx_GOTREF(item);
          *(temps[index]) = item;
        }
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 4) < 0) __PYX_ERR(1, 1543, __pyx_L1_error)
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(1, 1543, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_density, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_thickness, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_v_funny, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "python/cython/_fisx.pyx":1544
 *         if len(layerList[0]) == 4:
 *             for name, density, thickness, funny in layerList:
 *                 container.push_back(Layer(toBytes(name), density, thickness, funny))             # <<<<<<<<<<<<<<
 *         else:
 *             for name, density, thickness in layerList:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_name);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_12 = __pyx_convert_string_from_py_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1544, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_v_density); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1544, __pyx_L1_error)
      __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_v_thickness); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1544, __pyx_L1_error)
      __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_v_funny); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1544, __pyx_L1_error)
      try {
        __pyx_v_container.push_back(fisx::Layer(__pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15));
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(1, 1544, __pyx_L1_error)
      }

      /* "python/cython/_fisx.pyx":1543
 *         cdef std_vector[Layer] container
 *         if len(layerList[0]) == 4:
 *             for name, density, thickness, funny in layerList:             # <<<<<<<<<<<<<<
 *                 container.push_back(Layer(toBytes(name), density, thickness, funny))
 *         else:
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "python/cython/_fisx.pyx":1542
 *         """
 *         cdef std_vector[Layer] container
 *         if len(layerList[0]) == 4:             # <<<<<<<<<<<<<<
 *             for name, density, thickness, funny in layerList:
 *                 container.push_back(Layer(toBytes(name), density, thickness, funny))
 */
    goto __pyx_L3;
  }

  /* "python/cython/_fisx.pyx":1546
 *                 container.push_back(Layer(toBytes(name), density, thickness, funny))
 *         else:
 *             for name, density, thickness in layerList:             # <<<<<<<<<<<<<<
 *                 container.push_back(Layer(toBytes(name), density, thickness, 1.0))
 *         self.thisptr.setSample(container, referenceLayer)
 */
  /*else*/ {
    if (likely(PyList_CheckExact(__pyx_v_layerList)) || PyTuple_CheckExact(__pyx_v_layerList)) {
      __pyx_t_1 = __pyx_v_layerList; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_layerList); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1546, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1546, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 1546, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1546, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 1546, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1546, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 1546, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
        PyObject* sequence = __pyx_t_5;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(1, 1546, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
        } else {
          __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
        }
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1546, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1546, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1546, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1546, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext;
        index = 0; __pyx_t_9 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_9)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        index = 1; __pyx_t_8 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_8)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        index = 2; __pyx_t_7 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 3) < 0) __PYX_ERR(1, 1546, __pyx_L1_error)
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L11_unpacking_done;
        __pyx_L10_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(1, 1546, __pyx_L1_error)
        __pyx_L11_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_density, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_v_thickness, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "python/cython/_fisx.pyx":1547
 *         else:
 *             for name, density, thickness in layerList:
 *                 container.push_back(Layer(toBytes(name), density, thickness, 1.0))             # <<<<<<<<<<<<<<
 *         self.thisptr.setSample(container, referenceLayer)
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1547, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_name);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1547, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_12 = __pyx_convert_string_from_py_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1547, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_v_density); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1547, __pyx_L1_error)
      __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_v_thickness); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1547, __pyx_L1_error)
      try {
        __pyx_v_container.push_back(fisx::Layer(__pyx_t_12, __pyx_t_15, __pyx_t_14, 1.0));
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(1, 1547, __pyx_L1_error)
      }

      /* "python/cython/_fisx.pyx":1546
 *                 container.push_back(Layer(toBytes(name), density, thickness, funny))
 *         else:
 *             for name, density, thickness in layerList:             # <<<<<<<<<<<<<<
 *                 container.push_back(Layer(toBytes(name), density, thickness, 1.0))
 *         self.thisptr.setSample(container, referenceLayer)
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "python/cython/_fisx.pyx":1548
 *             for name, density, thickness in layerList:
 *                 container.push_back(Layer(toBytes(name), density, thickness, 1.0))
 *         self.thisptr.setSample(container, referenceLayer)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_referenceLayer); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1548, __pyx_L1_error)
  try {
    __pyx_v_self->thisptr->setSample(__pyx_v_container, __pyx_t_16);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1548, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":1531
 *             self.thisptr.setUserAttenuators(container)
 * 
 *     def setSample(self, layerList, referenceLayer=0):             # <<<<<<<<<<<<<<
 *         """
 *         Due to wrapping constraints, the list must have the form:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("fisx._fisx.PyXRF.setSample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_density);
  __Pyx_XDECREF(__pyx_v_thickness);
  __Pyx_XDECREF(__pyx_v_funny);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1551
 * 
 * 
 *     def setAttenuators(self, layerList):             # <<<<<<<<<<<<<<
 *         """
 *         Due to wrapping constraints, the filter list must have the form:
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_21setAttenuators(PyObject *__pyx_v_self, PyObject *__pyx_v_layerList); /*proto*/
static char __pyx_doc_4fisx_5_fisx_5PyXRF_20setAttenuators[] = "\n        Due to wrapping constraints, the filter list must have the form:\n        [[Material name or formula0, density0, thickness0, funny factor0],\n         [Material name or formula1, density1, thickness1, funny factor1],\n         ...\n         [Material name or formulan, densityn, thicknessn, funny factorn]]\n\n        Unless you know what you are doing, the funny factors must be 1.0\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_21setAttenuators(PyObject *__pyx_v_self, PyObject *__pyx_v_layerList) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setAttenuators (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_20setAttenuators(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), ((PyObject *)__pyx_v_layerList));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_20setAttenuators(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_layerList) {
  std::vector<fisx::Layer>  __pyx_v_container;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_density = NULL;
  PyObject *__pyx_v_thickness = NULL;
  PyObject *__pyx_v_funny = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  std::string __pyx_t_12;
  double __pyx_t_13;
  double __pyx_t_14;
  double __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setAttenuators", 0);

  /* "python/cython/_fisx.pyx":1562
 *         """
 *         cdef std_vector[Layer] container
 *         if len(layerList[0]) == 4:             # <<<<<<<<<<<<<<
 *             for name, density, thickness, funny in layerList:
 *                 container.push_back(Layer(toBytes(name), density, thickness, funny))
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_layerList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 == 4) != 0);
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":1563
 *         cdef std_vector[Layer] container
 *         if len(layerList[0]) == 4:
 *             for name, density, thickness, funny in layerList:             # <<<<<<<<<<<<<<
 *                 container.push_back(Layer(toBytes(name), density, thickness, funny))
 *         else:
 */
    if (likely(PyList_CheckExact(__pyx_v_layerList)) || PyTuple_CheckExact(__pyx_v_layerList)) {
      __pyx_t_1 = __pyx_v_layerList; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_layerList); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1563, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 1563, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1563, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 1563, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1563, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 1563, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
        PyObject* sequence = __pyx_t_5;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 4)) {
          if (size > 4) __Pyx_RaiseTooManyValuesError(4);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(1, 1563, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); 
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 3); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
          __pyx_t_9 = PyList_GET_ITEM(sequence, 3); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        #else
        {
          Py_ssize_t i;
          PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9};
          for (i=0; i < 4; i++) {
            PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(1, 1563, __pyx_L1_error)
            __Pyx_GOTREF(item);
            *(temps[i]) = item;
          }
        }
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        Py_ssize_t index = -1;
        PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9};
        __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1563, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
        for (index=0; index < 4; index++) {
          PyObject* item = __pyx_t_11(__pyx_t_10); if (unlikely(!item)) goto __pyx_L6_unpacking_failed;
          __Pyx_GOTREF(item);
          *(temps[index]) = item;
        }
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 4) < 0) __PYX_ERR(1, 1563, __pyx_L1_error)
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(1, 1563, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_density, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_thickness, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_v_funny, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "python/cython/_fisx.pyx":1564
 *         if len(layerList[0]) == 4:
 *             for name, density, thickness, funny in layerList:
 *                 container.push_back(Layer(toBytes(name), density, thickness, funny))             # <<<<<<<<<<<<<<
 *         else:
 *             for name, density, thickness in layerList:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_name);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_12 = __pyx_convert_string_from_py_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1564, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_v_density); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1564, __pyx_L1_error)
      __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_v_thickness); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1564, __pyx_L1_error)
      __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_v_funny); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1564, __pyx_L1_error)
      try {
        __pyx_v_container.push_back(fisx::Layer(__pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15));
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(1, 1564, __pyx_L1_error)
      }

      /* "python/cython/_fisx.pyx":1563
 *         cdef std_vector[Layer] container
 *         if len(layerList[0]) == 4:
 *             for name, density, thickness, funny in layerList:             # <<<<<<<<<<<<<<
 *                 container.push_back(Layer(toBytes(name), density, thickness, funny))
 *         else:
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "python/cython/_fisx.pyx":1562
 *         """
 *         cdef std_vector[Layer] container
 *         if len(layerList[0]) == 4:             # <<<<<<<<<<<<<<
 *             for name, density, thickness, funny in layerList:
 *                 container.push_back(Layer(toBytes(name), density, thickness, funny))
 */
    goto __pyx_L3;
  }

  /* "python/cython/_fisx.pyx":1566
 *                 container.push_back(Layer(toBytes(name), density, thickness, funny))
 *         else:
 *             for name, density, thickness in layerList:             # <<<<<<<<<<<<<<
 *                 container.push_back(Layer(toBytes(name), density, thickness, 1.0))
 *         self.thisptr.setAttenuators(container)
 */
  /*else*/ {
    if (likely(PyList_CheckExact(__pyx_v_layerList)) || PyTuple_CheckExact(__pyx_v_layerList)) {
      __pyx_t_1 = __pyx_v_layerList; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_layerList); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1566, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1566, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 1566, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1566, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 1566, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1566, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 1566, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
        PyObject* sequence = __pyx_t_5;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(1, 1566, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
        } else {
          __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
        }
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext;
        index = 0; __pyx_t_9 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_9)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        index = 1; __pyx_t_8 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_8)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        index = 2; __pyx_t_7 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 3) < 0) __PYX_ERR(1, 1566, __pyx_L1_error)
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L11_unpacking_done;
        __pyx_L10_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(1, 1566, __pyx_L1_error)
        __pyx_L11_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_density, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_v_thickness, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "python/cython/_fisx.pyx":1567
 *         else:
 *             for name, density, thickness in layerList:
 *                 container.push_back(Layer(toBytes(name), density, thickness, 1.0))             # <<<<<<<<<<<<<<
 *         self.thisptr.setAttenuators(container)
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_name);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_12 = __pyx_convert_string_from_py_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1567, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_v_density); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1567, __pyx_L1_error)
      __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_v_thickness); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1567, __pyx_L1_error)
      try {
        __pyx_v_container.push_back(fisx::Layer(__pyx_t_12, __pyx_t_15, __pyx_t_14, 1.0));
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(1, 1567, __pyx_L1_error)
      }

      /* "python/cython/_fisx.pyx":1566
 *                 container.push_back(Layer(toBytes(name), density, thickness, funny))
 *         else:
 *             for name, density, thickness in layerList:             # <<<<<<<<<<<<<<
 *                 container.push_back(Layer(toBytes(name), density, thickness, 1.0))
 *         self.thisptr.setAttenuators(container)
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "python/cython/_fisx.pyx":1568
 *             for name, density, thickness in layerList:
 *                 container.push_back(Layer(toBytes(name), density, thickness, 1.0))
 *         self.thisptr.setAttenuators(container)             # <<<<<<<<<<<<<<
 * 
 *     def setUserAttenuators(self, pyTransmissionTableList):
 */
  try {
    __pyx_v_self->thisptr->setAttenuators(__pyx_v_container);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1568, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":1551
 * 
 * 
 *     def setAttenuators(self, layerList):             # <<<<<<<<<<<<<<
 *         """
 *         Due to wrapping constraints, the filter list must have the form:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("fisx._fisx.PyXRF.setAttenuators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_density);
  __Pyx_XDECREF(__pyx_v_thickness);
  __Pyx_XDECREF(__pyx_v_funny);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1570
 *         self.thisptr.setAttenuators(container)
 * 
 *     def setUserAttenuators(self, pyTransmissionTableList):             # <<<<<<<<<<<<<<
 *         """
 *         Provide a list of in which each item is either an already instantiated
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_23setUserAttenuators(PyObject *__pyx_v_self, PyObject *__pyx_v_pyTransmissionTableList); /*proto*/
static char __pyx_doc_4fisx_5_fisx_5PyXRF_22setUserAttenuators[] = "\n        Provide a list of in which each item is either an already instantiated\n        PyTransmissionTable or each item is a list of the arguments of the\n        PyTransmissionTable method setTransmissionTable.\n        This transmission tables will be used as filters between sample and\n        detector\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_23setUserAttenuators(PyObject *__pyx_v_self, PyObject *__pyx_v_pyTransmissionTableList) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setUserAttenuators (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_22setUserAttenuators(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), ((PyObject *)__pyx_v_pyTransmissionTableList));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_22setUserAttenuators(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_pyTransmissionTableList) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setUserAttenuators", 0);

  /* "python/cython/_fisx.pyx":1578
 *         detector
 *         """
 *         self._fillTransmissionTable(pyTransmissionTableList, "attenuator")             # <<<<<<<<<<<<<<
 * 
 *     def setDetector(self, PyDetector detector):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fillTransmissionTable); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_pyTransmissionTableList, __pyx_n_s_attenuator};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1578, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_pyTransmissionTableList, __pyx_n_s_attenuator};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1578, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_pyTransmissionTableList);
    __Pyx_GIVEREF(__pyx_v_pyTransmissionTableList);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_pyTransmissionTableList);
    __Pyx_INCREF(__pyx_n_s_attenuator);
    __Pyx_GIVEREF(__pyx_n_s_attenuator);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_attenuator);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":1570
 *         self.thisptr.setAttenuators(container)
 * 
 *     def setUserAttenuators(self, pyTransmissionTableList):             # <<<<<<<<<<<<<<
 *         """
 *         Provide a list of in which each item is either an already instantiated
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("fisx._fisx.PyXRF.setUserAttenuators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1580
 *         self._fillTransmissionTable(pyTransmissionTableList, "attenuator")
 * 
 *     def setDetector(self, PyDetector detector):             # <<<<<<<<<<<<<<
 *         self.thisptr.setDetector(deref(detector.thisptr))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_25setDetector(PyObject *__pyx_v_self, PyObject *__pyx_v_detector); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_25setDetector(PyObject *__pyx_v_self, PyObject *__pyx_v_detector) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setDetector (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_detector), __pyx_ptype_4fisx_5_fisx_PyDetector, 1, "detector", 0))) __PYX_ERR(1, 1580, __pyx_L1_error)
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_24setDetector(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), ((struct __pyx_obj_4fisx_5_fisx_PyDetector *)__pyx_v_detector));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_24setDetector(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, struct __pyx_obj_4fisx_5_fisx_PyDetector *__pyx_v_detector) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setDetector", 0);

  /* "python/cython/_fisx.pyx":1581
 * 
 *     def setDetector(self, PyDetector detector):
 *         self.thisptr.setDetector(deref(detector.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def setGeometry(self, double alphaIn, double alphaOut, double scatteringAngle = -90.0):
 */
  try {
    __pyx_v_self->thisptr->setDetector((*__pyx_v_detector->thisptr));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1581, __pyx_L1_error)
  }

  /* "python/cython/_fisx.pyx":1580
 *         self._fillTransmissionTable(pyTransmissionTableList, "attenuator")
 * 
 *     def setDetector(self, PyDetector detector):             # <<<<<<<<<<<<<<
 *         self.thisptr.setDetector(deref(detector.thisptr))
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF.setDetector", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1583
 *         self.thisptr.setDetector(deref(detector.thisptr))
 * 
 *     def setGeometry(self, double alphaIn, double alphaOut, double scatteringAngle = -90.0):             # <<<<<<<<<<<<<<
 *         if scatteringAngle < 0.0:
 *             self.thisptr.setGeometry(alphaIn, alphaOut, alphaIn + alphaOut)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_27setGeometry(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_27setGeometry(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_alphaIn;
  double __pyx_v_alphaOut;
  double __pyx_v_scatteringAngle;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setGeometry (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alphaIn,&__pyx_n_s_alphaOut,&__pyx_n_s_scatteringAngle,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alphaIn)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alphaOut)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setGeometry", 0, 2, 3, 1); __PYX_ERR(1, 1583, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scatteringAngle);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setGeometry") < 0)) __PYX_ERR(1, 1583, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_alphaIn = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_alphaIn == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1583, __pyx_L3_error)
    __pyx_v_alphaOut = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_alphaOut == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1583, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_scatteringAngle = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_scatteringAngle == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1583, __pyx_L3_error)
    } else {
      __pyx_v_scatteringAngle = ((double)-90.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setGeometry", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1583, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF.setGeometry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_26setGeometry(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), __pyx_v_alphaIn, __pyx_v_alphaOut, __pyx_v_scatteringAngle);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_26setGeometry(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, double __pyx_v_alphaIn, double __pyx_v_alphaOut, double __pyx_v_scatteringAngle) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setGeometry", 0);

  /* "python/cython/_fisx.pyx":1584
 * 
 *     def setGeometry(self, double alphaIn, double alphaOut, double scatteringAngle = -90.0):
 *         if scatteringAngle < 0.0:             # <<<<<<<<<<<<<<
 *             self.thisptr.setGeometry(alphaIn, alphaOut, alphaIn + alphaOut)
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_scatteringAngle < 0.0) != 0);
  if (__pyx_t_1) {

    /* "python/cython/_fisx.pyx":1585
 *     def setGeometry(self, double alphaIn, double alphaOut, double scatteringAngle = -90.0):
 *         if scatteringAngle < 0.0:
 *             self.thisptr.setGeometry(alphaIn, alphaOut, alphaIn + alphaOut)             # <<<<<<<<<<<<<<
 *         else:
 *             self.thisptr.setGeometry(alphaIn, alphaOut, scatteringAngle)
 */
    try {
      __pyx_v_self->thisptr->setGeometry(__pyx_v_alphaIn, __pyx_v_alphaOut, (__pyx_v_alphaIn + __pyx_v_alphaOut));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 1585, __pyx_L1_error)
    }

    /* "python/cython/_fisx.pyx":1584
 * 
 *     def setGeometry(self, double alphaIn, double alphaOut, double scatteringAngle = -90.0):
 *         if scatteringAngle < 0.0:             # <<<<<<<<<<<<<<
 *             self.thisptr.setGeometry(alphaIn, alphaOut, alphaIn + alphaOut)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "python/cython/_fisx.pyx":1587
 *             self.thisptr.setGeometry(alphaIn, alphaOut, alphaIn + alphaOut)
 *         else:
 *             self.thisptr.setGeometry(alphaIn, alphaOut, scatteringAngle)             # <<<<<<<<<<<<<<
 * 
 *     def getMultilayerFluorescence(self, elementFamilyLayer, PyElements elementsLibrary, \
 */
  /*else*/ {
    try {
      __pyx_v_self->thisptr->setGeometry(__pyx_v_alphaIn, __pyx_v_alphaOut, __pyx_v_scatteringAngle);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 1587, __pyx_L1_error)
    }
  }
  __pyx_L3:;

  /* "python/cython/_fisx.pyx":1583
 *         self.thisptr.setDetector(deref(detector.thisptr))
 * 
 *     def setGeometry(self, double alphaIn, double alphaOut, double scatteringAngle = -90.0):             # <<<<<<<<<<<<<<
 *         if scatteringAngle < 0.0:
 *             self.thisptr.setGeometry(alphaIn, alphaOut, alphaIn + alphaOut)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF.setGeometry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1589
 *             self.thisptr.setGeometry(alphaIn, alphaOut, scatteringAngle)
 * 
 *     def getMultilayerFluorescence(self, elementFamilyLayer, PyElements elementsLibrary, \             # <<<<<<<<<<<<<<
 *                             int secondary = 0, int useGeometricEfficiency = 1, int useMassFractions = 0, \
 *                             secondaryCalculationLimit = 0.0):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_29getMultilayerFluorescence(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4fisx_5_fisx_5PyXRF_28getMultilayerFluorescence[] = "\n        Input\n        elementFamilyLayer - Vector of strings. Each string represents the information we are interested on.\n        \"Cr\"     - We want the information for Cr, for all line families and sample layers\n        \"Cr K\"   - We want the information for Cr, for the family of K-shell emission lines, in all layers.\n        \"Cr K 0\" - We want the information for Cr, for the family of K-shell emission lines, in layer 0.\n        elementsLibrary - Instance of library to be used for all the Physical constants\n        secondary - Flag to indicate different levels of secondary excitation to be considered.\n                    0 Means not considered\n                    1 Consider only intralayer secondary excitation\n                    2 Consider intralayer and interlayer secondary excitation\n        useGeometricEfficiency - Take into account solid angle or not. Default is 1 (yes)\n\n        useMassFractions - If 0 (default) the output corresponds to the requested information if the mass\n        fraction of the element would be one on each calculated sample layer. To get the actual signal, one\n        has to multiply bthe rates by the actual mass fraction of the element on each sample layer.\n                           If set to 1 the rate will be already corrected by the actual mass fraction.\n\n        Return a complete output of the form\n        [Element Family][Layer][line][\"energy\"] - Energy in keV of the emission line\n        [Element Family][Layer][line][\"primary\"] - Primary rate prior to correct for detection efficiency\n        [Element Family][Layer][line][\"secondary\"] - Secondary rate prior to correct for detection efficiency\n        [Element Family][Layer][line][\"rate\"] - Overall rate\n        [Element Family][Layer][line][\"efficiency\"] - Detection efficiency\n        [Element Family][Layer][line][element line layer] - Secondary rate (prior to correct for detection efficiency)\n        due to the fluorescence from the given e""lement, line and layer index composing the map key.\n        ";
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_29getMultilayerFluorescence(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elementFamilyLayer = 0;
  struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLibrary = 0;
  int __pyx_v_secondary;
  int __pyx_v_useGeometricEfficiency;
  int __pyx_v_useMassFractions;
  PyObject *__pyx_v_secondaryCalculationLimit = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMultilayerFluorescence (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementFamilyLayer,&__pyx_n_s_elementsLibrary,&__pyx_n_s_secondary,&__pyx_n_s_useGeometricEfficiency,&__pyx_n_s_useMassFractions,&__pyx_n_s_secondaryCalculationLimit,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[5] = ((PyObject *)__pyx_float_0_0);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementFamilyLayer)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementsLibrary)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getMultilayerFluorescence", 0, 2, 6, 1); __PYX_ERR(1, 1589, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_secondary);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_useGeometricEfficiency);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_useMassFractions);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_secondaryCalculationLimit);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getMultilayerFluorescence") < 0)) __PYX_ERR(1, 1589, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_elementFamilyLayer = values[0];
    __pyx_v_elementsLibrary = ((struct __pyx_obj_4fisx_5_fisx_PyElements *)values[1]);
    if (values[2]) {
      __pyx_v_secondary = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_secondary == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1590, __pyx_L3_error)
    } else {
      __pyx_v_secondary = ((int)0);
    }
    if (values[3]) {
      __pyx_v_useGeometricEfficiency = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_useGeometricEfficiency == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1590, __pyx_L3_error)
    } else {
      __pyx_v_useGeometricEfficiency = ((int)1);
    }
    if (values[4]) {
      __pyx_v_useMassFractions = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_useMassFractions == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1590, __pyx_L3_error)
    } else {
      __pyx_v_useMassFractions = ((int)0);
    }
    __pyx_v_secondaryCalculationLimit = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getMultilayerFluorescence", 0, 2, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1589, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF.getMultilayerFluorescence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementsLibrary), __pyx_ptype_4fisx_5_fisx_PyElements, 1, "elementsLibrary", 0))) __PYX_ERR(1, 1589, __pyx_L1_error)
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_28getMultilayerFluorescence(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), __pyx_v_elementFamilyLayer, __pyx_v_elementsLibrary, __pyx_v_secondary, __pyx_v_useGeometricEfficiency, __pyx_v_useMassFractions, __pyx_v_secondaryCalculationLimit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_28getMultilayerFluorescence(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_elementFamilyLayer, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLibrary, int __pyx_v_secondary, int __pyx_v_useGeometricEfficiency, int __pyx_v_useMassFractions, PyObject *__pyx_v_secondaryCalculationLimit) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  std::vector<std::string>  __pyx_t_9;
  double __pyx_t_10;
  std::map<std::string,std::map<int,std::map<std::string,std::map<std::string,double> > > >  __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getMultilayerFluorescence", 0);
  __Pyx_INCREF(__pyx_v_elementFamilyLayer);

  /* "python/cython/_fisx.pyx":1619
 *         due to the fluorescence from the given element, line and layer index composing the map key.
 *         """
 *         if sys.version > "3.0":             # <<<<<<<<<<<<<<
 *             elementFamilyLayer = [toBytes(x) for x in elementFamilyLayer]
 *             return toStringKeysAndValues(self.thisptr.getMultilayerFluorescence(elementFamilyLayer, \
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":1620
 *         """
 *         if sys.version > "3.0":
 *             elementFamilyLayer = [toBytes(x) for x in elementFamilyLayer]             # <<<<<<<<<<<<<<
 *             return toStringKeysAndValues(self.thisptr.getMultilayerFluorescence(elementFamilyLayer, \
 *                             deref(elementsLibrary.thisptr), \
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_elementFamilyLayer)) || PyTuple_CheckExact(__pyx_v_elementFamilyLayer)) {
      __pyx_t_2 = __pyx_v_elementFamilyLayer; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_elementFamilyLayer); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1620, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1620, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 1620, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1620, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 1620, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1620, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_2);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 1620, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1620, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_x) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_x);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1620, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 1620, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_elementFamilyLayer, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "python/cython/_fisx.pyx":1621
 *         if sys.version > "3.0":
 *             elementFamilyLayer = [toBytes(x) for x in elementFamilyLayer]
 *             return toStringKeysAndValues(self.thisptr.getMultilayerFluorescence(elementFamilyLayer, \             # <<<<<<<<<<<<<<
 *                             deref(elementsLibrary.thisptr), \
 *                             secondary, useGeometricEfficiency, \
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeysAndValues); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_v_elementFamilyLayer); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1621, __pyx_L1_error)

    /* "python/cython/_fisx.pyx":1624
 *                             deref(elementsLibrary.thisptr), \
 *                             secondary, useGeometricEfficiency, \
 *                             useMassFractions, secondaryCalculationLimit))             # <<<<<<<<<<<<<<
 *         else:
 *             return self.thisptr.getMultilayerFluorescence(elementFamilyLayer, \
 */
    __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_secondaryCalculationLimit); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1624, __pyx_L1_error)

    /* "python/cython/_fisx.pyx":1621
 *         if sys.version > "3.0":
 *             elementFamilyLayer = [toBytes(x) for x in elementFamilyLayer]
 *             return toStringKeysAndValues(self.thisptr.getMultilayerFluorescence(elementFamilyLayer, \             # <<<<<<<<<<<<<<
 *                             deref(elementsLibrary.thisptr), \
 *                             secondary, useGeometricEfficiency, \
 */
    try {
      __pyx_t_11 = __pyx_v_self->thisptr->getMultilayerFluorescence(__pyx_t_9, (*__pyx_v_elementsLibrary->thisptr), __pyx_v_secondary, __pyx_v_useGeometricEfficiency, __pyx_v_useMassFractions, __pyx_t_10);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 1621, __pyx_L1_error)
    }
    __pyx_t_6 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_int_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e____3e___(__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":1619
 *         due to the fluorescence from the given element, line and layer index composing the map key.
 *         """
 *         if sys.version > "3.0":             # <<<<<<<<<<<<<<
 *             elementFamilyLayer = [toBytes(x) for x in elementFamilyLayer]
 *             return toStringKeysAndValues(self.thisptr.getMultilayerFluorescence(elementFamilyLayer, \
 */
  }

  /* "python/cython/_fisx.pyx":1626
 *                             useMassFractions, secondaryCalculationLimit))
 *         else:
 *             return self.thisptr.getMultilayerFluorescence(elementFamilyLayer, \             # <<<<<<<<<<<<<<
 *                             deref(elementsLibrary.thisptr), \
 *                             secondary, useGeometricEfficiency, \
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_9 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_v_elementFamilyLayer); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1626, __pyx_L1_error)

    /* "python/cython/_fisx.pyx":1629
 *                             deref(elementsLibrary.thisptr), \
 *                             secondary, useGeometricEfficiency, \
 *                             useMassFractions, secondaryCalculationLimit)             # <<<<<<<<<<<<<<
 * 
 *     def getFluorescence(self, elementName, PyElements elementsLibrary, \
 */
    __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_secondaryCalculationLimit); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1629, __pyx_L1_error)

    /* "python/cython/_fisx.pyx":1626
 *                             useMassFractions, secondaryCalculationLimit))
 *         else:
 *             return self.thisptr.getMultilayerFluorescence(elementFamilyLayer, \             # <<<<<<<<<<<<<<
 *                             deref(elementsLibrary.thisptr), \
 *                             secondary, useGeometricEfficiency, \
 */
    try {
      __pyx_t_11 = __pyx_v_self->thisptr->getMultilayerFluorescence(__pyx_t_9, (*__pyx_v_elementsLibrary->thisptr), __pyx_v_secondary, __pyx_v_useGeometricEfficiency, __pyx_v_useMassFractions, __pyx_t_10);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 1626, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_int_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e____3e___(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":1589
 *             self.thisptr.setGeometry(alphaIn, alphaOut, scatteringAngle)
 * 
 *     def getMultilayerFluorescence(self, elementFamilyLayer, PyElements elementsLibrary, \             # <<<<<<<<<<<<<<
 *                             int secondary = 0, int useGeometricEfficiency = 1, int useMassFractions = 0, \
 *                             secondaryCalculationLimit = 0.0):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("fisx._fisx.PyXRF.getMultilayerFluorescence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_elementFamilyLayer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1631
 *                             useMassFractions, secondaryCalculationLimit)
 * 
 *     def getFluorescence(self, elementName, PyElements elementsLibrary, \             # <<<<<<<<<<<<<<
 *                             int sampleLayer = 0, lineFamily="K", int secondary = 0, \
 *                             int useGeometricEfficiency = 1, int useMassFractions = 0, \
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_31getFluorescence(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_31getFluorescence(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elementName = 0;
  struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLibrary = 0;
  int __pyx_v_sampleLayer;
  PyObject *__pyx_v_lineFamily = 0;
  int __pyx_v_secondary;
  int __pyx_v_useGeometricEfficiency;
  int __pyx_v_useMassFractions;
  double __pyx_v_secondaryCalculationLimit;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getFluorescence (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementName,&__pyx_n_s_elementsLibrary,&__pyx_n_s_sampleLayer,&__pyx_n_s_lineFamily,&__pyx_n_s_secondary,&__pyx_n_s_useGeometricEfficiency,&__pyx_n_s_useMassFractions,&__pyx_n_s_secondaryCalculationLimit,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    values[3] = ((PyObject *)__pyx_n_s_K);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementsLibrary)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getFluorescence", 0, 2, 8, 1); __PYX_ERR(1, 1631, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sampleLayer);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lineFamily);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_secondary);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_useGeometricEfficiency);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_useMassFractions);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_secondaryCalculationLimit);
          if (value) { values[7] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getFluorescence") < 0)) __PYX_ERR(1, 1631, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_elementName = values[0];
    __pyx_v_elementsLibrary = ((struct __pyx_obj_4fisx_5_fisx_PyElements *)values[1]);
    if (values[2]) {
      __pyx_v_sampleLayer = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_sampleLayer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1632, __pyx_L3_error)
    } else {
      __pyx_v_sampleLayer = ((int)0);
    }
    __pyx_v_lineFamily = values[3];
    if (values[4]) {
      __pyx_v_secondary = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_secondary == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1632, __pyx_L3_error)
    } else {
      __pyx_v_secondary = ((int)0);
    }
    if (values[5]) {
      __pyx_v_useGeometricEfficiency = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_useGeometricEfficiency == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1633, __pyx_L3_error)
    } else {
      __pyx_v_useGeometricEfficiency = ((int)1);
    }
    if (values[6]) {
      __pyx_v_useMassFractions = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_useMassFractions == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1633, __pyx_L3_error)
    } else {
      __pyx_v_useMassFractions = ((int)0);
    }
    if (values[7]) {
      __pyx_v_secondaryCalculationLimit = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_secondaryCalculationLimit == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1634, __pyx_L3_error)
    } else {
      __pyx_v_secondaryCalculationLimit = ((double)0.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getFluorescence", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1631, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF.getFluorescence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementsLibrary), __pyx_ptype_4fisx_5_fisx_PyElements, 1, "elementsLibrary", 0))) __PYX_ERR(1, 1631, __pyx_L1_error)
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_30getFluorescence(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), __pyx_v_elementName, __pyx_v_elementsLibrary, __pyx_v_sampleLayer, __pyx_v_lineFamily, __pyx_v_secondary, __pyx_v_useGeometricEfficiency, __pyx_v_useMassFractions, __pyx_v_secondaryCalculationLimit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_30getFluorescence(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, PyObject *__pyx_v_elementName, struct __pyx_obj_4fisx_5_fisx_PyElements *__pyx_v_elementsLibrary, int __pyx_v_sampleLayer, PyObject *__pyx_v_lineFamily, int __pyx_v_secondary, int __pyx_v_useGeometricEfficiency, int __pyx_v_useMassFractions, double __pyx_v_secondaryCalculationLimit) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  std::string __pyx_t_5;
  std::string __pyx_t_6;
  std::map<std::string,std::map<int,std::map<std::string,std::map<std::string,double> > > >  __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getFluorescence", 0);
  __Pyx_INCREF(__pyx_v_elementName);
  __Pyx_INCREF(__pyx_v_lineFamily);

  /* "python/cython/_fisx.pyx":1635
 *                             int useGeometricEfficiency = 1, int useMassFractions = 0, \
 *                             double secondaryCalculationLimit = 0.0):
 *         if sys.version > "3.0":             # <<<<<<<<<<<<<<
 *             elementName = toBytes(elementName)
 *             lineFamily = toBytes(lineFamily)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_3_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "python/cython/_fisx.pyx":1636
 *                             double secondaryCalculationLimit = 0.0):
 *         if sys.version > "3.0":
 *             elementName = toBytes(elementName)             # <<<<<<<<<<<<<<
 *             lineFamily = toBytes(lineFamily)
 *             return toStringKeysAndValues(self.thisptr.getMultilayerFluorescence(elementName, deref(elementsLibrary.thisptr), \
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_elementName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_elementName);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_elementName, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "python/cython/_fisx.pyx":1637
 *         if sys.version > "3.0":
 *             elementName = toBytes(elementName)
 *             lineFamily = toBytes(lineFamily)             # <<<<<<<<<<<<<<
 *             return toStringKeysAndValues(self.thisptr.getMultilayerFluorescence(elementName, deref(elementsLibrary.thisptr), \
 *                             sampleLayer, lineFamily, secondary, useGeometricEfficiency, useMassFractions, \
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_lineFamily) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_lineFamily);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_lineFamily, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "python/cython/_fisx.pyx":1638
 *             elementName = toBytes(elementName)
 *             lineFamily = toBytes(lineFamily)
 *             return toStringKeysAndValues(self.thisptr.getMultilayerFluorescence(elementName, deref(elementsLibrary.thisptr), \             # <<<<<<<<<<<<<<
 *                             sampleLayer, lineFamily, secondary, useGeometricEfficiency, useMassFractions, \
 *                             secondaryCalculationLimit))
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toStringKeysAndValues); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_elementName); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1638, __pyx_L1_error)

    /* "python/cython/_fisx.pyx":1639
 *             lineFamily = toBytes(lineFamily)
 *             return toStringKeysAndValues(self.thisptr.getMultilayerFluorescence(elementName, deref(elementsLibrary.thisptr), \
 *                             sampleLayer, lineFamily, secondary, useGeometricEfficiency, useMassFractions, \             # <<<<<<<<<<<<<<
 *                             secondaryCalculationLimit))
 *         else:
 */
    __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_lineFamily); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1639, __pyx_L1_error)

    /* "python/cython/_fisx.pyx":1638
 *             elementName = toBytes(elementName)
 *             lineFamily = toBytes(lineFamily)
 *             return toStringKeysAndValues(self.thisptr.getMultilayerFluorescence(elementName, deref(elementsLibrary.thisptr), \             # <<<<<<<<<<<<<<
 *                             sampleLayer, lineFamily, secondary, useGeometricEfficiency, useMassFractions, \
 *                             secondaryCalculationLimit))
 */
    try {
      __pyx_t_7 = __pyx_v_self->thisptr->getMultilayerFluorescence(__pyx_t_5, (*__pyx_v_elementsLibrary->thisptr), __pyx_v_sampleLayer, __pyx_t_6, __pyx_v_secondary, __pyx_v_useGeometricEfficiency, __pyx_v_useMassFractions, __pyx_v_secondaryCalculationLimit);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 1638, __pyx_L1_error)
    }
    __pyx_t_4 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_int_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e____3e___(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "python/cython/_fisx.pyx":1635
 *                             int useGeometricEfficiency = 1, int useMassFractions = 0, \
 *                             double secondaryCalculationLimit = 0.0):
 *         if sys.version > "3.0":             # <<<<<<<<<<<<<<
 *             elementName = toBytes(elementName)
 *             lineFamily = toBytes(lineFamily)
 */
  }

  /* "python/cython/_fisx.pyx":1642
 *                             secondaryCalculationLimit))
 *         else:
 *             return self.thisptr.getMultilayerFluorescence(elementName, deref(elementsLibrary.thisptr), \             # <<<<<<<<<<<<<<
 *                             sampleLayer, lineFamily, secondary, useGeometricEfficiency, useMassFractions, \
 *                             secondaryCalculationLimit)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_elementName); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1642, __pyx_L1_error)

    /* "python/cython/_fisx.pyx":1643
 *         else:
 *             return self.thisptr.getMultilayerFluorescence(elementName, deref(elementsLibrary.thisptr), \
 *                             sampleLayer, lineFamily, secondary, useGeometricEfficiency, useMassFractions, \             # <<<<<<<<<<<<<<
 *                             secondaryCalculationLimit)
 * 
 */
    __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_lineFamily); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1643, __pyx_L1_error)

    /* "python/cython/_fisx.pyx":1642
 *                             secondaryCalculationLimit))
 *         else:
 *             return self.thisptr.getMultilayerFluorescence(elementName, deref(elementsLibrary.thisptr), \             # <<<<<<<<<<<<<<
 *                             sampleLayer, lineFamily, secondary, useGeometricEfficiency, useMassFractions, \
 *                             secondaryCalculationLimit)
 */
    try {
      __pyx_t_7 = __pyx_v_self->thisptr->getMultilayerFluorescence(__pyx_t_6, (*__pyx_v_elementsLibrary->thisptr), __pyx_v_sampleLayer, __pyx_t_5, __pyx_v_secondary, __pyx_v_useGeometricEfficiency, __pyx_v_useMassFractions, __pyx_v_secondaryCalculationLimit);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 1642, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_int_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e____3e___(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "python/cython/_fisx.pyx":1631
 *                             useMassFractions, secondaryCalculationLimit)
 * 
 *     def getFluorescence(self, elementName, PyElements elementsLibrary, \             # <<<<<<<<<<<<<<
 *                             int sampleLayer = 0, lineFamily="K", int secondary = 0, \
 *                             int useGeometricEfficiency = 1, int useMassFractions = 0, \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("fisx._fisx.PyXRF.getFluorescence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_elementName);
  __Pyx_XDECREF(__pyx_v_lineFamily);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "python/cython/_fisx.pyx":1646
 *                             secondaryCalculationLimit)
 * 
 *     def getGeometricEfficiency(self, int layerIndex = 0):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getGeometricEfficiency(layerIndex)
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_33getGeometricEfficiency(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_33getGeometricEfficiency(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_layerIndex;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getGeometricEfficiency (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_layerIndex,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_layerIndex);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getGeometricEfficiency") < 0)) __PYX_ERR(1, 1646, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_layerIndex = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_layerIndex == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1646, __pyx_L3_error)
    } else {
      __pyx_v_layerIndex = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getGeometricEfficiency", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1646, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fisx._fisx.PyXRF.getGeometricEfficiency", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_32getGeometricEfficiency(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), __pyx_v_layerIndex);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_32getGeometricEfficiency(struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, int __pyx_v_layerIndex) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getGeometricEfficiency", 0);

  /* "python/cython/_fisx.pyx":1647
 * 
 *     def getGeometricEfficiency(self, int layerIndex = 0):
 *         return self.thisptr.getGeometricEfficiency(layerIndex)             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_v_self->thisptr->getGeometricEfficiency(__pyx_v_layerIndex);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 1647, __pyx_L1_error)
  }
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "python/cython/_fisx.pyx":1646
 *                             secondaryCalculationLimit)
 * 
 *     def getGeometricEfficiency(self, int layerIndex = 0):             # <<<<<<<<<<<<<<
 *         return self.thisptr.getGeometricEfficiency(layerIndex)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fisx._fisx.PyXRF.getGeometricEfficiency", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_35__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_35__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_34__reduce_cython__(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_34__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyXRF.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_37__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_4fisx_5_fisx_5PyXRF_37__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4fisx_5_fisx_5PyXRF_36__setstate_cython__(((struct __pyx_obj_4fisx_5_fisx_PyXRF *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4fisx_5_fisx_5PyXRF_36__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4fisx_5_fisx_PyXRF *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fisx._fisx.PyXRF.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.from_py":13
 * 
 * @cname("__pyx_convert_string_from_py_std__in_string")
 * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = 0
 *     cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length)
 */

static std::string __pyx_convert_string_from_py_std__in_string(PyObject *__pyx_v_o) {
  Py_ssize_t __pyx_v_length;
  char const *__pyx_v_data;
  std::string __pyx_r;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_string_from_py_std__in_string", 0);

  /* "string.from_py":14
 * @cname("__pyx_convert_string_from_py_std__in_string")
 * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *:
 *     cdef Py_ssize_t length = 0             # <<<<<<<<<<<<<<
 *     cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length)
 *     return string(data, length)
 */
  __pyx_v_length = 0;

  /* "string.from_py":15
 * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *:
 *     cdef Py_ssize_t length = 0
 *     cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length)             # <<<<<<<<<<<<<<
 *     return string(data, length)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_AsStringAndSize(__pyx_v_o, (&__pyx_v_length)); if (unlikely(__pyx_t_1 == ((char const *)NULL))) __PYX_ERR(0, 15, __pyx_L1_error)
  __pyx_v_data = __pyx_t_1;

  /* "string.from_py":16
 *     cdef Py_ssize_t length = 0
 *     cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length)
 *     return string(data, length)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = std::string(__pyx_v_data, __pyx_v_length);
  goto __pyx_L0;

  /* "string.from_py":13
 * 
 * @cname("__pyx_convert_string_from_py_std__in_string")
 * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = 0
 *     cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("string.from_py.__pyx_convert_string_from_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "map.from_py":174
 * 
 * @cname("__pyx_convert_map_from_py_std_3a__3a_string__and_double")
 * cdef map[X,Y] __pyx_convert_map_from_py_std_3a__3a_string__and_double(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef dict d = o
 *     cdef map[X,Y] m
 */

static std::map<std::string,double>  __pyx_convert_map_from_py_std_3a__3a_string__and_double(PyObject *__pyx_v_o) {
  PyObject *__pyx_v_d = 0;
  std::map<std::string,double>  __pyx_v_m;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  std::map<std::string,double>  __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  std::string __pyx_t_8;
  double __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_map_from_py_std_3a__3a_string__and_double", 0);

  /* "map.from_py":175
 * @cname("__pyx_convert_map_from_py_std_3a__3a_string__and_double")
 * cdef map[X,Y] __pyx_convert_map_from_py_std_3a__3a_string__and_double(object o) except *:
 *     cdef dict d = o             # <<<<<<<<<<<<<<
 *     cdef map[X,Y] m
 *     for key, value in d.iteritems():
 */
  if (!(likely(PyDict_CheckExact(__pyx_v_o))||((__pyx_v_o) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_o)->tp_name), 0))) __PYX_ERR(0, 175, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_o;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_d = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "map.from_py":177
 *     cdef dict d = o
 *     cdef map[X,Y] m
 *     for key, value in d.iteritems():             # <<<<<<<<<<<<<<
 *         m.insert(pair[X,Y](<X>key, <Y>value))
 *     return m
 */
  __pyx_t_2 = 0;
  if (unlikely(__pyx_v_d == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
    __PYX_ERR(0, 177, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_d, 1, __pyx_n_s_iteritems, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_7 == 0)) break;
    if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "map.from_py":178
 *     cdef map[X,Y] m
 *     for key, value in d.iteritems():
 *         m.insert(pair[X,Y](<X>key, <Y>value))             # <<<<<<<<<<<<<<
 *     return m
 * 
 */
    __pyx_t_8 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L1_error)
    __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L1_error)
    __pyx_v_m.insert(std::pair<std::string,double> (((std::string)__pyx_t_8), ((double)__pyx_t_9)));
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "map.from_py":179
 *     for key, value in d.iteritems():
 *         m.insert(pair[X,Y](<X>key, <Y>value))
 *     return m             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_m;
  goto __pyx_L0;

  /* "map.from_py":174
 * 
 * @cname("__pyx_convert_map_from_py_std_3a__3a_string__and_double")
 * cdef map[X,Y] __pyx_convert_map_from_py_std_3a__3a_string__and_double(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef dict d = o
 *     cdef map[X,Y] m
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("map.from_py.__pyx_convert_map_from_py_std_3a__3a_string__and_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vector.from_py":45
 * 
 * @cname("__pyx_convert_vector_from_py_double")
 * cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef vector[X] v
 *     for item in o:
 */

static std::vector<double>  __pyx_convert_vector_from_py_double(PyObject *__pyx_v_o) {
  std::vector<double>  __pyx_v_v;
  PyObject *__pyx_v_item = NULL;
  std::vector<double>  __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  double __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_double", 0);

  /* "vector.from_py":47
 * cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *:
 *     cdef vector[X] v
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 *     return v
 */
  if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
    __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 47, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "vector.from_py":48
 *     cdef vector[X] v
 *     for item in o:
 *         v.push_back(<X>item)             # <<<<<<<<<<<<<<
 *     return v
 * 
 */
    __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_item); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L1_error)
    __pyx_v_v.push_back(((double)__pyx_t_5));

    /* "vector.from_py":47
 * cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *:
 *     cdef vector[X] v
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 *     return v
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vector.from_py":49
 *     for item in o:
 *         v.push_back(<X>item)
 *     return v             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_v;
  goto __pyx_L0;

  /* "vector.from_py":45
 * 
 * @cname("__pyx_convert_vector_from_py_double")
 * cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef vector[X] v
 *     for item in o:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static std::vector<std::string>  __pyx_convert_vector_from_py_std_3a__3a_string(PyObject *__pyx_v_o) {
  std::vector<std::string>  __pyx_v_v;
  PyObject *__pyx_v_item = NULL;
  std::vector<std::string>  __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_std_3a__3a_string", 0);

  /* "vector.from_py":47
 * cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_string(object o) except *:
 *     cdef vector[X] v
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 *     return v
 */
  if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
    __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 47, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "vector.from_py":48
 *     cdef vector[X] v
 *     for item in o:
 *         v.push_back(<X>item)             # <<<<<<<<<<<<<<
 *     return v
 * 
 */
    __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_item); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L1_error)
    __pyx_v_v.push_back(((std::string)__pyx_t_5));

    /* "vector.from_py":47
 * cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_string(object o) except *:
 *     cdef vector[X] v
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 *     return v
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vector.from_py":49
 *     for item in o:
 *         v.push_back(<X>item)
 *     return v             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_v;
  goto __pyx_L0;

  /* "vector.from_py":45
 * 
 * @cname("__pyx_convert_vector_from_py_std_3a__3a_string")
 * cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_string(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef vector[X] v
 *     for item in o:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_std_3a__3a_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "map.from_py":174
 * 
 * @cname("__pyx_convert_map_from_py_double__and_double")
 * cdef map[X,Y] __pyx_convert_map_from_py_double__and_double(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef dict d = o
 *     cdef map[X,Y] m
 */

static std::map<double,double>  __pyx_convert_map_from_py_double__and_double(PyObject *__pyx_v_o) {
  PyObject *__pyx_v_d = 0;
  std::map<double,double>  __pyx_v_m;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  std::map<double,double>  __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  double __pyx_t_8;
  double __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_map_from_py_double__and_double", 0);

  /* "map.from_py":175
 * @cname("__pyx_convert_map_from_py_double__and_double")
 * cdef map[X,Y] __pyx_convert_map_from_py_double__and_double(object o) except *:
 *     cdef dict d = o             # <<<<<<<<<<<<<<
 *     cdef map[X,Y] m
 *     for key, value in d.iteritems():
 */
  if (!(likely(PyDict_CheckExact(__pyx_v_o))||((__pyx_v_o) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_o)->tp_name), 0))) __PYX_ERR(0, 175, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_o;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_d = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "map.from_py":177
 *     cdef dict d = o
 *     cdef map[X,Y] m
 *     for key, value in d.iteritems():             # <<<<<<<<<<<<<<
 *         m.insert(pair[X,Y](<X>key, <Y>value))
 *     return m
 */
  __pyx_t_2 = 0;
  if (unlikely(__pyx_v_d == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
    __PYX_ERR(0, 177, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_d, 1, __pyx_n_s_iteritems, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_7 == 0)) break;
    if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "map.from_py":178
 *     cdef map[X,Y] m
 *     for key, value in d.iteritems():
 *         m.insert(pair[X,Y](<X>key, <Y>value))             # <<<<<<<<<<<<<<
 *     return m
 * 
 */
    __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_key); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L1_error)
    __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L1_error)
    __pyx_v_m.insert(std::pair<double,double> (((double)__pyx_t_8), ((double)__pyx_t_9)));
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "map.from_py":179
 *     for key, value in d.iteritems():
 *         m.insert(pair[X,Y](<X>key, <Y>value))
 *     return m             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_m;
  goto __pyx_L0;

  /* "map.from_py":174
 * 
 * @cname("__pyx_convert_map_from_py_double__and_double")
 * cdef map[X,Y] __pyx_convert_map_from_py_double__and_double(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef dict d = o
 *     cdef map[X,Y] m
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("map.from_py.__pyx_convert_map_from_py_double__and_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vector.from_py":45
 * 
 * @cname("__pyx_convert_vector_from_py_int")
 * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef vector[X] v
 *     for item in o:
 */

static std::vector<int>  __pyx_convert_vector_from_py_int(PyObject *__pyx_v_o) {
  std::vector<int>  __pyx_v_v;
  PyObject *__pyx_v_item = NULL;
  std::vector<int>  __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_int", 0);

  /* "vector.from_py":47
 * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *:
 *     cdef vector[X] v
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 *     return v
 */
  if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
    __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 47, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "vector.from_py":48
 *     cdef vector[X] v
 *     for item in o:
 *         v.push_back(<X>item)             # <<<<<<<<<<<<<<
 *     return v
 * 
 */
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_item); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L1_error)
    __pyx_v_v.push_back(((int)__pyx_t_5));

    /* "vector.from_py":47
 * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *:
 *     cdef vector[X] v
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 *     return v
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vector.from_py":49
 *     for item in o:
 *         v.push_back(<X>item)
 *     return v             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_v;
  goto __pyx_L0;

  /* "vector.from_py":45
 * 
 * @cname("__pyx_convert_vector_from_py_int")
 * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef vector[X] v
 *     for item in o:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vector.to_py":60
 * 
 * @cname("__pyx_convert_vector_to_py_double")
 * cdef object __pyx_convert_vector_to_py_double(vector[X]& v):             # <<<<<<<<<<<<<<
 *     return [v[i] for i in range(v.size())]
 * 
 */

static PyObject *__pyx_convert_vector_to_py_double(const std::vector<double>  &__pyx_v_v) {
  size_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_double", 0);

  /* "vector.to_py":61
 * @cname("__pyx_convert_vector_to_py_double")
 * cdef object __pyx_convert_vector_to_py_double(vector[X]& v):
 *     return [v[i] for i in range(v.size())]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_v.size();
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;
    __pyx_t_5 = PyFloat_FromDouble((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 61, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vector.to_py":60
 * 
 * @cname("__pyx_convert_vector_to_py_double")
 * cdef object __pyx_convert_vector_to_py_double(vector[X]& v):             # <<<<<<<<<<<<<<
 *     return [v[i] for i in range(v.size())]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.to_py":31
 * 
 * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
 * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
 *     return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
 * cdef extern from *:
 */

static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_PyObject_string_to_py_std__in_string", 0);

  /* "string.to_py":32
 * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
 * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s):
 *     return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())             # <<<<<<<<<<<<<<
 * cdef extern from *:
 *     cdef object __Pyx_PyUnicode_FromStringAndSize(const char*, size_t)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "string.to_py":31
 * 
 * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
 * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
 *     return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
 * cdef extern from *:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyObject_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.to_py":37
 * 
 * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
 * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
 *     return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
 * cdef extern from *:
 */

static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_PyUnicode_string_to_py_std__in_string", 0);

  /* "string.to_py":38
 * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
 * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s):
 *     return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())             # <<<<<<<<<<<<<<
 * cdef extern from *:
 *     cdef object __Pyx_PyStr_FromStringAndSize(const char*, size_t)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "string.to_py":37
 * 
 * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
 * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
 *     return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
 * cdef extern from *:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyUnicode_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.to_py":43
 * 
 * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
 * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
 *     return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
 * cdef extern from *:
 */

static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_PyStr_string_to_py_std__in_string", 0);

  /* "string.to_py":44
 * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
 * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s):
 *     return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())             # <<<<<<<<<<<<<<
 * cdef extern from *:
 *     cdef object __Pyx_PyBytes_FromStringAndSize(const char*, size_t)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyStr_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "string.to_py":43
 * 
 * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
 * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
 *     return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
 * cdef extern from *:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyStr_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.to_py":49
 * 
 * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
 * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
 *     return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
 * cdef extern from *:
 */

static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_PyBytes_string_to_py_std__in_string", 0);

  /* "string.to_py":50
 * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
 * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s):
 *     return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())             # <<<<<<<<<<<<<<
 * cdef extern from *:
 *     cdef object __Pyx_PyByteArray_FromStringAndSize(const char*, size_t)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "string.to_py":49
 * 
 * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
 * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
 *     return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
 * cdef extern from *:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyBytes_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.to_py":55
 * 
 * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
 * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
 *     return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
 * 
 */

static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_PyByteArray_string_to_py_std__in_string", 0);

  /* "string.to_py":56
 * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
 * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s):
 *     return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())             # <<<<<<<<<<<<<<
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyByteArray_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "string.to_py":55
 * 
 * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
 * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
 *     return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyByteArray_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "map.to_py":201
 * 
 * @cname("__pyx_convert_map_to_py_std_3a__3a_string____double")
 * cdef object __pyx_convert_map_to_py_std_3a__3a_string____double(const map[X,Y]& s):             # <<<<<<<<<<<<<<
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 */

static PyObject *__pyx_convert_map_to_py_std_3a__3a_string____double(std::map<std::string,double>  const &__pyx_v_s) {
  PyObject *__pyx_v_o = NULL;
  std::map<std::string,double> ::value_type const *__pyx_v_key_value;
  std::map<std::string,double> ::const_iterator __pyx_v_iter;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_map_to_py_std_3a__3a_string____double", 0);

  /* "map.to_py":202
 * @cname("__pyx_convert_map_to_py_std_3a__3a_string____double")
 * cdef object __pyx_convert_map_to_py_std_3a__3a_string____double(const map[X,Y]& s):
 *     o = {}             # <<<<<<<<<<<<<<
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_o = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "map.to_py":204
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()             # <<<<<<<<<<<<<<
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)
 */
  __pyx_v_iter = __pyx_v_s.begin();

  /* "map.to_py":205
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()
 *     while iter != s.end():             # <<<<<<<<<<<<<<
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_iter != __pyx_v_s.end()) != 0);
    if (!__pyx_t_2) break;

    /* "map.to_py":206
 *     cdef map[X,Y].const_iterator iter = s.begin()
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)             # <<<<<<<<<<<<<<
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)
 */
    __pyx_v_key_value = (&(*__pyx_v_iter));

    /* "map.to_py":207
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second             # <<<<<<<<<<<<<<
 *         cython.operator.preincrement(iter)
 *     return o
 */
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_key_value->second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_key_value->first); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_o, __pyx_t_3, __pyx_t_1) < 0)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "map.to_py":208
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)             # <<<<<<<<<<<<<<
 *     return o
 * 
 */
    (void)((++__pyx_v_iter));
  }

  /* "map.to_py":209
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)
 *     return o             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_o);
  __pyx_r = __pyx_v_o;
  goto __pyx_L0;

  /* "map.to_py":201
 * 
 * @cname("__pyx_convert_map_to_py_std_3a__3a_string____double")
 * cdef object __pyx_convert_map_to_py_std_3a__3a_string____double(const map[X,Y]& s):             # <<<<<<<<<<<<<<
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("map.to_py.__pyx_convert_map_to_py_std_3a__3a_string____double", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___(std::map<std::string,std::map<std::string,double> >  const &__pyx_v_s) {
  PyObject *__pyx_v_o = NULL;
  std::map<std::string,std::map<std::string,double> > ::value_type const *__pyx_v_key_value;
  std::map<std::string,std::map<std::string,double> > ::const_iterator __pyx_v_iter;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___", 0);

  /* "map.to_py":202
 * @cname("__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___")
 * cdef object __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___(const map[X,Y]& s):
 *     o = {}             # <<<<<<<<<<<<<<
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_o = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "map.to_py":204
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()             # <<<<<<<<<<<<<<
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)
 */
  __pyx_v_iter = __pyx_v_s.begin();

  /* "map.to_py":205
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()
 *     while iter != s.end():             # <<<<<<<<<<<<<<
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_iter != __pyx_v_s.end()) != 0);
    if (!__pyx_t_2) break;

    /* "map.to_py":206
 *     cdef map[X,Y].const_iterator iter = s.begin()
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)             # <<<<<<<<<<<<<<
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)
 */
    __pyx_v_key_value = (&(*__pyx_v_iter));

    /* "map.to_py":207
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second             # <<<<<<<<<<<<<<
 *         cython.operator.preincrement(iter)
 *     return o
 */
    __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____double(__pyx_v_key_value->second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_key_value->first); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_o, __pyx_t_3, __pyx_t_1) < 0)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "map.to_py":208
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)             # <<<<<<<<<<<<<<
 *     return o
 * 
 */
    (void)((++__pyx_v_iter));
  }

  /* "map.to_py":209
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)
 *     return o             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_o);
  __pyx_r = __pyx_v_o;
  goto __pyx_L0;

  /* "map.to_py":201
 * 
 * @cname("__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___")
 * cdef object __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___(const map[X,Y]& s):             # <<<<<<<<<<<<<<
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("map.to_py.__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___(std::map<std::string,std::vector<double> >  const &__pyx_v_s) {
  PyObject *__pyx_v_o = NULL;
  std::map<std::string,std::vector<double> > ::value_type const *__pyx_v_key_value;
  std::map<std::string,std::vector<double> > ::const_iterator __pyx_v_iter;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___", 0);

  /* "map.to_py":202
 * @cname("__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___")
 * cdef object __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___(const map[X,Y]& s):
 *     o = {}             # <<<<<<<<<<<<<<
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_o = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "map.to_py":204
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()             # <<<<<<<<<<<<<<
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)
 */
  __pyx_v_iter = __pyx_v_s.begin();

  /* "map.to_py":205
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()
 *     while iter != s.end():             # <<<<<<<<<<<<<<
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_iter != __pyx_v_s.end()) != 0);
    if (!__pyx_t_2) break;

    /* "map.to_py":206
 *     cdef map[X,Y].const_iterator iter = s.begin()
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)             # <<<<<<<<<<<<<<
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)
 */
    __pyx_v_key_value = (&(*__pyx_v_iter));

    /* "map.to_py":207
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second             # <<<<<<<<<<<<<<
 *         cython.operator.preincrement(iter)
 *     return o
 */
    __pyx_t_1 = __pyx_convert_vector_to_py_double(__pyx_v_key_value->second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_key_value->first); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_o, __pyx_t_3, __pyx_t_1) < 0)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "map.to_py":208
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)             # <<<<<<<<<<<<<<
 *     return o
 * 
 */
    (void)((++__pyx_v_iter));
  }

  /* "map.to_py":209
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)
 *     return o             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_o);
  __pyx_r = __pyx_v_o;
  goto __pyx_L0;

  /* "map.to_py":201
 * 
 * @cname("__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___")
 * cdef object __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___(const map[X,Y]& s):             # <<<<<<<<<<<<<<
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("map.to_py.__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_vector_3c_double_3e___", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vector.to_py":60
 * 
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_string")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_string(vector[X]& v):             # <<<<<<<<<<<<<<
 *     return [v[i] for i in range(v.size())]
 * 
 */

static PyObject *__pyx_convert_vector_to_py_std_3a__3a_string(const std::vector<std::string>  &__pyx_v_v) {
  size_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_std_3a__3a_string", 0);

  /* "vector.to_py":61
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_string")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_string(vector[X]& v):
 *     return [v[i] for i in range(v.size())]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_v.size();
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;
    __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 61, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vector.to_py":60
 * 
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_string")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_string(vector[X]& v):             # <<<<<<<<<<<<<<
 *     return [v[i] for i in range(v.size())]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_std_3a__3a_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_convert_vector_to_py_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___(const std::vector<std::map<std::string,std::map<std::string,double> > >  &__pyx_v_v) {
  size_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___", 0);

  /* "vector.to_py":61
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___(vector[X]& v):
 *     return [v[i] for i in range(v.size())]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_v.size();
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;
    __pyx_t_5 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 61, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vector.to_py":60
 * 
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___(vector[X]& v):             # <<<<<<<<<<<<<<
 *     return [v[i] for i in range(v.size())]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pair.to_py":158
 * 
 * @cname("__pyx_convert_pair_to_py_std_3a__3a_string____double")
 * cdef object __pyx_convert_pair_to_py_std_3a__3a_string____double(const pair[X,Y]& p):             # <<<<<<<<<<<<<<
 *     return p.first, p.second
 * 
 */

static PyObject *__pyx_convert_pair_to_py_std_3a__3a_string____double(std::pair<std::string,double>  const &__pyx_v_p) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_pair_to_py_std_3a__3a_string____double", 0);

  /* "pair.to_py":159
 * @cname("__pyx_convert_pair_to_py_std_3a__3a_string____double")
 * cdef object __pyx_convert_pair_to_py_std_3a__3a_string____double(const pair[X,Y]& p):
 *     return p.first, p.second             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_p.first); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_p.second); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pair.to_py":158
 * 
 * @cname("__pyx_convert_pair_to_py_std_3a__3a_string____double")
 * cdef object __pyx_convert_pair_to_py_std_3a__3a_string____double(const pair[X,Y]& p):             # <<<<<<<<<<<<<<
 *     return p.first, p.second
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pair.to_py.__pyx_convert_pair_to_py_std_3a__3a_string____double", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vector.to_py":60
 * 
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_pair_3c_std_3a__3a_string_2c_double_3e___")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_pair_3c_std_3a__3a_string_2c_double_3e___(vector[X]& v):             # <<<<<<<<<<<<<<
 *     return [v[i] for i in range(v.size())]
 * 
 */

static PyObject *__pyx_convert_vector_to_py_std_3a__3a_pair_3c_std_3a__3a_string_2c_double_3e___(const std::vector<std::pair<std::string,double> >  &__pyx_v_v) {
  size_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_std_3a__3a_pair_3c_std_3a__3a_string_2c_double_3e___", 0);

  /* "vector.to_py":61
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_pair_3c_std_3a__3a_string_2c_double_3e___")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_pair_3c_std_3a__3a_string_2c_double_3e___(vector[X]& v):
 *     return [v[i] for i in range(v.size())]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_v.size();
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;
    __pyx_t_5 = __pyx_convert_pair_to_py_std_3a__3a_string____double((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 61, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vector.to_py":60
 * 
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_pair_3c_std_3a__3a_string_2c_double_3e___")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_pair_3c_std_3a__3a_string_2c_double_3e___(vector[X]& v):             # <<<<<<<<<<<<<<
 *     return [v[i] for i in range(v.size())]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_std_3a__3a_pair_3c_std_3a__3a_string_2c_double_3e___", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "map.to_py":201
 * 
 * @cname("__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string")
 * cdef object __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(const map[X,Y]& s):             # <<<<<<<<<<<<<<
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 */

static PyObject *__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(std::map<std::string,std::string>  const &__pyx_v_s) {
  PyObject *__pyx_v_o = NULL;
  std::map<std::string,std::string> ::value_type const *__pyx_v_key_value;
  std::map<std::string,std::string> ::const_iterator __pyx_v_iter;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string", 0);

  /* "map.to_py":202
 * @cname("__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string")
 * cdef object __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(const map[X,Y]& s):
 *     o = {}             # <<<<<<<<<<<<<<
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_o = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "map.to_py":204
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()             # <<<<<<<<<<<<<<
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)
 */
  __pyx_v_iter = __pyx_v_s.begin();

  /* "map.to_py":205
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()
 *     while iter != s.end():             # <<<<<<<<<<<<<<
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_iter != __pyx_v_s.end()) != 0);
    if (!__pyx_t_2) break;

    /* "map.to_py":206
 *     cdef map[X,Y].const_iterator iter = s.begin()
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)             # <<<<<<<<<<<<<<
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)
 */
    __pyx_v_key_value = (&(*__pyx_v_iter));

    /* "map.to_py":207
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second             # <<<<<<<<<<<<<<
 *         cython.operator.preincrement(iter)
 *     return o
 */
    __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_key_value->second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_key_value->first); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_o, __pyx_t_3, __pyx_t_1) < 0)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "map.to_py":208
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)             # <<<<<<<<<<<<<<
 *     return o
 * 
 */
    (void)((++__pyx_v_iter));
  }

  /* "map.to_py":209
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)
 *     return o             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_o);
  __pyx_r = __pyx_v_o;
  goto __pyx_L0;

  /* "map.to_py":201
 * 
 * @cname("__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string")
 * cdef object __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(const map[X,Y]& s):             # <<<<<<<<<<<<<<
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("map.to_py.__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vector.to_py":60
 * 
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___(vector[X]& v):             # <<<<<<<<<<<<<<
 *     return [v[i] for i in range(v.size())]
 * 
 */

static PyObject *__pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___(const std::vector<std::vector<double> >  &__pyx_v_v) {
  size_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___", 0);

  /* "vector.to_py":61
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___(vector[X]& v):
 *     return [v[i] for i in range(v.size())]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_v.size();
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;
    __pyx_t_5 = __pyx_convert_vector_to_py_double((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 61, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vector.to_py":60
 * 
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___(vector[X]& v):             # <<<<<<<<<<<<<<
 *     return [v[i] for i in range(v.size())]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "map.to_py":201
 * 
 * @cname("__pyx_convert_map_to_py_double____double")
 * cdef object __pyx_convert_map_to_py_double____double(const map[X,Y]& s):             # <<<<<<<<<<<<<<
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 */

static PyObject *__pyx_convert_map_to_py_double____double(std::map<double,double>  const &__pyx_v_s) {
  PyObject *__pyx_v_o = NULL;
  std::map<double,double> ::value_type const *__pyx_v_key_value;
  std::map<double,double> ::const_iterator __pyx_v_iter;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_map_to_py_double____double", 0);

  /* "map.to_py":202
 * @cname("__pyx_convert_map_to_py_double____double")
 * cdef object __pyx_convert_map_to_py_double____double(const map[X,Y]& s):
 *     o = {}             # <<<<<<<<<<<<<<
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_o = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "map.to_py":204
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()             # <<<<<<<<<<<<<<
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)
 */
  __pyx_v_iter = __pyx_v_s.begin();

  /* "map.to_py":205
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()
 *     while iter != s.end():             # <<<<<<<<<<<<<<
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_iter != __pyx_v_s.end()) != 0);
    if (!__pyx_t_2) break;

    /* "map.to_py":206
 *     cdef map[X,Y].const_iterator iter = s.begin()
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)             # <<<<<<<<<<<<<<
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)
 */
    __pyx_v_key_value = (&(*__pyx_v_iter));

    /* "map.to_py":207
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second             # <<<<<<<<<<<<<<
 *         cython.operator.preincrement(iter)
 *     return o
 */
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_key_value->second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_key_value->first); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_o, __pyx_t_3, __pyx_t_1) < 0)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "map.to_py":208
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)             # <<<<<<<<<<<<<<
 *     return o
 * 
 */
    (void)((++__pyx_v_iter));
  }

  /* "map.to_py":209
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)
 *     return o             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_o);
  __pyx_r = __pyx_v_o;
  goto __pyx_L0;

  /* "map.to_py":201
 * 
 * @cname("__pyx_convert_map_to_py_double____double")
 * cdef object __pyx_convert_map_to_py_double____double(const map[X,Y]& s):             # <<<<<<<<<<<<<<
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("map.to_py.__pyx_convert_map_to_py_double____double", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_convert_map_to_py_int____std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___(std::map<int,std::map<std::string,std::map<std::string,double> > >  const &__pyx_v_s) {
  PyObject *__pyx_v_o = NULL;
  std::map<int,std::map<std::string,std::map<std::string,double> > > ::value_type const *__pyx_v_key_value;
  std::map<int,std::map<std::string,std::map<std::string,double> > > ::const_iterator __pyx_v_iter;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_map_to_py_int____std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___", 0);

  /* "map.to_py":202
 * @cname("__pyx_convert_map_to_py_int____std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___")
 * cdef object __pyx_convert_map_to_py_int____std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___(const map[X,Y]& s):
 *     o = {}             # <<<<<<<<<<<<<<
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_o = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "map.to_py":204
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()             # <<<<<<<<<<<<<<
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)
 */
  __pyx_v_iter = __pyx_v_s.begin();

  /* "map.to_py":205
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()
 *     while iter != s.end():             # <<<<<<<<<<<<<<
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_iter != __pyx_v_s.end()) != 0);
    if (!__pyx_t_2) break;

    /* "map.to_py":206
 *     cdef map[X,Y].const_iterator iter = s.begin()
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)             # <<<<<<<<<<<<<<
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)
 */
    __pyx_v_key_value = (&(*__pyx_v_iter));

    /* "map.to_py":207
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second             # <<<<<<<<<<<<<<
 *         cython.operator.preincrement(iter)
 *     return o
 */
    __pyx_t_1 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e___(__pyx_v_key_value->second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_key_value->first); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_o, __pyx_t_3, __pyx_t_1) < 0)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "map.to_py":208
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)             # <<<<<<<<<<<<<<
 *     return o
 * 
 */
    (void)((++__pyx_v_iter));
  }

  /* "map.to_py":209
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)
 *     return o             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_o);
  __pyx_r = __pyx_v_o;
  goto __pyx_L0;

  /* "map.to_py":201
 * 
 * @cname("__pyx_convert_map_to_py_int____std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___")
 * cdef object __pyx_convert_map_to_py_int____std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___(const map[X,Y]& s):             # <<<<<<<<<<<<<<
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("map.to_py.__pyx_convert_map_to_py_int____std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_int_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e____3e___(std::map<std::string,std::map<int,std::map<std::string,std::map<std::string,double> > > >  const &__pyx_v_s) {
  PyObject *__pyx_v_o = NULL;
  std::map<std::string,std::map<int,std::map<std::string,std::map<std::string,double> > > > ::value_type const *__pyx_v_key_value;
  std::map<std::string,std::map<int,std::map<std::string,std::map<std::string,double> > > > ::const_iterator __pyx_v_iter;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_int_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e____3e___", 0);

  /* "map.to_py":202
 * @cname("__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_int_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e____3e___")
 * cdef object __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_int_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e____3e___(const map[X,Y]& s):
 *     o = {}             # <<<<<<<<<<<<<<
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_o = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "map.to_py":204
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()             # <<<<<<<<<<<<<<
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)
 */
  __pyx_v_iter = __pyx_v_s.begin();

  /* "map.to_py":205
 *     cdef const map[X,Y].value_type *key_value
 *     cdef map[X,Y].const_iterator iter = s.begin()
 *     while iter != s.end():             # <<<<<<<<<<<<<<
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_iter != __pyx_v_s.end()) != 0);
    if (!__pyx_t_2) break;

    /* "map.to_py":206
 *     cdef map[X,Y].const_iterator iter = s.begin()
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)             # <<<<<<<<<<<<<<
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)
 */
    __pyx_v_key_value = (&(*__pyx_v_iter));

    /* "map.to_py":207
 *     while iter != s.end():
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second             # <<<<<<<<<<<<<<
 *         cython.operator.preincrement(iter)
 *     return o
 */
    __pyx_t_1 = __pyx_convert_map_to_py_int____std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e___(__pyx_v_key_value->second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_key_value->first); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_o, __pyx_t_3, __pyx_t_1) < 0)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "map.to_py":208
 *         key_value = &cython.operator.dereference(iter)
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)             # <<<<<<<<<<<<<<
 *     return o
 * 
 */
    (void)((++__pyx_v_iter));
  }

  /* "map.to_py":209
 *         o[key_value.first] = key_value.second
 *         cython.operator.preincrement(iter)
 *     return o             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_o);
  __pyx_r = __pyx_v_o;
  goto __pyx_L0;

  /* "map.to_py":201
 * 
 * @cname("__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_int_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e____3e___")
 * cdef object __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_int_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e____3e___(const map[X,Y]& s):             # <<<<<<<<<<<<<<
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("map.to_py.__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_int_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e____3e___", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_4fisx_5_fisx_PyDetector(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4fisx_5_fisx_10PyDetector_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4fisx_5_fisx_PyDetector(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4fisx_5_fisx_10PyDetector_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4fisx_5_fisx_PyDetector[] = {
  {"getTransmission", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyDetector_5getTransmission, METH_VARARGS|METH_KEYWORDS, 0},
  {"setActiveArea", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_7setActiveArea, METH_O, 0},
  {"setDiameter", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_9setDiameter, METH_O, 0},
  {"getActiveArea", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_11getActiveArea, METH_NOARGS, 0},
  {"getDiameter", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_13getDiameter, METH_NOARGS, 0},
  {"setDistance", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_15setDistance, METH_O, 0},
  {"getDistance", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_17getDistance, METH_NOARGS, 0},
  {"setMaximumNumberOfEscapePeaks", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_19setMaximumNumberOfEscapePeaks, METH_O, 0},
  {"getEscape", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyDetector_21getEscape, METH_VARARGS|METH_KEYWORDS, 0},
  {"getEscapePeakEnergyThreshold", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_23getEscapePeakEnergyThreshold, METH_NOARGS, 0},
  {"getEscapePeakIntensityThreshold", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_25getEscapePeakIntensityThreshold, METH_NOARGS, 0},
  {"getEscapePeakNThreshold", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_27getEscapePeakNThreshold, METH_NOARGS, 0},
  {"getEscapePeakAlphaIn", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_29getEscapePeakAlphaIn, METH_NOARGS, 0},
  {"getThickness", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_31getThickness, METH_NOARGS, 0},
  {"getDensity", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_33getDensity, METH_NOARGS, 0},
  {"getComposition", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_35getComposition, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_37__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyDetector_39__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4fisx_5_fisx_PyDetector = {
  PyVarObject_HEAD_INIT(0, 0)
  "fisx._fisx.PyDetector", /*tp_name*/
  sizeof(struct __pyx_obj_4fisx_5_fisx_PyDetector), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4fisx_5_fisx_PyDetector, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4fisx_5_fisx_PyDetector, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4fisx_5_fisx_PyDetector, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4fisx_5_fisx_PyElement(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4fisx_5_fisx_9PyElement_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4fisx_5_fisx_PyElement(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4fisx_5_fisx_9PyElement_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4fisx_5_fisx_PyElement[] = {
  {"setName", (PyCFunction)__pyx_pw_4fisx_5_fisx_9PyElement_5setName, METH_O, 0},
  {"setAtomicNumber", (PyCFunction)__pyx_pw_4fisx_5_fisx_9PyElement_7setAtomicNumber, METH_O, 0},
  {"getAtomicNumber", (PyCFunction)__pyx_pw_4fisx_5_fisx_9PyElement_9getAtomicNumber, METH_NOARGS, 0},
  {"setBindingEnergies", (PyCFunction)__pyx_pw_4fisx_5_fisx_9PyElement_11setBindingEnergies, METH_O, 0},
  {"getBindingEnergies", (PyCFunction)__pyx_pw_4fisx_5_fisx_9PyElement_13getBindingEnergies, METH_NOARGS, 0},
  {"setMassAttenuationCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_9PyElement_15setMassAttenuationCoefficients, METH_VARARGS|METH_KEYWORDS, 0},
  {"_getDefaultMassAttenuationCoefficients", (PyCFunction)__pyx_pw_4fisx_5_fisx_9PyElement_17_getDefaultMassAttenuationCoefficients, METH_NOARGS, 0},
  {"_getSingleMassAttenuationCoefficients", (PyCFunction)__pyx_pw_4fisx_5_fisx_9PyElement_19_getSingleMassAttenuationCoefficients, METH_O, 0},
  {"getMassAttenuationCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_9PyElement_21getMassAttenuationCoefficients, METH_VARARGS|METH_KEYWORDS, 0},
  {"_getMultipleMassAttenuationCoefficients", (PyCFunction)__pyx_pw_4fisx_5_fisx_9PyElement_23_getMultipleMassAttenuationCoefficients, METH_O, 0},
  {"setRadiativeTransitions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_9PyElement_25setRadiativeTransitions, METH_VARARGS|METH_KEYWORDS, 0},
  {"getRadiativeTransitions", (PyCFunction)__pyx_pw_4fisx_5_fisx_9PyElement_27getRadiativeTransitions, METH_O, 0},
  {"setNonradiativeTransitions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_9PyElement_29setNonradiativeTransitions, METH_VARARGS|METH_KEYWORDS, 0},
  {"getNonradiativeTransitions", (PyCFunction)__pyx_pw_4fisx_5_fisx_9PyElement_31getNonradiativeTransitions, METH_O, 0},
  {"setShellConstants", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_9PyElement_33setShellConstants, METH_VARARGS|METH_KEYWORDS, 0},
  {"getShellConstants", (PyCFunction)__pyx_pw_4fisx_5_fisx_9PyElement_35getShellConstants, METH_O, 0},
  {"getXRayLinesFromVacancyDistribution", (PyCFunction)__pyx_pw_4fisx_5_fisx_9PyElement_37getXRayLinesFromVacancyDistribution, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_9PyElement_39__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_9PyElement_41__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4fisx_5_fisx_PyElement = {
  PyVarObject_HEAD_INIT(0, 0)
  "fisx._fisx.PyElement", /*tp_name*/
  sizeof(struct __pyx_obj_4fisx_5_fisx_PyElement), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4fisx_5_fisx_PyElement, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4fisx_5_fisx_PyElement, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4fisx_5_fisx_PyElement, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4fisx_5_fisx_PyElements(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4fisx_5_fisx_10PyElements_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4fisx_5_fisx_PyElements(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4fisx_5_fisx_10PyElements_25__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4fisx_5_fisx_PyElements[] = {
  {"initializeAsPyMca", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_3initializeAsPyMca, METH_NOARGS, __pyx_doc_4fisx_5_fisx_10PyElements_2initializeAsPyMca},
  {"__initializeAsPyMcaOld", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_5__initializeAsPyMcaOld, METH_NOARGS, __pyx_doc_4fisx_5_fisx_10PyElements_4__initializeAsPyMcaOld},
  {"getElementNames", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_7getElementNames, METH_NOARGS, 0},
  {"getAtomicMass", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_9getAtomicMass, METH_O, 0},
  {"getAtomicNumber", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_11getAtomicNumber, METH_O, 0},
  {"getDensity", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_13getDensity, METH_O, 0},
  {"getLongName", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_15getLongName, METH_O, 0},
  {"getColumn", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_17getColumn, METH_O, 0},
  {"getRow", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_19getRow, METH_O, 0},
  {"getMaterialNames", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_21getMaterialNames, METH_NOARGS, 0},
  {"getComposition", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_23getComposition, METH_O, 0},
  {"addMaterial", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_27addMaterial, METH_VARARGS|METH_KEYWORDS, 0},
  {"setShellConstantsFile", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_29setShellConstantsFile, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_10PyElements_28setShellConstantsFile},
  {"getShellConstantsFile", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_31getShellConstantsFile, METH_O, 0},
  {"setShellRadiativeTransitionsFile", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_33setShellRadiativeTransitionsFile, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_10PyElements_32setShellRadiativeTransitionsFile},
  {"getShellRadiativeTransitionsFile", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_35getShellRadiativeTransitionsFile, METH_O, 0},
  {"getShellNonradiativeTransitionsFile", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_37getShellNonradiativeTransitionsFile, METH_O, 0},
  {"setMassAttenuationCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_39setMassAttenuationCoefficients, METH_VARARGS|METH_KEYWORDS, 0},
  {"setMassAttenuationCoefficientsFile", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_41setMassAttenuationCoefficientsFile, METH_O, 0},
  {"_getSingleMassAttenuationCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_43_getSingleMassAttenuationCoefficients, METH_VARARGS|METH_KEYWORDS, 0},
  {"_getElementDefaultMassAttenuationCoefficients", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_45_getElementDefaultMassAttenuationCoefficients, METH_O, 0},
  {"getElementMassAttenuationCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_47getElementMassAttenuationCoefficients, METH_VARARGS|METH_KEYWORDS, 0},
  {"_getMultipleMassAttenuationCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_49_getMultipleMassAttenuationCoefficients, METH_VARARGS|METH_KEYWORDS, 0},
  {"getMassAttenuationCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_51getMassAttenuationCoefficients, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_10PyElements_50getMassAttenuationCoefficients},
  {"getExcitationFactors", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_53getExcitationFactors, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_10PyElements_52getExcitationFactors},
  {"_getMaterialMassAttenuationCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_55_getMaterialMassAttenuationCoefficients, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_10PyElements_54_getMaterialMassAttenuationCoefficients},
  {"_getMassAttenuationCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_57_getMassAttenuationCoefficients, METH_VARARGS|METH_KEYWORDS, 0},
  {"_getExcitationFactors", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_59_getExcitationFactors, METH_VARARGS|METH_KEYWORDS, 0},
  {"getPeakFamilies", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_61getPeakFamilies, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_10PyElements_60getPeakFamilies},
  {"_getPeakFamilies", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_63_getPeakFamilies, METH_VARARGS|METH_KEYWORDS, 0},
  {"_getPeakFamiliesFromVectorOfElements", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_65_getPeakFamiliesFromVectorOfElements, METH_VARARGS|METH_KEYWORDS, 0},
  {"getBindingEnergies", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_67getBindingEnergies, METH_O, 0},
  {"getEscape", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_69getEscape, METH_VARARGS|METH_KEYWORDS, 0},
  {"updateEscapeCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_71updateEscapeCache, METH_VARARGS|METH_KEYWORDS, 0},
  {"getShellConstants", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_73getShellConstants, METH_VARARGS|METH_KEYWORDS, 0},
  {"getEmittedXRayLines", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_75getEmittedXRayLines, METH_VARARGS|METH_KEYWORDS, 0},
  {"getRadiativeTransitions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_77getRadiativeTransitions, METH_VARARGS|METH_KEYWORDS, 0},
  {"getNonradiativeTransitions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_79getNonradiativeTransitions, METH_VARARGS|METH_KEYWORDS, 0},
  {"setElementCascadeCacheEnabled", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_81setElementCascadeCacheEnabled, METH_VARARGS|METH_KEYWORDS, 0},
  {"emptyElementCascadeCache", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_83emptyElementCascadeCache, METH_O, 0},
  {"fillCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_85fillCache, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_10PyElements_84fillCache},
  {"updateCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_87updateCache, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_10PyElements_86updateCache},
  {"setCacheEnabled", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_89setCacheEnabled, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_10PyElements_88setCacheEnabled},
  {"setEscapeCacheEnabled", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_91setEscapeCacheEnabled, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_10PyElements_90setEscapeCacheEnabled},
  {"clearCache", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_93clearCache, METH_O, __pyx_doc_4fisx_5_fisx_10PyElements_92clearCache},
  {"isCacheEnabled", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_95isCacheEnabled, METH_O, __pyx_doc_4fisx_5_fisx_10PyElements_94isCacheEnabled},
  {"isEscapeCacheEnabled", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_97isEscapeCacheEnabled, METH_NOARGS, __pyx_doc_4fisx_5_fisx_10PyElements_96isEscapeCacheEnabled},
  {"getCacheSize", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_99getCacheSize, METH_O, __pyx_doc_4fisx_5_fisx_10PyElements_98getCacheSize},
  {"removeMaterials", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_101removeMaterials, METH_NOARGS, 0},
  {"getInitialPhotoelectricVacancyDistribution", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_103getInitialPhotoelectricVacancyDistribution, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_10PyElements_102getInitialPhotoelectricVacancyDistribution},
  {"getCascadeModifiedVacancyDistribution", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_105getCascadeModifiedVacancyDistribution, METH_VARARGS|METH_KEYWORDS, 0},
  {"_getCascadeModifiedVacancyDistribution", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_107_getCascadeModifiedVacancyDistribution, METH_VARARGS|METH_KEYWORDS, 0},
  {"getXRayLinesFromVacancyDistribution", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_109getXRayLinesFromVacancyDistribution, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_10PyElements_108getXRayLinesFromVacancyDistribution},
  {"_getXRayLinesFromVacancyDistribution", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyElements_111_getXRayLinesFromVacancyDistribution, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_113__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyElements_115__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4fisx_5_fisx_PyElements = {
  PyVarObject_HEAD_INIT(0, 0)
  "fisx._fisx.PyElements", /*tp_name*/
  sizeof(struct __pyx_obj_4fisx_5_fisx_PyElements), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4fisx_5_fisx_PyElements, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4fisx_5_fisx_PyElements, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4fisx_5_fisx_PyElements, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4fisx_5_fisx_PyEPDL97(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4fisx_5_fisx_8PyEPDL97_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4fisx_5_fisx_PyEPDL97(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4fisx_5_fisx_8PyEPDL97_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4fisx_5_fisx_PyEPDL97[] = {
  {"setDataDirectory", (PyCFunction)__pyx_pw_4fisx_5_fisx_8PyEPDL97_5setDataDirectory, METH_O, 0},
  {"setBindingEnergies", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_8PyEPDL97_7setBindingEnergies, METH_VARARGS|METH_KEYWORDS, 0},
  {"getBindingEnergies", (PyCFunction)__pyx_pw_4fisx_5_fisx_8PyEPDL97_9getBindingEnergies, METH_O, 0},
  {"getMassAttenuationCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_8PyEPDL97_11getMassAttenuationCoefficients, METH_VARARGS|METH_KEYWORDS, 0},
  {"_getDefaultMassAttenuationCoefficients", (PyCFunction)__pyx_pw_4fisx_5_fisx_8PyEPDL97_13_getDefaultMassAttenuationCoefficients, METH_O, 0},
  {"_getSingleMassAttenuationCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_8PyEPDL97_15_getSingleMassAttenuationCoefficients, METH_VARARGS|METH_KEYWORDS, 0},
  {"_getMultipleMassAttenuationCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_8PyEPDL97_17_getMultipleMassAttenuationCoefficients, METH_VARARGS|METH_KEYWORDS, 0},
  {"getPhotoelectricWeights", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_8PyEPDL97_19getPhotoelectricWeights, METH_VARARGS|METH_KEYWORDS, 0},
  {"_getSinglePhotoelectricWeights", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_8PyEPDL97_21_getSinglePhotoelectricWeights, METH_VARARGS|METH_KEYWORDS, 0},
  {"_getMultiplePhotoelectricWeights", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_8PyEPDL97_23_getMultiplePhotoelectricWeights, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_8PyEPDL97_25__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_8PyEPDL97_27__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4fisx_5_fisx_PyEPDL97 = {
  PyVarObject_HEAD_INIT(0, 0)
  "fisx._fisx.PyEPDL97", /*tp_name*/
  sizeof(struct __pyx_obj_4fisx_5_fisx_PyEPDL97), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4fisx_5_fisx_PyEPDL97, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4fisx_5_fisx_PyEPDL97, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4fisx_5_fisx_PyEPDL97, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4fisx_5_fisx_PyLayer(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4fisx_5_fisx_7PyLayer_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4fisx_5_fisx_PyLayer(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4fisx_5_fisx_7PyLayer_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4fisx_5_fisx_PyLayer[] = {
  {"getComposition", (PyCFunction)__pyx_pw_4fisx_5_fisx_7PyLayer_5getComposition, METH_O, __pyx_doc_4fisx_5_fisx_7PyLayer_4getComposition},
  {"getTransmission", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_7PyLayer_7getTransmission, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_7PyLayer_6getTransmission},
  {"setMaterial", (PyCFunction)__pyx_pw_4fisx_5_fisx_7PyLayer_9setMaterial, METH_O, __pyx_doc_4fisx_5_fisx_7PyLayer_8setMaterial},
  {"getPeakFamilies", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_7PyLayer_11getPeakFamilies, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_7PyLayer_10getPeakFamilies},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_7PyLayer_13__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_7PyLayer_15__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4fisx_5_fisx_PyLayer = {
  PyVarObject_HEAD_INIT(0, 0)
  "fisx._fisx.PyLayer", /*tp_name*/
  sizeof(struct __pyx_obj_4fisx_5_fisx_PyLayer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4fisx_5_fisx_PyLayer, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4fisx_5_fisx_PyLayer, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4fisx_5_fisx_PyLayer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4fisx_5_fisx_PyMaterial(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4fisx_5_fisx_10PyMaterial_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4fisx_5_fisx_PyMaterial(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4fisx_5_fisx_10PyMaterial_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4fisx_5_fisx_PyMaterial[] = {
  {"getName", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyMaterial_5getName, METH_NOARGS, 0},
  {"setName", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyMaterial_7setName, METH_O, 0},
  {"setCompositionFromLists", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_10PyMaterial_9setCompositionFromLists, METH_VARARGS|METH_KEYWORDS, 0},
  {"setComposition", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyMaterial_11setComposition, METH_O, 0},
  {"getComposition", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyMaterial_13getComposition, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyMaterial_15__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_10PyMaterial_17__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4fisx_5_fisx_PyMaterial = {
  PyVarObject_HEAD_INIT(0, 0)
  "fisx._fisx.PyMaterial", /*tp_name*/
  sizeof(struct __pyx_obj_4fisx_5_fisx_PyMaterial), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4fisx_5_fisx_PyMaterial, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4fisx_5_fisx_PyMaterial, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4fisx_5_fisx_PyMaterial, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4fisx_5_fisx_PyMath(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4fisx_5_fisx_6PyMath_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4fisx_5_fisx_PyMath(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4fisx_5_fisx_6PyMath_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4fisx_5_fisx_PyMath[] = {
  {"E1", (PyCFunction)__pyx_pw_4fisx_5_fisx_6PyMath_5E1, METH_O, 0},
  {"En", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_6PyMath_7En, METH_VARARGS|METH_KEYWORDS, 0},
  {"deBoerD", (PyCFunction)__pyx_pw_4fisx_5_fisx_6PyMath_9deBoerD, METH_O, 0},
  {"deBoerL0", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_6PyMath_11deBoerL0, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_6PyMath_10deBoerL0},
  {"deBoerX", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_6PyMath_13deBoerX, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_6PyMath_12deBoerX},
  {"erf", (PyCFunction)__pyx_pw_4fisx_5_fisx_6PyMath_15erf, METH_O, __pyx_doc_4fisx_5_fisx_6PyMath_14erf},
  {"erfc", (PyCFunction)__pyx_pw_4fisx_5_fisx_6PyMath_17erfc, METH_O, __pyx_doc_4fisx_5_fisx_6PyMath_16erfc},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_6PyMath_19__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_6PyMath_21__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4fisx_5_fisx_PyMath = {
  PyVarObject_HEAD_INIT(0, 0)
  "fisx._fisx.PyMath", /*tp_name*/
  sizeof(struct __pyx_obj_4fisx_5_fisx_PyMath), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4fisx_5_fisx_PyMath, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4fisx_5_fisx_PyMath, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4fisx_5_fisx_PyMath, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4fisx_5_fisx_PyShell(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4fisx_5_fisx_7PyShell_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4fisx_5_fisx_PyShell(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4fisx_5_fisx_7PyShell_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4fisx_5_fisx_PyShell[] = {
  {"setRadiativeTransitions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_7PyShell_5setRadiativeTransitions, METH_VARARGS|METH_KEYWORDS, 0},
  {"setNonradiativeTransitions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_7PyShell_7setNonradiativeTransitions, METH_VARARGS|METH_KEYWORDS, 0},
  {"getAugerRatios", (PyCFunction)__pyx_pw_4fisx_5_fisx_7PyShell_9getAugerRatios, METH_NOARGS, 0},
  {"getCosterKronigRatios", (PyCFunction)__pyx_pw_4fisx_5_fisx_7PyShell_11getCosterKronigRatios, METH_NOARGS, 0},
  {"getFluorescenceRatios", (PyCFunction)__pyx_pw_4fisx_5_fisx_7PyShell_13getFluorescenceRatios, METH_NOARGS, 0},
  {"getRadiativeTransitions", (PyCFunction)__pyx_pw_4fisx_5_fisx_7PyShell_15getRadiativeTransitions, METH_NOARGS, 0},
  {"getNonradiativeTransitions", (PyCFunction)__pyx_pw_4fisx_5_fisx_7PyShell_17getNonradiativeTransitions, METH_NOARGS, 0},
  {"getDirectVacancyTransferRatios", (PyCFunction)__pyx_pw_4fisx_5_fisx_7PyShell_19getDirectVacancyTransferRatios, METH_O, 0},
  {"setShellConstants", (PyCFunction)__pyx_pw_4fisx_5_fisx_7PyShell_21setShellConstants, METH_O, 0},
  {"getShellConstants", (PyCFunction)__pyx_pw_4fisx_5_fisx_7PyShell_23getShellConstants, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_7PyShell_25__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_7PyShell_27__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4fisx_5_fisx_PyShell = {
  PyVarObject_HEAD_INIT(0, 0)
  "fisx._fisx.PyShell", /*tp_name*/
  sizeof(struct __pyx_obj_4fisx_5_fisx_PyShell), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4fisx_5_fisx_PyShell, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4fisx_5_fisx_PyShell, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4fisx_5_fisx_PyShell, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4fisx_5_fisx_PySimpleIni(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4fisx_5_fisx_11PySimpleIni_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4fisx_5_fisx_PySimpleIni(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4fisx_5_fisx_11PySimpleIni_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4fisx_5_fisx_PySimpleIni[] = {
  {"getKeys", (PyCFunction)__pyx_pw_4fisx_5_fisx_11PySimpleIni_5getKeys, METH_NOARGS, 0},
  {"readKey", (PyCFunction)__pyx_pw_4fisx_5_fisx_11PySimpleIni_7readKey, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_11PySimpleIni_9__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_11PySimpleIni_11__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4fisx_5_fisx_PySimpleIni = {
  PyVarObject_HEAD_INIT(0, 0)
  "fisx._fisx.PySimpleIni", /*tp_name*/
  sizeof(struct __pyx_obj_4fisx_5_fisx_PySimpleIni), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4fisx_5_fisx_PySimpleIni, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4fisx_5_fisx_PySimpleIni, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4fisx_5_fisx_PySimpleIni, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4fisx_5_fisx_PySimpleSpecfile(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4fisx_5_fisx_PySimpleSpecfile(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4fisx_5_fisx_PySimpleSpecfile[] = {
  {"getNumberOfScans", (PyCFunction)__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_5getNumberOfScans, METH_NOARGS, 0},
  {"getScanLabels", (PyCFunction)__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_7getScanLabels, METH_O, 0},
  {"getScanData", (PyCFunction)__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_9getScanData, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_11__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_16PySimpleSpecfile_13__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4fisx_5_fisx_PySimpleSpecfile = {
  PyVarObject_HEAD_INIT(0, 0)
  "fisx._fisx.PySimpleSpecfile", /*tp_name*/
  sizeof(struct __pyx_obj_4fisx_5_fisx_PySimpleSpecfile), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4fisx_5_fisx_PySimpleSpecfile, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4fisx_5_fisx_PySimpleSpecfile, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4fisx_5_fisx_PySimpleSpecfile, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4fisx_5_fisx_PyTransmissionTable(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4fisx_5_fisx_PyTransmissionTable(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4fisx_5_fisx_19PyTransmissionTable_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4fisx_5_fisx_PyTransmissionTable[] = {
  {"getName", (PyCFunction)__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_5getName, METH_NOARGS, 0},
  {"setName", (PyCFunction)__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_7setName, METH_O, 0},
  {"getComment", (PyCFunction)__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_9getComment, METH_NOARGS, 0},
  {"setComment", (PyCFunction)__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_11setComment, METH_O, 0},
  {"setTransmissionTableFromLists", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_13setTransmissionTableFromLists, METH_VARARGS|METH_KEYWORDS, 0},
  {"setTransmissionTable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_15setTransmissionTable, METH_VARARGS|METH_KEYWORDS, 0},
  {"getTransmissionTable", (PyCFunction)__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_17getTransmissionTable, METH_NOARGS, 0},
  {"getTransmission", (PyCFunction)__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_19getTransmission, METH_O, 0},
  {"_getTransmissionSingle", (PyCFunction)__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_21_getTransmissionSingle, METH_O, 0},
  {"_getTransmissionMultiple", (PyCFunction)__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_23_getTransmissionMultiple, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_25__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_19PyTransmissionTable_27__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4fisx_5_fisx_PyTransmissionTable = {
  PyVarObject_HEAD_INIT(0, 0)
  "fisx._fisx.PyTransmissionTable", /*tp_name*/
  sizeof(struct __pyx_obj_4fisx_5_fisx_PyTransmissionTable), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4fisx_5_fisx_PyTransmissionTable, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4fisx_5_fisx_PyTransmissionTable, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4fisx_5_fisx_PyTransmissionTable, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4fisx_5_fisx_PyXRF(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4fisx_5_fisx_5PyXRF_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4fisx_5_fisx_PyXRF(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4fisx_5_fisx_5PyXRF_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4fisx_5_fisx_PyXRF[] = {
  {"readConfigurationFromFile", (PyCFunction)__pyx_pw_4fisx_5_fisx_5PyXRF_5readConfigurationFromFile, METH_O, 0},
  {"setBeam", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_5PyXRF_7setBeam, METH_VARARGS|METH_KEYWORDS, 0},
  {"_setSingleEnergyBeam", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_5PyXRF_9_setSingleEnergyBeam, METH_VARARGS|METH_KEYWORDS, 0},
  {"_setBeam", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_5PyXRF_11_setBeam, METH_VARARGS|METH_KEYWORDS, 0},
  {"setBeamFilters", (PyCFunction)__pyx_pw_4fisx_5_fisx_5PyXRF_13setBeamFilters, METH_O, __pyx_doc_4fisx_5_fisx_5PyXRF_12setBeamFilters},
  {"setUserBeamFilters", (PyCFunction)__pyx_pw_4fisx_5_fisx_5PyXRF_15setUserBeamFilters, METH_O, __pyx_doc_4fisx_5_fisx_5PyXRF_14setUserBeamFilters},
  {"_fillTransmissionTable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_5PyXRF_17_fillTransmissionTable, METH_VARARGS|METH_KEYWORDS, 0},
  {"setSample", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_5PyXRF_19setSample, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_5PyXRF_18setSample},
  {"setAttenuators", (PyCFunction)__pyx_pw_4fisx_5_fisx_5PyXRF_21setAttenuators, METH_O, __pyx_doc_4fisx_5_fisx_5PyXRF_20setAttenuators},
  {"setUserAttenuators", (PyCFunction)__pyx_pw_4fisx_5_fisx_5PyXRF_23setUserAttenuators, METH_O, __pyx_doc_4fisx_5_fisx_5PyXRF_22setUserAttenuators},
  {"setDetector", (PyCFunction)__pyx_pw_4fisx_5_fisx_5PyXRF_25setDetector, METH_O, 0},
  {"setGeometry", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_5PyXRF_27setGeometry, METH_VARARGS|METH_KEYWORDS, 0},
  {"getMultilayerFluorescence", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_5PyXRF_29getMultilayerFluorescence, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4fisx_5_fisx_5PyXRF_28getMultilayerFluorescence},
  {"getFluorescence", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_5PyXRF_31getFluorescence, METH_VARARGS|METH_KEYWORDS, 0},
  {"getGeometricEfficiency", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4fisx_5_fisx_5PyXRF_33getGeometricEfficiency, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_5PyXRF_35__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4fisx_5_fisx_5PyXRF_37__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4fisx_5_fisx_PyXRF = {
  PyVarObject_HEAD_INIT(0, 0)
  "fisx._fisx.PyXRF", /*tp_name*/
  sizeof(struct __pyx_obj_4fisx_5_fisx_PyXRF), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4fisx_5_fisx_PyXRF, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4fisx_5_fisx_PyXRF, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4fisx_5_fisx_PyXRF, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec__fisx(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec__fisx},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "_fisx",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_b_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 0, 0},
  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
  {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
  {&__pyx_kp_s_3_0, __pyx_k_3_0, sizeof(__pyx_k_3_0), 0, 0, 1, 0},
  {&__pyx_kp_s_BindingEnergies_dat, __pyx_k_BindingEnergies_dat, sizeof(__pyx_k_BindingEnergies_dat), 0, 0, 1, 0},
  {&__pyx_n_s_DataDir, __pyx_k_DataDir, sizeof(__pyx_k_DataDir), 0, 0, 1, 1},
  {&__pyx_n_s_FISX_DATA_DIR, __pyx_k_FISX_DATA_DIR, sizeof(__pyx_k_FISX_DATA_DIR), 0, 0, 1, 1},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_kp_s_Initialization_with_XCOM_mass_a, __pyx_k_Initialization_with_XCOM_mass_a, sizeof(__pyx_k_Initialization_with_XCOM_mass_a), 0, 0, 1, 0},
  {&__pyx_n_s_K, __pyx_k_K, sizeof(__pyx_k_K), 0, 0, 1, 1},
  {&__pyx_n_s_L, __pyx_k_L, sizeof(__pyx_k_L), 0, 0, 1, 1},
  {&__pyx_n_s_M, __pyx_k_M, sizeof(__pyx_k_M), 0, 0, 1, 1},
  {&__pyx_kp_s_Not_appropriate_input_type_or_le, __pyx_k_Not_appropriate_input_type_or_le, sizeof(__pyx_k_Not_appropriate_input_type_or_le), 0, 0, 1, 0},
  {&__pyx_n_s_PYMCA_DATA_DIR, __pyx_k_PYMCA_DATA_DIR, sizeof(__pyx_k_PYMCA_DATA_DIR), 0, 0, 1, 1},
  {&__pyx_kp_s_Please_specify_usage_as_filter_o, __pyx_k_Please_specify_usage_as_filter_o, sizeof(__pyx_k_Please_specify_usage_as_filter_o), 0, 0, 1, 0},
  {&__pyx_n_s_PyDetector, __pyx_k_PyDetector, sizeof(__pyx_k_PyDetector), 0, 0, 1, 1},
  {&__pyx_n_s_PyEPDL97, __pyx_k_PyEPDL97, sizeof(__pyx_k_PyEPDL97), 0, 0, 1, 1},
  {&__pyx_n_s_PyElement, __pyx_k_PyElement, sizeof(__pyx_k_PyElement), 0, 0, 1, 1},
  {&__pyx_n_s_PyElements, __pyx_k_PyElements, sizeof(__pyx_k_PyElements), 0, 0, 1, 1},
  {&__pyx_n_s_PyLayer, __pyx_k_PyLayer, sizeof(__pyx_k_PyLayer), 0, 0, 1, 1},
  {&__pyx_n_s_PyMaterial, __pyx_k_PyMaterial, sizeof(__pyx_k_PyMaterial), 0, 0, 1, 1},
  {&__pyx_n_s_PyMath, __pyx_k_PyMath, sizeof(__pyx_k_PyMath), 0, 0, 1, 1},
  {&__pyx_n_s_PyMca5, __pyx_k_PyMca5, sizeof(__pyx_k_PyMca5), 0, 0, 1, 1},
  {&__pyx_n_s_PyMcaDataDir, __pyx_k_PyMcaDataDir, sizeof(__pyx_k_PyMcaDataDir), 0, 0, 1, 1},
  {&__pyx_n_s_PyShell, __pyx_k_PyShell, sizeof(__pyx_k_PyShell), 0, 0, 1, 1},
  {&__pyx_n_s_PySimpleIni, __pyx_k_PySimpleIni, sizeof(__pyx_k_PySimpleIni), 0, 0, 1, 1},
  {&__pyx_n_s_PySimpleSpecfile, __pyx_k_PySimpleSpecfile, sizeof(__pyx_k_PySimpleSpecfile), 0, 0, 1, 1},
  {&__pyx_n_s_PyTransmissionTable, __pyx_k_PyTransmissionTable, sizeof(__pyx_k_PyTransmissionTable), 0, 0, 1, 1},
  {&__pyx_n_s_PyXRF, __pyx_k_PyXRF, sizeof(__pyx_k_PyXRF), 0, 0, 1, 1},
  {&__pyx_kp_s_ShellConstants_dat, __pyx_k_ShellConstants_dat, sizeof(__pyx_k_ShellConstants_dat), 0, 0, 1, 0},
  {&__pyx_kp_s_ShellRates_dat, __pyx_k_ShellRates_dat, sizeof(__pyx_k_ShellRates_dat), 0, 0, 1, 0},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_kp_s_XCOM_CrossSections_dat, __pyx_k_XCOM_CrossSections_dat, sizeof(__pyx_k_XCOM_CrossSections_dat), 0, 0, 1, 0},
  {&__pyx_n_s_alphaIn, __pyx_k_alphaIn, sizeof(__pyx_k_alphaIn), 0, 0, 1, 1},
  {&__pyx_n_s_alphaOut, __pyx_k_alphaOut, sizeof(__pyx_k_alphaOut), 0, 0, 1, 1},
  {&__pyx_n_s_angle, __pyx_k_angle, sizeof(__pyx_k_angle), 0, 0, 1, 1},
  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
  {&__pyx_n_s_attenuator, __pyx_k_attenuator, sizeof(__pyx_k_attenuator), 0, 0, 1, 1},
  {&__pyx_n_s_bindingEnergiesFile, __pyx_k_bindingEnergiesFile, sizeof(__pyx_k_bindingEnergiesFile), 0, 0, 1, 1},
  {&__pyx_n_s_cascade, __pyx_k_cascade, sizeof(__pyx_k_cascade), 0, 0, 1, 1},
  {&__pyx_n_s_characteristic, __pyx_k_characteristic, sizeof(__pyx_k_characteristic), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_coherent, __pyx_k_coherent, sizeof(__pyx_k_coherent), 0, 0, 1, 1},
  {&__pyx_n_s_comment, __pyx_k_comment, sizeof(__pyx_k_comment), 0, 0, 1, 1},
  {&__pyx_n_s_composition, __pyx_k_composition, sizeof(__pyx_k_composition), 0, 0, 1, 1},
  {&__pyx_n_s_compton, __pyx_k_compton, sizeof(__pyx_k_compton), 0, 0, 1, 1},
  {&__pyx_n_s_configurationFile, __pyx_k_configurationFile, sizeof(__pyx_k_configurationFile), 0, 0, 1, 1},
  {&__pyx_n_s_crossSectionsFile, __pyx_k_crossSectionsFile, sizeof(__pyx_k_crossSectionsFile), 0, 0, 1, 1},
  {&__pyx_n_s_d1, __pyx_k_d1, sizeof(__pyx_k_d1), 0, 0, 1, 1},
  {&__pyx_n_s_d2, __pyx_k_d2, sizeof(__pyx_k_d2), 0, 0, 1, 1},
  {&__pyx_n_s_density, __pyx_k_density, sizeof(__pyx_k_density), 0, 0, 1, 1},
  {&__pyx_n_s_directoryName, __pyx_k_directoryName, sizeof(__pyx_k_directoryName), 0, 0, 1, 1},
  {&__pyx_n_s_distribution, __pyx_k_distribution, sizeof(__pyx_k_distribution), 0, 0, 1, 1},
  {&__pyx_n_s_divergency, __pyx_k_divergency, sizeof(__pyx_k_divergency), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_element, __pyx_k_element, sizeof(__pyx_k_element), 0, 0, 1, 1},
  {&__pyx_n_s_elementDict, __pyx_k_elementDict, sizeof(__pyx_k_elementDict), 0, 0, 1, 1},
  {&__pyx_n_s_elementFamilyLayer, __pyx_k_elementFamilyLayer, sizeof(__pyx_k_elementFamilyLayer), 0, 0, 1, 1},
  {&__pyx_n_s_elementList, __pyx_k_elementList, sizeof(__pyx_k_elementList), 0, 0, 1, 1},
  {&__pyx_n_s_elementName, __pyx_k_elementName, sizeof(__pyx_k_elementName), 0, 0, 1, 1},
  {&__pyx_n_s_elementsLib, __pyx_k_elementsLib, sizeof(__pyx_k_elementsLib), 0, 0, 1, 1},
  {&__pyx_n_s_elementsLibrary, __pyx_k_elementsLibrary, sizeof(__pyx_k_elementsLibrary), 0, 0, 1, 1},
  {&__pyx_n_s_energies, __pyx_k_energies, sizeof(__pyx_k_energies), 0, 0, 1, 1},
  {&__pyx_n_s_energy, __pyx_k_energy, sizeof(__pyx_k_energy), 0, 0, 1, 1},
  {&__pyx_n_s_energyList, __pyx_k_energyList, sizeof(__pyx_k_energyList), 0, 0, 1, 1},
  {&__pyx_n_s_energyThreshold, __pyx_k_energyThreshold, sizeof(__pyx_k_energyThreshold), 0, 0, 1, 1},
  {&__pyx_n_s_errorOnReplace, __pyx_k_errorOnReplace, sizeof(__pyx_k_errorOnReplace), 0, 0, 1, 1},
  {&__pyx_n_s_fileName, __pyx_k_fileName, sizeof(__pyx_k_fileName), 0, 0, 1, 1},
  {&__pyx_n_s_fillTransmissionTable, __pyx_k_fillTransmissionTable, sizeof(__pyx_k_fillTransmissionTable), 0, 0, 1, 1},
  {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 0, 1, 1},
  {&__pyx_n_s_fisx, __pyx_k_fisx, sizeof(__pyx_k_fisx), 0, 0, 1, 1},
  {&__pyx_n_s_fisxVersion, __pyx_k_fisxVersion, sizeof(__pyx_k_fisxVersion), 0, 0, 1, 1},
  {&__pyx_n_s_fisx_FisxCythonTools, __pyx_k_fisx_FisxCythonTools, sizeof(__pyx_k_fisx_FisxCythonTools), 0, 0, 1, 1},
  {&__pyx_n_s_fisx__fisx, __pyx_k_fisx__fisx, sizeof(__pyx_k_fisx__fisx), 0, 0, 1, 1},
  {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1},
  {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1},
  {&__pyx_n_s_function, __pyx_k_function, sizeof(__pyx_k_function), 0, 0, 1, 1},
  {&__pyx_n_s_funny, __pyx_k_funny, sizeof(__pyx_k_funny), 0, 0, 1, 1},
  {&__pyx_n_s_getCascadeModifiedVacancyDistri, __pyx_k_getCascadeModifiedVacancyDistri, sizeof(__pyx_k_getCascadeModifiedVacancyDistri), 0, 0, 1, 1},
  {&__pyx_n_s_getComment, __pyx_k_getComment, sizeof(__pyx_k_getComment), 0, 0, 1, 1},
  {&__pyx_n_s_getDataFile, __pyx_k_getDataFile, sizeof(__pyx_k_getDataFile), 0, 0, 1, 1},
  {&__pyx_n_s_getDefaultMassAttenuationCoeffi, __pyx_k_getDefaultMassAttenuationCoeffi, sizeof(__pyx_k_getDefaultMassAttenuationCoeffi), 0, 0, 1, 1},
  {&__pyx_n_s_getElementDefaultMassAttenuatio, __pyx_k_getElementDefaultMassAttenuatio, sizeof(__pyx_k_getElementDefaultMassAttenuatio), 0, 0, 1, 1},
  {&__pyx_n_s_getExcitationFactors, __pyx_k_getExcitationFactors, sizeof(__pyx_k_getExcitationFactors), 0, 0, 1, 1},
  {&__pyx_n_s_getMassAttenuationCoefficients, __pyx_k_getMassAttenuationCoefficients, sizeof(__pyx_k_getMassAttenuationCoefficients), 0, 0, 1, 1},
  {&__pyx_n_s_getMaterialMassAttenuationCoeff, __pyx_k_getMaterialMassAttenuationCoeff, sizeof(__pyx_k_getMaterialMassAttenuationCoeff), 0, 0, 1, 1},
  {&__pyx_n_s_getMultipleMassAttenuationCoeff, __pyx_k_getMultipleMassAttenuationCoeff, sizeof(__pyx_k_getMultipleMassAttenuationCoeff), 0, 0, 1, 1},
  {&__pyx_n_s_getMultiplePhotoelectricWeights, __pyx_k_getMultiplePhotoelectricWeights, sizeof(__pyx_k_getMultiplePhotoelectricWeights), 0, 0, 1, 1},
  {&__pyx_n_s_getName, __pyx_k_getName, sizeof(__pyx_k_getName), 0, 0, 1, 1},
  {&__pyx_n_s_getPeakFamilies, __pyx_k_getPeakFamilies, sizeof(__pyx_k_getPeakFamilies), 0, 0, 1, 1},
  {&__pyx_n_s_getPeakFamiliesFromVectorOfElem, __pyx_k_getPeakFamiliesFromVectorOfElem, sizeof(__pyx_k_getPeakFamiliesFromVectorOfElem), 0, 0, 1, 1},
  {&__pyx_n_s_getTransmissionMultiple, __pyx_k_getTransmissionMultiple, sizeof(__pyx_k_getTransmissionMultiple), 0, 0, 1, 1},
  {&__pyx_n_s_getTransmissionSingle, __pyx_k_getTransmissionSingle, sizeof(__pyx_k_getTransmissionSingle), 0, 0, 1, 1},
  {&__pyx_n_s_getTransmissionTable, __pyx_k_getTransmissionTable, sizeof(__pyx_k_getTransmissionTable), 0, 0, 1, 1},
  {&__pyx_n_s_getXRayLinesFromVacancyDistribu, __pyx_k_getXRayLinesFromVacancyDistribu, sizeof(__pyx_k_getXRayLinesFromVacancyDistribu), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_initializeAsPyMcaOld, __pyx_k_initializeAsPyMcaOld, sizeof(__pyx_k_initializeAsPyMcaOld), 0, 0, 1, 1},
  {&__pyx_n_s_intensityThreshold, __pyx_k_intensityThreshold, sizeof(__pyx_k_intensityThreshold), 0, 0, 1, 1},
  {&__pyx_n_s_itemgetter, __pyx_k_itemgetter, sizeof(__pyx_k_itemgetter), 0, 0, 1, 1},
  {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
  {&__pyx_n_s_label, __pyx_k_label, sizeof(__pyx_k_label), 0, 0, 1, 1},
  {&__pyx_n_s_labels, __pyx_k_labels, sizeof(__pyx_k_labels), 0, 0, 1, 1},
  {&__pyx_n_s_layerIndex, __pyx_k_layerIndex, sizeof(__pyx_k_layerIndex), 0, 0, 1, 1},
  {&__pyx_n_s_layerList, __pyx_k_layerList, sizeof(__pyx_k_layerList), 0, 0, 1, 1},
  {&__pyx_n_s_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 0, 1, 1},
  {&__pyx_n_s_lineFamily, __pyx_k_lineFamily, sizeof(__pyx_k_lineFamily), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_mainShellName, __pyx_k_mainShellName, sizeof(__pyx_k_mainShellName), 0, 0, 1, 1},
  {&__pyx_n_s_massFractions, __pyx_k_massFractions, sizeof(__pyx_k_massFractions), 0, 0, 1, 1},
  {&__pyx_n_s_material, __pyx_k_material, sizeof(__pyx_k_material), 0, 0, 1, 1},
  {&__pyx_n_s_materialName, __pyx_k_materialName, sizeof(__pyx_k_materialName), 0, 0, 1, 1},
  {&__pyx_n_s_mu1, __pyx_k_mu1, sizeof(__pyx_k_mu1), 0, 0, 1, 1},
  {&__pyx_n_s_mu2, __pyx_k_mu2, sizeof(__pyx_k_mu2), 0, 0, 1, 1},
  {&__pyx_n_s_mu_1_j, __pyx_k_mu_1_j, sizeof(__pyx_k_mu_1_j), 0, 0, 1, 1},
  {&__pyx_n_s_mu_2_j, __pyx_k_mu_2_j, sizeof(__pyx_k_mu_2_j), 0, 0, 1, 1},
  {&__pyx_n_s_mu_b_d_t, __pyx_k_mu_b_d_t, sizeof(__pyx_k_mu_b_d_t), 0, 0, 1, 1},
  {&__pyx_n_s_muj, __pyx_k_muj, sizeof(__pyx_k_muj), 0, 0, 1, 1},
  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
  {&__pyx_n_s_nThreshold, __pyx_k_nThreshold, sizeof(__pyx_k_nThreshold), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_nameOrVector, __pyx_k_nameOrVector, sizeof(__pyx_k_nameOrVector), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
  {&__pyx_n_s_operator, __pyx_k_operator, sizeof(__pyx_k_operator), 0, 0, 1, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
  {&__pyx_n_s_pair, __pyx_k_pair, sizeof(__pyx_k_pair), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_photo, __pyx_k_photo, sizeof(__pyx_k_photo), 0, 0, 1, 1},
  {&__pyx_n_s_pyTransmissionTableList, __pyx_k_pyTransmissionTableList, sizeof(__pyx_k_pyTransmissionTableList), 0, 0, 1, 1},
  {&__pyx_n_s_pymca, __pyx_k_pymca, sizeof(__pyx_k_pymca), 0, 0, 1, 1},
  {&__pyx_kp_s_python_cython__fisx_pyx, __pyx_k_python_cython__fisx_pyx, sizeof(__pyx_k_python_cython__fisx_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_referenceLayer, __pyx_k_referenceLayer, sizeof(__pyx_k_referenceLayer), 0, 0, 1, 1},
  {&__pyx_n_s_sampleLayer, __pyx_k_sampleLayer, sizeof(__pyx_k_sampleLayer), 0, 0, 1, 1},
  {&__pyx_n_s_scatteringAngle, __pyx_k_scatteringAngle, sizeof(__pyx_k_scatteringAngle), 0, 0, 1, 1},
  {&__pyx_n_s_secondary, __pyx_k_secondary, sizeof(__pyx_k_secondary), 0, 0, 1, 1},
  {&__pyx_n_s_secondaryCalculationLimit, __pyx_k_secondaryCalculationLimit, sizeof(__pyx_k_secondaryCalculationLimit), 0, 0, 1, 1},
  {&__pyx_n_s_setBeam, __pyx_k_setBeam, sizeof(__pyx_k_setBeam), 0, 0, 1, 1},
  {&__pyx_n_s_setSingleEnergyBeam, __pyx_k_setSingleEnergyBeam, sizeof(__pyx_k_setSingleEnergyBeam), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_shell, __pyx_k_shell, sizeof(__pyx_k_shell), 0, 0, 1, 1},
  {&__pyx_n_s_sorted, __pyx_k_sorted, sizeof(__pyx_k_sorted), 0, 0, 1, 1},
  {&__pyx_n_s_subshell, __pyx_k_subshell, sizeof(__pyx_k_subshell), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_thickness, __pyx_k_thickness, sizeof(__pyx_k_thickness), 0, 0, 1, 1},
  {&__pyx_n_s_toBytes, __pyx_k_toBytes, sizeof(__pyx_k_toBytes), 0, 0, 1, 1},
  {&__pyx_n_s_toBytesKeys, __pyx_k_toBytesKeys, sizeof(__pyx_k_toBytesKeys), 0, 0, 1, 1},
  {&__pyx_n_s_toBytesKeysAndValues, __pyx_k_toBytesKeysAndValues, sizeof(__pyx_k_toBytesKeysAndValues), 0, 0, 1, 1},
  {&__pyx_n_s_toString, __pyx_k_toString, sizeof(__pyx_k_toString), 0, 0, 1, 1},
  {&__pyx_n_s_toStringKeys, __pyx_k_toStringKeys, sizeof(__pyx_k_toStringKeys), 0, 0, 1, 1},
  {&__pyx_n_s_toStringKeysAndValues, __pyx_k_toStringKeysAndValues, sizeof(__pyx_k_toStringKeysAndValues), 0, 0, 1, 1},
  {&__pyx_n_s_toStringList, __pyx_k_toStringList, sizeof(__pyx_k_toStringList), 0, 0, 1, 1},
  {&__pyx_n_s_transitions, __pyx_k_transitions, sizeof(__pyx_k_transitions), 0, 0, 1, 1},
  {&__pyx_n_s_transmission, __pyx_k_transmission, sizeof(__pyx_k_transmission), 0, 0, 1, 1},
  {&__pyx_n_s_transmissionTable, __pyx_k_transmissionTable, sizeof(__pyx_k_transmissionTable), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_useFluorescenceYield, __pyx_k_useFluorescenceYield, sizeof(__pyx_k_useFluorescenceYield), 0, 0, 1, 1},
  {&__pyx_n_s_useGeometricEfficiency, __pyx_k_useGeometricEfficiency, sizeof(__pyx_k_useGeometricEfficiency), 0, 0, 1, 1},
  {&__pyx_n_s_useMassFractions, __pyx_k_useMassFractions, sizeof(__pyx_k_useMassFractions), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_valuesDict, __pyx_k_valuesDict, sizeof(__pyx_k_valuesDict), 0, 0, 1, 1},
  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
  {&__pyx_n_s_weight, __pyx_k_weight, sizeof(__pyx_k_weight), 0, 0, 1, 1},
  {&__pyx_n_s_weights, __pyx_k_weights, sizeof(__pyx_k_weights), 0, 0, 1, 1},
  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  {&__pyx_n_s_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error)
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 312, __pyx_L1_error)
  __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s_sorted); if (!__pyx_builtin_sorted) __PYX_ERR(1, 548, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 1493, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 61, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "python/cython/_fisx.pyx":322
 *         del self.thisptr
 *         self.thisptr = new Elements(toBytes(directoryName), toBytes(bindingEnergies), toBytes(xcomFile))
 *         for shell in ["K", "L", "M"]:             # <<<<<<<<<<<<<<
 *             shellConstantsFile = getDataFile(shell+"ShellConstants.dat")
 *             self.thisptr.setShellConstantsFile(toBytes(shell),
 */
  __pyx_tuple__6 = PyTuple_Pack(3, __pyx_n_s_K, __pyx_n_s_L, __pyx_n_s_M); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "python/cython/_fisx.pyx":577
 *                                         double alphaIn=90.,
 *                                         double thickness=0.0):
 *         if sys.version_info < (3, ):             # <<<<<<<<<<<<<<
 *             return self.thisptr.getEscape(toBytesKeys(composition), energy, energyThreshold, intensityThreshold, nThreshold,
 *                                          alphaIn, thickness)
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "python/cython/_fisx.pyx":1493
 *     def _fillTransmissionTable(self, pyTransmissionTableList, function):
 *         if function not in ["filter", "attenuator"]:
 *             raise ValueError("Please specify usage as filter or as attenuator")             # <<<<<<<<<<<<<<
 *         if len(pyTransmissionTableList):
 *             if hasattr(pyTransmissionTableList[0], "getTransmissionTable"):
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_Please_specify_usage_as_filter_o); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 1493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "python/cython/_fisx.pyx":1524
 *                                            toBytes(item[2]))
 *                 else:
 *                     raise ValueError("Not appropriate input type or length")             # <<<<<<<<<<<<<<
 *                 container.push_back(t)
 *         if function == "filter":
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_Not_appropriate_input_type_or_le); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 1524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "python/cython/_fisx.pyx":1383
 * from Version cimport fisxVersion as _fisxVersion
 * 
 * def fisxVersion():             # <<<<<<<<<<<<<<
 *     return toString(_fisxVersion())
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */
  __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python_cython__fisx_pyx, __pyx_n_s_fisxVersion, 1383, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(1, 1383, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(1, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_4fisx_5_fisx_PyDetector) < 0) __PYX_ERR(1, 41, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4fisx_5_fisx_PyDetector.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4fisx_5_fisx_PyDetector.tp_dictoffset && __pyx_type_4fisx_5_fisx_PyDetector.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4fisx_5_fisx_PyDetector.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyDetector, (PyObject *)&__pyx_type_4fisx_5_fisx_PyDetector) < 0) __PYX_ERR(1, 41, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4fisx_5_fisx_PyDetector) < 0) __PYX_ERR(1, 41, __pyx_L1_error)
  __pyx_ptype_4fisx_5_fisx_PyDetector = &__pyx_type_4fisx_5_fisx_PyDetector;
  if (PyType_Ready(&__pyx_type_4fisx_5_fisx_PyElement) < 0) __PYX_ERR(1, 147, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4fisx_5_fisx_PyElement.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4fisx_5_fisx_PyElement.tp_dictoffset && __pyx_type_4fisx_5_fisx_PyElement.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4fisx_5_fisx_PyElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyElement, (PyObject *)&__pyx_type_4fisx_5_fisx_PyElement) < 0) __PYX_ERR(1, 147, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4fisx_5_fisx_PyElement) < 0) __PYX_ERR(1, 147, __pyx_L1_error)
  __pyx_ptype_4fisx_5_fisx_PyElement = &__pyx_type_4fisx_5_fisx_PyElement;
  if (PyType_Ready(&__pyx_type_4fisx_5_fisx_PyElements) < 0) __PYX_ERR(1, 281, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4fisx_5_fisx_PyElements.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4fisx_5_fisx_PyElements.tp_dictoffset && __pyx_type_4fisx_5_fisx_PyElements.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4fisx_5_fisx_PyElements.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyElements, (PyObject *)&__pyx_type_4fisx_5_fisx_PyElements) < 0) __PYX_ERR(1, 281, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4fisx_5_fisx_PyElements) < 0) __PYX_ERR(1, 281, __pyx_L1_error)
  __pyx_ptype_4fisx_5_fisx_PyElements = &__pyx_type_4fisx_5_fisx_PyElements;
  if (PyType_Ready(&__pyx_type_4fisx_5_fisx_PyEPDL97) < 0) __PYX_ERR(1, 767, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4fisx_5_fisx_PyEPDL97.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4fisx_5_fisx_PyEPDL97.tp_dictoffset && __pyx_type_4fisx_5_fisx_PyEPDL97.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4fisx_5_fisx_PyEPDL97.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyEPDL97, (PyObject *)&__pyx_type_4fisx_5_fisx_PyEPDL97) < 0) __PYX_ERR(1, 767, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4fisx_5_fisx_PyEPDL97) < 0) __PYX_ERR(1, 767, __pyx_L1_error)
  __pyx_ptype_4fisx_5_fisx_PyEPDL97 = &__pyx_type_4fisx_5_fisx_PyEPDL97;
  if (PyType_Ready(&__pyx_type_4fisx_5_fisx_PyLayer) < 0) __PYX_ERR(1, 858, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4fisx_5_fisx_PyLayer.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4fisx_5_fisx_PyLayer.tp_dictoffset && __pyx_type_4fisx_5_fisx_PyLayer.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4fisx_5_fisx_PyLayer.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyLayer, (PyObject *)&__pyx_type_4fisx_5_fisx_PyLayer) < 0) __PYX_ERR(1, 858, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4fisx_5_fisx_PyLayer) < 0) __PYX_ERR(1, 858, __pyx_L1_error)
  __pyx_ptype_4fisx_5_fisx_PyLayer = &__pyx_type_4fisx_5_fisx_PyLayer;
  if (PyType_Ready(&__pyx_type_4fisx_5_fisx_PyMaterial) < 0) __PYX_ERR(1, 942, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4fisx_5_fisx_PyMaterial.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4fisx_5_fisx_PyMaterial.tp_dictoffset && __pyx_type_4fisx_5_fisx_PyMaterial.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4fisx_5_fisx_PyMaterial.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyMaterial, (PyObject *)&__pyx_type_4fisx_5_fisx_PyMaterial) < 0) __PYX_ERR(1, 942, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4fisx_5_fisx_PyMaterial) < 0) __PYX_ERR(1, 942, __pyx_L1_error)
  __pyx_ptype_4fisx_5_fisx_PyMaterial = &__pyx_type_4fisx_5_fisx_PyMaterial;
  if (PyType_Ready(&__pyx_type_4fisx_5_fisx_PyMath) < 0) __PYX_ERR(1, 1007, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4fisx_5_fisx_PyMath.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4fisx_5_fisx_PyMath.tp_dictoffset && __pyx_type_4fisx_5_fisx_PyMath.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4fisx_5_fisx_PyMath.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyMath, (PyObject *)&__pyx_type_4fisx_5_fisx_PyMath) < 0) __PYX_ERR(1, 1007, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4fisx_5_fisx_PyMath) < 0) __PYX_ERR(1, 1007, __pyx_L1_error)
  __pyx_ptype_4fisx_5_fisx_PyMath = &__pyx_type_4fisx_5_fisx_PyMath;
  if (PyType_Ready(&__pyx_type_4fisx_5_fisx_PyShell) < 0) __PYX_ERR(1, 1094, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4fisx_5_fisx_PyShell.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4fisx_5_fisx_PyShell.tp_dictoffset && __pyx_type_4fisx_5_fisx_PyShell.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4fisx_5_fisx_PyShell.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyShell, (PyObject *)&__pyx_type_4fisx_5_fisx_PyShell) < 0) __PYX_ERR(1, 1094, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4fisx_5_fisx_PyShell) < 0) __PYX_ERR(1, 1094, __pyx_L1_error)
  __pyx_ptype_4fisx_5_fisx_PyShell = &__pyx_type_4fisx_5_fisx_PyShell;
  if (PyType_Ready(&__pyx_type_4fisx_5_fisx_PySimpleIni) < 0) __PYX_ERR(1, 1176, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4fisx_5_fisx_PySimpleIni.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4fisx_5_fisx_PySimpleIni.tp_dictoffset && __pyx_type_4fisx_5_fisx_PySimpleIni.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4fisx_5_fisx_PySimpleIni.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PySimpleIni, (PyObject *)&__pyx_type_4fisx_5_fisx_PySimpleIni) < 0) __PYX_ERR(1, 1176, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4fisx_5_fisx_PySimpleIni) < 0) __PYX_ERR(1, 1176, __pyx_L1_error)
  __pyx_ptype_4fisx_5_fisx_PySimpleIni = &__pyx_type_4fisx_5_fisx_PySimpleIni;
  if (PyType_Ready(&__pyx_type_4fisx_5_fisx_PySimpleSpecfile) < 0) __PYX_ERR(1, 1229, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4fisx_5_fisx_PySimpleSpecfile.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4fisx_5_fisx_PySimpleSpecfile.tp_dictoffset && __pyx_type_4fisx_5_fisx_PySimpleSpecfile.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4fisx_5_fisx_PySimpleSpecfile.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PySimpleSpecfile, (PyObject *)&__pyx_type_4fisx_5_fisx_PySimpleSpecfile) < 0) __PYX_ERR(1, 1229, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4fisx_5_fisx_PySimpleSpecfile) < 0) __PYX_ERR(1, 1229, __pyx_L1_error)
  __pyx_ptype_4fisx_5_fisx_PySimpleSpecfile = &__pyx_type_4fisx_5_fisx_PySimpleSpecfile;
  if (PyType_Ready(&__pyx_type_4fisx_5_fisx_PyTransmissionTable) < 0) __PYX_ERR(1, 1291, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4fisx_5_fisx_PyTransmissionTable.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4fisx_5_fisx_PyTransmissionTable.tp_dictoffset && __pyx_type_4fisx_5_fisx_PyTransmissionTable.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4fisx_5_fisx_PyTransmissionTable.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyTransmissionTable, (PyObject *)&__pyx_type_4fisx_5_fisx_PyTransmissionTable) < 0) __PYX_ERR(1, 1291, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4fisx_5_fisx_PyTransmissionTable) < 0) __PYX_ERR(1, 1291, __pyx_L1_error)
  __pyx_ptype_4fisx_5_fisx_PyTransmissionTable = &__pyx_type_4fisx_5_fisx_PyTransmissionTable;
  if (PyType_Ready(&__pyx_type_4fisx_5_fisx_PyXRF) < 0) __PYX_ERR(1, 1425, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4fisx_5_fisx_PyXRF.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4fisx_5_fisx_PyXRF.tp_dictoffset && __pyx_type_4fisx_5_fisx_PyXRF.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4fisx_5_fisx_PyXRF.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyXRF, (PyObject *)&__pyx_type_4fisx_5_fisx_PyXRF) < 0) __PYX_ERR(1, 1425, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4fisx_5_fisx_PyXRF) < 0) __PYX_ERR(1, 1425, __pyx_L1_error)
  __pyx_ptype_4fisx_5_fisx_PyXRF = &__pyx_type_4fisx_5_fisx_PyXRF;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC init_fisx(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC init_fisx(void)
#else
__Pyx_PyMODINIT_FUNC PyInit__fisx(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit__fisx(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec__fisx(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  std::string __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module '_fisx' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__fisx(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("_fisx", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_fisx___fisx) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "fisx._fisx")) {
      if (unlikely(PyDict_SetItemString(modules, "fisx._fisx", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif

  /* "python/cython/_fisx.pyx":28
 * #
 * #############################################################################*[inserted by cython to avoid comment closer]/
 * import numpy             # <<<<<<<<<<<<<<
 * import sys
 * cimport cython
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_1) < 0) __PYX_ERR(1, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":29
 * #############################################################################*[inserted by cython to avoid comment closer]/
 * import numpy
 * import sys             # <<<<<<<<<<<<<<
 * cimport cython
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(1, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":39
 * from Elements cimport *
 * from Detector cimport *
 * from fisx.FisxCythonTools import toBytes, toBytesKeys, toBytesKeysAndValues, toString,  toStringKeys, toStringKeysAndValues, toStringList             # <<<<<<<<<<<<<<
 * 
 * cdef class PyDetector:
 */
  __pyx_t_1 = PyList_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_toBytes);
  __Pyx_GIVEREF(__pyx_n_s_toBytes);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_toBytes);
  __Pyx_INCREF(__pyx_n_s_toBytesKeys);
  __Pyx_GIVEREF(__pyx_n_s_toBytesKeys);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_toBytesKeys);
  __Pyx_INCREF(__pyx_n_s_toBytesKeysAndValues);
  __Pyx_GIVEREF(__pyx_n_s_toBytesKeysAndValues);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_toBytesKeysAndValues);
  __Pyx_INCREF(__pyx_n_s_toString);
  __Pyx_GIVEREF(__pyx_n_s_toString);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_toString);
  __Pyx_INCREF(__pyx_n_s_toStringKeys);
  __Pyx_GIVEREF(__pyx_n_s_toStringKeys);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_toStringKeys);
  __Pyx_INCREF(__pyx_n_s_toStringKeysAndValues);
  __Pyx_GIVEREF(__pyx_n_s_toStringKeysAndValues);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_toStringKeysAndValues);
  __Pyx_INCREF(__pyx_n_s_toStringList);
  __Pyx_GIVEREF(__pyx_n_s_toStringList);
  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_toStringList);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_fisx_FisxCythonTools, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_toBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_toBytes, __pyx_t_1) < 0) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_toBytesKeys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_toBytesKeys, __pyx_t_1) < 0) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_toBytesKeysAndValues); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_toBytesKeysAndValues, __pyx_t_1) < 0) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_toString); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_toString, __pyx_t_1) < 0) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_toStringKeys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_toStringKeys, __pyx_t_1) < 0) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_toStringKeysAndValues); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_toStringKeysAndValues, __pyx_t_1) < 0) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_toStringList); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_toStringList, __pyx_t_1) < 0) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "python/cython/_fisx.pyx":258
 * #
 * #############################################################################*[inserted by cython to avoid comment closer]/
 * import sys             # <<<<<<<<<<<<<<
 * cimport cython
 * 
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(1, 258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "python/cython/_fisx.pyx":261
 * cimport cython
 * 
 * from operator import itemgetter             # <<<<<<<<<<<<<<
 * from libcpp.string cimport string as std_string
 * from libcpp.vector cimport vector as std_vector
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_itemgetter);
  __Pyx_GIVEREF(__pyx_n_s_itemgetter);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_itemgetter);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_operator, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_itemgetter); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_itemgetter, __pyx_t_2) < 0) __PYX_ERR(1, 261, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":269
 * from Material cimport *
 * 
 * __doc__ = """             # <<<<<<<<<<<<<<
 * 
 * Initialization with XCOM mass attenuation cross sections:
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_doc, __pyx_kp_s_Initialization_with_XCOM_mass_a) < 0) __PYX_ERR(1, 269, __pyx_L1_error)

  /* "python/cython/_fisx.pyx":843
 * #
 * #############################################################################*[inserted by cython to avoid comment closer]/
 * import numpy             # <<<<<<<<<<<<<<
 * #cimport numpy as np
 * cimport cython
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_1) < 0) __PYX_ERR(1, 843, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "python/cython/_fisx.pyx":852
 * from libcpp.map cimport map as std_map
 * from libcpp.map cimport pair as std_pair
 * from operator import itemgetter             # <<<<<<<<<<<<<<
 * 
 * from Elements cimport *
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_itemgetter);
  __Pyx_GIVEREF(__pyx_n_s_itemgetter);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_itemgetter);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_operator, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_itemgetter); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_itemgetter, __pyx_t_1) < 0) __PYX_ERR(1, 852, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "python/cython/_fisx.pyx":932
 * #
 * #############################################################################*[inserted by cython to avoid comment closer]/
 * import sys             # <<<<<<<<<<<<<<
 * cimport cython
 * 
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(1, 932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "python/cython/_fisx.pyx":999
 * #
 * #############################################################################*[inserted by cython to avoid comment closer]/
 * import numpy             # <<<<<<<<<<<<<<
 * #cimport numpy as np
 * cimport cython
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_2) < 0) __PYX_ERR(1, 999, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "python/cython/_fisx.pyx":1085
 * #
 * #############################################################################*[inserted by cython to avoid comment closer]/
 * import sys             # <<<<<<<<<<<<<<
 * cimport cython
 * 
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(1, 1085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "python/cython/_fisx.pyx":1281
 * #
 * #############################################################################*[inserted by cython to avoid comment closer]/
 * import sys             # <<<<<<<<<<<<<<
 * cimport cython
 * 
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(1, 1281, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "python/cython/_fisx.pyx":1383
 * from Version cimport fisxVersion as _fisxVersion
 * 
 * def fisxVersion():             # <<<<<<<<<<<<<<
 *     return toString(_fisxVersion())
 * #/[inserted by cython to avoid comment start]*##########################################################################
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_4fisx_5_fisx_1fisxVersion, NULL, __pyx_n_s_fisx__fisx); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fisxVersion, __pyx_t_2) < 0) __PYX_ERR(1, 1383, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "python/cython/_fisx.pyx":1428
 *     cdef XRF *thisptr
 * 
 *     def __cinit__(self, std_string configurationFile=""):             # <<<<<<<<<<<<<<
 *         if len(configurationFile):
 *             self.thisptr = new XRF(configurationFile)
 */
  __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_kp_b_); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1428, __pyx_L1_error)
  __pyx_k__26 = __pyx_t_3;

  /* "python/cython/_fisx.pyx":1
 * #/[inserted by cython to avoid comment start]*##########################################################################             # <<<<<<<<<<<<<<
 * #
 * # The fisx library for X-Ray Fluorescence
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "map.to_py":201
 * 
 * @cname("__pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_int_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e____3e___")
 * cdef object __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_map_3c_int_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_map_3c_std_3a__3a_string_2c_double_3e____3e____3e___(const map[X,Y]& s):             # <<<<<<<<<<<<<<
 *     o = {}
 *     cdef const map[X,Y].value_type *key_value
 */

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init fisx._fisx", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init fisx._fisx");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (__Pyx_PyFastCFunction_Check(func)) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* HasAttr */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#if defined(__Pyx_CyFunction_USED) && defined(NDEBUG)
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = Py_TYPE(iter)->tp_iternext;
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const short neg_one = (short) -1, const_zero = (short) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(short) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(short, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (short) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (short) 0;
                case  1: __PYX_VERIFY_RETURN_INT(short, digit, digits[0])
                case 2:
                    if (8 * sizeof(short) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(short) >= 2 * PyLong_SHIFT) {
                            return (short) (((((short)digits[1]) << PyLong_SHIFT) | (short)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(short) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(short) >= 3 * PyLong_SHIFT) {
                            return (short) (((((((short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(short) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(short) >= 4 * PyLong_SHIFT) {
                            return (short) (((((((((short)digits[3]) << PyLong_SHIFT) | (short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (short) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(short) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(short, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(short) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(short, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (short) 0;
                case -1: __PYX_VERIFY_RETURN_INT(short, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(short,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(short) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(short) - 1 > 2 * PyLong_SHIFT) {
                            return (short) (((short)-1)*(((((short)digits[1]) << PyLong_SHIFT) | (short)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(short) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(short) - 1 > 2 * PyLong_SHIFT) {
                            return (short) ((((((short)digits[1]) << PyLong_SHIFT) | (short)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(short) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(short) - 1 > 3 * PyLong_SHIFT) {
                            return (short) (((short)-1)*(((((((short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(short) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(short) - 1 > 3 * PyLong_SHIFT) {
                            return (short) ((((((((short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(short) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(short) - 1 > 4 * PyLong_SHIFT) {
                            return (short) (((short)-1)*(((((((((short)digits[3]) << PyLong_SHIFT) | (short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(short) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(short) - 1 > 4 * PyLong_SHIFT) {
                            return (short) ((((((((((short)digits[3]) << PyLong_SHIFT) | (short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(short) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(short, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(short) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(short, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            short val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (short) -1;
        }
    } else {
        short val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (short) -1;
        val = __Pyx_PyInt_As_short(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to short");
    return (short) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to short");
    return (short) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(size_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (size_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
                            return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
                            return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
                            return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (size_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(size_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(size_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(size_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            size_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (size_t) -1;
        }
    } else {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyInt_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to size_t");
    return (size_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to size_t");
    return (size_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[5];
    int same=1, i, found_dot;
    const char* rt_from_call = Py_GetVersion();
    PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    found_dot = 0;
    for (i = 0; i < 4; i++) {
        if (!ctversion[i]) {
            same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
            break;
        }
        if (rt_from_call[i] != ctversion[i]) {
            same = 0;
            break;
        }
    }
    if (!same) {
        char rtversion[5] = {'\0'};
        char message[200];
        for (i=0; i<4; ++i) {
            if (rt_from_call[i] == '.') {
                if (found_dot) break;
                found_dot = 1;
            } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
                break;
            }
            rtversion[i] = rt_from_call[i];
        }
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
