proteus  1.8.1
C/C++/Fortran libraries
WaveTools.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.30 */
2 
3 #ifndef PY_SSIZE_T_CLEAN
4 #define PY_SSIZE_T_CLEAN
5 #endif /* PY_SSIZE_T_CLEAN */
6 #include "Python.h"
7 #ifndef Py_PYTHON_H
8  #error Python headers needed to compile C extensions, please install development version of Python.
9 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
10  #error Cython requires Python 2.6+ or Python 3.3+.
11 #else
12 #define CYTHON_ABI "0_29_30"
13 #define CYTHON_HEX_VERSION 0x001D1EF0
14 #define CYTHON_FUTURE_DIVISION 1
15 #include <stddef.h>
16 #ifndef offsetof
17  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
18 #endif
19 #if !defined(WIN32) && !defined(MS_WINDOWS)
20  #ifndef __stdcall
21  #define __stdcall
22  #endif
23  #ifndef __cdecl
24  #define __cdecl
25  #endif
26  #ifndef __fastcall
27  #define __fastcall
28  #endif
29 #endif
30 #ifndef DL_IMPORT
31  #define DL_IMPORT(t) t
32 #endif
33 #ifndef DL_EXPORT
34  #define DL_EXPORT(t) t
35 #endif
36 #define __PYX_COMMA ,
37 #ifndef HAVE_LONG_LONG
38  #if PY_VERSION_HEX >= 0x02070000
39  #define HAVE_LONG_LONG
40  #endif
41 #endif
42 #ifndef PY_LONG_LONG
43  #define PY_LONG_LONG LONG_LONG
44 #endif
45 #ifndef Py_HUGE_VAL
46  #define Py_HUGE_VAL HUGE_VAL
47 #endif
48 #ifdef PYPY_VERSION
49  #define CYTHON_COMPILING_IN_PYPY 1
50  #define CYTHON_COMPILING_IN_PYSTON 0
51  #define CYTHON_COMPILING_IN_CPYTHON 0
52  #undef CYTHON_USE_TYPE_SLOTS
53  #define CYTHON_USE_TYPE_SLOTS 0
54  #undef CYTHON_USE_PYTYPE_LOOKUP
55  #define CYTHON_USE_PYTYPE_LOOKUP 0
56  #if PY_VERSION_HEX < 0x03050000
57  #undef CYTHON_USE_ASYNC_SLOTS
58  #define CYTHON_USE_ASYNC_SLOTS 0
59  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
60  #define CYTHON_USE_ASYNC_SLOTS 1
61  #endif
62  #undef CYTHON_USE_PYLIST_INTERNALS
63  #define CYTHON_USE_PYLIST_INTERNALS 0
64  #undef CYTHON_USE_UNICODE_INTERNALS
65  #define CYTHON_USE_UNICODE_INTERNALS 0
66  #undef CYTHON_USE_UNICODE_WRITER
67  #define CYTHON_USE_UNICODE_WRITER 0
68  #undef CYTHON_USE_PYLONG_INTERNALS
69  #define CYTHON_USE_PYLONG_INTERNALS 0
70  #undef CYTHON_AVOID_BORROWED_REFS
71  #define CYTHON_AVOID_BORROWED_REFS 1
72  #undef CYTHON_ASSUME_SAFE_MACROS
73  #define CYTHON_ASSUME_SAFE_MACROS 0
74  #undef CYTHON_UNPACK_METHODS
75  #define CYTHON_UNPACK_METHODS 0
76  #undef CYTHON_FAST_THREAD_STATE
77  #define CYTHON_FAST_THREAD_STATE 0
78  #undef CYTHON_FAST_PYCALL
79  #define CYTHON_FAST_PYCALL 0
80  #undef CYTHON_PEP489_MULTI_PHASE_INIT
81  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
82  #undef CYTHON_USE_TP_FINALIZE
83  #define CYTHON_USE_TP_FINALIZE 0
84  #undef CYTHON_USE_DICT_VERSIONS
85  #define CYTHON_USE_DICT_VERSIONS 0
86  #undef CYTHON_USE_EXC_INFO_STACK
87  #define CYTHON_USE_EXC_INFO_STACK 0
88  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
89  #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900)
90  #endif
91 #elif defined(PYSTON_VERSION)
92  #define CYTHON_COMPILING_IN_PYPY 0
93  #define CYTHON_COMPILING_IN_PYSTON 1
94  #define CYTHON_COMPILING_IN_CPYTHON 0
95  #ifndef CYTHON_USE_TYPE_SLOTS
96  #define CYTHON_USE_TYPE_SLOTS 1
97  #endif
98  #undef CYTHON_USE_PYTYPE_LOOKUP
99  #define CYTHON_USE_PYTYPE_LOOKUP 0
100  #undef CYTHON_USE_ASYNC_SLOTS
101  #define CYTHON_USE_ASYNC_SLOTS 0
102  #undef CYTHON_USE_PYLIST_INTERNALS
103  #define CYTHON_USE_PYLIST_INTERNALS 0
104  #ifndef CYTHON_USE_UNICODE_INTERNALS
105  #define CYTHON_USE_UNICODE_INTERNALS 1
106  #endif
107  #undef CYTHON_USE_UNICODE_WRITER
108  #define CYTHON_USE_UNICODE_WRITER 0
109  #undef CYTHON_USE_PYLONG_INTERNALS
110  #define CYTHON_USE_PYLONG_INTERNALS 0
111  #ifndef CYTHON_AVOID_BORROWED_REFS
112  #define CYTHON_AVOID_BORROWED_REFS 0
113  #endif
114  #ifndef CYTHON_ASSUME_SAFE_MACROS
115  #define CYTHON_ASSUME_SAFE_MACROS 1
116  #endif
117  #ifndef CYTHON_UNPACK_METHODS
118  #define CYTHON_UNPACK_METHODS 1
119  #endif
120  #undef CYTHON_FAST_THREAD_STATE
121  #define CYTHON_FAST_THREAD_STATE 0
122  #undef CYTHON_FAST_PYCALL
123  #define CYTHON_FAST_PYCALL 0
124  #undef CYTHON_PEP489_MULTI_PHASE_INIT
125  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
126  #undef CYTHON_USE_TP_FINALIZE
127  #define CYTHON_USE_TP_FINALIZE 0
128  #undef CYTHON_USE_DICT_VERSIONS
129  #define CYTHON_USE_DICT_VERSIONS 0
130  #undef CYTHON_USE_EXC_INFO_STACK
131  #define CYTHON_USE_EXC_INFO_STACK 0
132  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
133  #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
134  #endif
135 #else
136  #define CYTHON_COMPILING_IN_PYPY 0
137  #define CYTHON_COMPILING_IN_PYSTON 0
138  #define CYTHON_COMPILING_IN_CPYTHON 1
139  #ifndef CYTHON_USE_TYPE_SLOTS
140  #define CYTHON_USE_TYPE_SLOTS 1
141  #endif
142  #if PY_VERSION_HEX < 0x02070000
143  #undef CYTHON_USE_PYTYPE_LOOKUP
144  #define CYTHON_USE_PYTYPE_LOOKUP 0
145  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
146  #define CYTHON_USE_PYTYPE_LOOKUP 1
147  #endif
148  #if PY_MAJOR_VERSION < 3
149  #undef CYTHON_USE_ASYNC_SLOTS
150  #define CYTHON_USE_ASYNC_SLOTS 0
151  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
152  #define CYTHON_USE_ASYNC_SLOTS 1
153  #endif
154  #if PY_VERSION_HEX < 0x02070000
155  #undef CYTHON_USE_PYLONG_INTERNALS
156  #define CYTHON_USE_PYLONG_INTERNALS 0
157  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
158  #define CYTHON_USE_PYLONG_INTERNALS 1
159  #endif
160  #ifndef CYTHON_USE_PYLIST_INTERNALS
161  #define CYTHON_USE_PYLIST_INTERNALS 1
162  #endif
163  #ifndef CYTHON_USE_UNICODE_INTERNALS
164  #define CYTHON_USE_UNICODE_INTERNALS 1
165  #endif
166  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
167  #undef CYTHON_USE_UNICODE_WRITER
168  #define CYTHON_USE_UNICODE_WRITER 0
169  #elif !defined(CYTHON_USE_UNICODE_WRITER)
170  #define CYTHON_USE_UNICODE_WRITER 1
171  #endif
172  #ifndef CYTHON_AVOID_BORROWED_REFS
173  #define CYTHON_AVOID_BORROWED_REFS 0
174  #endif
175  #ifndef CYTHON_ASSUME_SAFE_MACROS
176  #define CYTHON_ASSUME_SAFE_MACROS 1
177  #endif
178  #ifndef CYTHON_UNPACK_METHODS
179  #define CYTHON_UNPACK_METHODS 1
180  #endif
181  #if PY_VERSION_HEX >= 0x030B00A4
182  #undef CYTHON_FAST_THREAD_STATE
183  #define CYTHON_FAST_THREAD_STATE 0
184  #elif !defined(CYTHON_FAST_THREAD_STATE)
185  #define CYTHON_FAST_THREAD_STATE 1
186  #endif
187  #ifndef CYTHON_FAST_PYCALL
188  #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
189  #endif
190  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
191  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
192  #endif
193  #ifndef CYTHON_USE_TP_FINALIZE
194  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
195  #endif
196  #ifndef CYTHON_USE_DICT_VERSIONS
197  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
198  #endif
199  #if PY_VERSION_HEX >= 0x030B00A4
200  #undef CYTHON_USE_EXC_INFO_STACK
201  #define CYTHON_USE_EXC_INFO_STACK 0
202  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
203  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
204  #endif
205  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
206  #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
207  #endif
208 #endif
209 #if !defined(CYTHON_FAST_PYCCALL)
210 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
211 #endif
212 #if CYTHON_USE_PYLONG_INTERNALS
213  #if PY_MAJOR_VERSION < 3
214  #include "longintrepr.h"
215  #endif
216  #undef SHIFT
217  #undef BASE
218  #undef MASK
219  #ifdef SIZEOF_VOID_P
220  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
221  #endif
222 #endif
223 #ifndef __has_attribute
224  #define __has_attribute(x) 0
225 #endif
226 #ifndef __has_cpp_attribute
227  #define __has_cpp_attribute(x) 0
228 #endif
229 #ifndef CYTHON_RESTRICT
230  #if defined(__GNUC__)
231  #define CYTHON_RESTRICT __restrict__
232  #elif defined(_MSC_VER) && _MSC_VER >= 1400
233  #define CYTHON_RESTRICT __restrict
234  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
235  #define CYTHON_RESTRICT restrict
236  #else
237  #define CYTHON_RESTRICT
238  #endif
239 #endif
240 #ifndef CYTHON_UNUSED
241 # if defined(__GNUC__)
242 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
243 # define CYTHON_UNUSED __attribute__ ((__unused__))
244 # else
245 # define CYTHON_UNUSED
246 # endif
247 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
248 # define CYTHON_UNUSED __attribute__ ((__unused__))
249 # else
250 # define CYTHON_UNUSED
251 # endif
252 #endif
253 #ifndef CYTHON_MAYBE_UNUSED_VAR
254 # if defined(__cplusplus)
255  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
256 # else
257 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
258 # endif
259 #endif
260 #ifndef CYTHON_NCP_UNUSED
261 # if CYTHON_COMPILING_IN_CPYTHON
262 # define CYTHON_NCP_UNUSED
263 # else
264 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
265 # endif
266 #endif
267 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
268 #ifdef _MSC_VER
269  #ifndef _MSC_STDINT_H_
270  #if _MSC_VER < 1300
271  typedef unsigned char uint8_t;
272  typedef unsigned int uint32_t;
273  #else
274  typedef unsigned __int8 uint8_t;
275  typedef unsigned __int32 uint32_t;
276  #endif
277  #endif
278 #else
279  #include <stdint.h>
280 #endif
281 #ifndef CYTHON_FALLTHROUGH
282  #if defined(__cplusplus) && __cplusplus >= 201103L
283  #if __has_cpp_attribute(fallthrough)
284  #define CYTHON_FALLTHROUGH [[fallthrough]]
285  #elif __has_cpp_attribute(clang::fallthrough)
286  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
287  #elif __has_cpp_attribute(gnu::fallthrough)
288  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
289  #endif
290  #endif
291  #ifndef CYTHON_FALLTHROUGH
292  #if __has_attribute(fallthrough)
293  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
294  #else
295  #define CYTHON_FALLTHROUGH
296  #endif
297  #endif
298  #if defined(__clang__ ) && defined(__apple_build_version__)
299  #if __apple_build_version__ < 7000000
300  #undef CYTHON_FALLTHROUGH
301  #define CYTHON_FALLTHROUGH
302  #endif
303  #endif
304 #endif
305 
306 #ifndef __cplusplus
307  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
308 #endif
309 #ifndef CYTHON_INLINE
310  #if defined(__clang__)
311  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
312  #else
313  #define CYTHON_INLINE inline
314  #endif
315 #endif
316 template<typename T>
317 void __Pyx_call_destructor(T& x) {
318  x.~T();
319 }
320 template<typename T>
321 class __Pyx_FakeReference {
322  public:
323  __Pyx_FakeReference() : ptr(NULL) { }
324  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
325  T *operator->() { return ptr; }
326  T *operator&() { return ptr; }
327  operator T&() { return *ptr; }
328  template<typename U> bool operator ==(U other) { return *ptr == other; }
329  template<typename U> bool operator !=(U other) { return *ptr != other; }
330  private:
331  T *ptr;
332 };
333 
334 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
335  #define Py_OptimizeFlag 0
336 #endif
337 #define __PYX_BUILD_PY_SSIZE_T "n"
338 #define CYTHON_FORMAT_SSIZE_T "z"
339 #if PY_MAJOR_VERSION < 3
340  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
341  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
342  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
343  #define __Pyx_DefaultClassType PyClass_Type
344 #else
345  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
346  #define __Pyx_DefaultClassType PyType_Type
347 #if PY_VERSION_HEX >= 0x030B00A1
348  static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
349  PyObject *code, PyObject *c, PyObject* n, PyObject *v,
350  PyObject *fv, PyObject *cell, PyObject* fn,
351  PyObject *name, int fline, PyObject *lnos) {
352  PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
353  PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
354  const char *fn_cstr=NULL;
355  const char *name_cstr=NULL;
356  PyCodeObject* co=NULL;
357  PyObject *type, *value, *traceback;
358  PyErr_Fetch(&type, &value, &traceback);
359  if (!(kwds=PyDict_New())) goto end;
360  if (!(argcount=PyLong_FromLong(a))) goto end;
361  if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
362  if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
363  if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
364  if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
365  if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
366  if (!(nlocals=PyLong_FromLong(l))) goto end;
367  if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
368  if (!(stacksize=PyLong_FromLong(s))) goto end;
369  if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
370  if (!(flags=PyLong_FromLong(f))) goto end;
371  if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
372  if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
373  if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
374  if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
375  if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
376  if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
377  if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
378  if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
379  if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
380  if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
381  if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
382  if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
383  if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
384  if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
385  Py_XDECREF((PyObject*)co);
386  co = (PyCodeObject*)call_result;
387  call_result = NULL;
388  if (0) {
389  cleanup_code_too:
390  Py_XDECREF((PyObject*)co);
391  co = NULL;
392  }
393  end:
394  Py_XDECREF(kwds);
395  Py_XDECREF(argcount);
396  Py_XDECREF(posonlyargcount);
397  Py_XDECREF(kwonlyargcount);
398  Py_XDECREF(nlocals);
399  Py_XDECREF(stacksize);
400  Py_XDECREF(replace);
401  Py_XDECREF(call_result);
402  Py_XDECREF(empty);
403  if (type) {
404  PyErr_Restore(type, value, traceback);
405  }
406  return co;
407  }
408 #else
409  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
410  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
411 #endif
412  #define __Pyx_DefaultClassType PyType_Type
413 #endif
414 #ifndef Py_TPFLAGS_CHECKTYPES
415  #define Py_TPFLAGS_CHECKTYPES 0
416 #endif
417 #ifndef Py_TPFLAGS_HAVE_INDEX
418  #define Py_TPFLAGS_HAVE_INDEX 0
419 #endif
420 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
421  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
422 #endif
423 #ifndef Py_TPFLAGS_HAVE_FINALIZE
424  #define Py_TPFLAGS_HAVE_FINALIZE 0
425 #endif
426 #ifndef METH_STACKLESS
427  #define METH_STACKLESS 0
428 #endif
429 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
430  #ifndef METH_FASTCALL
431  #define METH_FASTCALL 0x80
432  #endif
433  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
434  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
435  Py_ssize_t nargs, PyObject *kwnames);
436 #else
437  #define __Pyx_PyCFunctionFast _PyCFunctionFast
438  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
439 #endif
440 #if CYTHON_FAST_PYCCALL
441 #define __Pyx_PyFastCFunction_Check(func)\
442  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
443 #else
444 #define __Pyx_PyFastCFunction_Check(func) 0
445 #endif
446 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
447  #define PyObject_Malloc(s) PyMem_Malloc(s)
448  #define PyObject_Free(p) PyMem_Free(p)
449  #define PyObject_Realloc(p) PyMem_Realloc(p)
450 #endif
451 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
452  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
453  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
454  #define PyMem_RawFree(p) PyMem_Free(p)
455 #endif
456 #if CYTHON_COMPILING_IN_PYSTON
457  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
458  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
459 #else
460  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
461  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
462 #endif
463 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
464  #define __Pyx_PyThreadState_Current PyThreadState_GET()
465 #elif PY_VERSION_HEX >= 0x03060000
466  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
467 #elif PY_VERSION_HEX >= 0x03000000
468  #define __Pyx_PyThreadState_Current PyThreadState_GET()
469 #else
470  #define __Pyx_PyThreadState_Current _PyThreadState_Current
471 #endif
472 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
473 #include "pythread.h"
474 #define Py_tss_NEEDS_INIT 0
475 typedef int Py_tss_t;
476 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
477  *key = PyThread_create_key();
478  return 0;
479 }
480 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
481  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
482  *key = Py_tss_NEEDS_INIT;
483  return key;
484 }
485 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
486  PyObject_Free(key);
487 }
488 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
489  return *key != Py_tss_NEEDS_INIT;
490 }
491 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
492  PyThread_delete_key(*key);
493  *key = Py_tss_NEEDS_INIT;
494 }
495 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
496  return PyThread_set_key_value(*key, value);
497 }
498 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
499  return PyThread_get_key_value(*key);
500 }
501 #endif
502 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
503 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
504 #else
505 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
506 #endif
507 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
508  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
509  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
510 #else
511  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
512  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
513 #endif
514 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
515 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
516 #else
517 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
518 #endif
519 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
520  #define CYTHON_PEP393_ENABLED 1
521  #if defined(PyUnicode_IS_READY)
522  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
523  0 : _PyUnicode_Ready((PyObject *)(op)))
524  #else
525  #define __Pyx_PyUnicode_READY(op) (0)
526  #endif
527  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
528  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
529  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
530  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
531  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
532  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
533  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
534  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
535  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
536  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
537  #else
538  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
539  #endif
540  #else
541  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
542  #endif
543 #else
544  #define CYTHON_PEP393_ENABLED 0
545  #define PyUnicode_1BYTE_KIND 1
546  #define PyUnicode_2BYTE_KIND 2
547  #define PyUnicode_4BYTE_KIND 4
548  #define __Pyx_PyUnicode_READY(op) (0)
549  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
550  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
551  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
552  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
553  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
554  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
555  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
556  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
557 #endif
558 #if CYTHON_COMPILING_IN_PYPY
559  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
560  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
561 #else
562  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
563  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
564  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
565 #endif
566 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
567  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
568 #endif
569 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
570  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
571 #endif
572 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
573  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
574 #endif
575 #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))
576 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
577 #if PY_MAJOR_VERSION >= 3
578  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
579 #else
580  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
581 #endif
582 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
583  #define PyObject_ASCII(o) PyObject_Repr(o)
584 #endif
585 #if PY_MAJOR_VERSION >= 3
586  #define PyBaseString_Type PyUnicode_Type
587  #define PyStringObject PyUnicodeObject
588  #define PyString_Type PyUnicode_Type
589  #define PyString_Check PyUnicode_Check
590  #define PyString_CheckExact PyUnicode_CheckExact
591 #ifndef PyObject_Unicode
592  #define PyObject_Unicode PyObject_Str
593 #endif
594 #endif
595 #if PY_MAJOR_VERSION >= 3
596  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
597  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
598 #else
599  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
600  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
601 #endif
602 #ifndef PySet_CheckExact
603  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
604 #endif
605 #if PY_VERSION_HEX >= 0x030900A4
606  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
607  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
608 #else
609  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
610  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
611 #endif
612 #if CYTHON_ASSUME_SAFE_MACROS
613  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
614 #else
615  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
616 #endif
617 #if PY_MAJOR_VERSION >= 3
618  #define PyIntObject PyLongObject
619  #define PyInt_Type PyLong_Type
620  #define PyInt_Check(op) PyLong_Check(op)
621  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
622  #define PyInt_FromString PyLong_FromString
623  #define PyInt_FromUnicode PyLong_FromUnicode
624  #define PyInt_FromLong PyLong_FromLong
625  #define PyInt_FromSize_t PyLong_FromSize_t
626  #define PyInt_FromSsize_t PyLong_FromSsize_t
627  #define PyInt_AsLong PyLong_AsLong
628  #define PyInt_AS_LONG PyLong_AS_LONG
629  #define PyInt_AsSsize_t PyLong_AsSsize_t
630  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
631  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
632  #define PyNumber_Int PyNumber_Long
633 #endif
634 #if PY_MAJOR_VERSION >= 3
635  #define PyBoolObject PyLongObject
636 #endif
637 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
638  #ifndef PyUnicode_InternFromString
639  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
640  #endif
641 #endif
642 #if PY_VERSION_HEX < 0x030200A4
643  typedef long Py_hash_t;
644  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
645  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
646 #else
647  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
648  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
649 #endif
650 #if PY_MAJOR_VERSION >= 3
651  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
652 #else
653  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
654 #endif
655 #if CYTHON_USE_ASYNC_SLOTS
656  #if PY_VERSION_HEX >= 0x030500B1
657  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
658  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
659  #else
660  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
661  #endif
662 #else
663  #define __Pyx_PyType_AsAsync(obj) NULL
664 #endif
665 #ifndef __Pyx_PyAsyncMethodsStruct
666  typedef struct {
667  unaryfunc am_await;
668  unaryfunc am_aiter;
669  unaryfunc am_anext;
670  } __Pyx_PyAsyncMethodsStruct;
671 #endif
672 
673 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
674  #if !defined(_USE_MATH_DEFINES)
675  #define _USE_MATH_DEFINES
676  #endif
677 #endif
678 #include <math.h>
679 #ifdef NAN
680 #define __PYX_NAN() ((float) NAN)
681 #else
682 static CYTHON_INLINE float __PYX_NAN() {
683  float value;
684  memset(&value, 0xFF, sizeof(value));
685  return value;
686 }
687 #endif
688 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
689 #define __Pyx_truncl trunc
690 #else
691 #define __Pyx_truncl truncl
692 #endif
693 
694 #define __PYX_MARK_ERR_POS(f_index, lineno) \
695  { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
696 #define __PYX_ERR(f_index, lineno, Ln_error) \
697  { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
698 
699 #ifndef __PYX_EXTERN_C
700  #ifdef __cplusplus
701  #define __PYX_EXTERN_C extern "C"
702  #else
703  #define __PYX_EXTERN_C extern
704  #endif
705 #endif
706 
707 #define __PYX_HAVE__WaveTools
708 #define __PYX_HAVE_API__WaveTools
709 /* Early includes */
710 #include <math.h>
711 #include <string.h>
712 #include <stdio.h>
713 #include "numpy/arrayobject.h"
714 #include "numpy/ndarrayobject.h"
715 #include "numpy/ndarraytypes.h"
716 #include "numpy/arrayscalars.h"
717 #include "numpy/ufuncobject.h"
718 
719  /* NumPy API declarations from "numpy/__init__.pxd" */
720 
721 #include "WaveTools.h"
722 #ifdef _OPENMP
723 #include <omp.h>
724 #endif /* _OPENMP */
725 
726 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
727 #define CYTHON_WITHOUT_ASSERTIONS
728 #endif
729 
730 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
731  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
732 
733 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
734 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
735 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
736 #define __PYX_DEFAULT_STRING_ENCODING ""
737 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
738 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
739 #define __Pyx_uchar_cast(c) ((unsigned char)c)
740 #define __Pyx_long_cast(x) ((long)x)
741 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
742  (sizeof(type) < sizeof(Py_ssize_t)) ||\
743  (sizeof(type) > sizeof(Py_ssize_t) &&\
744  likely(v < (type)PY_SSIZE_T_MAX ||\
745  v == (type)PY_SSIZE_T_MAX) &&\
746  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
747  v == (type)PY_SSIZE_T_MIN))) ||\
748  (sizeof(type) == sizeof(Py_ssize_t) &&\
749  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
750  v == (type)PY_SSIZE_T_MAX))) )
751 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
752  return (size_t) i < (size_t) limit;
753 }
754 #if defined (__cplusplus) && __cplusplus >= 201103L
755  #include <cstdlib>
756  #define __Pyx_sst_abs(value) std::abs(value)
757 #elif SIZEOF_INT >= SIZEOF_SIZE_T
758  #define __Pyx_sst_abs(value) abs(value)
759 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
760  #define __Pyx_sst_abs(value) labs(value)
761 #elif defined (_MSC_VER)
762  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
763 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
764  #define __Pyx_sst_abs(value) llabs(value)
765 #elif defined (__GNUC__)
766  #define __Pyx_sst_abs(value) __builtin_llabs(value)
767 #else
768  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
769 #endif
770 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
771 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
772 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
773 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
774 #define __Pyx_PyBytes_FromString PyBytes_FromString
775 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
776 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
777 #if PY_MAJOR_VERSION < 3
778  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
779  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
780 #else
781  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
782  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
783 #endif
784 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
785 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
786 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
787 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
788 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
789 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
790 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
791 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
792 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
793 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
794 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
795 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
796 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
797 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
798 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
799 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
800 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
801  const Py_UNICODE *u_end = u;
802  while (*u_end++) ;
803  return (size_t)(u_end - u - 1);
804 }
805 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
806 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
807 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
808 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
809 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
810 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
811 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
812 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
813 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
814 #define __Pyx_PySequence_Tuple(obj)\
815  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
816 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
817 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
818 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
819 #if CYTHON_ASSUME_SAFE_MACROS
820 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
821 #else
822 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
823 #endif
824 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
825 #if PY_MAJOR_VERSION >= 3
826 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
827 #else
828 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
829 #endif
830 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
831 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
832 static int __Pyx_sys_getdefaultencoding_not_ascii;
833 static int __Pyx_init_sys_getdefaultencoding_params(void) {
834  PyObject* sys;
835  PyObject* default_encoding = NULL;
836  PyObject* ascii_chars_u = NULL;
837  PyObject* ascii_chars_b = NULL;
838  const char* default_encoding_c;
839  sys = PyImport_ImportModule("sys");
840  if (!sys) goto bad;
841  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
842  Py_DECREF(sys);
843  if (!default_encoding) goto bad;
844  default_encoding_c = PyBytes_AsString(default_encoding);
845  if (!default_encoding_c) goto bad;
846  if (strcmp(default_encoding_c, "ascii") == 0) {
847  __Pyx_sys_getdefaultencoding_not_ascii = 0;
848  } else {
849  char ascii_chars[128];
850  int c;
851  for (c = 0; c < 128; c++) {
852  ascii_chars[c] = c;
853  }
854  __Pyx_sys_getdefaultencoding_not_ascii = 1;
855  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
856  if (!ascii_chars_u) goto bad;
857  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
858  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
859  PyErr_Format(
860  PyExc_ValueError,
861  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
862  default_encoding_c);
863  goto bad;
864  }
865  Py_DECREF(ascii_chars_u);
866  Py_DECREF(ascii_chars_b);
867  }
868  Py_DECREF(default_encoding);
869  return 0;
870 bad:
871  Py_XDECREF(default_encoding);
872  Py_XDECREF(ascii_chars_u);
873  Py_XDECREF(ascii_chars_b);
874  return -1;
875 }
876 #endif
877 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
878 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
879 #else
880 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
881 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
882 static char* __PYX_DEFAULT_STRING_ENCODING;
883 static int __Pyx_init_sys_getdefaultencoding_params(void) {
884  PyObject* sys;
885  PyObject* default_encoding = NULL;
886  char* default_encoding_c;
887  sys = PyImport_ImportModule("sys");
888  if (!sys) goto bad;
889  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
890  Py_DECREF(sys);
891  if (!default_encoding) goto bad;
892  default_encoding_c = PyBytes_AsString(default_encoding);
893  if (!default_encoding_c) goto bad;
894  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
895  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
896  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
897  Py_DECREF(default_encoding);
898  return 0;
899 bad:
900  Py_XDECREF(default_encoding);
901  return -1;
902 }
903 #endif
904 #endif
905 
906 
907 /* Test for GCC > 2.95 */
908 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
909  #define likely(x) __builtin_expect(!!(x), 1)
910  #define unlikely(x) __builtin_expect(!!(x), 0)
911 #else /* !__GNUC__ or GCC < 2.95 */
912  #define likely(x) (x)
913  #define unlikely(x) (x)
914 #endif /* __GNUC__ */
915 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
916 
917 static PyObject *__pyx_m = NULL;
918 static PyObject *__pyx_d;
919 static PyObject *__pyx_b;
920 static PyObject *__pyx_cython_runtime = NULL;
921 static PyObject *__pyx_empty_tuple;
922 static PyObject *__pyx_empty_bytes;
923 static PyObject *__pyx_empty_unicode;
924 static int __pyx_lineno;
925 static int __pyx_clineno = 0;
926 static const char * __pyx_cfilenm= __FILE__;
927 static const char *__pyx_filename;
928 
929 /* Header.proto */
930 #if !defined(CYTHON_CCOMPLEX)
931  #if defined(__cplusplus)
932  #define CYTHON_CCOMPLEX 1
933  #elif defined(_Complex_I)
934  #define CYTHON_CCOMPLEX 1
935  #else
936  #define CYTHON_CCOMPLEX 0
937  #endif
938 #endif
939 #if CYTHON_CCOMPLEX
940  #ifdef __cplusplus
941  #include <complex>
942  #else
943  #include <complex.h>
944  #endif
945 #endif
946 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
947  #undef _Complex_I
948  #define _Complex_I 1.0fj
949 #endif
950 
951 
952 static const char *__pyx_f[] = {
953  "proteus/WaveTools.py",
954  "stringsource",
955  "proteus/WaveTools.pxd",
956  "__init__.pxd",
957  "type.pxd",
958 };
959 
960 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":690
961  * # in Cython to enable them only on the right systems.
962  *
963  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
964  * ctypedef npy_int16 int16_t
965  * ctypedef npy_int32 int32_t
966  */
967 typedef npy_int8 __pyx_t_5numpy_int8_t;
968 
969 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":691
970  *
971  * ctypedef npy_int8 int8_t
972  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
973  * ctypedef npy_int32 int32_t
974  * ctypedef npy_int64 int64_t
975  */
976 typedef npy_int16 __pyx_t_5numpy_int16_t;
977 
978 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":692
979  * ctypedef npy_int8 int8_t
980  * ctypedef npy_int16 int16_t
981  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
982  * ctypedef npy_int64 int64_t
983  * #ctypedef npy_int96 int96_t
984  */
985 typedef npy_int32 __pyx_t_5numpy_int32_t;
986 
987 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":693
988  * ctypedef npy_int16 int16_t
989  * ctypedef npy_int32 int32_t
990  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
991  * #ctypedef npy_int96 int96_t
992  * #ctypedef npy_int128 int128_t
993  */
994 typedef npy_int64 __pyx_t_5numpy_int64_t;
995 
996 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":697
997  * #ctypedef npy_int128 int128_t
998  *
999  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
1000  * ctypedef npy_uint16 uint16_t
1001  * ctypedef npy_uint32 uint32_t
1002  */
1003 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1004 
1005 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":698
1006  *
1007  * ctypedef npy_uint8 uint8_t
1008  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
1009  * ctypedef npy_uint32 uint32_t
1010  * ctypedef npy_uint64 uint64_t
1011  */
1012 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1013 
1014 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":699
1015  * ctypedef npy_uint8 uint8_t
1016  * ctypedef npy_uint16 uint16_t
1017  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1018  * ctypedef npy_uint64 uint64_t
1019  * #ctypedef npy_uint96 uint96_t
1020  */
1021 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1022 
1023 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":700
1024  * ctypedef npy_uint16 uint16_t
1025  * ctypedef npy_uint32 uint32_t
1026  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1027  * #ctypedef npy_uint96 uint96_t
1028  * #ctypedef npy_uint128 uint128_t
1029  */
1030 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1031 
1032 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":704
1033  * #ctypedef npy_uint128 uint128_t
1034  *
1035  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1036  * ctypedef npy_float64 float64_t
1037  * #ctypedef npy_float80 float80_t
1038  */
1039 typedef npy_float32 __pyx_t_5numpy_float32_t;
1040 
1041 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":705
1042  *
1043  * ctypedef npy_float32 float32_t
1044  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1045  * #ctypedef npy_float80 float80_t
1046  * #ctypedef npy_float128 float128_t
1047  */
1048 typedef npy_float64 __pyx_t_5numpy_float64_t;
1049 
1050 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":714
1051  * # The int types are mapped a bit surprising --
1052  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1053  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
1054  * ctypedef npy_longlong long_t
1055  * ctypedef npy_longlong longlong_t
1056  */
1057 typedef npy_long __pyx_t_5numpy_int_t;
1058 
1059 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":715
1060  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1061  * ctypedef npy_long int_t
1062  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
1063  * ctypedef npy_longlong longlong_t
1064  *
1065  */
1066 typedef npy_longlong __pyx_t_5numpy_long_t;
1067 
1068 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":716
1069  * ctypedef npy_long int_t
1070  * ctypedef npy_longlong long_t
1071  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1072  *
1073  * ctypedef npy_ulong uint_t
1074  */
1075 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1076 
1077 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":718
1078  * ctypedef npy_longlong longlong_t
1079  *
1080  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
1081  * ctypedef npy_ulonglong ulong_t
1082  * ctypedef npy_ulonglong ulonglong_t
1083  */
1084 typedef npy_ulong __pyx_t_5numpy_uint_t;
1085 
1086 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":719
1087  *
1088  * ctypedef npy_ulong uint_t
1089  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
1090  * ctypedef npy_ulonglong ulonglong_t
1091  *
1092  */
1093 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1094 
1095 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":720
1096  * ctypedef npy_ulong uint_t
1097  * ctypedef npy_ulonglong ulong_t
1098  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1099  *
1100  * ctypedef npy_intp intp_t
1101  */
1102 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1103 
1104 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":722
1105  * ctypedef npy_ulonglong ulonglong_t
1106  *
1107  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1108  * ctypedef npy_uintp uintp_t
1109  *
1110  */
1111 typedef npy_intp __pyx_t_5numpy_intp_t;
1112 
1113 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":723
1114  *
1115  * ctypedef npy_intp intp_t
1116  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1117  *
1118  * ctypedef npy_double float_t
1119  */
1120 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1121 
1122 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":725
1123  * ctypedef npy_uintp uintp_t
1124  *
1125  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1126  * ctypedef npy_double double_t
1127  * ctypedef npy_longdouble longdouble_t
1128  */
1129 typedef npy_double __pyx_t_5numpy_float_t;
1130 
1131 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":726
1132  *
1133  * ctypedef npy_double float_t
1134  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1135  * ctypedef npy_longdouble longdouble_t
1136  *
1137  */
1138 typedef npy_double __pyx_t_5numpy_double_t;
1139 
1140 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":727
1141  * ctypedef npy_double float_t
1142  * ctypedef npy_double double_t
1143  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1144  *
1145  * ctypedef npy_cfloat cfloat_t
1146  */
1147 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1148 /* Declarations.proto */
1149 #if CYTHON_CCOMPLEX
1150  #ifdef __cplusplus
1151  typedef ::std::complex< float > __pyx_t_float_complex;
1152  #else
1153  typedef float _Complex __pyx_t_float_complex;
1154  #endif
1155 #else
1156  typedef struct { float real, imag; } __pyx_t_float_complex;
1157 #endif
1158 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1159 
1160 /* Declarations.proto */
1161 #if CYTHON_CCOMPLEX
1162  #ifdef __cplusplus
1163  typedef ::std::complex< double > __pyx_t_double_complex;
1164  #else
1165  typedef double _Complex __pyx_t_double_complex;
1166  #endif
1167 #else
1168  typedef struct { double real, imag; } __pyx_t_double_complex;
1169 #endif
1170 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1171 
1172 
1173 /*--- Type declarations ---*/
1174 struct __pyx_obj_9WaveTools_SteadyCurrent;
1175 struct __pyx_obj_9WaveTools_SolitaryWave;
1176 struct __pyx_obj_9WaveTools_MonochromaticWaves;
1177 struct __pyx_obj_9WaveTools_NewWave;
1178 struct __pyx_obj_9WaveTools_RandomWaves;
1179 struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves;
1180 struct __pyx_obj_9WaveTools_DirectionalWaves;
1181 struct __pyx_obj_9WaveTools_TimeSeries;
1182 struct __pyx_obj_9WaveTools_RandomNLWaves;
1183 struct __pyx_obj_9WaveTools___pyx_scope_struct____cinit__;
1184 struct __pyx_obj_9WaveTools___pyx_scope_struct_1_genexpr;
1185 
1186 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":729
1187  * ctypedef npy_longdouble longdouble_t
1188  *
1189  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
1190  * ctypedef npy_cdouble cdouble_t
1191  * ctypedef npy_clongdouble clongdouble_t
1192  */
1193 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1194 
1195 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":730
1196  *
1197  * ctypedef npy_cfloat cfloat_t
1198  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
1199  * ctypedef npy_clongdouble clongdouble_t
1200  *
1201  */
1202 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1203 
1204 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":731
1205  * ctypedef npy_cfloat cfloat_t
1206  * ctypedef npy_cdouble cdouble_t
1207  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
1208  *
1209  * ctypedef npy_cdouble complex_t
1210  */
1211 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1212 
1213 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":733
1214  * ctypedef npy_clongdouble clongdouble_t
1215  *
1216  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
1217  *
1218  * cdef inline object PyArray_MultiIterNew1(a):
1219  */
1220 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1221 struct __pyx_defaults;
1222 typedef struct __pyx_defaults __pyx_defaults;
1223 
1224 /* "WaveTools.pxd":31
1225  *
1226  * # pointer to eta function
1227  * ctypedef double (*cfeta) (MonochromaticWaves, double* , double ) # <<<<<<<<<<<<<<
1228  *
1229  * # pointer to velocity function
1230  */
1231 typedef double (*__pyx_t_9WaveTools_cfeta)(struct __pyx_obj_9WaveTools_MonochromaticWaves *, double *, double);
1232 
1233 /* "WaveTools.pxd":34
1234  *
1235  * # pointer to velocity function
1236  * ctypedef void (*cfvel) (MonochromaticWaves, double*, double* , double ) # <<<<<<<<<<<<<<
1237  *
1238  *
1239  */
1240 typedef void (*__pyx_t_9WaveTools_cfvel)(struct __pyx_obj_9WaveTools_MonochromaticWaves *, double *, double *, double);
1241 
1242 /* "WaveTools.pxd":186
1243  *
1244  * # pointer to eta function
1245  * ctypedef double (*cfeta2) (TimeSeries, double* , double ) # <<<<<<<<<<<<<<
1246  *
1247  * # pointer to velocity function
1248  */
1249 typedef double (*__pyx_t_9WaveTools_cfeta2)(struct __pyx_obj_9WaveTools_TimeSeries *, double *, double);
1250 
1251 /* "WaveTools.pxd":189
1252  *
1253  * # pointer to velocity function
1254  * ctypedef void (*cfvel2) (TimeSeries, double*, double* , double ) # <<<<<<<<<<<<<<
1255  *
1256  * cdef class TimeSeries:
1257  */
1258 typedef void (*__pyx_t_9WaveTools_cfvel2)(struct __pyx_obj_9WaveTools_TimeSeries *, double *, double *, double);
1259 struct __pyx_defaults {
1260  PyObject *__pyx_arg_Lgen;
1261 };
1262 
1263 /* "WaveTools.pxd":37
1264  *
1265  *
1266  * cdef class SteadyCurrent: # <<<<<<<<<<<<<<
1267  * cdef public:
1268  * double mwl
1269  */
1270 struct __pyx_obj_9WaveTools_SteadyCurrent {
1271  PyObject_HEAD
1272  double mwl;
1273  PyArrayObject *U;
1274  double ramp;
1275 };
1276 
1277 
1278 /* "WaveTools.pxd":42
1279  * cdef np.ndarray U
1280  * cdef double ramp
1281  * cdef class SolitaryWave: # <<<<<<<<<<<<<<
1282  * cdef double H,gAbs,K,depth,d2,d3
1283  * cdef public:
1284  */
1285 struct __pyx_obj_9WaveTools_SolitaryWave {
1286  PyObject_HEAD
1287  double H;
1288  double gAbs;
1289  double K;
1290  double depth;
1291  double d2;
1292  double d3;
1293  double mwl;
1294  double c;
1295  PyArrayObject *g;
1296  PyArrayObject *waveDir;
1297  PyArrayObject *vDir;
1298  PyArrayObject *trans;
1299  bool fast;
1300 };
1301 
1302 
1303 /* "WaveTools.pxd":49
1304  * cdef bool fast
1305  *
1306  * cdef class MonochromaticWaves: # <<<<<<<<<<<<<<
1307  * cdef bool fast
1308  * cdef np.ndarray g,waveDir,vDir,Ycoeff,Bcoeff,kDir,tanhF,mV
1309  */
1310 struct __pyx_obj_9WaveTools_MonochromaticWaves {
1311  PyObject_HEAD
1312  struct __pyx_vtabstruct_9WaveTools_MonochromaticWaves *__pyx_vtab;
1313  bool fast;
1314  PyArrayObject *g;
1315  PyArrayObject *waveDir;
1316  PyArrayObject *vDir;
1317  PyArrayObject *Ycoeff;
1318  PyArrayObject *Bcoeff;
1319  PyArrayObject *kDir;
1320  PyArrayObject *tanhF;
1321  PyArrayObject *mV;
1322  double gAbs;
1323  double phi;
1324  double depth;
1325  double omega;
1326  double k;
1327  double phi0;
1328  double tanhL;
1329  double amplitude;
1330  int Nf;
1331  double *kDir_;
1332  double *waveDir_;
1333  double *vDir_;
1334  double *mV_;
1335  double *Ycoeff_;
1336  double *Bcoeff_;
1337  double *tanhF_;
1338  double kDir_c[3];
1339  double waveDir_c[3];
1340  double vDir_c[3];
1341  double mV_c[3];
1342  double Ycoeff_c[0x3E8];
1343  double Bcoeff_c[0x3E8];
1344  double tanh_c[0x3E8];
1345  double wavelength;
1346  double mwl;
1347  __pyx_t_9WaveTools_cfeta _cpp_eta;
1348  __pyx_t_9WaveTools_cfvel _cpp_u;
1349  PyObject *waveType;
1350 };
1351 
1352 
1353 /* "WaveTools.pxd":79
1354  * cdef void uFenton(self, double* U, double* x, double t)
1355  *
1356  * cdef class NewWave: # <<<<<<<<<<<<<<
1357  * cdef bool fast
1358  * cdef double* waveDir_
1359  */
1360 struct __pyx_obj_9WaveTools_NewWave {
1361  PyObject_HEAD
1362  struct __pyx_vtabstruct_9WaveTools_NewWave *__pyx_vtab;
1363  bool fast;
1364  double *waveDir_;
1365  double *vDir_;
1366  double *tanh_;
1367  double *ai_;
1368  double *phi_;
1369  double *omega_;
1370  double *kDir_;
1371  double *ki_;
1372  double waveDir_c[3];
1373  double vDir_c[3];
1374  double kDir_c[0x7530];
1375  double omega_c[0x2710];
1376  double ki_c[0x2710];
1377  double ai_c[0x2710];
1378  double tanh_c[0x2710];
1379  double phi_c[0x2710];
1380  double mwl;
1381  double depth;
1382  double gAbs;
1383  double Tlag;
1384  double Hs;
1385  double Tp;
1386  double fp;
1387  double bandFactor;
1388  double df;
1389  double focus;
1390  double tfocus;
1391  int N;
1392  PyArrayObject *fi;
1393  PyArrayObject *fim;
1394  PyArrayObject *Si_Jm;
1395  PyArrayObject *ki;
1396  PyArrayObject *omega;
1397  PyArrayObject *tanhF;
1398  PyArrayObject *g;
1399  PyArrayObject *waveDir;
1400  PyArrayObject *vDir;
1401  PyArrayObject *kDir;
1402  PyArrayObject *ai;
1403  PyObject *phi;
1404 };
1405 
1406 
1407 /* "WaveTools.pxd":104
1408  * cdef double _cpp_eta(self , double* x, double t)
1409  * cdef void _cpp_u(self, double *U, double* x, double t)
1410  * cdef class RandomWaves: # <<<<<<<<<<<<<<
1411  * cdef bool fast
1412  * cdef double* waveDir_
1413  */
1414 struct __pyx_obj_9WaveTools_RandomWaves {
1415  PyObject_HEAD
1416  struct __pyx_vtabstruct_9WaveTools_RandomWaves *__pyx_vtab;
1417  bool fast;
1418  double *waveDir_;
1419  double *vDir_;
1420  double *tanh_;
1421  double *ai_;
1422  double *phi_;
1423  double *omega_;
1424  double *kDir_;
1425  double *ki_;
1426  double waveDir_c[3];
1427  double vDir_c[3];
1428  double kDir_c[0x7530];
1429  double omega_c[0x2710];
1430  double ki_c[0x2710];
1431  double ai_c[0x2710];
1432  double tanh_c[0x2710];
1433  double phi_c[0x2710];
1434  double mwl;
1435  double depth;
1436  double gAbs;
1437  double Tlag;
1438  double Hs;
1439  double Tp;
1440  double fp;
1441  double bandFactor;
1442  double df;
1443  double wavelength;
1444  int N;
1445  PyArrayObject *fi;
1446  PyArrayObject *fim;
1447  PyArrayObject *Si_Jm;
1448  PyArrayObject *ki;
1449  PyArrayObject *omega;
1450  PyArrayObject *tanhF;
1451  PyArrayObject *g;
1452  PyArrayObject *waveDir;
1453  PyArrayObject *vDir;
1454  PyArrayObject *kDir;
1455  PyArrayObject *ai;
1456  PyObject *phi;
1457 };
1458 
1459 
1460 /* "WaveTools.pxd":132
1461  *
1462  *
1463  * cdef class MultiSpectraRandomWaves: # <<<<<<<<<<<<<<
1464  * cdef bool fast
1465  * cdef double gAbs
1466  */
1467 struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves {
1468  PyObject_HEAD
1469  struct __pyx_vtabstruct_9WaveTools_MultiSpectraRandomWaves *__pyx_vtab;
1470  bool fast;
1471  double gAbs;
1472  int Nall;
1473  int N;
1474  PyArrayObject *g;
1475  PyArrayObject *vDir;
1476  PyArrayObject *waveDir;
1477  PyArrayObject *omegaM;
1478  PyArrayObject *phiM;
1479  PyArrayObject *kiM;
1480  PyArrayObject *kDirM;
1481  PyArrayObject *tanhFM;
1482  PyArrayObject *aiM;
1483  double *vDir_;
1484  double *omegaM_;
1485  double *phiM_;
1486  double *kiM_;
1487  double *kDirM_;
1488  double *tanhM_;
1489  double *waveDirM_;
1490  double *aiM_;
1491  double vDir_c[3];
1492  double kDir_cM[0x7530];
1493  double waveDir_cM[0x7530];
1494  double omega_cM[0x2710];
1495  double ki_cM[0x2710];
1496  double ai_cM[0x2710];
1497  double tanh_cM[0x2710];
1498  double phi_cM[0x2710];
1499  double mwl;
1500  double depth;
1501 };
1502 
1503 
1504 /* "WaveTools.pxd":158
1505  * cdef void _cpp_u(self, double* U, double* x, double t)
1506  *
1507  * cdef class DirectionalWaves: # <<<<<<<<<<<<<<
1508  * cdef bool fast
1509  * cdef double gAbs
1510  */
1511 struct __pyx_obj_9WaveTools_DirectionalWaves {
1512  PyObject_HEAD
1513  struct __pyx_vtabstruct_9WaveTools_DirectionalWaves *__pyx_vtab;
1514  bool fast;
1515  double gAbs;
1516  int Nall;
1517  int Mtot;
1518  int N;
1519  PyArrayObject *vDir;
1520  PyArrayObject *omega;
1521  PyArrayObject *tanh;
1522  PyArrayObject *waveDir0;
1523  PyArrayObject *waveDirs;
1524  PyArrayObject *phiDirs;
1525  PyArrayObject *aiDirs;
1526  PyArrayObject *ki;
1527  PyArrayObject *kDirs;
1528  PyArrayObject *tanhF;
1529  double *vDir_;
1530  double *omega_;
1531  double *phi_;
1532  double *ki_;
1533  double *kDir_;
1534  double *tanh_;
1535  double *waveDir_;
1536  double *ai_;
1537  double vDir_c[3];
1538  double kDir_c[0x493E0];
1539  double waveDir_c[0x493E0];
1540  double omega_c[0x186A0];
1541  double ki_c[0x186A0];
1542  double ai_c[0x186A0];
1543  double tanh_c[0x186A0];
1544  double phi_c[0x186A0];
1545  double mwl;
1546  double depth;
1547 };
1548 
1549 
1550 /* "WaveTools.pxd":191
1551  * ctypedef void (*cfvel2) (TimeSeries, double*, double* , double )
1552  *
1553  * cdef class TimeSeries: # <<<<<<<<<<<<<<
1554  * cdef bool fast,rec_direct
1555  * cdef np.ndarray g,waveDir,vDir,x0,kDir,tanhF,time,etaS,ai,omega,phi,ki
1556  */
1557 struct __pyx_obj_9WaveTools_TimeSeries {
1558  PyObject_HEAD
1559  struct __pyx_vtabstruct_9WaveTools_TimeSeries *__pyx_vtab;
1560  bool fast;
1561  bool rec_direct;
1562  PyArrayObject *g;
1563  PyArrayObject *waveDir;
1564  PyArrayObject *vDir;
1565  PyArrayObject *x0;
1566  PyArrayObject *kDir;
1567  PyArrayObject *tanhF;
1568  PyArrayObject *time;
1569  PyArrayObject *etaS;
1570  PyArrayObject *ai;
1571  PyArrayObject *omega;
1572  PyArrayObject *phi;
1573  PyArrayObject *ki;
1574  double gAbs;
1575  double depth;
1576  double Tm;
1577  double overlap;
1578  double cutoff;
1579  double setup;
1580  double handover;
1581  double Twindow;
1582  double Tlag;
1583  double Toverlap;
1584  double dt;
1585  double t0;
1586  double tlength;
1587  int N;
1588  int Nall;
1589  int Nf;
1590  int Nwaves;
1591  int Nwindows;
1592  PyObject *windows_handover;
1593  PyObject *windows_rec;
1594  PyObject *decompose_window;
1595  double *kDir_;
1596  double *waveDir_;
1597  double *vDir_;
1598  double *tanh_;
1599  double *whand_;
1600  double *ai_;
1601  double *omega_;
1602  double *phi_;
1603  double *ki_;
1604  double *T0_;
1605  double x0_[3];
1606  double kDir_c[0x2DC6C0];
1607  double ki_c[0xF4240];
1608  double ai_c[0xF4240];
1609  double omega_c[0xF4240];
1610  double phi_c[0xF4240];
1611  double tanh_c[0xF4240];
1612  double waveDir_c[3];
1613  double vDir_c[3];
1614  double x0_c[3];
1615  double whand_c[0xF4240];
1616  double T0[0xF4240];
1617  double wavelength;
1618  double mwl;
1619  PyObject *eta;
1620  PyObject *u;
1621  __pyx_t_9WaveTools_cfeta2 _cpp_eta;
1622  __pyx_t_9WaveTools_cfvel2 _cpp_u;
1623 };
1624 
1625 
1626 /* "WaveTools.pxd":229
1627  * cdef void _cpp_uWindow(self, double* U, double* x, double t)
1628  *
1629  * cdef class RandomNLWaves: # <<<<<<<<<<<<<<
1630  * cdef bool fast
1631  * cdef np.ndarray omega,ki,kDir,phi,tanhKd,sinhKd,waveDir,ai
1632  */
1633 struct __pyx_obj_9WaveTools_RandomNLWaves {
1634  PyObject_HEAD
1635  struct __pyx_vtabstruct_9WaveTools_RandomNLWaves *__pyx_vtab;
1636  bool fast;
1637  PyArrayObject *omega;
1638  PyArrayObject *ki;
1639  PyArrayObject *kDir;
1640  PyArrayObject *phi;
1641  PyArrayObject *tanhKd;
1642  PyArrayObject *sinhKd;
1643  PyArrayObject *waveDir;
1644  PyArrayObject *ai;
1645  int N;
1646  double depth;
1647  double gAbs;
1648  double *tanhKd_;
1649  double *sinhKd_;
1650  double *ai_;
1651  double *phi_;
1652  double *omega_;
1653  double *kDir_;
1654  double *ki_;
1655  double kDir_c[0x7530];
1656  double omega_c[0x2710];
1657  double ki_c[0x2710];
1658  double ai_c[0x2710];
1659  double tanh_c[0x2710];
1660  double sinh_c[0x2710];
1661  double phi_c[0x2710];
1662  PyObject *eta;
1663  PyObject *u;
1664  PyObject *eta_linear;
1665 };
1666 
1667 
1668 /* "WaveTools.py":1204
1669  * Switch for optimised functions
1670  * """
1671  * def __cinit__(self, # <<<<<<<<<<<<<<
1672  * Tp,
1673  * Hs,
1674  */
1675 struct __pyx_obj_9WaveTools___pyx_scope_struct____cinit__ {
1676  PyObject_HEAD
1677  struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self;
1678  PyObject *__pyx_v_xfocus;
1679 };
1680 
1681 
1682 /* "WaveTools.py":1268
1683  * if(self.N > 10000):
1684  * logEvent("ERROR! Wavetools.py: Maximum number of frequencies for Random Waves is 10000 ",level=0)
1685  * self.phi= -sum(self.kDir[:,j]*xfocus[j] for j in range(3))+tfocus*self.omega # <<<<<<<<<<<<<<
1686  *
1687  *
1688  */
1689 struct __pyx_obj_9WaveTools___pyx_scope_struct_1_genexpr {
1690  PyObject_HEAD
1691  struct __pyx_obj_9WaveTools___pyx_scope_struct____cinit__ *__pyx_outer_scope;
1692  PyObject *__pyx_v_j;
1693  PyObject *__pyx_t_0;
1694  Py_ssize_t __pyx_t_1;
1695  PyObject *(*__pyx_t_2)(PyObject *);
1696 };
1697 
1698 
1699 
1700 /* "WaveTools.py":889
1701  *
1702  *
1703  * class MonochromaticWaves(object): # <<<<<<<<<<<<<<
1704  * """
1705  * This class is used for generating regular waves in both linear and nonlinear regimes. See Dean and Dalrymple 1994 for equations.
1706  */
1707 
1708 struct __pyx_vtabstruct_9WaveTools_MonochromaticWaves {
1709  double (*etaLinear)(struct __pyx_obj_9WaveTools_MonochromaticWaves *, double *, double);
1710  double (*etaFenton)(struct __pyx_obj_9WaveTools_MonochromaticWaves *, double *, double);
1711  void (*uLinear)(struct __pyx_obj_9WaveTools_MonochromaticWaves *, double *, double *, double);
1712  void (*uFenton)(struct __pyx_obj_9WaveTools_MonochromaticWaves *, double *, double *, double);
1713 };
1714 static struct __pyx_vtabstruct_9WaveTools_MonochromaticWaves *__pyx_vtabptr_9WaveTools_MonochromaticWaves;
1715 
1716 
1717 /* "WaveTools.py":1165
1718  * return U
1719  *
1720  * class NewWave(object): # <<<<<<<<<<<<<<
1721  * """
1722  * This class is used for generating the NewWave theory (see Tromans et al. 1991)
1723  */
1724 
1725 struct __pyx_vtabstruct_9WaveTools_NewWave {
1726  double (*_cpp_eta)(struct __pyx_obj_9WaveTools_NewWave *, double *, double);
1727  void (*_cpp_u)(struct __pyx_obj_9WaveTools_NewWave *, double *, double *, double);
1728 };
1729 static struct __pyx_vtabstruct_9WaveTools_NewWave *__pyx_vtabptr_9WaveTools_NewWave;
1730 
1731 
1732 /* "WaveTools.py":1398
1733  * return series
1734  *
1735  * class RandomWaves(object): # <<<<<<<<<<<<<<
1736  * """
1737  * This class is used for generating plane random waves using linear reconstruction of components from a
1738  */
1739 
1740 struct __pyx_vtabstruct_9WaveTools_RandomWaves {
1741  double (*_cpp_eta)(struct __pyx_obj_9WaveTools_RandomWaves *, double *, double);
1742  void (*_cpp_u)(struct __pyx_obj_9WaveTools_RandomWaves *, double *, double *, double);
1743 };
1744 static struct __pyx_vtabstruct_9WaveTools_RandomWaves *__pyx_vtabptr_9WaveTools_RandomWaves;
1745 
1746 
1747 /* "WaveTools.py":1658
1748  *
1749  *
1750  * class MultiSpectraRandomWaves(object): # <<<<<<<<<<<<<<
1751  * """This class is used for generating random waves by combining
1752  * multiple spectra with different distributions and directions
1753  */
1754 
1755 struct __pyx_vtabstruct_9WaveTools_MultiSpectraRandomWaves {
1756  double (*_cpp_eta)(struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *, double *, double);
1757  void (*_cpp_u)(struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *, double *, double *, double);
1758 };
1759 static struct __pyx_vtabstruct_9WaveTools_MultiSpectraRandomWaves *__pyx_vtabptr_9WaveTools_MultiSpectraRandomWaves;
1760 
1761 
1762 /* "WaveTools.py":1853
1763  *
1764  *
1765  * class DirectionalWaves(object): # <<<<<<<<<<<<<<
1766  * """
1767  * This class is used for generating directional random waves using linear reconstruction of components from a
1768  */
1769 
1770 struct __pyx_vtabstruct_9WaveTools_DirectionalWaves {
1771  double (*_cpp_eta)(struct __pyx_obj_9WaveTools_DirectionalWaves *, double *, double);
1772  void (*_cpp_u)(struct __pyx_obj_9WaveTools_DirectionalWaves *, double *, double *, double);
1773 };
1774 static struct __pyx_vtabstruct_9WaveTools_DirectionalWaves *__pyx_vtabptr_9WaveTools_DirectionalWaves;
1775 
1776 
1777 /* "WaveTools.py":2096
1778  *
1779  *
1780  * class TimeSeries(object): # <<<<<<<<<<<<<<
1781  * """This class is used for generating waves from an arbirtrary free-surface elevation time series
1782  *
1783  */
1784 
1785 struct __pyx_vtabstruct_9WaveTools_TimeSeries {
1786  double (*_cpp_etaDirect)(struct __pyx_obj_9WaveTools_TimeSeries *, double *, double);
1787  double (*_cpp_etaWindow)(struct __pyx_obj_9WaveTools_TimeSeries *, double *, double);
1788  void (*_cpp_uDirect)(struct __pyx_obj_9WaveTools_TimeSeries *, double *, double *, double);
1789  void (*_cpp_uWindow)(struct __pyx_obj_9WaveTools_TimeSeries *, double *, double *, double);
1790 };
1791 static struct __pyx_vtabstruct_9WaveTools_TimeSeries *__pyx_vtabptr_9WaveTools_TimeSeries;
1792 
1793 
1794 /* "WaveTools.py":2764
1795  *
1796  *
1797  * class RandomNLWaves(object): # <<<<<<<<<<<<<<
1798  * """
1799  * This class is contains functions for calculating random waves with 2nd order corrections
1800  */
1801 
1802 struct __pyx_vtabstruct_9WaveTools_RandomNLWaves {
1803  double (*_cpp_eta_2ndOrder)(struct __pyx_obj_9WaveTools_RandomNLWaves *, double *, double);
1804  double (*_cpp_eta_short)(struct __pyx_obj_9WaveTools_RandomNLWaves *, double *, double);
1805  double (*_cpp_eta_long)(struct __pyx_obj_9WaveTools_RandomNLWaves *, double *, double);
1806 };
1807 static struct __pyx_vtabstruct_9WaveTools_RandomNLWaves *__pyx_vtabptr_9WaveTools_RandomNLWaves;
1808 
1809 /* --- Runtime support code (head) --- */
1810 /* Refnanny.proto */
1811 #ifndef CYTHON_REFNANNY
1812  #define CYTHON_REFNANNY 0
1813 #endif
1814 #if CYTHON_REFNANNY
1815  typedef struct {
1816  void (*INCREF)(void*, PyObject*, int);
1817  void (*DECREF)(void*, PyObject*, int);
1818  void (*GOTREF)(void*, PyObject*, int);
1819  void (*GIVEREF)(void*, PyObject*, int);
1820  void* (*SetupContext)(const char*, int, const char*);
1821  void (*FinishContext)(void**);
1822  } __Pyx_RefNannyAPIStruct;
1823  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1824  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1825  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1826 #ifdef WITH_THREAD
1827  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1828  if (acquire_gil) {\
1829  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1830  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1831  PyGILState_Release(__pyx_gilstate_save);\
1832  } else {\
1833  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1834  }
1835 #else
1836  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1837  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1838 #endif
1839  #define __Pyx_RefNannyFinishContext()\
1840  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1841  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1842  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1843  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1844  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1845  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1846  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1847  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1848  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1849 #else
1850  #define __Pyx_RefNannyDeclarations
1851  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1852  #define __Pyx_RefNannyFinishContext()
1853  #define __Pyx_INCREF(r) Py_INCREF(r)
1854  #define __Pyx_DECREF(r) Py_DECREF(r)
1855  #define __Pyx_GOTREF(r)
1856  #define __Pyx_GIVEREF(r)
1857  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1858  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1859  #define __Pyx_XGOTREF(r)
1860  #define __Pyx_XGIVEREF(r)
1861 #endif
1862 #define __Pyx_XDECREF_SET(r, v) do {\
1863  PyObject *tmp = (PyObject *) r;\
1864  r = v; __Pyx_XDECREF(tmp);\
1865  } while (0)
1866 #define __Pyx_DECREF_SET(r, v) do {\
1867  PyObject *tmp = (PyObject *) r;\
1868  r = v; __Pyx_DECREF(tmp);\
1869  } while (0)
1870 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1871 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1872 
1873 /* PyObjectGetAttrStr.proto */
1874 #if CYTHON_USE_TYPE_SLOTS
1875 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1876 #else
1877 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1878 #endif
1879 
1880 /* GetBuiltinName.proto */
1881 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1882 
1883 /* RaiseDoubleKeywords.proto */
1884 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1885 
1886 /* ParseKeywords.proto */
1887 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1888  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1889  const char* function_name);
1890 
1891 /* RaiseArgTupleInvalid.proto */
1892 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1893  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1894 
1895 /* PyDictVersioning.proto */
1896 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1897 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1898 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1899 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1900  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1901  (cache_var) = (value);
1902 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1903  static PY_UINT64_T __pyx_dict_version = 0;\
1904  static PyObject *__pyx_dict_cached_value = NULL;\
1905  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1906  (VAR) = __pyx_dict_cached_value;\
1907  } else {\
1908  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1909  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1910  }\
1911 }
1912 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1913 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1914 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1915 #else
1916 #define __PYX_GET_DICT_VERSION(dict) (0)
1917 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1918 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1919 #endif
1920 
1921 /* GetModuleGlobalName.proto */
1922 #if CYTHON_USE_DICT_VERSIONS
1923 #define __Pyx_GetModuleGlobalName(var, name) {\
1924  static PY_UINT64_T __pyx_dict_version = 0;\
1925  static PyObject *__pyx_dict_cached_value = NULL;\
1926  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1927  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1928  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1929 }
1930 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1931  PY_UINT64_T __pyx_dict_version;\
1932  PyObject *__pyx_dict_cached_value;\
1933  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1934 }
1935 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1936 #else
1937 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1938 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1939 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1940 #endif
1941 
1942 /* PyFunctionFastCall.proto */
1943 #if CYTHON_FAST_PYCALL
1944 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1945  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1946 #if 1 || PY_VERSION_HEX < 0x030600B1
1947 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1948 #else
1949 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1950 #endif
1951 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1952  (sizeof(char [1 - 2*!(cond)]) - 1)
1953 #ifndef Py_MEMBER_SIZE
1954 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1955 #endif
1956 #if CYTHON_FAST_PYCALL
1957  static size_t __pyx_pyframe_localsplus_offset = 0;
1958  #include "frameobject.h"
1959 #if PY_VERSION_HEX >= 0x030b00a6
1960  #ifndef Py_BUILD_CORE
1961  #define Py_BUILD_CORE 1
1962  #endif
1963  #include "internal/pycore_frame.h"
1964 #endif
1965  #define __Pxy_PyFrame_Initialize_Offsets()\
1966  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1967  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1968  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1969  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1970 #endif // CYTHON_FAST_PYCALL
1971 #endif
1972 
1973 /* PyCFunctionFastCall.proto */
1974 #if CYTHON_FAST_PYCCALL
1975 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1976 #else
1977 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1978 #endif
1979 
1980 /* PyObjectCall.proto */
1981 #if CYTHON_COMPILING_IN_CPYTHON
1982 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1983 #else
1984 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1985 #endif
1986 
1987 /* PyObjectCall2Args.proto */
1988 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1989 
1990 /* PyObjectCallMethO.proto */
1991 #if CYTHON_COMPILING_IN_CPYTHON
1992 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1993 #endif
1994 
1995 /* PyObjectCallOneArg.proto */
1996 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1997 
1998 /* ListAppend.proto */
1999 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
2000 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
2001  PyListObject* L = (PyListObject*) list;
2002  Py_ssize_t len = Py_SIZE(list);
2003  if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
2004  Py_INCREF(x);
2005  PyList_SET_ITEM(list, len, x);
2006  __Pyx_SET_SIZE(list, len + 1);
2007  return 0;
2008  }
2009  return PyList_Append(list, x);
2010 }
2011 #else
2012 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
2013 #endif
2014 
2015 /* PySequenceContains.proto */
2016 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
2017  int result = PySequence_Contains(seq, item);
2018  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
2019 }
2020 
2021 /* None.proto */
2022 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
2023 
2024 /* GetItemInt.proto */
2025 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2026  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2027  __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
2028  (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
2029  __Pyx_GetItemInt_Generic(o, to_py_func(i))))
2030 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2031  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2032  __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2033  (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
2034 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
2035  int wraparound, int boundscheck);
2036 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2037  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2038  __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2039  (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
2040 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
2041  int wraparound, int boundscheck);
2042 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
2043 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
2044  int is_list, int wraparound, int boundscheck);
2045 
2046 /* py_abs.proto */
2047 #if CYTHON_USE_PYLONG_INTERNALS
2048 static PyObject *__Pyx_PyLong_AbsNeg(PyObject *num);
2049 #define __Pyx_PyNumber_Absolute(x)\
2050  ((likely(PyLong_CheckExact(x))) ?\
2051  (likely(Py_SIZE(x) >= 0) ? (Py_INCREF(x), (x)) : __Pyx_PyLong_AbsNeg(x)) :\
2052  PyNumber_Absolute(x))
2053 #else
2054 #define __Pyx_PyNumber_Absolute(x) PyNumber_Absolute(x)
2055 #endif
2056 
2057 /* SliceObject.proto */
2058 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
2059  PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
2060  PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
2061  int has_cstart, int has_cstop, int wraparound);
2062 
2063 /* PyObjectCallNoArg.proto */
2064 #if CYTHON_COMPILING_IN_CPYTHON
2065 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
2066 #else
2067 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
2068 #endif
2069 
2070 /* ObjectGetItem.proto */
2071 #if CYTHON_USE_TYPE_SLOTS
2072 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
2073 #else
2074 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
2075 #endif
2076 
2077 /* PyFloatBinop.proto */
2078 #if !CYTHON_COMPILING_IN_PYPY
2079 static PyObject* __Pyx_PyFloat_AddCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
2080 #else
2081 #define __Pyx_PyFloat_AddCObj(op1, op2, floatval, inplace, zerodivision_check)\
2082  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
2083 #endif
2084 
2085 /* PyFloatBinop.proto */
2086 #if !CYTHON_COMPILING_IN_PYPY
2087 static PyObject* __Pyx_PyFloat_SubtractObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
2088 #else
2089 #define __Pyx_PyFloat_SubtractObjC(op1, op2, floatval, inplace, zerodivision_check)\
2090  (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
2091 #endif
2092 
2093 /* SliceObject.proto */
2094 #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
2095  __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
2096 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
2097  PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
2098  PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
2099  int has_cstart, int has_cstop, int wraparound);
2100 
2101 /* pyobject_as_double.proto */
2102 static double __Pyx__PyObject_AsDouble(PyObject* obj);
2103 #if CYTHON_COMPILING_IN_PYPY
2104 #define __Pyx_PyObject_AsDouble(obj)\
2105 (likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) :\
2106  likely(PyInt_CheckExact(obj)) ?\
2107  PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
2108 #else
2109 #define __Pyx_PyObject_AsDouble(obj)\
2110 ((likely(PyFloat_CheckExact(obj))) ?\
2111  PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
2112 #endif
2113 
2114 /* PyIntBinop.proto */
2115 #if !CYTHON_COMPILING_IN_PYPY
2116 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
2117 #else
2118 #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
2119  (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
2120 #endif
2121 
2122 /* GetTopmostException.proto */
2123 #if CYTHON_USE_EXC_INFO_STACK
2124 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
2125 #endif
2126 
2127 /* PyThreadStateGet.proto */
2128 #if CYTHON_FAST_THREAD_STATE
2129 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
2130 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
2131 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
2132 #else
2133 #define __Pyx_PyThreadState_declare
2134 #define __Pyx_PyThreadState_assign
2135 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
2136 #endif
2137 
2138 /* SaveResetException.proto */
2139 #if CYTHON_FAST_THREAD_STATE
2140 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
2141 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2142 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
2143 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2144 #else
2145 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
2146 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
2147 #endif
2148 
2149 /* GetException.proto */
2150 #if CYTHON_FAST_THREAD_STATE
2151 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
2152 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2153 #else
2154 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2155 #endif
2156 
2157 /* ExtTypeTest.proto */
2158 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
2159 
2160 /* PyErrExceptionMatches.proto */
2161 #if CYTHON_FAST_THREAD_STATE
2162 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2163 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2164 #else
2165 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2166 #endif
2167 
2168 /* PyErrFetchRestore.proto */
2169 #if CYTHON_FAST_THREAD_STATE
2170 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
2171 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
2172 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
2173 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
2174 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
2175 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2176 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2177 #if CYTHON_COMPILING_IN_CPYTHON
2178 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
2179 #else
2180 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2181 #endif
2182 #else
2183 #define __Pyx_PyErr_Clear() PyErr_Clear()
2184 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2185 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
2186 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
2187 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
2188 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
2189 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
2190 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
2191 #endif
2192 
2193 /* GetAttr.proto */
2194 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
2195 
2196 /* GetAttr3.proto */
2197 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
2198 
2199 /* PyFloatBinop.proto */
2200 #if !CYTHON_COMPILING_IN_PYPY
2201 static PyObject* __Pyx_PyFloat_TrueDivideCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
2202 #else
2203 #define __Pyx_PyFloat_TrueDivideCObj(op1, op2, floatval, inplace, zerodivision_check)\
2204  (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
2205 #endif
2206 
2207 /* IncludeStringH.proto */
2208 #include <string.h>
2209 
2210 /* BytesEquals.proto */
2211 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
2212 
2213 /* UnicodeEquals.proto */
2214 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
2215 
2216 /* StrEquals.proto */
2217 #if PY_MAJOR_VERSION >= 3
2218 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
2219 #else
2220 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
2221 #endif
2222 
2223 /* PyFloatBinop.proto */
2224 #if !CYTHON_COMPILING_IN_PYPY
2225 static PyObject* __Pyx_PyFloat_EqObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
2226 #else
2227 #define __Pyx_PyFloat_EqObjC(op1, op2, floatval, inplace, zerodivision_check)\
2228  (PyObject_RichCompare(op1, op2, Py_EQ))
2229  #endif
2230 
2231 /* PyIntBinop.proto */
2232 #if !CYTHON_COMPILING_IN_PYPY
2233 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
2234 #else
2235 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
2236  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
2237 #endif
2238 
2239 /* Import.proto */
2240 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
2241 
2242 /* ImportFrom.proto */
2243 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
2244 
2245 /* DictGetItem.proto */
2246 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
2247 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
2248 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
2249  (likely(PyDict_CheckExact(obj)) ?\
2250  __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
2251 #else
2252 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
2253 #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
2254 #endif
2255 
2256 /* RaiseTooManyValuesToUnpack.proto */
2257 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
2258 
2259 /* RaiseNeedMoreValuesToUnpack.proto */
2260 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
2261 
2262 /* IterFinish.proto */
2263 static CYTHON_INLINE int __Pyx_IterFinish(void);
2264 
2265 /* UnpackItemEndCheck.proto */
2266 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
2267 
2268 /* SetItemInt.proto */
2269 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2270  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2271  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
2272  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
2273  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
2274 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
2275 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
2276  int is_list, int wraparound, int boundscheck);
2277 
2278 /* RaiseException.proto */
2279 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2280 
2281 /* None.proto */
2282 static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
2283 
2284 /* PyFloatBinop.proto */
2285 #if !CYTHON_COMPILING_IN_PYPY
2286 static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
2287 #else
2288 #define __Pyx_PyFloat_TrueDivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
2289  (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
2290 #endif
2291 
2292 /* PyIntCompare.proto */
2293 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
2294 
2295 /* PyObjectGetMethod.proto */
2296 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
2297 
2298 /* PyObjectCallMethod1.proto */
2299 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
2300 
2301 /* append.proto */
2302 static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
2303 
2304 /* PyObjectSetAttrStr.proto */
2305 #if CYTHON_USE_TYPE_SLOTS
2306 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
2307 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
2308 #else
2309 #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
2310 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
2311 #endif
2312 
2313 /* HasAttr.proto */
2314 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
2315 
2316 /* PyObject_GenericGetAttrNoDict.proto */
2317 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2318 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
2319 #else
2320 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
2321 #endif
2322 
2323 /* PyObject_GenericGetAttr.proto */
2324 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2325 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
2326 #else
2327 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
2328 #endif
2329 
2330 /* PyObjectGetAttrStrNoError.proto */
2331 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2332 
2333 /* SetupReduce.proto */
2334 static int __Pyx_setup_reduce(PyObject* type_obj);
2335 
2336 /* SetVTable.proto */
2337 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
2338 
2339 /* TypeImport.proto */
2340 #ifndef __PYX_HAVE_RT_ImportType_proto
2341 #define __PYX_HAVE_RT_ImportType_proto
2342 enum __Pyx_ImportType_CheckSize {
2343  __Pyx_ImportType_CheckSize_Error = 0,
2344  __Pyx_ImportType_CheckSize_Warn = 1,
2345  __Pyx_ImportType_CheckSize_Ignore = 2
2346 };
2347 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
2348 #endif
2349 
2350 /* FetchCommonType.proto */
2351 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
2352 
2353 /* CythonFunctionShared.proto */
2354 #define __Pyx_CyFunction_USED 1
2355 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
2356 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
2357 #define __Pyx_CYFUNCTION_CCLASS 0x04
2358 #define __Pyx_CyFunction_GetClosure(f)\
2359  (((__pyx_CyFunctionObject *) (f))->func_closure)
2360 #define __Pyx_CyFunction_GetClassObj(f)\
2361  (((__pyx_CyFunctionObject *) (f))->func_classobj)
2362 #define __Pyx_CyFunction_Defaults(type, f)\
2363  ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
2364 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
2365  ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
2366 typedef struct {
2367  PyCFunctionObject func;
2368 #if PY_VERSION_HEX < 0x030500A0
2369  PyObject *func_weakreflist;
2370 #endif
2371  PyObject *func_dict;
2372  PyObject *func_name;
2373  PyObject *func_qualname;
2374  PyObject *func_doc;
2375  PyObject *func_globals;
2376  PyObject *func_code;
2377  PyObject *func_closure;
2378  PyObject *func_classobj;
2379  void *defaults;
2380  int defaults_pyobjects;
2381  size_t defaults_size; // used by FusedFunction for copying defaults
2382  int flags;
2383  PyObject *defaults_tuple;
2384  PyObject *defaults_kwdict;
2385  PyObject *(*defaults_getter)(PyObject *);
2386  PyObject *func_annotations;
2387 } __pyx_CyFunctionObject;
2388 static PyTypeObject *__pyx_CyFunctionType = 0;
2389 #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
2390 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
2391  int flags, PyObject* qualname,
2392  PyObject *self,
2393  PyObject *module, PyObject *globals,
2394  PyObject* code);
2395 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
2396  size_t size,
2397  int pyobjects);
2398 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
2399  PyObject *tuple);
2400 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
2401  PyObject *dict);
2402 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
2403  PyObject *dict);
2404 static int __pyx_CyFunction_init(void);
2405 
2406 /* CythonFunction.proto */
2407 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
2408  int flags, PyObject* qualname,
2409  PyObject *closure,
2410  PyObject *module, PyObject *globals,
2411  PyObject* code);
2412 
2413 /* CalculateMetaclass.proto */
2414 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
2415 
2416 /* SetNameInClass.proto */
2417 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
2418 #define __Pyx_SetNameInClass(ns, name, value)\
2419  (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
2420 #elif CYTHON_COMPILING_IN_CPYTHON
2421 #define __Pyx_SetNameInClass(ns, name, value)\
2422  (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
2423 #else
2424 #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value)
2425 #endif
2426 
2427 /* Py3ClassCreate.proto */
2428 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
2429  PyObject *mkw, PyObject *modname, PyObject *doc);
2430 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
2431  PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
2432 
2433 /* CLineInTraceback.proto */
2434 #ifdef CYTHON_CLINE_IN_TRACEBACK
2435 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2436 #else
2437 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
2438 #endif
2439 
2440 /* CodeObjectCache.proto */
2441 typedef struct {
2442  PyCodeObject* code_object;
2443  int code_line;
2444 } __Pyx_CodeObjectCacheEntry;
2445 struct __Pyx_CodeObjectCache {
2446  int count;
2447  int max_count;
2448  __Pyx_CodeObjectCacheEntry* entries;
2449 };
2450 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
2451 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
2452 static PyCodeObject *__pyx_find_code_object(int code_line);
2453 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
2454 
2455 /* AddTraceback.proto */
2456 static void __Pyx_AddTraceback(const char *funcname, int c_line,
2457  int py_line, const char *filename);
2458 
2459 /* GCCDiagnostics.proto */
2460 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2461 #define __Pyx_HAS_GCC_DIAGNOSTIC
2462 #endif
2463 
2464 /* RealImag.proto */
2465 #if CYTHON_CCOMPLEX
2466  #ifdef __cplusplus
2467  #define __Pyx_CREAL(z) ((z).real())
2468  #define __Pyx_CIMAG(z) ((z).imag())
2469  #else
2470  #define __Pyx_CREAL(z) (__real__(z))
2471  #define __Pyx_CIMAG(z) (__imag__(z))
2472  #endif
2473 #else
2474  #define __Pyx_CREAL(z) ((z).real)
2475  #define __Pyx_CIMAG(z) ((z).imag)
2476 #endif
2477 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
2478  && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2479  #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2480  #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2481 #else
2482  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2483  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2484 #endif
2485 
2486 /* Arithmetic.proto */
2487 #if CYTHON_CCOMPLEX
2488  #define __Pyx_c_eq_float(a, b) ((a)==(b))
2489  #define __Pyx_c_sum_float(a, b) ((a)+(b))
2490  #define __Pyx_c_diff_float(a, b) ((a)-(b))
2491  #define __Pyx_c_prod_float(a, b) ((a)*(b))
2492  #define __Pyx_c_quot_float(a, b) ((a)/(b))
2493  #define __Pyx_c_neg_float(a) (-(a))
2494  #ifdef __cplusplus
2495  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2496  #define __Pyx_c_conj_float(z) (::std::conj(z))
2497  #if 1
2498  #define __Pyx_c_abs_float(z) (::std::abs(z))
2499  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2500  #endif
2501  #else
2502  #define __Pyx_c_is_zero_float(z) ((z)==0)
2503  #define __Pyx_c_conj_float(z) (conjf(z))
2504  #if 1
2505  #define __Pyx_c_abs_float(z) (cabsf(z))
2506  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2507  #endif
2508  #endif
2509 #else
2510  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2511  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2512  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2513  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2514  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2515  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2516  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2517  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2518  #if 1
2519  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
2520  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2521  #endif
2522 #endif
2523 
2524 /* Arithmetic.proto */
2525 #if CYTHON_CCOMPLEX
2526  #define __Pyx_c_eq_double(a, b) ((a)==(b))
2527  #define __Pyx_c_sum_double(a, b) ((a)+(b))
2528  #define __Pyx_c_diff_double(a, b) ((a)-(b))
2529  #define __Pyx_c_prod_double(a, b) ((a)*(b))
2530  #define __Pyx_c_quot_double(a, b) ((a)/(b))
2531  #define __Pyx_c_neg_double(a) (-(a))
2532  #ifdef __cplusplus
2533  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2534  #define __Pyx_c_conj_double(z) (::std::conj(z))
2535  #if 1
2536  #define __Pyx_c_abs_double(z) (::std::abs(z))
2537  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2538  #endif
2539  #else
2540  #define __Pyx_c_is_zero_double(z) ((z)==0)
2541  #define __Pyx_c_conj_double(z) (conj(z))
2542  #if 1
2543  #define __Pyx_c_abs_double(z) (cabs(z))
2544  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2545  #endif
2546  #endif
2547 #else
2548  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2549  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2550  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2551  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2552  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2553  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2554  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2555  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2556  #if 1
2557  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
2558  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2559  #endif
2560 #endif
2561 
2562 /* CIntFromPy.proto */
2563 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2564 
2565 /* CIntToPy.proto */
2566 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
2567 
2568 /* CIntFromPy.proto */
2569 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2570 
2571 /* CIntToPy.proto */
2572 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
2573 
2574 /* CIntToPy.proto */
2575 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value);
2576 
2577 /* CIntFromPy.proto */
2578 static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
2579 
2580 /* FastTypeChecks.proto */
2581 #if CYTHON_COMPILING_IN_CPYTHON
2582 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2583 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2584 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2585 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2586 #else
2587 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2588 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2589 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
2590 #endif
2591 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2592 
2593 /* SwapException.proto */
2594 #if CYTHON_FAST_THREAD_STATE
2595 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
2596 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2597 #else
2598 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
2599 #endif
2600 
2601 /* CoroutineBase.proto */
2602 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
2603 #if CYTHON_USE_EXC_INFO_STACK
2604 #define __Pyx_ExcInfoStruct _PyErr_StackItem
2605 #else
2606 typedef struct {
2607  PyObject *exc_type;
2608  PyObject *exc_value;
2609  PyObject *exc_traceback;
2610 } __Pyx_ExcInfoStruct;
2611 #endif
2612 typedef struct {
2613  PyObject_HEAD
2614  __pyx_coroutine_body_t body;
2615  PyObject *closure;
2616  __Pyx_ExcInfoStruct gi_exc_state;
2617  PyObject *gi_weakreflist;
2618  PyObject *classobj;
2619  PyObject *yieldfrom;
2620  PyObject *gi_name;
2621  PyObject *gi_qualname;
2622  PyObject *gi_modulename;
2623  PyObject *gi_code;
2624  PyObject *gi_frame;
2625  int resume_label;
2626  char is_running;
2627 } __pyx_CoroutineObject;
2628 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
2629  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
2630  PyObject *name, PyObject *qualname, PyObject *module_name);
2631 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
2632  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
2633  PyObject *name, PyObject *qualname, PyObject *module_name);
2634 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
2635 static int __Pyx_Coroutine_clear(PyObject *self);
2636 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
2637 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
2638 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
2639 #if CYTHON_USE_EXC_INFO_STACK
2640 #define __Pyx_Coroutine_SwapException(self)
2641 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
2642 #else
2643 #define __Pyx_Coroutine_SwapException(self) {\
2644  __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
2645  __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
2646  }
2647 #define __Pyx_Coroutine_ResetAndClearException(self) {\
2648  __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
2649  (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
2650  }
2651 #endif
2652 #if CYTHON_FAST_THREAD_STATE
2653 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
2654  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
2655 #else
2656 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
2657  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
2658 #endif
2659 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
2660 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
2661 
2662 /* PatchModuleWithCoroutine.proto */
2663 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
2664 
2665 /* PatchGeneratorABC.proto */
2666 static int __Pyx_patch_abc(void);
2667 
2668 /* Generator.proto */
2669 #define __Pyx_Generator_USED
2670 static PyTypeObject *__pyx_GeneratorType = 0;
2671 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
2672 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
2673  __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
2674 static PyObject *__Pyx_Generator_Next(PyObject *self);
2675 static int __pyx_Generator_init(void);
2676 
2677 /* CheckBinaryVersion.proto */
2678 static int __Pyx_check_binary_version(void);
2679 
2680 /* InitStrings.proto */
2681 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2682 
2683 static double __pyx_f_9WaveTools_18MonochromaticWaves_etaLinear(struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2684 static double __pyx_f_9WaveTools_18MonochromaticWaves_etaFenton(struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2685 static void __pyx_f_9WaveTools_18MonochromaticWaves_uLinear(struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self, double *__pyx_v_U, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2686 static void __pyx_f_9WaveTools_18MonochromaticWaves_uFenton(struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self, double *__pyx_v_U, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2687 static double __pyx_f_9WaveTools_7NewWave__cpp_eta(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2688 static void __pyx_f_9WaveTools_7NewWave__cpp_u(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, double *__pyx_v_U, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2689 static double __pyx_f_9WaveTools_11RandomWaves__cpp_eta(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2690 static void __pyx_f_9WaveTools_11RandomWaves__cpp_u(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, double *__pyx_v_U, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2691 static double __pyx_f_9WaveTools_23MultiSpectraRandomWaves__cpp_eta(struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2692 static void __pyx_f_9WaveTools_23MultiSpectraRandomWaves__cpp_u(struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self, double *__pyx_v_U, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2693 static double __pyx_f_9WaveTools_16DirectionalWaves__cpp_eta(struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2694 static void __pyx_f_9WaveTools_16DirectionalWaves__cpp_u(struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self, double *__pyx_v_U, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2695 static double __pyx_f_9WaveTools_10TimeSeries__cpp_etaDirect(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2696 static void __pyx_f_9WaveTools_10TimeSeries__cpp_uDirect(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, double *__pyx_v_U, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2697 static double __pyx_f_9WaveTools_10TimeSeries__cpp_etaWindow(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2698 static void __pyx_f_9WaveTools_10TimeSeries__cpp_uWindow(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, double *__pyx_v_U, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2699 static double __pyx_f_9WaveTools_13RandomNLWaves__cpp_eta_2ndOrder(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2700 static double __pyx_f_9WaveTools_13RandomNLWaves__cpp_eta_short(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2701 static double __pyx_f_9WaveTools_13RandomNLWaves__cpp_eta_long(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, double *__pyx_v_x, double __pyx_v_t); /* proto*/
2702 
2703 /* Module declarations from 'cython' */
2704 
2705 /* Module declarations from 'libc.math' */
2706 
2707 /* Module declarations from 'cpython.buffer' */
2708 
2709 /* Module declarations from 'libc.string' */
2710 
2711 /* Module declarations from 'libc.stdio' */
2712 
2713 /* Module declarations from '__builtin__' */
2714 
2715 /* Module declarations from 'cpython.type' */
2716 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
2717 
2718 /* Module declarations from 'cpython' */
2719 
2720 /* Module declarations from 'cpython.object' */
2721 
2722 /* Module declarations from 'cpython.ref' */
2723 
2724 /* Module declarations from 'cpython.mem' */
2725 
2726 /* Module declarations from 'numpy' */
2727 
2728 /* Module declarations from 'numpy' */
2729 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
2730 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
2731 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
2732 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
2733 static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
2734 static PyTypeObject *__pyx_ptype_5numpy_number = 0;
2735 static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
2736 static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
2737 static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
2738 static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
2739 static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
2740 static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
2741 static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
2742 static PyTypeObject *__pyx_ptype_5numpy_character = 0;
2743 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
2744 
2745 /* Module declarations from 'libcpp' */
2746 
2747 /* Module declarations from 'WaveTools' */
2748 static PyTypeObject *__pyx_ptype_9WaveTools_SteadyCurrent = 0;
2749 static PyTypeObject *__pyx_ptype_9WaveTools_SolitaryWave = 0;
2750 static PyTypeObject *__pyx_ptype_9WaveTools_MonochromaticWaves = 0;
2751 static PyTypeObject *__pyx_ptype_9WaveTools_NewWave = 0;
2752 static PyTypeObject *__pyx_ptype_9WaveTools_RandomWaves = 0;
2753 static PyTypeObject *__pyx_ptype_9WaveTools_MultiSpectraRandomWaves = 0;
2754 static PyTypeObject *__pyx_ptype_9WaveTools_DirectionalWaves = 0;
2755 static PyTypeObject *__pyx_ptype_9WaveTools_TimeSeries = 0;
2756 static PyTypeObject *__pyx_ptype_9WaveTools_RandomNLWaves = 0;
2757 static PyTypeObject *__pyx_ptype_9WaveTools___pyx_scope_struct____cinit__ = 0;
2758 static PyTypeObject *__pyx_ptype_9WaveTools___pyx_scope_struct_1_genexpr = 0;
2759 static PyObject *__pyx_f_9WaveTools___pyx_unpickle_SteadyCurrent__set_state(struct __pyx_obj_9WaveTools_SteadyCurrent *, PyObject *); /*proto*/
2760 static PyObject *__pyx_f_9WaveTools___pyx_unpickle_SolitaryWave__set_state(struct __pyx_obj_9WaveTools_SolitaryWave *, PyObject *); /*proto*/
2761 static CYTHON_INLINE PyObject *__Pyx_carray_to_py_double(double *, Py_ssize_t); /*proto*/
2762 static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_double(double *, Py_ssize_t); /*proto*/
2763 #define __Pyx_MODULE_NAME "WaveTools"
2764 extern int __pyx_module_is_main_WaveTools;
2765 int __pyx_module_is_main_WaveTools = 0;
2766 
2767 /* Implementation of 'WaveTools' */
2768 static PyObject *__pyx_builtin_object;
2769 static PyObject *__pyx_builtin_sum;
2770 static PyObject *__pyx_builtin_TypeError;
2771 static PyObject *__pyx_builtin_max;
2772 static PyObject *__pyx_builtin_open;
2773 static PyObject *__pyx_builtin_round;
2774 static PyObject *__pyx_builtin_print;
2775 static PyObject *__pyx_builtin_ImportError;
2776 static const char __pyx_k_K[] = "K";
2777 static const char __pyx_k_M[] = "M";
2778 static const char __pyx_k_N[] = "N";
2779 static const char __pyx_k_U[] = "U";
2780 static const char __pyx_k_V[] = "V";
2781 static const char __pyx_k_Z[] = "Z";
2782 static const char __pyx_k_a[] = "a";
2783 static const char __pyx_k_c[] = "c";
2784 static const char __pyx_k_d[] = "d";
2785 static const char __pyx_k_f[] = "f";
2786 static const char __pyx_k_g[] = "g";
2787 static const char __pyx_k_i[] = "i";
2788 static const char __pyx_k_j[] = "j";
2789 static const char __pyx_k_k[] = "k";
2790 static const char __pyx_k_l[] = "l";
2791 static const char __pyx_k_r[] = "r";
2792 static const char __pyx_k_s[] = "s";
2793 static const char __pyx_k_t[] = "t";
2794 static const char __pyx_k_u[] = "u";
2795 static const char __pyx_k_w[] = "w";
2796 static const char __pyx_k_x[] = "x";
2797 static const char __pyx_k_y[] = "y";
2798 static const char __pyx_k_G0[] = "G0";
2799 static const char __pyx_k_Hs[] = "Hs";
2800 static const char __pyx_k_Nf[] = "Nf";
2801 static const char __pyx_k_Np[] = "Np";
2802 static const char __pyx_k_RW[] = "RW";
2803 static const char __pyx_k_TS[] = "TS";
2804 static const char __pyx_k_Tm[] = "Tm";
2805 static const char __pyx_k_Tp[] = "Tp";
2806 static const char __pyx_k_UH[] = "UH";
2807 static const char __pyx_k_UV[] = "UV";
2808 static const char __pyx_k_a1[] = "a1";
2809 static const char __pyx_k_a2[] = "a2";
2810 static const char __pyx_k_aR[] = "aR";
2811 static const char __pyx_k_aa[] = "aa";
2812 static const char __pyx_k_ai[] = "ai";
2813 static const char __pyx_k_bj[] = "bj";
2814 static const char __pyx_k_df[] = "df";
2815 static const char __pyx_k_dt[] = "dt";
2816 static const char __pyx_k_f0[] = "f0";
2817 static const char __pyx_k_fi[] = "fi";
2818 static const char __pyx_k_ho[] = "ho";
2819 static const char __pyx_k_i1[] = "i1";
2820 static const char __pyx_k_i2[] = "i2";
2821 static const char __pyx_k_ii[] = "ii";
2822 static const char __pyx_k_jj[] = "jj";
2823 static const char __pyx_k_np[] = "np";
2824 static const char __pyx_k_pi[] = "pi";
2825 static const char __pyx_k_pp[] = "pp";
2826 static const char __pyx_k_te[] = "te";
2827 static const char __pyx_k_ts[] = "ts";
2828 static const char __pyx_k_tt[] = "tt";
2829 static const char __pyx_k_uR[] = "uR";
2830 static const char __pyx_k_v1[] = "v1";
2831 static const char __pyx_k_v2[] = "v2";
2832 static const char __pyx_k_ww[] = "ww";
2833 static const char __pyx_k_x0[] = "x0";
2834 static const char __pyx_k_xx[] = "xx";
2835 static const char __pyx_k_Er1[] = "Er1 =";
2836 static const char __pyx_k_TMA[] = "TMA";
2837 static const char __pyx_k__43[] = ",";
2838 static const char __pyx_k__52[] = " ";
2839 static const char __pyx_k_aRN[] = "aRN";
2840 static const char __pyx_k_all[] = "all";
2841 static const char __pyx_k_amp[] = "amp";
2842 static const char __pyx_k_cos[] = "cos";
2843 static const char __pyx_k_csv[] = ".csv";
2844 static const char __pyx_k_cut[] = "cut";
2845 static const char __pyx_k_doc[] = "__doc__";
2846 static const char __pyx_k_dom[] = "dom";
2847 static const char __pyx_k_er1[] = "er1";
2848 static const char __pyx_k_eta[] = "eta";
2849 static const char __pyx_k_exp[] = "exp";
2850 static const char __pyx_k_fft[] = "fft";
2851 static const char __pyx_k_fun[] = "fun";
2852 static const char __pyx_k_get[] = "get";
2853 static const char __pyx_k_log[] = "log";
2854 static const char __pyx_k_max[] = "max";
2855 static const char __pyx_k_mwl[] = "mwl";
2856 static const char __pyx_k_new[] = "__new__";
2857 static const char __pyx_k_phi[] = "phi";
2858 static const char __pyx_k_str[] = "str";
2859 static const char __pyx_k_sum[] = "sum";
2860 static const char __pyx_k_sys[] = "sys";
2861 static const char __pyx_k_tma[] = "tma";
2862 static const char __pyx_k_txt[] = ".txt";
2863 static const char __pyx_k_zip[] = "zip";
2864 static const char __pyx_k_Comm[] = "Comm";
2865 static const char __pyx_k_Hs_2[] = "_Hs_";
2866 static const char __pyx_k_Lgen[] = "Lgen";
2867 static const char __pyx_k_Nmax[] = "Nmax";
2868 static const char __pyx_k_Tend[] = "Tend";
2869 static const char __pyx_k_Tlag[] = "Tlag";
2870 static const char __pyx_k_Tmax[] = "Tmax";
2871 static const char __pyx_k_Tp_2[] = "_Tp_";
2872 static const char __pyx_k_args[] = "args";
2873 static const char __pyx_k_cmat[] = "cmat";
2874 static const char __pyx_k_cond[] = "cond";
2875 static const char __pyx_k_cppU[] = "cppU";
2876 static const char __pyx_k_dict[] = "__dict__";
2877 static const char __pyx_k_etaR[] = "etaR";
2878 static const char __pyx_k_exit[] = "exit";
2879 static const char __pyx_k_fast[] = "fast";
2880 static const char __pyx_k_freq[] = "freq";
2881 static const char __pyx_k_func[] = "func";
2882 static const char __pyx_k_gAbs[] = "gAbs";
2883 static const char __pyx_k_iend[] = "iend";
2884 static const char __pyx_k_init[] = "__init__";
2885 static const char __pyx_k_kAbs[] = "kAbs";
2886 static const char __pyx_k_kDir[] = "kDir";
2887 static const char __pyx_k_long[] = "long";
2888 static const char __pyx_k_main[] = "__main__";
2889 static const char __pyx_k_mean[] = "mean";
2890 static const char __pyx_k_mode[] = "mode";
2891 static const char __pyx_k_name[] = "__name__";
2892 static const char __pyx_k_nfft[] = "nfft";
2893 static const char __pyx_k_norm[] = "norm";
2894 static const char __pyx_k_ones[] = "ones";
2895 static const char __pyx_k_open[] = "open";
2896 static const char __pyx_k_phi0[] = "phi0";
2897 static const char __pyx_k_rand[] = "rand";
2898 static const char __pyx_k_real[] = "real";
2899 static const char __pyx_k_self[] = "self";
2900 static const char __pyx_k_send[] = "send";
2901 static const char __pyx_k_sinh[] = "sinh";
2902 static const char __pyx_k_smax[] = "smax";
2903 static const char __pyx_k_sqrt[] = "sqrt";
2904 static const char __pyx_k_tanh[] = "tanh";
2905 static const char __pyx_k_test[] = "__test__";
2906 static const char __pyx_k_time[] = "time";
2907 static const char __pyx_k_vDir[] = "vDir";
2908 static const char __pyx_k_wind[] = "wind";
2909 static const char __pyx_k_Nfreq[] = "Nfreq";
2910 static const char __pyx_k_Nwind[] = "Nwind";
2911 static const char __pyx_k_Uhorz[] = "Uhorz";
2912 static const char __pyx_k_Uvert[] = "Uvert";
2913 static const char __pyx_k_all_2[] = "__all__";
2914 static const char __pyx_k_array[] = "array";
2915 static const char __pyx_k_close[] = "close";
2916 static const char __pyx_k_cmath[] = "cmath";
2917 static const char __pyx_k_cos2s[] = "cos2s";
2918 static const char __pyx_k_depth[] = "depth";
2919 static const char __pyx_k_fft_x[] = "fft_x";
2920 static const char __pyx_k_fname[] = "fname";
2921 static const char __pyx_k_gamma[] = "gamma";
2922 static const char __pyx_k_level[] = "level";
2923 static const char __pyx_k_modes[] = "modes";
2924 static const char __pyx_k_niter[] = "niter";
2925 static const char __pyx_k_numpy[] = "numpy";
2926 static const char __pyx_k_omega[] = "omega";
2927 static const char __pyx_k_overl[] = "overl";
2928 static const char __pyx_k_phase[] = "phase";
2929 static const char __pyx_k_print[] = "print";
2930 static const char __pyx_k_range[] = "range";
2931 static const char __pyx_k_rec_d[] = "rec_d";
2932 static const char __pyx_k_round[] = "round";
2933 static const char __pyx_k_setUp[] = "setUp";
2934 static const char __pyx_k_setup[] = "setup";
2935 static const char __pyx_k_shape[] = "shape";
2936 static const char __pyx_k_short[] = "short";
2937 static const char __pyx_k_sigma[] = "sigma";
2938 static const char __pyx_k_sinus[] = "sinus";
2939 static const char __pyx_k_state[] = "state";
2940 static const char __pyx_k_theta[] = "theta";
2941 static const char __pyx_k_throw[] = "throw";
2942 static const char __pyx_k_trans[] = "trans";
2943 static const char __pyx_k_w_aux[] = "w_aux";
2944 static const char __pyx_k_where[] = "where";
2945 static const char __pyx_k_zeros[] = "zeros";
2946 static const char __pyx_k_Bcoeff[] = "Bcoeff";
2947 static const char __pyx_k_Cutoff[] = "Cutoff";
2948 static const char __pyx_k_Fenton[] = "Fenton";
2949 static const char __pyx_k_Linear[] = "Linear";
2950 static const char __pyx_k_NLongW[] = "NLongW";
2951 static const char __pyx_k_Nwaves[] = "Nwaves";
2952 static const char __pyx_k_PM_mod[] = "PM_mod";
2953 static const char __pyx_k_Period[] = "Period";
2954 static const char __pyx_k_Tstart[] = "Tstart";
2955 static const char __pyx_k_Udrift[] = "Udrift";
2956 static const char __pyx_k_Window[] = "Window";
2957 static const char __pyx_k_Ycoeff[] = "Ycoeff";
2958 static const char __pyx_k_append[] = "append";
2959 static const char __pyx_k_costap[] = "costap";
2960 static const char __pyx_k_custom[] = "custom";
2961 static const char __pyx_k_cutoff[] = "cutoff";
2962 static const char __pyx_k_dict_2[] = "_dict";
2963 static const char __pyx_k_errors[] = "errors";
2964 static const char __pyx_k_freq_S[] = "freq_S";
2965 static const char __pyx_k_import[] = "__import__";
2966 static const char __pyx_k_interp[] = "interp";
2967 static const char __pyx_k_linalg[] = "linalg";
2968 static const char __pyx_k_linear[] = "linear";
2969 static const char __pyx_k_module[] = "__module__";
2970 static const char __pyx_k_object[] = "object";
2971 static const char __pyx_k_omega0[] = "omega0";
2972 static const char __pyx_k_period[] = "period";
2973 static const char __pyx_k_pickle[] = "pickle";
2974 static const char __pyx_k_random[] = "random";
2975 static const char __pyx_k_reduce[] = "__reduce__";
2976 static const char __pyx_k_series[] = "series";
2977 static const char __pyx_k_tfocus[] = "tfocus";
2978 static const char __pyx_k_tolist[] = "tolist";
2979 static const char __pyx_k_tophat[] = "tophat";
2980 static const char __pyx_k_uCheck[] = "uCheck";
2981 static const char __pyx_k_update[] = "update";
2982 static const char __pyx_k_vector[] = "vector";
2983 static const char __pyx_k_xfocus[] = "xfocus";
2984 static const char __pyx_k_JONSWAP[] = "JONSWAP";
2985 static const char __pyx_k_NewWave[] = "NewWave";
2986 static const char __pyx_k_Nseries[] = "Nseries";
2987 static const char __pyx_k_Overlap[] = "Overlap";
2988 static const char __pyx_k_TWindow[] = "TWindow";
2989 static const char __pyx_k_barrier[] = "barrier";
2990 static const char __pyx_k_depth_2[] = "_depth_";
2991 static const char __pyx_k_fftfreq[] = "fftfreq";
2992 static const char __pyx_k_fim_tmp[] = "fim_tmp";
2993 static const char __pyx_k_genexpr[] = "genexpr";
2994 static const char __pyx_k_loadtxt[] = "loadtxt";
2995 static const char __pyx_k_logFile[] = "logFile";
2996 static const char __pyx_k_ncoeffs[] = "ncoeffs";
2997 static const char __pyx_k_npoints[] = "npoints";
2998 static const char __pyx_k_old_div[] = "old_div";
2999 static const char __pyx_k_periods[] = "periods";
3000 static const char __pyx_k_phiSymm[] = "phiSymm";
3001 static const char __pyx_k_prepare[] = "__prepare__";
3002 static const char __pyx_k_proteus[] = "proteus";
3003 static const char __pyx_k_results[] = "results";
3004 static const char __pyx_k_savetxt[] = "savetxt";
3005 static const char __pyx_k_timelst[] = "timelst";
3006 static const char __pyx_k_uDirect[] = "uDirect";
3007 static const char __pyx_k_uWindow[] = "uWindow";
3008 static const char __pyx_k_waveDir[] = "waveDir";
3009 static const char __pyx_k_windOut[] = "windOut";
3010 static const char __pyx_k_windows[] = "windows";
3011 static const char __pyx_k_wtError[] = "wtError";
3012 static const char __pyx_k_Cutoff_2[] = "Cutoff=";
3013 static const char __pyx_k_End_time[] = "End time= ";
3014 static const char __pyx_k_EtasetUp[] = "EtasetUp";
3015 static const char __pyx_k_Nspectra[] = "Nspectra";
3016 static const char __pyx_k_TOverlap[] = "TOverlap";
3017 static const char __pyx_k_builtins[] = "builtins";
3018 static const char __pyx_k_checkAcc[] = "checkAcc";
3019 static const char __pyx_k_dirCheck[] = "dirCheck";
3020 static const char __pyx_k_dircheck[] = "dircheck";
3021 static const char __pyx_k_duration[] = "duration";
3022 static const char __pyx_k_etaCheck[] = "etaCheck";
3023 static const char __pyx_k_eta_long[] = "eta_long";
3024 static const char __pyx_k_eta_mode[] = "eta_mode";
3025 static const char __pyx_k_funcName[] = "funcName";
3026 static const char __pyx_k_func_ret[] = "func_ret";
3027 static const char __pyx_k_getstate[] = "__getstate__";
3028 static const char __pyx_k_isMaster[] = "isMaster";
3029 static const char __pyx_k_linspace[] = "linspace";
3030 static const char __pyx_k_logEvent[] = "logEvent";
3031 static const char __pyx_k_printOut[] = "printOut";
3032 static const char __pyx_k_pyx_type[] = "__pyx_type";
3033 static const char __pyx_k_qualname[] = "__qualname__";
3034 static const char __pyx_k_rampTime[] = "rampTime";
3035 static const char __pyx_k_setstate[] = "__setstate__";
3036 static const char __pyx_k_skiprows[] = "skiprows";
3037 static const char __pyx_k_vel_mode[] = "vel_mode";
3038 static const char __pyx_k_waveDir0[] = "waveDir0";
3039 static const char __pyx_k_waveList[] = "waveList";
3040 static const char __pyx_k_waveType[] = "waveType";
3041 static const char __pyx_k_NewWave_u[] = "NewWave.u";
3042 static const char __pyx_k_Profiling[] = "Profiling";
3043 static const char __pyx_k_TypeError[] = "TypeError";
3044 static const char __pyx_k_WaveTools[] = "WaveTools";
3045 static const char __pyx_k_amplitude[] = "amplitude";
3046 static const char __pyx_k_arrayData[] = "arrayData";
3047 static const char __pyx_k_condition[] = "condition";
3048 static const char __pyx_k_conv_crit[] = "conv_crit";
3049 static const char __pyx_k_copyFiles[] = "copyFiles";
3050 static const char __pyx_k_delimiter[] = "delimiter";
3051 static const char __pyx_k_etaDirect[] = "etaDirect";
3052 static const char __pyx_k_etaWindow[] = "etaWindow";
3053 static const char __pyx_k_eta_setUp[] = "eta_setUp";
3054 static const char __pyx_k_eta_short[] = "eta_short";
3055 static const char __pyx_k_funcNames[] = "funcNames";
3056 static const char __pyx_k_metaclass[] = "__metaclass__";
3057 static const char __pyx_k_mitsuyasu[] = "mitsuyasu";
3058 static const char __pyx_k_pyx_state[] = "__pyx_state";
3059 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
3060 static const char __pyx_k_spectName[] = "spectName";
3061 static const char __pyx_k_wwi_setUp[] = "wwi_setUp";
3062 static const char __pyx_k_Etaoverall[] = "Etaoverall";
3063 static const char __pyx_k_Nwaves_tot[] = "Nwaves_tot";
3064 static const char __pyx_k_Start_Time[] = "Start Time =";
3065 static const char __pyx_k_TimeSeries[] = "TimeSeries";
3066 static const char __pyx_k_autoFenton[] = "autoFenton";
3067 static const char __pyx_k_bandFactor[] = "bandFactor";
3068 static const char __pyx_k_crestFocus[] = "crestFocus";
3069 static const char __pyx_k_cutoff_win[] = "cutoff_win";
3070 static const char __pyx_k_dispersion[] = "dispersion";
3071 static const char __pyx_k_findWindow[] = "findWindow";
3072 static const char __pyx_k_freq_array[] = "freq_array";
3073 static const char __pyx_k_past_utils[] = "past.utils";
3074 static const char __pyx_k_pyx_result[] = "__pyx_result";
3075 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
3076 static const char __pyx_k_rec_direct[] = "rec_direct";
3077 static const char __pyx_k_rotation3D[] = "rotation3D";
3078 static const char __pyx_k_runFourier[] = "runFourier";
3079 static const char __pyx_k_setVertDir[] = "setVertDir";
3080 static const char __pyx_k_spreadName[] = "spreadName";
3081 static const char __pyx_k_waveHeight[] = "waveHeight";
3082 static const char __pyx_k_waveheight[] = "waveheight";
3083 static const char __pyx_k_wavelength[] = "wavelength";
3084 static const char __pyx_k_writeInput[] = "writeInput";
3085 static const char __pyx_k_ImportError[] = "ImportError";
3086 static const char __pyx_k_NewWave_eta[] = "NewWave.eta";
3087 static const char __pyx_k_PickleError[] = "PickleError";
3088 static const char __pyx_k_RandomWaves[] = "RandomWaves";
3089 static const char __pyx_k_Tstart_temp[] = "Tstart_temp";
3090 static const char __pyx_k_cutoffTotal[] = "cutoffTotal";
3091 static const char __pyx_k_eta_overall[] = "eta_overall";
3092 static const char __pyx_k_getBYCoeffs[] = "getBYCoeffs";
3093 static const char __pyx_k_seriesArray[] = "seriesArray";
3094 static const char __pyx_k_sigmaReturn[] = "sigmaReturn";
3095 static const char __pyx_k_CombineWaves[] = "CombineWaves";
3096 static const char __pyx_k_RandomSeries[] = "RandomSeries";
3097 static const char __pyx_k_SolitaryWave[] = "SolitaryWave";
3098 static const char __pyx_k_SpatialTools[] = "SpatialTools";
3099 static const char __pyx_k_coshkzd_test[] = "coshkzd_test";
3100 static const char __pyx_k_eta_2ndOrder[] = "eta_2ndOrder";
3101 static const char __pyx_k_fastcos_test[] = "fastcos_test";
3102 static const char __pyx_k_height_steps[] = "height_steps";
3103 static const char __pyx_k_meanVelocity[] = "meanVelocity";
3104 static const char __pyx_k_normIntegral[] = "normIntegral";
3105 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
3106 static const char __pyx_k_setDirVector[] = "setDirVector";
3107 static const char __pyx_k_sinhkzd_test[] = "sinhkzd_test";
3108 static const char __pyx_k_stringsource[] = "stringsource";
3109 static const char __pyx_k_use_setstate[] = "use_setstate";
3110 static const char __pyx_k_RandomNLWaves[] = "RandomNLWaves";
3111 static const char __pyx_k_RandomWaves_u[] = "RandomWaves.u";
3112 static const char __pyx_k_SteadyCurrent[] = "SteadyCurrent";
3113 static const char __pyx_k_fastcosh_test[] = "fastcosh_test";
3114 static const char __pyx_k_fastsinh_test[] = "fastsinh_test";
3115 static const char __pyx_k_getWavelength[] = "getWavelength";
3116 static const char __pyx_k_randomNLWaves[] = "randomNLWaves_";
3117 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
3118 static const char __pyx_k_spread_params[] = "spread_params";
3119 static const char __pyx_k_window_params[] = "window_params";
3120 static const char __pyx_k_CombineWaves_u[] = "CombineWaves.u";
3121 static const char __pyx_k_SolitaryWave_u[] = "SolitaryWave.u";
3122 static const char __pyx_k_autoFentonOpts[] = "autoFentonOpts";
3123 static const char __pyx_k_proteus_fenton[] = "proteus.fenton";
3124 static const char __pyx_k_timeSeriesFile[] = "timeSeriesFile";
3125 static const char __pyx_k_validFunctions[] = "validFunctions";
3126 static const char __pyx_k_writeEtaSeries[] = "writeEtaSeries";
3127 static const char __pyx_k_RandomWavesFast[] = "RandomWavesFast";
3128 static const char __pyx_k_RandomWaves_eta[] = "RandomWaves.eta";
3129 static const char __pyx_k_SteadyCurrent_u[] = "SteadyCurrent.u";
3130 static const char __pyx_k_points_velocity[] = "points_velocity";
3131 static const char __pyx_k_points_vertical[] = "points_vertical";
3132 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
3133 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
3134 static const char __pyx_k_spectral_params[] = "spectral_params";
3135 static const char __pyx_k_CombineWaves_eta[] = "CombineWaves.eta";
3136 static const char __pyx_k_DirectionalWaves[] = "DirectionalWaves";
3137 static const char __pyx_k_SolitaryWave_eta[] = "SolitaryWave.eta";
3138 static const char __pyx_k_returnRectangles[] = "returnRectangles";
3139 static const char __pyx_k_Number_of_windows[] = "Number of windows=";
3140 static const char __pyx_k_RandomNLWavesFast[] = "RandomNLWavesFast";
3141 static const char __pyx_k_SteadyCurrent_eta[] = "SteadyCurrent.eta";
3142 static const char __pyx_k_current_criterion[] = "current_criterion";
3143 static const char __pyx_k_current_magnitude[] = "current_magnitude";
3144 static const char __pyx_k_decompose_tseries[] = "decompose_tseries";
3145 static const char __pyx_k_reduceToIntervals[] = "reduceToIntervals";
3146 static const char __pyx_k_DirectionalWaves_u[] = "DirectionalWaves.u";
3147 static const char __pyx_k_MonochromaticWaves[] = "MonochromaticWaves";
3148 static const char __pyx_k_TimeSeries_uDirect[] = "TimeSeries.uDirect";
3149 static const char __pyx_k_TimeSeries_uWindow[] = "TimeSeries.uWindow";
3150 static const char __pyx_k_TimeSeries_windOut[] = "TimeSeries.windOut";
3151 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
3152 static const char __pyx_k_points_freesurface[] = "points_freesurface";
3153 static const char __pyx_k_returnRectangles3D[] = "returnRectangles3D";
3154 static const char __pyx_k_timeSeriesPosition[] = "timeSeriesPosition";
3155 static const char __pyx_k_CombineWaves___init[] = "CombineWaves.__init__";
3156 static const char __pyx_k_RandomNLWavesFast_u[] = "RandomNLWavesFast.u";
3157 static const char __pyx_k_DirectionalWaves_eta[] = "DirectionalWaves.eta";
3158 static const char __pyx_k_MonochromaticWaves_u[] = "MonochromaticWaves.u";
3159 static const char __pyx_k_TimeSeries_etaDirect[] = "TimeSeries.etaDirect";
3160 static const char __pyx_k_TimeSeries_etaWindow[] = "TimeSeries.etaWindow";
3161 static const char __pyx_k_loadExistingFunction[] = "loadExistingFunction";
3162 static const char __pyx_k_proteus_WaveTools_py[] = "proteus/WaveTools.py";
3163 static const char __pyx_k_Direct_reconstruction[] = "Direct reconstruction? ";
3164 static const char __pyx_k_RandomNLWavesFast_eta[] = "RandomNLWavesFast.eta";
3165 static const char __pyx_k_RandomNLWaves_wtError[] = "RandomNLWaves.wtError";
3166 static const char __pyx_k_TimeSeries_findWindow[] = "TimeSeries.findWindow";
3167 static const char __pyx_k_MonochromaticWaves_eta[] = "MonochromaticWaves.eta";
3168 static const char __pyx_k_NewWave_writeEtaSeries[] = "NewWave.writeEtaSeries";
3169 static const char __pyx_k_RandomNLWaves_eta_long[] = "RandomNLWaves.eta_long";
3170 static const char __pyx_k_RandomWavesFast___init[] = "RandomWavesFast.__init__";
3171 static const char __pyx_k_cinit___locals_genexpr[] = "__cinit__.<locals>.genexpr";
3172 static const char __pyx_k_MultiSpectraRandomWaves[] = "MultiSpectraRandomWaves";
3173 static const char __pyx_k_NewWave___reduce_cython[] = "NewWave.__reduce_cython__";
3174 static const char __pyx_k_RandomNLWaves_eta_setUp[] = "RandomNLWaves.eta_setUp";
3175 static const char __pyx_k_RandomNLWaves_eta_short[] = "RandomNLWaves.eta_short";
3176 static const char __pyx_k_RandomNLWavesFast___init[] = "RandomNLWavesFast.__init__";
3177 static const char __pyx_k_RandomWavesFast_printOut[] = "RandomWavesFast.printOut";
3178 static const char __pyx_k_MultiSpectraRandomWaves_u[] = "MultiSpectraRandomWaves.u";
3179 static const char __pyx_k_NewWave___setstate_cython[] = "NewWave.__setstate_cython__";
3180 static const char __pyx_k_RandomNLWaves_eta_overall[] = "RandomNLWaves.eta_overall";
3181 static const char __pyx_k_pyx_unpickle_SolitaryWave[] = "__pyx_unpickle_SolitaryWave";
3182 static const char __pyx_k_RandomNLWaves_eta_2ndOrder[] = "RandomNLWaves.eta_2ndOrder";
3183 static const char __pyx_k_RandomWaves_writeEtaSeries[] = "RandomWaves.writeEtaSeries";
3184 static const char __pyx_k_TimeSeries___reduce_cython[] = "TimeSeries.__reduce_cython__";
3185 static const char __pyx_k_pyx_unpickle_SteadyCurrent[] = "__pyx_unpickle_SteadyCurrent";
3186 static const char __pyx_k_MultiSpectraRandomWaves_eta[] = "MultiSpectraRandomWaves.eta";
3187 static const char __pyx_k_RandomWaves___reduce_cython[] = "RandomWaves.__reduce_cython__";
3188 static const char __pyx_k_waves_This_may_take_a_while[] = " waves. This may take a while";
3189 static const char __pyx_k_RandomNLWaves_writeEtaSeries[] = "RandomNLWaves.writeEtaSeries";
3190 static const char __pyx_k_SolitaryWave___reduce_cython[] = "SolitaryWave.__reduce_cython__";
3191 static const char __pyx_k_TimeSeries___setstate_cython[] = "TimeSeries.__setstate_cython__";
3192 static const char __pyx_k_RandomNLWaves___reduce_cython[] = "RandomNLWaves.__reduce_cython__";
3193 static const char __pyx_k_RandomWaves___setstate_cython[] = "RandomWaves.__setstate_cython__";
3194 static const char __pyx_k_SteadyCurrent___reduce_cython[] = "SteadyCurrent.__reduce_cython__";
3195 static const char __pyx_k_SolitaryWave___setstate_cython[] = "SolitaryWave.__setstate_cython__";
3196 static const char __pyx_k_self_Bcoeff__self_Ycoeff__self[] = "self.Bcoeff_,self.Ycoeff_,self._cpp_eta,self._cpp_u,self.kDir_,self.mV_,self.tanhF_,self.vDir_,self.waveDir_ cannot be converted to a Python object for pickling";
3197 static const char __pyx_k_ERROR_Custom_parameters_not_set[] = "ERROR!: Custom parameters not set";
3198 static const char __pyx_k_ERROR_Wavetools_py_meanVelocity[] = "ERROR! Wavetools.py: meanVelocity should be a vector with 3 components. ";
3199 static const char __pyx_k_ERROR_Wavetools_py_phi_argument[] = "ERROR! Wavetools.py: phi argument must be an array with N elements";
3200 static const char __pyx_k_INFO_WaveTools_py_Overlap_entry[] = "INFO WaveTools.py: Overlap entry in window_params dictionary not found. Setting default value of 0.7 (70% of the window length)";
3201 static const char __pyx_k_RandomNLWaves___setstate_cython[] = "RandomNLWaves.__setstate_cython__";
3202 static const char __pyx_k_SteadyCurrent___setstate_cython[] = "SteadyCurrent.__setstate_cython__";
3203 static const char __pyx_k_This_class_is_used_for_combinin[] = "\n This class is used for combining multiple waveTools classes, thus allowing for the generation of complex wave conditions\n\n Parameters\n ----------\n waveList : list\n List of wave classes\n ";
3204 static const char __pyx_k_This_class_is_used_for_generati[] = "\n This class is used for generating plane random waves in an optimised manner\n using linear reconstruction of components from a wave spectrum\n\n Parameters\n ----------\n Tstart : float\n Start time \n Tend : float\n End time \n x0 : numpy.ndarray\n Position vector for the time series \n Tp : float\n Peak wave period\n Hs : float\n Significant wave height\n mwl : float\n Still water level\n depth : float\n Water depth\n waveDir : numpy.ndarray\n Wave direction vector\n g : Numpy array\n Gravitational acceleration vector\n N : int\n Number of frequency components\n bandFactor : float\n Spectral band factor. fmax = bandFactor/Tp, fmin = 1/(bandFactor*Tp) \n spectName : string\n Name of spectral distribution\n spectral_params : dict\n Dictionary of arguments specific to the spectral distribution\n Example for JONSWAP = {\"gamma\": 3.3, \"TMA\":True,\"depth\": depth}\n TMA=True activates the TMA modification, which in turn needs the depth as a parameter\n phi : numpy.ndarray\n Component phases (if set to None, phases are picked at random)\n Lgen : numpy.ndarray\n Length of the generation zone (np.array([0., 0., 0.]) by default\n Nwaves : int\n Number of waves per window\n Nfreq : int\n Number of Fourier components per window\n checkAcc : bool\n Switch for enabling accuracy checks\n fast : bool\n Switch for enabling optimised functions \n \n\n ";
3205 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
3206 static const char __pyx_k_DirectionalWaves___reduce_cython[] = "DirectionalWaves.__reduce_cython__";
3207 static const char __pyx_k_DirectionalWaves___setstate_cyth[] = "DirectionalWaves.__setstate_cython__";
3208 static const char __pyx_k_ERROR_Each_input_list_entry_shou[] = "ERROR!: Each input list entry should be a waveTools function with an eta function";
3209 static const char __pyx_k_ERROR_Number_of_Fourier_modes_is[] = "ERROR!!: Number of Fourier modes is not set, please define a reasonable number of Fourier modes e.g. Nf = 12";
3210 static const char __pyx_k_ERROR_WaveTools_py_Dictionary_ke[] = "ERROR! WaveTools.py: Dictionary key 'Nwaves' (waves per window) not found in window_params dictionary";
3211 static const char __pyx_k_ERROR_WaveTools_py_Found_large_e[] = "ERROR!: WaveTools.py: Found large errors error={s}) during window reconstruction at RandomWavesFast. Please a) Increase Nfreq, b) Decrease waves per window to decrease error < 1%. You can set checkAcc = False if you want to proceed with these errors";
3212 static const char __pyx_k_ERROR_WaveTools_py_Found_not_con[] = "ERROR! WaveTools.py: Found not consistent time entry between %s and %s row in %s file. Time variable must be always at the first column of the file and increasing monotonically";
3213 static const char __pyx_k_ERROR_WaveTools_py_Found_too_few[] = "ERROR!: WaveTools.py: Found too few windows in RandomWavesFast. Consider increasing Tend (this is independent from the duration of the simulation)";
3214 static const char __pyx_k_ERROR_WaveTools_py_Reconstructio[] = "ERROR! WaveTools.py: Reconstruction is expected to have two windows or more. Plese reduce the number of waves per window or switch to direct decomposition )";
3215 static const char __pyx_k_ERROR_WaveTools_py_Relaxation_zo[] = "ERROR!: WaveTools.py: Relaxation zone lenght does not allow for spatial coherency in the windows method.Please a) increase number of waves per window or b) increase overlap or c) decrease lenght of the relaxation zone";
3216 static const char __pyx_k_ERROR_WaveTools_py_Set_parameter[] = "ERROR! WaveTools.py: Set parameters for spectral windowing. Argument window_params must be a dictionary";
3217 static const char __pyx_k_ERROR_Wavetools_py_Additional_sp[] = "ERROR! Wavetools.py: Additional spectral parameters are not valid for the %s spectrum";
3218 static const char __pyx_k_ERROR_Wavetools_py_File_s_must_b[] = "ERROR! Wavetools.py: File %s must be given in .txt or .csv format";
3219 static const char __pyx_k_ERROR_Wavetools_py_Location_vect[] = "ERROR! Wavetools.py: Location vector of generation zone should not be opposite to the wave direction";
3220 static const char __pyx_k_ERROR_Wavetools_py_Maximum_numbe[] = "ERROR! Wavetools.py: Maximum number of frequencies for Random Waves is 10000 ";
3221 static const char __pyx_k_ERROR_Wavetools_py_Parameters_pa[] = "ERROR! Wavetools.py: Parameters passed in MultiSpectraRandomWaves must be in array or list form with length Nspectra ";
3222 static const char __pyx_k_ERROR_Wavetools_py_Phase_array_m[] = "ERROR! Wavetools.py: Phase array must have N elements";
3223 static const char __pyx_k_ERROR_Wavetools_py_SteadyCurrent[] = "ERROR! Wavetools.py: SteadyCurrent velocity argument needs to be a vector with length = 3";
3224 static const char __pyx_k_ERROR_Wavetools_py_Timeseries_fi[] = "ERROR! Wavetools.py: Timeseries file (%s) must have only two columns [time, eta]";
3225 static const char __pyx_k_ERROR_Wavetools_py_Wavelenght_is[] = "ERROR! Wavetools.py: Wavelenght is not defined for nonlinear waves. Enter wavelength in class arguments";
3226 static const char __pyx_k_ERROR_Wavetools_py_Window_handov[] = "ERROR! Wavetools.py: Window handover is not optimal as the cutoff is too close to the overlap. Decrease cutoff or increase overlap";
3227 static const char __pyx_k_ERROR_Wavetools_py_Wrong_functio[] = "ERROR! Wavetools.py: Wrong function type (%s) given: Valid wavetypes are %s";
3228 static const char __pyx_k_ERROR_Wavetools_py_Ycoeff_and_Bc[] = "ERROR! Wavetools.py: Ycoeff and Bcoeff must have the same length and equal to Nf and the 1st order harmonic must not be zero";
3229 static const char __pyx_k_ERROR_Wavetools_py_You_are_not_r[] = "ERROR! Wavetools.py: You are not really using more than 1000 Fourier modes for a regular wave, right? ";
3230 static const char __pyx_k_ERROR_Wavetools_py_eta_and_u_fun[] = "ERROR! Wavetools.py: eta and u functions not available for this class. Please use RandomNLWavesFast for generating random waves with nonlinear correction";
3231 static const char __pyx_k_ERROR_Wavetools_py_phi_in_Direct[] = "ERROR! Wavetools.py: phi in DirectionalWaves class must be given either as None or as a list with 2*M + 1 numpy arrays with length N";
3232 static const char __pyx_k_ERROR_Wavetools_pyx_Argument_mod[] = "ERROR! Wavetools.pyx: Argument mode in RandomNLWaves.writeEtaSeries should be \"all\", \"setup\", \"short\", \"long\" or \"linear\"";
3233 static const char __pyx_k_ERROR_Wrong_wavetype_given_Valid[] = "ERROR!!: Wrong wavetype given: Valid wavetypes are %s";
3234 static const char __pyx_k_INFO_Calculating_nonlinear_corre[] = "INFO: Calculating nonlinear corrections for ";
3235 static const char __pyx_k_INFO_WaveTools_py_Cutoff_entry_i[] = "INFO WaveTools.py: Cutoff entry in window_params dictionary not found. Setting default value of 0.1 (1/10 of the window length)";
3236 static const char __pyx_k_INFO_WaveTools_py_Not_constant_s[] = "INFO WaveTools.py: Not constant sampling rate found, proceeding to signal interpolation to a constant sampling rate";
3237 static const char __pyx_k_INFO_WaveTools_py_performing_a_d[] = "INFO: WaveTools.py: performing a direct series decomposition";
3238 static const char __pyx_k_INFO_WaveTools_py_performing_ser[] = "INFO WaveTools.py: performing series decomposition with spectral windows";
3239 static const char __pyx_k_INFO_Wavetools_py_Checking_durat[] = "INFO: Wavetools.py: Checking duration of windowed time series: %s per cent difference from original duration";
3240 static const char __pyx_k_INFO_Wavetools_py_Correcting_win[] = "INFO: Wavetools.py: Correcting window duration for matching the exact time range of the series. Window duration correspond to %s waves approx.";
3241 static const char __pyx_k_INFO_Wavetools_py_No_phase_array[] = "INFO Wavetools.py: No phase array is given. Assigning random phases. Outputing the phasing of the random waves";
3242 static const char __pyx_k_INFO_Wavetools_py_Reading_spectr[] = "INFO Wavetools.py: Reading spectra No %s";
3243 static const char __pyx_k_INFO_Wavetools_py_Using_s_window[] = "INFO: Wavetools.py: Using %s windows for reconstruction with %s sec duration and %s per cent overlap";
3244 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xe2264c7, 0x4153f8a, 0xe106827) = (U, mwl, ramp))";
3245 static const char __pyx_k_MonochromaticWaves___reduce_cyth[] = "MonochromaticWaves.__reduce_cython__";
3246 static const char __pyx_k_MonochromaticWaves___setstate_cy[] = "MonochromaticWaves.__setstate_cython__";
3247 static const char __pyx_k_MultiSpectraRandomWaves___reduce[] = "MultiSpectraRandomWaves.__reduce_cython__";
3248 static const char __pyx_k_MultiSpectraRandomWaves___setsta[] = "MultiSpectraRandomWaves.__setstate_cython__";
3249 static const char __pyx_k_Tools_for_working_with_water_wav[] = "Tools for working with water waves.\n\nThe primary objective of this module is to provide solutions (exact and\napproximate) for the free surface deformation and subsurface velocity\ncomponents of water waves. These can be used as boundary conditions, wave\ngeneration sources, and validation solutions for numerical wave codes.\n";
3250 static const char __pyx_k_Wave_direction_is_not_perpendicu[] = "Wave direction is not perpendicular to gravity vector. Check input";
3251 static const char __pyx_k_Wavetools_py_Provide_valid_depth[] = "Wavetools:py. Provide valid depth definition definition for TMA spectrum";
3252 static const char __pyx_k_Wavetools_py_Stopping_simulation[] = "Wavetools:py. Stopping simulation";
3253 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
3254 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
3255 static const char __pyx_k_self_T0__self__cpp_eta_self__cpp[] = "self.T0_,self._cpp_eta,self._cpp_u,self.ai_,self.kDir_,self.ki_,self.omega_,self.phi_,self.tanh_,self.vDir_,self.waveDir_,self.whand_ cannot be converted to a Python object for pickling";
3256 static const char __pyx_k_self_ai__self_kDir__self_ki__sel[] = "self.ai_,self.kDir_,self.ki_,self.omega_,self.phi_,self.sinhKd_,self.tanhKd_ cannot be converted to a Python object for pickling";
3257 static const char __pyx_k_This_class_is_used_for_generati_2[] = "\n This class is used for generating plane random waves with 2ns order correction in an optimised manner\n using linear reconstruction of components from a wave spectrum\n\n Parameters\n ----------\n Tstart : float\n Start time \n Tend : float\n End time \n x0 : numpy.ndarray\n Position vector for the time series \n Tp : float\n Peak wave period \n Hs : float\n Significant wave height \n mwl : float\n Still water level \n depth : float\n Water depth \n waveDir : np.ndarray\n Wave direction vector \n g : Numpy array\n Gravitational acceleration vector \n N : int\n Number of frequency components\n bandFactor : float\n Spectral band factor. fmax = bandFactor/Tp, fmin = 1/(bandFactor*Tp) \n spectName : string\n Name of spectral distribution\n spectral_params : dict\n Dictionary of arguments specific to the spectral distribution\n Example for JONSWAP = {\"gamma\": 3.3, \"TMA\":True,\"depth\": depth}\n TMA=True activates the TMA modification, which in turn needs the depth as a parameter \n phi : numpy.ndarray\n Component phases (if set to None, phases are picked at random)\n \n Lgen : numpy.ndarray\n Length of the generation zone (np.array([0., 0., 0.]) by default\n \n Nwaves : int\n Number of waves per window\n Nfreq : int\n Number of Fourier components per window\n NLongw : int\n Estmated ratio of long wave period to Tp\n fast : bool\n Switch for enabling optimised functions \n ";
3258 static const char __pyx_k_ERROR_Each_input_list_entry_shou_2[] = "ERROR!: Each input list entry should be a waveTools function with a u function";
3259 static const char __pyx_k_ERROR_WaveTools_py_Dictionary_ke_2[] = "ERROR! WaveTools.py: Dictionary key 'Tm' (mean or characteristic wave period) not found in window_params dictionary";
3260 static const char __pyx_k_ERROR_WaveTools_py_Dictionary_ke_3[] = "ERROR! WaveTools.py: Dictionary key 'Window' (window function type) not found in window_params dictionary";
3261 static const char __pyx_k_ERROR_Wavetools_py_Additional_sp_2[] = "ERROR! Wavetools.py: Additional spread parameters are not valid for the %s spectrum";
3262 static const char __pyx_k_ERROR_Wavetools_py_Location_vect_2[] = "ERROR! Wavetools.py: Location vector for timeSeries must have three-components";
3263 static const char __pyx_k_ERROR_Wavetools_py_Maximum_numbe_2[] = "ERROR! Wavetools.py: Maximum (number of frequencies) x (No of spectra) for MultispectraRandomWaves is 10000 ";
3264 static const char __pyx_k_ERROR_Wavetools_py_Maximum_numbe_3[] = "ERROR! Wavetools.py: Maximum (number of frequencies) x (No of spectra) for DirectionalWaves is 100000 ";
3265 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_2[] = "Incompatible checksums (0x%x vs (0x9a37670, 0xebc478b, 0x6d927ea) = (H, K, c, d2, d3, depth, fast, g, gAbs, mwl, trans, vDir, waveDir))";
3266 static PyObject *__pyx_n_s_Bcoeff;
3267 static PyObject *__pyx_n_s_CombineWaves;
3268 static PyObject *__pyx_n_s_CombineWaves___init;
3269 static PyObject *__pyx_n_s_CombineWaves_eta;
3270 static PyObject *__pyx_n_s_CombineWaves_u;
3271 static PyObject *__pyx_n_s_Comm;
3272 static PyObject *__pyx_n_s_Cutoff;
3273 static PyObject *__pyx_kp_s_Cutoff_2;
3274 static PyObject *__pyx_kp_s_Direct_reconstruction;
3275 static PyObject *__pyx_n_s_DirectionalWaves;
3276 static PyObject *__pyx_n_s_DirectionalWaves___reduce_cython;
3277 static PyObject *__pyx_n_s_DirectionalWaves___setstate_cyth;
3278 static PyObject *__pyx_n_s_DirectionalWaves_eta;
3279 static PyObject *__pyx_n_s_DirectionalWaves_u;
3280 static PyObject *__pyx_kp_s_ERROR_Custom_parameters_not_set;
3281 static PyObject *__pyx_kp_s_ERROR_Each_input_list_entry_shou;
3282 static PyObject *__pyx_kp_s_ERROR_Each_input_list_entry_shou_2;
3283 static PyObject *__pyx_kp_s_ERROR_Number_of_Fourier_modes_is;
3284 static PyObject *__pyx_kp_s_ERROR_WaveTools_py_Dictionary_ke;
3285 static PyObject *__pyx_kp_s_ERROR_WaveTools_py_Dictionary_ke_2;
3286 static PyObject *__pyx_kp_s_ERROR_WaveTools_py_Dictionary_ke_3;
3287 static PyObject *__pyx_kp_s_ERROR_WaveTools_py_Found_large_e;
3288 static PyObject *__pyx_kp_s_ERROR_WaveTools_py_Found_not_con;
3289 static PyObject *__pyx_kp_s_ERROR_WaveTools_py_Found_too_few;
3290 static PyObject *__pyx_kp_s_ERROR_WaveTools_py_Reconstructio;
3291 static PyObject *__pyx_kp_s_ERROR_WaveTools_py_Relaxation_zo;
3292 static PyObject *__pyx_kp_s_ERROR_WaveTools_py_Set_parameter;
3293 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_Additional_sp;
3294 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_Additional_sp_2;
3295 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_File_s_must_b;
3296 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_Location_vect;
3297 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_Location_vect_2;
3298 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_Maximum_numbe;
3299 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_Maximum_numbe_2;
3300 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_Maximum_numbe_3;
3301 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_Parameters_pa;
3302 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_Phase_array_m;
3303 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_SteadyCurrent;
3304 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_Timeseries_fi;
3305 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_Wavelenght_is;
3306 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_Window_handov;
3307 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_Wrong_functio;
3308 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_Ycoeff_and_Bc;
3309 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_You_are_not_r;
3310 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_eta_and_u_fun;
3311 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_meanVelocity;
3312 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_phi_argument;
3313 static PyObject *__pyx_kp_s_ERROR_Wavetools_py_phi_in_Direct;
3314 static PyObject *__pyx_kp_s_ERROR_Wavetools_pyx_Argument_mod;
3315 static PyObject *__pyx_kp_s_ERROR_Wrong_wavetype_given_Valid;
3316 static PyObject *__pyx_kp_s_End_time;
3317 static PyObject *__pyx_kp_s_Er1;
3318 static PyObject *__pyx_n_s_Etaoverall;
3319 static PyObject *__pyx_n_s_EtasetUp;
3320 static PyObject *__pyx_n_s_Fenton;
3321 static PyObject *__pyx_n_s_G0;
3322 static PyObject *__pyx_n_s_Hs;
3323 static PyObject *__pyx_n_s_Hs_2;
3324 static PyObject *__pyx_kp_s_INFO_Calculating_nonlinear_corre;
3325 static PyObject *__pyx_kp_s_INFO_WaveTools_py_Cutoff_entry_i;
3326 static PyObject *__pyx_kp_s_INFO_WaveTools_py_Not_constant_s;
3327 static PyObject *__pyx_kp_s_INFO_WaveTools_py_Overlap_entry;
3328 static PyObject *__pyx_kp_s_INFO_WaveTools_py_performing_a_d;
3329 static PyObject *__pyx_kp_s_INFO_WaveTools_py_performing_ser;
3330 static PyObject *__pyx_kp_s_INFO_Wavetools_py_Checking_durat;
3331 static PyObject *__pyx_kp_s_INFO_Wavetools_py_Correcting_win;
3332 static PyObject *__pyx_kp_s_INFO_Wavetools_py_No_phase_array;
3333 static PyObject *__pyx_kp_s_INFO_Wavetools_py_Reading_spectr;
3334 static PyObject *__pyx_kp_s_INFO_Wavetools_py_Using_s_window;
3335 static PyObject *__pyx_n_s_ImportError;
3336 static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
3337 static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2;
3338 static PyObject *__pyx_n_s_JONSWAP;
3339 static PyObject *__pyx_n_s_K;
3340 static PyObject *__pyx_n_s_Lgen;
3341 static PyObject *__pyx_n_s_Linear;
3342 static PyObject *__pyx_n_s_M;
3343 static PyObject *__pyx_n_s_MonochromaticWaves;
3344 static PyObject *__pyx_n_s_MonochromaticWaves___reduce_cyth;
3345 static PyObject *__pyx_n_s_MonochromaticWaves___setstate_cy;
3346 static PyObject *__pyx_n_s_MonochromaticWaves_eta;
3347 static PyObject *__pyx_n_s_MonochromaticWaves_u;
3348 static PyObject *__pyx_n_s_MultiSpectraRandomWaves;
3349 static PyObject *__pyx_n_s_MultiSpectraRandomWaves___reduce;
3350 static PyObject *__pyx_n_s_MultiSpectraRandomWaves___setsta;
3351 static PyObject *__pyx_n_s_MultiSpectraRandomWaves_eta;
3352 static PyObject *__pyx_n_s_MultiSpectraRandomWaves_u;
3353 static PyObject *__pyx_n_s_N;
3354 static PyObject *__pyx_n_s_NLongW;
3355 static PyObject *__pyx_n_s_NewWave;
3356 static PyObject *__pyx_n_s_NewWave___reduce_cython;
3357 static PyObject *__pyx_n_s_NewWave___setstate_cython;
3358 static PyObject *__pyx_n_s_NewWave_eta;
3359 static PyObject *__pyx_n_s_NewWave_u;
3360 static PyObject *__pyx_n_s_NewWave_writeEtaSeries;
3361 static PyObject *__pyx_n_s_Nf;
3362 static PyObject *__pyx_n_s_Nfreq;
3363 static PyObject *__pyx_n_s_Nmax;
3364 static PyObject *__pyx_n_s_Np;
3365 static PyObject *__pyx_n_s_Nseries;
3366 static PyObject *__pyx_n_s_Nspectra;
3367 static PyObject *__pyx_kp_s_Number_of_windows;
3368 static PyObject *__pyx_n_s_Nwaves;
3369 static PyObject *__pyx_n_s_Nwaves_tot;
3370 static PyObject *__pyx_n_s_Nwind;
3371 static PyObject *__pyx_n_s_Overlap;
3372 static PyObject *__pyx_n_s_PM_mod;
3373 static PyObject *__pyx_n_s_Period;
3374 static PyObject *__pyx_n_s_PickleError;
3375 static PyObject *__pyx_n_s_Profiling;
3376 static PyObject *__pyx_n_s_RW;
3377 static PyObject *__pyx_n_s_RandomNLWaves;
3378 static PyObject *__pyx_n_s_RandomNLWavesFast;
3379 static PyObject *__pyx_n_s_RandomNLWavesFast___init;
3380 static PyObject *__pyx_n_s_RandomNLWavesFast_eta;
3381 static PyObject *__pyx_n_s_RandomNLWavesFast_u;
3382 static PyObject *__pyx_n_s_RandomNLWaves___reduce_cython;
3383 static PyObject *__pyx_n_s_RandomNLWaves___setstate_cython;
3384 static PyObject *__pyx_n_s_RandomNLWaves_eta_2ndOrder;
3385 static PyObject *__pyx_n_s_RandomNLWaves_eta_long;
3386 static PyObject *__pyx_n_s_RandomNLWaves_eta_overall;
3387 static PyObject *__pyx_n_s_RandomNLWaves_eta_setUp;
3388 static PyObject *__pyx_n_s_RandomNLWaves_eta_short;
3389 static PyObject *__pyx_n_s_RandomNLWaves_writeEtaSeries;
3390 static PyObject *__pyx_n_s_RandomNLWaves_wtError;
3391 static PyObject *__pyx_n_s_RandomSeries;
3392 static PyObject *__pyx_n_s_RandomWaves;
3393 static PyObject *__pyx_n_s_RandomWavesFast;
3394 static PyObject *__pyx_n_s_RandomWavesFast___init;
3395 static PyObject *__pyx_n_s_RandomWavesFast_printOut;
3396 static PyObject *__pyx_n_s_RandomWaves___reduce_cython;
3397 static PyObject *__pyx_n_s_RandomWaves___setstate_cython;
3398 static PyObject *__pyx_n_s_RandomWaves_eta;
3399 static PyObject *__pyx_n_s_RandomWaves_u;
3400 static PyObject *__pyx_n_s_RandomWaves_writeEtaSeries;
3401 static PyObject *__pyx_n_s_SolitaryWave;
3402 static PyObject *__pyx_n_s_SolitaryWave___reduce_cython;
3403 static PyObject *__pyx_n_s_SolitaryWave___setstate_cython;
3404 static PyObject *__pyx_n_s_SolitaryWave_eta;
3405 static PyObject *__pyx_n_s_SolitaryWave_u;
3406 static PyObject *__pyx_n_s_SpatialTools;
3407 static PyObject *__pyx_kp_s_Start_Time;
3408 static PyObject *__pyx_n_s_SteadyCurrent;
3409 static PyObject *__pyx_n_s_SteadyCurrent___reduce_cython;
3410 static PyObject *__pyx_n_s_SteadyCurrent___setstate_cython;
3411 static PyObject *__pyx_n_s_SteadyCurrent_eta;
3412 static PyObject *__pyx_n_s_SteadyCurrent_u;
3413 static PyObject *__pyx_n_s_TMA;
3414 static PyObject *__pyx_n_s_TOverlap;
3415 static PyObject *__pyx_n_s_TS;
3416 static PyObject *__pyx_n_s_TWindow;
3417 static PyObject *__pyx_n_s_Tend;
3418 static PyObject *__pyx_kp_s_This_class_is_used_for_combinin;
3419 static PyObject *__pyx_kp_s_This_class_is_used_for_generati;
3420 static PyObject *__pyx_kp_s_This_class_is_used_for_generati_2;
3421 static PyObject *__pyx_n_s_TimeSeries;
3422 static PyObject *__pyx_n_s_TimeSeries___reduce_cython;
3423 static PyObject *__pyx_n_s_TimeSeries___setstate_cython;
3424 static PyObject *__pyx_n_s_TimeSeries_etaDirect;
3425 static PyObject *__pyx_n_s_TimeSeries_etaWindow;
3426 static PyObject *__pyx_n_s_TimeSeries_findWindow;
3427 static PyObject *__pyx_n_s_TimeSeries_uDirect;
3428 static PyObject *__pyx_n_s_TimeSeries_uWindow;
3429 static PyObject *__pyx_n_s_TimeSeries_windOut;
3430 static PyObject *__pyx_n_s_Tlag;
3431 static PyObject *__pyx_n_s_Tm;
3432 static PyObject *__pyx_n_s_Tmax;
3433 static PyObject *__pyx_n_s_Tp;
3434 static PyObject *__pyx_n_s_Tp_2;
3435 static PyObject *__pyx_n_s_Tstart;
3436 static PyObject *__pyx_n_s_Tstart_temp;
3437 static PyObject *__pyx_n_s_TypeError;
3438 static PyObject *__pyx_n_s_U;
3439 static PyObject *__pyx_n_s_UH;
3440 static PyObject *__pyx_n_s_UV;
3441 static PyObject *__pyx_n_s_Udrift;
3442 static PyObject *__pyx_n_s_Uhorz;
3443 static PyObject *__pyx_n_s_Uvert;
3444 static PyObject *__pyx_n_s_V;
3445 static PyObject *__pyx_n_s_WaveTools;
3446 static PyObject *__pyx_kp_s_Wave_direction_is_not_perpendicu;
3447 static PyObject *__pyx_kp_s_Wavetools_py_Provide_valid_depth;
3448 static PyObject *__pyx_kp_s_Wavetools_py_Stopping_simulation;
3449 static PyObject *__pyx_n_s_Window;
3450 static PyObject *__pyx_n_s_Ycoeff;
3451 static PyObject *__pyx_n_s_Z;
3452 static PyObject *__pyx_kp_s__43;
3453 static PyObject *__pyx_kp_s__52;
3454 static PyObject *__pyx_n_s_a;
3455 static PyObject *__pyx_n_s_a1;
3456 static PyObject *__pyx_n_s_a2;
3457 static PyObject *__pyx_n_s_aR;
3458 static PyObject *__pyx_n_s_aRN;
3459 static PyObject *__pyx_n_s_aa;
3460 static PyObject *__pyx_n_s_ai;
3461 static PyObject *__pyx_n_s_all;
3462 static PyObject *__pyx_n_s_all_2;
3463 static PyObject *__pyx_n_s_amp;
3464 static PyObject *__pyx_n_s_amplitude;
3465 static PyObject *__pyx_n_s_append;
3466 static PyObject *__pyx_n_s_args;
3467 static PyObject *__pyx_n_s_array;
3468 static PyObject *__pyx_n_s_arrayData;
3469 static PyObject *__pyx_n_s_autoFenton;
3470 static PyObject *__pyx_n_s_autoFentonOpts;
3471 static PyObject *__pyx_n_s_bandFactor;
3472 static PyObject *__pyx_n_s_barrier;
3473 static PyObject *__pyx_n_s_bj;
3474 static PyObject *__pyx_n_s_builtins;
3475 static PyObject *__pyx_n_s_c;
3476 static PyObject *__pyx_n_s_checkAcc;
3477 static PyObject *__pyx_n_s_cinit___locals_genexpr;
3478 static PyObject *__pyx_n_s_cline_in_traceback;
3479 static PyObject *__pyx_n_s_close;
3480 static PyObject *__pyx_n_s_cmat;
3481 static PyObject *__pyx_n_s_cmath;
3482 static PyObject *__pyx_n_s_cond;
3483 static PyObject *__pyx_n_s_condition;
3484 static PyObject *__pyx_n_s_conv_crit;
3485 static PyObject *__pyx_n_s_copyFiles;
3486 static PyObject *__pyx_n_s_cos;
3487 static PyObject *__pyx_n_s_cos2s;
3488 static PyObject *__pyx_n_s_coshkzd_test;
3489 static PyObject *__pyx_n_s_costap;
3490 static PyObject *__pyx_n_s_cppU;
3491 static PyObject *__pyx_n_s_crestFocus;
3492 static PyObject *__pyx_kp_s_csv;
3493 static PyObject *__pyx_n_s_current_criterion;
3494 static PyObject *__pyx_n_s_current_magnitude;
3495 static PyObject *__pyx_n_s_custom;
3496 static PyObject *__pyx_n_s_cut;
3497 static PyObject *__pyx_n_s_cutoff;
3498 static PyObject *__pyx_n_s_cutoffTotal;
3499 static PyObject *__pyx_n_s_cutoff_win;
3500 static PyObject *__pyx_n_s_d;
3501 static PyObject *__pyx_n_s_decompose_tseries;
3502 static PyObject *__pyx_n_s_delimiter;
3503 static PyObject *__pyx_n_s_depth;
3504 static PyObject *__pyx_n_s_depth_2;
3505 static PyObject *__pyx_n_s_df;
3506 static PyObject *__pyx_n_s_dict;
3507 static PyObject *__pyx_n_s_dict_2;
3508 static PyObject *__pyx_n_s_dirCheck;
3509 static PyObject *__pyx_n_s_dircheck;
3510 static PyObject *__pyx_n_s_dispersion;
3511 static PyObject *__pyx_n_s_doc;
3512 static PyObject *__pyx_n_s_dom;
3513 static PyObject *__pyx_n_s_dt;
3514 static PyObject *__pyx_n_s_duration;
3515 static PyObject *__pyx_n_s_er1;
3516 static PyObject *__pyx_n_s_errors;
3517 static PyObject *__pyx_n_s_eta;
3518 static PyObject *__pyx_n_s_etaCheck;
3519 static PyObject *__pyx_n_s_etaDirect;
3520 static PyObject *__pyx_n_s_etaR;
3521 static PyObject *__pyx_n_s_etaWindow;
3522 static PyObject *__pyx_n_s_eta_2ndOrder;
3523 static PyObject *__pyx_n_s_eta_long;
3524 static PyObject *__pyx_n_s_eta_mode;
3525 static PyObject *__pyx_n_s_eta_overall;
3526 static PyObject *__pyx_n_s_eta_setUp;
3527 static PyObject *__pyx_n_s_eta_short;
3528 static PyObject *__pyx_n_s_exit;
3529 static PyObject *__pyx_n_s_exp;
3530 static PyObject *__pyx_n_s_f;
3531 static PyObject *__pyx_n_s_f0;
3532 static PyObject *__pyx_n_s_fast;
3533 static PyObject *__pyx_n_s_fastcos_test;
3534 static PyObject *__pyx_n_s_fastcosh_test;
3535 static PyObject *__pyx_n_s_fastsinh_test;
3536 static PyObject *__pyx_n_s_fft;
3537 static PyObject *__pyx_n_s_fft_x;
3538 static PyObject *__pyx_n_s_fftfreq;
3539 static PyObject *__pyx_n_s_fi;
3540 static PyObject *__pyx_n_s_fim_tmp;
3541 static PyObject *__pyx_n_s_findWindow;
3542 static PyObject *__pyx_n_s_fname;
3543 static PyObject *__pyx_n_s_freq;
3544 static PyObject *__pyx_n_s_freq_S;
3545 static PyObject *__pyx_n_s_freq_array;
3546 static PyObject *__pyx_n_s_fun;
3547 static PyObject *__pyx_n_s_func;
3548 static PyObject *__pyx_n_s_funcName;
3549 static PyObject *__pyx_n_s_funcNames;
3550 static PyObject *__pyx_n_s_func_ret;
3551 static PyObject *__pyx_n_s_g;
3552 static PyObject *__pyx_n_s_gAbs;
3553 static PyObject *__pyx_n_s_gamma;
3554 static PyObject *__pyx_n_s_genexpr;
3555 static PyObject *__pyx_n_s_get;
3556 static PyObject *__pyx_n_s_getBYCoeffs;
3557 static PyObject *__pyx_n_s_getWavelength;
3558 static PyObject *__pyx_n_s_getstate;
3559 static PyObject *__pyx_n_s_height_steps;
3560 static PyObject *__pyx_n_s_ho;
3561 static PyObject *__pyx_n_s_i;
3562 static PyObject *__pyx_n_s_i1;
3563 static PyObject *__pyx_n_s_i2;
3564 static PyObject *__pyx_n_s_iend;
3565 static PyObject *__pyx_n_s_ii;
3566 static PyObject *__pyx_n_s_import;
3567 static PyObject *__pyx_n_s_init;
3568 static PyObject *__pyx_n_s_interp;
3569 static PyObject *__pyx_n_s_isMaster;
3570 static PyObject *__pyx_n_s_j;
3571 static PyObject *__pyx_n_s_jj;
3572 static PyObject *__pyx_n_s_k;
3573 static PyObject *__pyx_n_s_kAbs;
3574 static PyObject *__pyx_n_s_kDir;
3575 static PyObject *__pyx_n_s_l;
3576 static PyObject *__pyx_n_s_level;
3577 static PyObject *__pyx_n_s_linalg;
3578 static PyObject *__pyx_n_s_linear;
3579 static PyObject *__pyx_n_s_linspace;
3580 static PyObject *__pyx_n_s_loadExistingFunction;
3581 static PyObject *__pyx_n_s_loadtxt;
3582 static PyObject *__pyx_n_s_log;
3583 static PyObject *__pyx_n_s_logEvent;
3584 static PyObject *__pyx_n_s_logFile;
3585 static PyObject *__pyx_n_s_long;
3586 static PyObject *__pyx_n_s_main;
3587 static PyObject *__pyx_n_s_max;
3588 static PyObject *__pyx_n_s_mean;
3589 static PyObject *__pyx_n_s_meanVelocity;
3590 static PyObject *__pyx_n_s_metaclass;
3591 static PyObject *__pyx_n_s_mitsuyasu;
3592 static PyObject *__pyx_n_s_mode;
3593 static PyObject *__pyx_n_s_modes;
3594 static PyObject *__pyx_n_s_module;
3595 static PyObject *__pyx_n_s_mwl;
3596 static PyObject *__pyx_n_s_name;
3597 static PyObject *__pyx_n_s_ncoeffs;
3598 static PyObject *__pyx_n_s_new;
3599 static PyObject *__pyx_n_s_nfft;
3600 static PyObject *__pyx_n_s_niter;
3601 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
3602 static PyObject *__pyx_n_s_norm;
3603 static PyObject *__pyx_n_s_normIntegral;
3604 static PyObject *__pyx_n_s_np;
3605 static PyObject *__pyx_n_s_npoints;
3606 static PyObject *__pyx_n_s_numpy;
3607 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
3608 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
3609 static PyObject *__pyx_n_s_object;
3610 static PyObject *__pyx_n_s_old_div;
3611 static PyObject *__pyx_n_s_omega;
3612 static PyObject *__pyx_n_s_omega0;
3613 static PyObject *__pyx_n_s_ones;
3614 static PyObject *__pyx_n_s_open;
3615 static PyObject *__pyx_n_s_overl;
3616 static PyObject *__pyx_n_s_past_utils;
3617 static PyObject *__pyx_n_s_period;
3618 static PyObject *__pyx_n_s_periods;
3619 static PyObject *__pyx_n_s_phase;
3620 static PyObject *__pyx_n_s_phi;
3621 static PyObject *__pyx_n_s_phi0;
3622 static PyObject *__pyx_n_s_phiSymm;
3623 static PyObject *__pyx_n_s_pi;
3624 static PyObject *__pyx_n_s_pickle;
3625 static PyObject *__pyx_n_s_points_freesurface;
3626 static PyObject *__pyx_n_s_points_velocity;
3627 static PyObject *__pyx_n_s_points_vertical;
3628 static PyObject *__pyx_n_s_pp;
3629 static PyObject *__pyx_n_s_prepare;
3630 static PyObject *__pyx_n_s_print;
3631 static PyObject *__pyx_n_s_printOut;
3632 static PyObject *__pyx_n_s_proteus;
3633 static PyObject *__pyx_kp_s_proteus_WaveTools_py;
3634 static PyObject *__pyx_n_s_proteus_fenton;
3635 static PyObject *__pyx_n_s_pyx_PickleError;
3636 static PyObject *__pyx_n_s_pyx_checksum;
3637 static PyObject *__pyx_n_s_pyx_result;
3638 static PyObject *__pyx_n_s_pyx_state;
3639 static PyObject *__pyx_n_s_pyx_type;
3640 static PyObject *__pyx_n_s_pyx_unpickle_SolitaryWave;
3641 static PyObject *__pyx_n_s_pyx_unpickle_SteadyCurrent;
3642 static PyObject *__pyx_n_s_pyx_vtable;
3643 static PyObject *__pyx_n_s_qualname;
3644 static PyObject *__pyx_n_s_r;
3645 static PyObject *__pyx_n_s_rampTime;
3646 static PyObject *__pyx_n_s_rand;
3647 static PyObject *__pyx_n_s_random;
3648 static PyObject *__pyx_n_s_randomNLWaves;
3649 static PyObject *__pyx_n_s_range;
3650 static PyObject *__pyx_n_s_real;
3651 static PyObject *__pyx_n_s_rec_d;
3652 static PyObject *__pyx_n_s_rec_direct;
3653 static PyObject *__pyx_n_s_reduce;
3654 static PyObject *__pyx_n_s_reduceToIntervals;
3655 static PyObject *__pyx_n_s_reduce_cython;
3656 static PyObject *__pyx_n_s_reduce_ex;
3657 static PyObject *__pyx_n_s_results;
3658 static PyObject *__pyx_n_s_returnRectangles;
3659 static PyObject *__pyx_n_s_returnRectangles3D;
3660 static PyObject *__pyx_n_s_rotation3D;
3661 static PyObject *__pyx_n_s_round;
3662 static PyObject *__pyx_n_s_runFourier;
3663 static PyObject *__pyx_n_s_s;
3664 static PyObject *__pyx_n_s_savetxt;
3665 static PyObject *__pyx_n_s_self;
3666 static PyObject *__pyx_kp_s_self_Bcoeff__self_Ycoeff__self;
3667 static PyObject *__pyx_kp_s_self_T0__self__cpp_eta_self__cpp;
3668 static PyObject *__pyx_kp_s_self_ai__self_kDir__self_ki__sel;
3669 static PyObject *__pyx_n_s_send;
3670 static PyObject *__pyx_n_s_series;
3671 static PyObject *__pyx_n_s_seriesArray;
3672 static PyObject *__pyx_n_s_setDirVector;
3673 static PyObject *__pyx_n_s_setUp;
3674 static PyObject *__pyx_n_s_setVertDir;
3675 static PyObject *__pyx_n_s_setstate;
3676 static PyObject *__pyx_n_s_setstate_cython;
3677 static PyObject *__pyx_n_s_setup;
3678 static PyObject *__pyx_n_s_shape;
3679 static PyObject *__pyx_n_s_short;
3680 static PyObject *__pyx_n_s_sigma;
3681 static PyObject *__pyx_n_s_sigmaReturn;
3682 static PyObject *__pyx_n_s_sinh;
3683 static PyObject *__pyx_n_s_sinhkzd_test;
3684 static PyObject *__pyx_n_s_sinus;
3685 static PyObject *__pyx_n_s_skiprows;
3686 static PyObject *__pyx_n_s_smax;
3687 static PyObject *__pyx_n_s_spectName;
3688 static PyObject *__pyx_n_s_spectral_params;
3689 static PyObject *__pyx_n_s_spreadName;
3690 static PyObject *__pyx_n_s_spread_params;
3691 static PyObject *__pyx_n_s_sqrt;
3692 static PyObject *__pyx_n_s_state;
3693 static PyObject *__pyx_n_s_str;
3694 static PyObject *__pyx_kp_s_stringsource;
3695 static PyObject *__pyx_n_s_sum;
3696 static PyObject *__pyx_n_s_sys;
3697 static PyObject *__pyx_n_s_t;
3698 static PyObject *__pyx_n_s_tanh;
3699 static PyObject *__pyx_n_s_te;
3700 static PyObject *__pyx_n_s_test;
3701 static PyObject *__pyx_n_s_tfocus;
3702 static PyObject *__pyx_n_s_theta;
3703 static PyObject *__pyx_n_s_throw;
3704 static PyObject *__pyx_n_s_time;
3705 static PyObject *__pyx_n_s_timeSeriesFile;
3706 static PyObject *__pyx_n_s_timeSeriesPosition;
3707 static PyObject *__pyx_n_s_timelst;
3708 static PyObject *__pyx_n_s_tma;
3709 static PyObject *__pyx_n_s_tolist;
3710 static PyObject *__pyx_n_s_tophat;
3711 static PyObject *__pyx_n_s_trans;
3712 static PyObject *__pyx_n_s_ts;
3713 static PyObject *__pyx_n_s_tt;
3714 static PyObject *__pyx_kp_s_txt;
3715 static PyObject *__pyx_n_s_u;
3716 static PyObject *__pyx_n_s_uCheck;
3717 static PyObject *__pyx_n_s_uDirect;
3718 static PyObject *__pyx_n_s_uR;
3719 static PyObject *__pyx_n_s_uWindow;
3720 static PyObject *__pyx_n_s_update;
3721 static PyObject *__pyx_n_s_use_setstate;
3722 static PyObject *__pyx_n_s_v1;
3723 static PyObject *__pyx_n_s_v2;
3724 static PyObject *__pyx_n_s_vDir;
3725 static PyObject *__pyx_n_s_validFunctions;
3726 static PyObject *__pyx_n_s_vector;
3727 static PyObject *__pyx_n_s_vel_mode;
3728 static PyObject *__pyx_n_s_w;
3729 static PyObject *__pyx_n_s_w_aux;
3730 static PyObject *__pyx_n_s_waveDir;
3731 static PyObject *__pyx_n_s_waveDir0;
3732 static PyObject *__pyx_n_s_waveHeight;
3733 static PyObject *__pyx_n_s_waveList;
3734 static PyObject *__pyx_n_s_waveType;
3735 static PyObject *__pyx_n_s_waveheight;
3736 static PyObject *__pyx_n_s_wavelength;
3737 static PyObject *__pyx_kp_s_waves_This_may_take_a_while;
3738 static PyObject *__pyx_n_s_where;
3739 static PyObject *__pyx_n_s_wind;
3740 static PyObject *__pyx_n_s_windOut;
3741 static PyObject *__pyx_n_s_window_params;
3742 static PyObject *__pyx_n_s_windows;
3743 static PyObject *__pyx_n_s_writeEtaSeries;
3744 static PyObject *__pyx_n_s_writeInput;
3745 static PyObject *__pyx_n_s_wtError;
3746 static PyObject *__pyx_n_s_ww;
3747 static PyObject *__pyx_n_s_wwi_setUp;
3748 static PyObject *__pyx_n_s_x;
3749 static PyObject *__pyx_n_s_x0;
3750 static PyObject *__pyx_n_s_xfocus;
3751 static PyObject *__pyx_n_s_xx;
3752 static PyObject *__pyx_n_s_y;
3753 static PyObject *__pyx_n_s_zeros;
3754 static PyObject *__pyx_n_s_zip;
3755 static PyObject *__pyx_pf_9WaveTools_fastcos_test(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_phase, PyObject *__pyx_v_sinus); /* proto */
3756 static PyObject *__pyx_pf_9WaveTools_2fastcosh_test(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_k, PyObject *__pyx_v_Z, PyObject *__pyx_v_fast); /* proto */
3757 static PyObject *__pyx_pf_9WaveTools_4fastsinh_test(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_k, PyObject *__pyx_v_Z, PyObject *__pyx_v_fast); /* proto */
3758 static PyObject *__pyx_pf_9WaveTools_6coshkzd_test(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_k, PyObject *__pyx_v_Z, PyObject *__pyx_v_d, PyObject *__pyx_v_fast); /* proto */
3759 static PyObject *__pyx_pf_9WaveTools_8sinhkzd_test(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_k, PyObject *__pyx_v_Z, PyObject *__pyx_v_d, PyObject *__pyx_v_fast); /* proto */
3760 static PyObject *__pyx_pf_9WaveTools_10loadExistingFunction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_funcName, PyObject *__pyx_v_validFunctions); /* proto */
3761 static PyObject *__pyx_pf_9WaveTools_12setVertDir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_g); /* proto */
3762 static PyObject *__pyx_pf_9WaveTools_14setDirVector(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vector); /* proto */
3763 static PyObject *__pyx_pf_9WaveTools_16dirCheck(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v1, PyObject *__pyx_v_v2); /* proto */
3764 static PyObject *__pyx_pf_9WaveTools_18reduceToIntervals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fi, PyObject *__pyx_v_df); /* proto */
3765 static PyObject *__pyx_pf_9WaveTools_20returnRectangles(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_x); /* proto */
3766 static PyObject *__pyx_pf_9WaveTools_22returnRectangles3D(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
3767 static PyObject *__pyx_pf_9WaveTools_24normIntegral(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, PyObject *__pyx_v_dom); /* proto */
3768 static PyObject *__pyx_pf_9WaveTools_26eta_mode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t, PyObject *__pyx_v_kDir, PyObject *__pyx_v_omega, PyObject *__pyx_v_phi, PyObject *__pyx_v_amplitude); /* proto */
3769 static PyObject *__pyx_pf_9WaveTools_28Udrift(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_amp, PyObject *__pyx_v_gAbs, PyObject *__pyx_v_c, PyObject *__pyx_v_d); /* proto */
3770 static PyObject *__pyx_pf_9WaveTools_30vel_mode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t, PyObject *__pyx_v_kDir, PyObject *__pyx_v_kAbs, PyObject *__pyx_v_omega, PyObject *__pyx_v_phi, PyObject *__pyx_v_amplitude, PyObject *__pyx_v_mwl, PyObject *__pyx_v_depth, PyObject *__pyx_v_vDir, PyObject *__pyx_v_gAbs); /* proto */
3771 static PyObject *__pyx_pf_9WaveTools_32sigma(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_omega, PyObject *__pyx_v_omega0); /* proto */
3772 static PyObject *__pyx_pf_9WaveTools_34custom(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
3773 static PyObject *__pyx_pf_9WaveTools_36JONSWAP(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, PyObject *__pyx_v_f0, PyObject *__pyx_v_Hs, PyObject *__pyx_v_gamma, PyObject *__pyx_v_TMA, PyObject *__pyx_v_depth); /* proto */
3774 static PyObject *__pyx_pf_9WaveTools_38PM_mod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, PyObject *__pyx_v_f0, PyObject *__pyx_v_Hs); /* proto */
3775 static PyObject *__pyx_pf_9WaveTools_40cos2s(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_theta, PyObject *__pyx_v_f, PyObject *__pyx_v_s); /* proto */
3776 static PyObject *__pyx_pf_9WaveTools_42mitsuyasu(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_theta, PyObject *__pyx_v_fi, PyObject *__pyx_v_f0, PyObject *__pyx_v_smax); /* proto */
3777 static PyObject *__pyx_pf_9WaveTools_44dispersion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_w, PyObject *__pyx_v_d, PyObject *__pyx_v_g, PyObject *__pyx_v_niter); /* proto */
3778 static PyObject *__pyx_pf_9WaveTools_46tophat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_l, PyObject *__pyx_v_cutoff); /* proto */
3779 static PyObject *__pyx_pf_9WaveTools_48costap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_l, PyObject *__pyx_v_cutoff); /* proto */
3780 static PyObject *__pyx_pf_9WaveTools_50decompose_tseries(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_time, PyObject *__pyx_v_eta, PyObject *__pyx_v_dt); /* proto */
3781 static int __pyx_pf_9WaveTools_13SteadyCurrent___init__(struct __pyx_obj_9WaveTools_SteadyCurrent *__pyx_v_self, PyObject *__pyx_v_U, PyObject *__pyx_v_mwl, PyObject *__pyx_v_rampTime); /* proto */
3782 static PyObject *__pyx_pf_9WaveTools_13SteadyCurrent_2eta(CYTHON_UNUSED struct __pyx_obj_9WaveTools_SteadyCurrent *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_t); /* proto */
3783 static PyObject *__pyx_pf_9WaveTools_13SteadyCurrent_4u(struct __pyx_obj_9WaveTools_SteadyCurrent *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3784 static PyObject *__pyx_pf_9WaveTools_13SteadyCurrent_3mwl___get__(struct __pyx_obj_9WaveTools_SteadyCurrent *__pyx_v_self); /* proto */
3785 static int __pyx_pf_9WaveTools_13SteadyCurrent_3mwl_2__set__(struct __pyx_obj_9WaveTools_SteadyCurrent *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3786 static PyObject *__pyx_pf_9WaveTools_13SteadyCurrent_6__reduce_cython__(struct __pyx_obj_9WaveTools_SteadyCurrent *__pyx_v_self); /* proto */
3787 static PyObject *__pyx_pf_9WaveTools_13SteadyCurrent_8__setstate_cython__(struct __pyx_obj_9WaveTools_SteadyCurrent *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
3788 static int __pyx_pf_9WaveTools_12SolitaryWave___init__(struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self, PyObject *__pyx_v_waveHeight, PyObject *__pyx_v_mwl, PyObject *__pyx_v_depth, PyObject *__pyx_v_g, PyObject *__pyx_v_waveDir, PyObject *__pyx_v_trans, PyObject *__pyx_v_fast); /* proto */
3789 static PyObject *__pyx_pf_9WaveTools_12SolitaryWave_2eta(struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3790 static PyObject *__pyx_pf_9WaveTools_12SolitaryWave_4u(struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3791 static PyObject *__pyx_pf_9WaveTools_12SolitaryWave_3mwl___get__(struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self); /* proto */
3792 static int __pyx_pf_9WaveTools_12SolitaryWave_3mwl_2__set__(struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3793 static PyObject *__pyx_pf_9WaveTools_12SolitaryWave_1c___get__(struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self); /* proto */
3794 static int __pyx_pf_9WaveTools_12SolitaryWave_1c_2__set__(struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3795 static PyObject *__pyx_pf_9WaveTools_12SolitaryWave_6__reduce_cython__(struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self); /* proto */
3796 static PyObject *__pyx_pf_9WaveTools_12SolitaryWave_8__setstate_cython__(struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
3797 static int __pyx_pf_9WaveTools_18MonochromaticWaves___init__(struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self, PyObject *__pyx_v_period, PyObject *__pyx_v_waveHeight, PyObject *__pyx_v_mwl, PyObject *__pyx_v_depth, PyObject *__pyx_v_g, PyObject *__pyx_v_waveDir, PyObject *__pyx_v_wavelength, PyObject *__pyx_v_waveType, PyObject *__pyx_v_autoFenton, PyObject *__pyx_v_autoFentonOpts, PyObject *__pyx_v_Ycoeff, PyObject *__pyx_v_Bcoeff, PyObject *__pyx_v_Nf, PyObject *__pyx_v_meanVelocity, PyObject *__pyx_v_phi0, PyObject *__pyx_v_fast); /* proto */
3798 static PyObject *__pyx_pf_9WaveTools_18MonochromaticWaves_2eta(struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3799 static PyObject *__pyx_pf_9WaveTools_18MonochromaticWaves_4u(struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3800 static PyObject *__pyx_pf_9WaveTools_18MonochromaticWaves_10wavelength___get__(struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self); /* proto */
3801 static int __pyx_pf_9WaveTools_18MonochromaticWaves_10wavelength_2__set__(struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3802 static PyObject *__pyx_pf_9WaveTools_18MonochromaticWaves_3mwl___get__(struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self); /* proto */
3803 static int __pyx_pf_9WaveTools_18MonochromaticWaves_3mwl_2__set__(struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3804 static PyObject *__pyx_pf_9WaveTools_18MonochromaticWaves_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self); /* proto */
3805 static PyObject *__pyx_pf_9WaveTools_18MonochromaticWaves_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3806 static PyObject *__pyx_pf_9WaveTools_7NewWave_9__cinit___genexpr(PyObject *__pyx_self); /* proto */
3807 static int __pyx_pf_9WaveTools_7NewWave___cinit__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_Tp, PyObject *__pyx_v_Hs, PyObject *__pyx_v_mwl, PyObject *__pyx_v_depth, PyObject *__pyx_v_waveDir, PyObject *__pyx_v_g, PyObject *__pyx_v_N, PyObject *__pyx_v_bandFactor, PyObject *__pyx_v_spectName, PyObject *__pyx_v_spectral_params, CYTHON_UNUSED PyObject *__pyx_v_crestFocus, PyObject *__pyx_v_xfocus, PyObject *__pyx_v_tfocus, PyObject *__pyx_v_fast, PyObject *__pyx_v_Nmax); /* proto */
3808 static PyObject *__pyx_pf_9WaveTools_7NewWave_2eta(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3809 static PyObject *__pyx_pf_9WaveTools_7NewWave_4u(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3810 static PyObject *__pyx_pf_9WaveTools_7NewWave_6writeEtaSeries(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_Tstart, PyObject *__pyx_v_Tend, PyObject *__pyx_v_x0, PyObject *__pyx_v_fname, PyObject *__pyx_v_Lgen); /* proto */
3811 static PyObject *__pyx_pf_9WaveTools_7NewWave_3mwl___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3812 static int __pyx_pf_9WaveTools_7NewWave_3mwl_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3813 static PyObject *__pyx_pf_9WaveTools_7NewWave_5depth___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3814 static int __pyx_pf_9WaveTools_7NewWave_5depth_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3815 static PyObject *__pyx_pf_9WaveTools_7NewWave_4gAbs___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3816 static int __pyx_pf_9WaveTools_7NewWave_4gAbs_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3817 static PyObject *__pyx_pf_9WaveTools_7NewWave_4Tlag___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3818 static int __pyx_pf_9WaveTools_7NewWave_4Tlag_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3819 static PyObject *__pyx_pf_9WaveTools_7NewWave_2Hs___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3820 static int __pyx_pf_9WaveTools_7NewWave_2Hs_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3821 static PyObject *__pyx_pf_9WaveTools_7NewWave_2Tp___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3822 static int __pyx_pf_9WaveTools_7NewWave_2Tp_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3823 static PyObject *__pyx_pf_9WaveTools_7NewWave_2fp___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3824 static int __pyx_pf_9WaveTools_7NewWave_2fp_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3825 static PyObject *__pyx_pf_9WaveTools_7NewWave_10bandFactor___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3826 static int __pyx_pf_9WaveTools_7NewWave_10bandFactor_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3827 static PyObject *__pyx_pf_9WaveTools_7NewWave_2df___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3828 static int __pyx_pf_9WaveTools_7NewWave_2df_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3829 static PyObject *__pyx_pf_9WaveTools_7NewWave_5focus___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3830 static int __pyx_pf_9WaveTools_7NewWave_5focus_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3831 static PyObject *__pyx_pf_9WaveTools_7NewWave_6tfocus___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3832 static int __pyx_pf_9WaveTools_7NewWave_6tfocus_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3833 static PyObject *__pyx_pf_9WaveTools_7NewWave_1N___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3834 static int __pyx_pf_9WaveTools_7NewWave_1N_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3835 static PyObject *__pyx_pf_9WaveTools_7NewWave_2fi___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3836 static int __pyx_pf_9WaveTools_7NewWave_2fi_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3837 static int __pyx_pf_9WaveTools_7NewWave_2fi_4__del__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3838 static PyObject *__pyx_pf_9WaveTools_7NewWave_3fim___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3839 static int __pyx_pf_9WaveTools_7NewWave_3fim_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3840 static int __pyx_pf_9WaveTools_7NewWave_3fim_4__del__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3841 static PyObject *__pyx_pf_9WaveTools_7NewWave_5Si_Jm___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3842 static int __pyx_pf_9WaveTools_7NewWave_5Si_Jm_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3843 static int __pyx_pf_9WaveTools_7NewWave_5Si_Jm_4__del__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3844 static PyObject *__pyx_pf_9WaveTools_7NewWave_2ki___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3845 static int __pyx_pf_9WaveTools_7NewWave_2ki_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3846 static int __pyx_pf_9WaveTools_7NewWave_2ki_4__del__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3847 static PyObject *__pyx_pf_9WaveTools_7NewWave_5omega___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3848 static int __pyx_pf_9WaveTools_7NewWave_5omega_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3849 static int __pyx_pf_9WaveTools_7NewWave_5omega_4__del__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3850 static PyObject *__pyx_pf_9WaveTools_7NewWave_5tanhF___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3851 static int __pyx_pf_9WaveTools_7NewWave_5tanhF_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3852 static int __pyx_pf_9WaveTools_7NewWave_5tanhF_4__del__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3853 static PyObject *__pyx_pf_9WaveTools_7NewWave_1g___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3854 static int __pyx_pf_9WaveTools_7NewWave_1g_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3855 static int __pyx_pf_9WaveTools_7NewWave_1g_4__del__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3856 static PyObject *__pyx_pf_9WaveTools_7NewWave_7waveDir___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3857 static int __pyx_pf_9WaveTools_7NewWave_7waveDir_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3858 static int __pyx_pf_9WaveTools_7NewWave_7waveDir_4__del__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3859 static PyObject *__pyx_pf_9WaveTools_7NewWave_4vDir___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3860 static int __pyx_pf_9WaveTools_7NewWave_4vDir_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3861 static int __pyx_pf_9WaveTools_7NewWave_4vDir_4__del__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3862 static PyObject *__pyx_pf_9WaveTools_7NewWave_4kDir___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3863 static int __pyx_pf_9WaveTools_7NewWave_4kDir_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3864 static int __pyx_pf_9WaveTools_7NewWave_4kDir_4__del__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3865 static PyObject *__pyx_pf_9WaveTools_7NewWave_2ai___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3866 static int __pyx_pf_9WaveTools_7NewWave_2ai_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3867 static int __pyx_pf_9WaveTools_7NewWave_2ai_4__del__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3868 static PyObject *__pyx_pf_9WaveTools_7NewWave_3phi___get__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3869 static int __pyx_pf_9WaveTools_7NewWave_3phi_2__set__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3870 static int __pyx_pf_9WaveTools_7NewWave_3phi_4__del__(struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3871 static PyObject *__pyx_pf_9WaveTools_7NewWave_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self); /* proto */
3872 static PyObject *__pyx_pf_9WaveTools_7NewWave_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3873 static int __pyx_pf_9WaveTools_11RandomWaves___cinit__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_Tp, PyObject *__pyx_v_Hs, PyObject *__pyx_v_mwl, PyObject *__pyx_v_depth, PyObject *__pyx_v_waveDir, PyObject *__pyx_v_g, PyObject *__pyx_v_N, PyObject *__pyx_v_bandFactor, PyObject *__pyx_v_spectName, PyObject *__pyx_v_spectral_params, PyObject *__pyx_v_phi, PyObject *__pyx_v_fast); /* proto */
3874 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2eta(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3875 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_4u(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3876 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_6writeEtaSeries(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_Tstart, PyObject *__pyx_v_Tend, PyObject *__pyx_v_x0, PyObject *__pyx_v_fname, PyObject *__pyx_v_Lgen); /* proto */
3877 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_3mwl___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3878 static int __pyx_pf_9WaveTools_11RandomWaves_3mwl_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3879 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_5depth___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3880 static int __pyx_pf_9WaveTools_11RandomWaves_5depth_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3881 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_4gAbs___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3882 static int __pyx_pf_9WaveTools_11RandomWaves_4gAbs_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3883 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_4Tlag___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3884 static int __pyx_pf_9WaveTools_11RandomWaves_4Tlag_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3885 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2Hs___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3886 static int __pyx_pf_9WaveTools_11RandomWaves_2Hs_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3887 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2Tp___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3888 static int __pyx_pf_9WaveTools_11RandomWaves_2Tp_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3889 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2fp___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3890 static int __pyx_pf_9WaveTools_11RandomWaves_2fp_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3891 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_10bandFactor___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3892 static int __pyx_pf_9WaveTools_11RandomWaves_10bandFactor_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3893 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2df___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3894 static int __pyx_pf_9WaveTools_11RandomWaves_2df_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3895 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_10wavelength___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3896 static int __pyx_pf_9WaveTools_11RandomWaves_10wavelength_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3897 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_1N___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3898 static int __pyx_pf_9WaveTools_11RandomWaves_1N_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3899 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2fi___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3900 static int __pyx_pf_9WaveTools_11RandomWaves_2fi_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3901 static int __pyx_pf_9WaveTools_11RandomWaves_2fi_4__del__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3902 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_3fim___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3903 static int __pyx_pf_9WaveTools_11RandomWaves_3fim_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3904 static int __pyx_pf_9WaveTools_11RandomWaves_3fim_4__del__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3905 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_5Si_Jm___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3906 static int __pyx_pf_9WaveTools_11RandomWaves_5Si_Jm_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3907 static int __pyx_pf_9WaveTools_11RandomWaves_5Si_Jm_4__del__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3908 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2ki___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3909 static int __pyx_pf_9WaveTools_11RandomWaves_2ki_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3910 static int __pyx_pf_9WaveTools_11RandomWaves_2ki_4__del__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3911 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_5omega___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3912 static int __pyx_pf_9WaveTools_11RandomWaves_5omega_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3913 static int __pyx_pf_9WaveTools_11RandomWaves_5omega_4__del__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3914 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_5tanhF___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3915 static int __pyx_pf_9WaveTools_11RandomWaves_5tanhF_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3916 static int __pyx_pf_9WaveTools_11RandomWaves_5tanhF_4__del__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3917 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_1g___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3918 static int __pyx_pf_9WaveTools_11RandomWaves_1g_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3919 static int __pyx_pf_9WaveTools_11RandomWaves_1g_4__del__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3920 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_7waveDir___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3921 static int __pyx_pf_9WaveTools_11RandomWaves_7waveDir_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3922 static int __pyx_pf_9WaveTools_11RandomWaves_7waveDir_4__del__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3923 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_4vDir___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3924 static int __pyx_pf_9WaveTools_11RandomWaves_4vDir_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3925 static int __pyx_pf_9WaveTools_11RandomWaves_4vDir_4__del__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3926 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_4kDir___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3927 static int __pyx_pf_9WaveTools_11RandomWaves_4kDir_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3928 static int __pyx_pf_9WaveTools_11RandomWaves_4kDir_4__del__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3929 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2ai___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3930 static int __pyx_pf_9WaveTools_11RandomWaves_2ai_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3931 static int __pyx_pf_9WaveTools_11RandomWaves_2ai_4__del__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3932 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_3phi___get__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3933 static int __pyx_pf_9WaveTools_11RandomWaves_3phi_2__set__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3934 static int __pyx_pf_9WaveTools_11RandomWaves_3phi_4__del__(struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3935 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self); /* proto */
3936 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3937 static int __pyx_pf_9WaveTools_23MultiSpectraRandomWaves___cinit__(struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self, PyObject *__pyx_v_Nspectra, PyObject *__pyx_v_Tp, PyObject *__pyx_v_Hs, PyObject *__pyx_v_mwl, PyObject *__pyx_v_depth, PyObject *__pyx_v_waveDir, PyObject *__pyx_v_g, PyObject *__pyx_v_N, PyObject *__pyx_v_bandFactor, PyObject *__pyx_v_spectName, PyObject *__pyx_v_spectral_params, PyObject *__pyx_v_phi, PyObject *__pyx_v_fast); /* proto */
3938 static PyObject *__pyx_pf_9WaveTools_23MultiSpectraRandomWaves_2eta(struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3939 static PyObject *__pyx_pf_9WaveTools_23MultiSpectraRandomWaves_4u(struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3940 static PyObject *__pyx_pf_9WaveTools_23MultiSpectraRandomWaves_3mwl___get__(struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self); /* proto */
3941 static int __pyx_pf_9WaveTools_23MultiSpectraRandomWaves_3mwl_2__set__(struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3942 static PyObject *__pyx_pf_9WaveTools_23MultiSpectraRandomWaves_5depth___get__(struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self); /* proto */
3943 static int __pyx_pf_9WaveTools_23MultiSpectraRandomWaves_5depth_2__set__(struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3944 static PyObject *__pyx_pf_9WaveTools_23MultiSpectraRandomWaves_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self); /* proto */
3945 static PyObject *__pyx_pf_9WaveTools_23MultiSpectraRandomWaves_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3946 static int __pyx_pf_9WaveTools_16DirectionalWaves___cinit__(struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self, PyObject *__pyx_v_M, PyObject *__pyx_v_Tp, PyObject *__pyx_v_Hs, PyObject *__pyx_v_mwl, PyObject *__pyx_v_depth, PyObject *__pyx_v_waveDir0, PyObject *__pyx_v_g, PyObject *__pyx_v_N, PyObject *__pyx_v_bandFactor, PyObject *__pyx_v_spectName, PyObject *__pyx_v_spreadName, PyObject *__pyx_v_spectral_params, PyObject *__pyx_v_spread_params, PyObject *__pyx_v_phi, PyObject *__pyx_v_phiSymm, PyObject *__pyx_v_fast); /* proto */
3947 static PyObject *__pyx_pf_9WaveTools_16DirectionalWaves_2eta(struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3948 static PyObject *__pyx_pf_9WaveTools_16DirectionalWaves_4u(struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3949 static PyObject *__pyx_pf_9WaveTools_16DirectionalWaves_3mwl___get__(struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self); /* proto */
3950 static int __pyx_pf_9WaveTools_16DirectionalWaves_3mwl_2__set__(struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3951 static PyObject *__pyx_pf_9WaveTools_16DirectionalWaves_5depth___get__(struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self); /* proto */
3952 static int __pyx_pf_9WaveTools_16DirectionalWaves_5depth_2__set__(struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3953 static PyObject *__pyx_pf_9WaveTools_16DirectionalWaves_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self); /* proto */
3954 static PyObject *__pyx_pf_9WaveTools_16DirectionalWaves_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3955 static int __pyx_pf_9WaveTools_10TimeSeries___init__(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_timeSeriesFile, PyObject *__pyx_v_skiprows, PyObject *__pyx_v_timeSeriesPosition, PyObject *__pyx_v_depth, PyObject *__pyx_v_N, PyObject *__pyx_v_mwl, PyObject *__pyx_v_waveDir, PyObject *__pyx_v_g, PyObject *__pyx_v_cutoffTotal, PyObject *__pyx_v_rec_direct, PyObject *__pyx_v_window_params, PyObject *__pyx_v_arrayData, PyObject *__pyx_v_seriesArray, PyObject *__pyx_v_Lgen, PyObject *__pyx_v_fast); /* proto */
3956 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_2windOut(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self); /* proto */
3957 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_4etaDirect(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3958 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_6uDirect(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3959 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_8findWindow(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_t); /* proto */
3960 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_10etaWindow(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3961 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_12uWindow(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3962 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_10wavelength___get__(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self); /* proto */
3963 static int __pyx_pf_9WaveTools_10TimeSeries_10wavelength_2__set__(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3964 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_3mwl___get__(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self); /* proto */
3965 static int __pyx_pf_9WaveTools_10TimeSeries_3mwl_2__set__(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3966 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_3eta___get__(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self); /* proto */
3967 static int __pyx_pf_9WaveTools_10TimeSeries_3eta_2__set__(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3968 static int __pyx_pf_9WaveTools_10TimeSeries_3eta_4__del__(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self); /* proto */
3969 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_1u___get__(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self); /* proto */
3970 static int __pyx_pf_9WaveTools_10TimeSeries_1u_2__set__(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3971 static int __pyx_pf_9WaveTools_10TimeSeries_1u_4__del__(struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self); /* proto */
3972 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self); /* proto */
3973 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3974 static PyObject *__pyx_pf_9WaveTools_15RandomWavesFast___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_Tstart, PyObject *__pyx_v_Tend, PyObject *__pyx_v_x0, PyObject *__pyx_v_Tp, PyObject *__pyx_v_Hs, PyObject *__pyx_v_mwl, PyObject *__pyx_v_depth, PyObject *__pyx_v_waveDir, PyObject *__pyx_v_g, PyObject *__pyx_v_N, PyObject *__pyx_v_bandFactor, PyObject *__pyx_v_spectName, PyObject *__pyx_v_spectral_params, PyObject *__pyx_v_phi, PyObject *__pyx_v_Lgen, PyObject *__pyx_v_Nwaves, PyObject *__pyx_v_Nfreq, PyObject *__pyx_v_checkAcc, PyObject *__pyx_v_fast); /* proto */
3975 static PyObject *__pyx_pf_9WaveTools_15RandomWavesFast_2printOut(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
3976 static int __pyx_pf_9WaveTools_13RandomNLWaves___init__(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_Tstart, CYTHON_UNUSED PyObject *__pyx_v_Tend, PyObject *__pyx_v_Tp, PyObject *__pyx_v_Hs, PyObject *__pyx_v_mwl, PyObject *__pyx_v_depth, PyObject *__pyx_v_waveDir, PyObject *__pyx_v_g, PyObject *__pyx_v_N, PyObject *__pyx_v_bandFactor, PyObject *__pyx_v_spectName, PyObject *__pyx_v_spectral_params, PyObject *__pyx_v_phi, PyObject *__pyx_v_fast); /* proto */
3977 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_2eta_2ndOrder(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3978 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_4eta_short(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3979 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_6eta_long(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3980 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_8eta_setUp(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_t); /* proto */
3981 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_10eta_overall(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t, PyObject *__pyx_v_setUp); /* proto */
3982 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_12writeEtaSeries(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, PyObject *__pyx_v_Tstart, PyObject *__pyx_v_Tend, PyObject *__pyx_v_dt, PyObject *__pyx_v_x0, PyObject *__pyx_v_fname, PyObject *__pyx_v_mode, PyObject *__pyx_v_setUp, PyObject *__pyx_v_Lgen); /* proto */
3983 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_14wtError(CYTHON_UNUSED struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_t); /* proto */
3984 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_3eta___get__(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self); /* proto */
3985 static int __pyx_pf_9WaveTools_13RandomNLWaves_3eta_2__set__(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3986 static int __pyx_pf_9WaveTools_13RandomNLWaves_3eta_4__del__(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self); /* proto */
3987 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_1u___get__(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self); /* proto */
3988 static int __pyx_pf_9WaveTools_13RandomNLWaves_1u_2__set__(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3989 static int __pyx_pf_9WaveTools_13RandomNLWaves_1u_4__del__(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self); /* proto */
3990 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_10eta_linear___get__(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self); /* proto */
3991 static int __pyx_pf_9WaveTools_13RandomNLWaves_10eta_linear_2__set__(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3992 static int __pyx_pf_9WaveTools_13RandomNLWaves_10eta_linear_4__del__(struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self); /* proto */
3993 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self); /* proto */
3994 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3995 static PyObject *__pyx_pf_9WaveTools_56__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
3996 static PyObject *__pyx_pf_9WaveTools_17RandomNLWavesFast___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_Tstart, PyObject *__pyx_v_Tend, PyObject *__pyx_v_x0, PyObject *__pyx_v_Tp, PyObject *__pyx_v_Hs, PyObject *__pyx_v_mwl, PyObject *__pyx_v_depth, PyObject *__pyx_v_waveDir, PyObject *__pyx_v_g, PyObject *__pyx_v_N, PyObject *__pyx_v_bandFactor, PyObject *__pyx_v_spectName, PyObject *__pyx_v_spectral_params, PyObject *__pyx_v_phi, PyObject *__pyx_v_Lgen, PyObject *__pyx_v_Nwaves, PyObject *__pyx_v_Nfreq, PyObject *__pyx_v_NLongW, PyObject *__pyx_v_fast); /* proto */
3997 static PyObject *__pyx_pf_9WaveTools_17RandomNLWavesFast_2eta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3998 static PyObject *__pyx_pf_9WaveTools_17RandomNLWavesFast_4u(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
3999 static PyObject *__pyx_pf_9WaveTools_12CombineWaves___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_waveList); /* proto */
4000 static PyObject *__pyx_pf_9WaveTools_12CombineWaves_2eta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
4001 static PyObject *__pyx_pf_9WaveTools_12CombineWaves_4u(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t); /* proto */
4002 static PyObject *__pyx_pf_9WaveTools_52__pyx_unpickle_SteadyCurrent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
4003 static PyObject *__pyx_pf_9WaveTools_54__pyx_unpickle_SolitaryWave(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
4004 static PyObject *__pyx_tp_new_9WaveTools_SteadyCurrent(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4005 static PyObject *__pyx_tp_new_9WaveTools_SolitaryWave(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4006 static PyObject *__pyx_tp_new_9WaveTools_MonochromaticWaves(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4007 static PyObject *__pyx_tp_new_9WaveTools_NewWave(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4008 static PyObject *__pyx_tp_new_9WaveTools_RandomWaves(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4009 static PyObject *__pyx_tp_new_9WaveTools_MultiSpectraRandomWaves(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4010 static PyObject *__pyx_tp_new_9WaveTools_DirectionalWaves(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4011 static PyObject *__pyx_tp_new_9WaveTools_TimeSeries(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4012 static PyObject *__pyx_tp_new_9WaveTools_RandomNLWaves(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4013 static PyObject *__pyx_tp_new_9WaveTools___pyx_scope_struct____cinit__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4014 static PyObject *__pyx_tp_new_9WaveTools___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4015 static PyObject *__pyx_float_0_;
4016 static PyObject *__pyx_float_1_;
4017 static PyObject *__pyx_float_2_;
4018 static PyObject *__pyx_float_4_;
4019 static PyObject *__pyx_float_0_1;
4020 static PyObject *__pyx_float_0_2;
4021 static PyObject *__pyx_float_0_5;
4022 static PyObject *__pyx_float_0_7;
4023 static PyObject *__pyx_float_1_0;
4024 static PyObject *__pyx_float_1_1;
4025 static PyObject *__pyx_float_1_5;
4026 static PyObject *__pyx_float_1_9;
4027 static PyObject *__pyx_float_10_;
4028 static PyObject *__pyx_float_16_;
4029 static PyObject *__pyx_float_2_0;
4030 static PyObject *__pyx_float_3_0;
4031 static PyObject *__pyx_float_3_3;
4032 static PyObject *__pyx_float_4_0;
4033 static PyObject *__pyx_float_5_0;
4034 static PyObject *__pyx_float_50_;
4035 static PyObject *__pyx_float_0_01;
4036 static PyObject *__pyx_float_0_07;
4037 static PyObject *__pyx_float_0_09;
4038 static PyObject *__pyx_float_0_23;
4039 static PyObject *__pyx_float_16_0;
4040 static PyObject *__pyx_float_9_81;
4041 static PyObject *__pyx_float_0_185;
4042 static PyObject *__pyx_float_1eneg_05;
4043 static PyObject *__pyx_float_1eneg_10;
4044 static PyObject *__pyx_float_0_0336;
4045 static PyObject *__pyx_float_neg_2_5;
4046 static PyObject *__pyx_float_neg_5_0;
4047 static PyObject *__pyx_float_neg_1_25;
4048 static PyObject *__pyx_int_0;
4049 static PyObject *__pyx_int_1;
4050 static PyObject *__pyx_int_2;
4051 static PyObject *__pyx_int_3;
4052 static PyObject *__pyx_int_4;
4053 static PyObject *__pyx_int_5;
4054 static PyObject *__pyx_int_10;
4055 static PyObject *__pyx_int_15;
4056 static PyObject *__pyx_int_16;
4057 static PyObject *__pyx_int_20;
4058 static PyObject *__pyx_int_32;
4059 static PyObject *__pyx_int_40;
4060 static PyObject *__pyx_int_50;
4061 static PyObject *__pyx_int_999;
4062 static PyObject *__pyx_int_1000;
4063 static PyObject *__pyx_int_68501386;
4064 static PyObject *__pyx_int_114894826;
4065 static PyObject *__pyx_int_161707632;
4066 static PyObject *__pyx_int_235956263;
4067 static PyObject *__pyx_int_237135047;
4068 static PyObject *__pyx_int_247220107;
4069 static PyObject *__pyx_int_neg_1;
4070 static PyObject *__pyx_int_neg_4;
4071 static PyObject *__pyx_k__12;
4072 static PyObject *__pyx_k__13;
4073 static PyObject *__pyx_k__14;
4074 static PyObject *__pyx_k__15;
4075 static PyObject *__pyx_k__22;
4076 static PyObject *__pyx_k__24;
4077 static PyObject *__pyx_k__29;
4078 static PyObject *__pyx_k__40;
4079 static PyObject *__pyx_k__51;
4080 static PyObject *__pyx_tuple_;
4081 static PyObject *__pyx_slice__2;
4082 static PyObject *__pyx_slice__3;
4083 static PyObject *__pyx_slice__4;
4084 static PyObject *__pyx_tuple__5;
4085 static PyObject *__pyx_tuple__6;
4086 static PyObject *__pyx_tuple__7;
4087 static PyObject *__pyx_tuple__8;
4088 static PyObject *__pyx_tuple__9;
4089 static PyObject *__pyx_slice__42;
4090 static PyObject *__pyx_tuple__10;
4091 static PyObject *__pyx_tuple__11;
4092 static PyObject *__pyx_tuple__16;
4093 static PyObject *__pyx_tuple__17;
4094 static PyObject *__pyx_tuple__18;
4095 static PyObject *__pyx_tuple__19;
4096 static PyObject *__pyx_tuple__20;
4097 static PyObject *__pyx_tuple__21;
4098 static PyObject *__pyx_tuple__23;
4099 static PyObject *__pyx_tuple__25;
4100 static PyObject *__pyx_tuple__26;
4101 static PyObject *__pyx_tuple__27;
4102 static PyObject *__pyx_tuple__28;
4103 static PyObject *__pyx_tuple__30;
4104 static PyObject *__pyx_tuple__31;
4105 static PyObject *__pyx_tuple__32;
4106 static PyObject *__pyx_tuple__33;
4107 static PyObject *__pyx_tuple__34;
4108 static PyObject *__pyx_tuple__35;
4109 static PyObject *__pyx_tuple__36;
4110 static PyObject *__pyx_tuple__37;
4111 static PyObject *__pyx_tuple__38;
4112 static PyObject *__pyx_tuple__39;
4113 static PyObject *__pyx_tuple__41;
4114 static PyObject *__pyx_tuple__44;
4115 static PyObject *__pyx_tuple__45;
4116 static PyObject *__pyx_tuple__46;
4117 static PyObject *__pyx_tuple__47;
4118 static PyObject *__pyx_tuple__48;
4119 static PyObject *__pyx_tuple__49;
4120 static PyObject *__pyx_tuple__50;
4121 static PyObject *__pyx_tuple__53;
4122 static PyObject *__pyx_tuple__54;
4123 static PyObject *__pyx_tuple__55;
4124 static PyObject *__pyx_tuple__56;
4125 static PyObject *__pyx_tuple__57;
4126 static PyObject *__pyx_tuple__58;
4127 static PyObject *__pyx_tuple__59;
4128 static PyObject *__pyx_tuple__60;
4129 static PyObject *__pyx_tuple__62;
4130 static PyObject *__pyx_tuple__63;
4131 static PyObject *__pyx_tuple__65;
4132 static PyObject *__pyx_tuple__66;
4133 static PyObject *__pyx_tuple__68;
4134 static PyObject *__pyx_tuple__69;
4135 static PyObject *__pyx_tuple__71;
4136 static PyObject *__pyx_tuple__72;
4137 static PyObject *__pyx_tuple__74;
4138 static PyObject *__pyx_tuple__75;
4139 static PyObject *__pyx_tuple__77;
4140 static PyObject *__pyx_tuple__79;
4141 static PyObject *__pyx_tuple__81;
4142 static PyObject *__pyx_tuple__83;
4143 static PyObject *__pyx_tuple__85;
4144 static PyObject *__pyx_tuple__87;
4145 static PyObject *__pyx_tuple__89;
4146 static PyObject *__pyx_tuple__91;
4147 static PyObject *__pyx_tuple__93;
4148 static PyObject *__pyx_tuple__95;
4149 static PyObject *__pyx_tuple__97;
4150 static PyObject *__pyx_tuple__100;
4151 static PyObject *__pyx_tuple__102;
4152 static PyObject *__pyx_tuple__103;
4153 static PyObject *__pyx_tuple__105;
4154 static PyObject *__pyx_tuple__107;
4155 static PyObject *__pyx_tuple__108;
4156 static PyObject *__pyx_tuple__110;
4157 static PyObject *__pyx_tuple__111;
4158 static PyObject *__pyx_tuple__113;
4159 static PyObject *__pyx_tuple__114;
4160 static PyObject *__pyx_tuple__116;
4161 static PyObject *__pyx_tuple__118;
4162 static PyObject *__pyx_tuple__119;
4163 static PyObject *__pyx_tuple__121;
4164 static PyObject *__pyx_tuple__123;
4165 static PyObject *__pyx_tuple__125;
4166 static PyObject *__pyx_tuple__127;
4167 static PyObject *__pyx_tuple__129;
4168 static PyObject *__pyx_tuple__130;
4169 static PyObject *__pyx_tuple__132;
4170 static PyObject *__pyx_tuple__134;
4171 static PyObject *__pyx_tuple__136;
4172 static PyObject *__pyx_tuple__138;
4173 static PyObject *__pyx_tuple__139;
4174 static PyObject *__pyx_tuple__141;
4175 static PyObject *__pyx_tuple__143;
4176 static PyObject *__pyx_tuple__145;
4177 static PyObject *__pyx_tuple__147;
4178 static PyObject *__pyx_tuple__149;
4179 static PyObject *__pyx_tuple__151;
4180 static PyObject *__pyx_tuple__153;
4181 static PyObject *__pyx_tuple__155;
4182 static PyObject *__pyx_tuple__157;
4183 static PyObject *__pyx_tuple__159;
4184 static PyObject *__pyx_tuple__161;
4185 static PyObject *__pyx_tuple__163;
4186 static PyObject *__pyx_tuple__165;
4187 static PyObject *__pyx_tuple__167;
4188 static PyObject *__pyx_tuple__169;
4189 static PyObject *__pyx_tuple__171;
4190 static PyObject *__pyx_tuple__173;
4191 static PyObject *__pyx_tuple__175;
4192 static PyObject *__pyx_tuple__177;
4193 static PyObject *__pyx_tuple__179;
4194 static PyObject *__pyx_tuple__181;
4195 static PyObject *__pyx_tuple__183;
4196 static PyObject *__pyx_tuple__185;
4197 static PyObject *__pyx_tuple__187;
4198 static PyObject *__pyx_tuple__189;
4199 static PyObject *__pyx_tuple__191;
4200 static PyObject *__pyx_tuple__193;
4201 static PyObject *__pyx_tuple__195;
4202 static PyObject *__pyx_tuple__197;
4203 static PyObject *__pyx_tuple__199;
4204 static PyObject *__pyx_tuple__200;
4205 static PyObject *__pyx_tuple__202;
4206 static PyObject *__pyx_tuple__203;
4207 static PyObject *__pyx_tuple__205;
4208 static PyObject *__pyx_tuple__207;
4209 static PyObject *__pyx_tuple__209;
4210 static PyObject *__pyx_tuple__211;
4211 static PyObject *__pyx_tuple__213;
4212 static PyObject *__pyx_tuple__215;
4213 static PyObject *__pyx_tuple__216;
4214 static PyObject *__pyx_tuple__218;
4215 static PyObject *__pyx_tuple__220;
4216 static PyObject *__pyx_tuple__222;
4217 static PyObject *__pyx_tuple__224;
4218 static PyObject *__pyx_tuple__225;
4219 static PyObject *__pyx_tuple__227;
4220 static PyObject *__pyx_tuple__229;
4221 static PyObject *__pyx_tuple__231;
4222 static PyObject *__pyx_tuple__232;
4223 static PyObject *__pyx_tuple__234;
4224 static PyObject *__pyx_tuple__236;
4225 static PyObject *__pyx_tuple__238;
4226 static PyObject *__pyx_tuple__240;
4227 static PyObject *__pyx_codeobj__61;
4228 static PyObject *__pyx_codeobj__64;
4229 static PyObject *__pyx_codeobj__67;
4230 static PyObject *__pyx_codeobj__70;
4231 static PyObject *__pyx_codeobj__73;
4232 static PyObject *__pyx_codeobj__76;
4233 static PyObject *__pyx_codeobj__78;
4234 static PyObject *__pyx_codeobj__80;
4235 static PyObject *__pyx_codeobj__82;
4236 static PyObject *__pyx_codeobj__84;
4237 static PyObject *__pyx_codeobj__86;
4238 static PyObject *__pyx_codeobj__88;
4239 static PyObject *__pyx_codeobj__90;
4240 static PyObject *__pyx_codeobj__92;
4241 static PyObject *__pyx_codeobj__94;
4242 static PyObject *__pyx_codeobj__96;
4243 static PyObject *__pyx_codeobj__98;
4244 static PyObject *__pyx_codeobj__99;
4245 static PyObject *__pyx_codeobj__101;
4246 static PyObject *__pyx_codeobj__104;
4247 static PyObject *__pyx_codeobj__106;
4248 static PyObject *__pyx_codeobj__109;
4249 static PyObject *__pyx_codeobj__112;
4250 static PyObject *__pyx_codeobj__115;
4251 static PyObject *__pyx_codeobj__117;
4252 static PyObject *__pyx_codeobj__120;
4253 static PyObject *__pyx_codeobj__122;
4254 static PyObject *__pyx_codeobj__124;
4255 static PyObject *__pyx_codeobj__126;
4256 static PyObject *__pyx_codeobj__128;
4257 static PyObject *__pyx_codeobj__131;
4258 static PyObject *__pyx_codeobj__133;
4259 static PyObject *__pyx_codeobj__135;
4260 static PyObject *__pyx_codeobj__137;
4261 static PyObject *__pyx_codeobj__140;
4262 static PyObject *__pyx_codeobj__142;
4263 static PyObject *__pyx_codeobj__144;
4264 static PyObject *__pyx_codeobj__146;
4265 static PyObject *__pyx_codeobj__148;
4266 static PyObject *__pyx_codeobj__150;
4267 static PyObject *__pyx_codeobj__152;
4268 static PyObject *__pyx_codeobj__154;
4269 static PyObject *__pyx_codeobj__156;
4270 static PyObject *__pyx_codeobj__158;
4271 static PyObject *__pyx_codeobj__160;
4272 static PyObject *__pyx_codeobj__162;
4273 static PyObject *__pyx_codeobj__164;
4274 static PyObject *__pyx_codeobj__166;
4275 static PyObject *__pyx_codeobj__168;
4276 static PyObject *__pyx_codeobj__170;
4277 static PyObject *__pyx_codeobj__172;
4278 static PyObject *__pyx_codeobj__174;
4279 static PyObject *__pyx_codeobj__176;
4280 static PyObject *__pyx_codeobj__178;
4281 static PyObject *__pyx_codeobj__180;
4282 static PyObject *__pyx_codeobj__182;
4283 static PyObject *__pyx_codeobj__184;
4284 static PyObject *__pyx_codeobj__186;
4285 static PyObject *__pyx_codeobj__188;
4286 static PyObject *__pyx_codeobj__190;
4287 static PyObject *__pyx_codeobj__192;
4288 static PyObject *__pyx_codeobj__194;
4289 static PyObject *__pyx_codeobj__196;
4290 static PyObject *__pyx_codeobj__198;
4291 static PyObject *__pyx_codeobj__201;
4292 static PyObject *__pyx_codeobj__204;
4293 static PyObject *__pyx_codeobj__206;
4294 static PyObject *__pyx_codeobj__208;
4295 static PyObject *__pyx_codeobj__210;
4296 static PyObject *__pyx_codeobj__212;
4297 static PyObject *__pyx_codeobj__214;
4298 static PyObject *__pyx_codeobj__217;
4299 static PyObject *__pyx_codeobj__219;
4300 static PyObject *__pyx_codeobj__221;
4301 static PyObject *__pyx_codeobj__223;
4302 static PyObject *__pyx_codeobj__226;
4303 static PyObject *__pyx_codeobj__228;
4304 static PyObject *__pyx_codeobj__230;
4305 static PyObject *__pyx_codeobj__233;
4306 static PyObject *__pyx_codeobj__235;
4307 static PyObject *__pyx_codeobj__237;
4308 static PyObject *__pyx_codeobj__239;
4309 static PyObject *__pyx_codeobj__241;
4310 /* Late includes */
4311 
4312 /* "WaveTools.py":67
4313  *
4314  *
4315  * def fastcos_test(phase,sinus=False): # <<<<<<<<<<<<<<
4316  * """Fast cosine function with Taylor approximation - TO BE USED FOR TESTING"
4317  * Parameters
4318  */
4319 
4320 /* Python wrapper */
4321 static PyObject *__pyx_pw_9WaveTools_1fastcos_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4322 static char __pyx_doc_9WaveTools_fastcos_test[] = "Fast cosine function with Taylor approximation - TO BE USED FOR TESTING\"\n Parameters\n ----------\n phase : double\n Phase \n sinus : bool\n Switch for cosine or sine calculation\n \n Returns\n --------\n cos(phi) or sin(phi)\n\n ";
4323 static PyMethodDef __pyx_mdef_9WaveTools_1fastcos_test = {"fastcos_test", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9WaveTools_1fastcos_test, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9WaveTools_fastcos_test};
4324 static PyObject *__pyx_pw_9WaveTools_1fastcos_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4325  PyObject *__pyx_v_phase = 0;
4326  PyObject *__pyx_v_sinus = 0;
4327  int __pyx_lineno = 0;
4328  const char *__pyx_filename = NULL;
4329  int __pyx_clineno = 0;
4330  PyObject *__pyx_r = 0;
4331  __Pyx_RefNannyDeclarations
4332  __Pyx_RefNannySetupContext("fastcos_test (wrapper)", 0);
4333  {
4334  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_phase,&__pyx_n_s_sinus,0};
4335  PyObject* values[2] = {0,0};
4336  values[1] = ((PyObject *)((PyObject *)Py_False));
4337  if (unlikely(__pyx_kwds)) {
4338  Py_ssize_t kw_args;
4339  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4340  switch (pos_args) {
4341  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4342  CYTHON_FALLTHROUGH;
4343  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4344  CYTHON_FALLTHROUGH;
4345  case 0: break;
4346  default: goto __pyx_L5_argtuple_error;
4347  }
4348  kw_args = PyDict_Size(__pyx_kwds);
4349  switch (pos_args) {
4350  case 0:
4351  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phase)) != 0)) kw_args--;
4352  else goto __pyx_L5_argtuple_error;
4353  CYTHON_FALLTHROUGH;
4354  case 1:
4355  if (kw_args > 0) {
4356  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sinus);
4357  if (value) { values[1] = value; kw_args--; }
4358  }
4359  }
4360  if (unlikely(kw_args > 0)) {
4361  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fastcos_test") < 0)) __PYX_ERR(0, 67, __pyx_L3_error)
4362  }
4363  } else {
4364  switch (PyTuple_GET_SIZE(__pyx_args)) {
4365  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4366  CYTHON_FALLTHROUGH;
4367  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4368  break;
4369  default: goto __pyx_L5_argtuple_error;
4370  }
4371  }
4372  __pyx_v_phase = values[0];
4373  __pyx_v_sinus = values[1];
4374  }
4375  goto __pyx_L4_argument_unpacking_done;
4376  __pyx_L5_argtuple_error:;
4377  __Pyx_RaiseArgtupleInvalid("fastcos_test", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 67, __pyx_L3_error)
4378  __pyx_L3_error:;
4379  __Pyx_AddTraceback("WaveTools.fastcos_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
4380  __Pyx_RefNannyFinishContext();
4381  return NULL;
4382  __pyx_L4_argument_unpacking_done:;
4383  __pyx_r = __pyx_pf_9WaveTools_fastcos_test(__pyx_self, __pyx_v_phase, __pyx_v_sinus);
4384 
4385  /* function exit code */
4386  __Pyx_RefNannyFinishContext();
4387  return __pyx_r;
4388 }
4389 
4390 static PyObject *__pyx_pf_9WaveTools_fastcos_test(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_phase, PyObject *__pyx_v_sinus) {
4391  PyObject *__pyx_r = NULL;
4392  __Pyx_RefNannyDeclarations
4393  int __pyx_t_1;
4394  PyObject *__pyx_t_2 = NULL;
4395  PyObject *__pyx_t_3 = NULL;
4396  PyObject *__pyx_t_4 = NULL;
4397  PyObject *__pyx_t_5 = NULL;
4398  int __pyx_t_6;
4399  PyObject *__pyx_t_7 = NULL;
4400  double __pyx_t_8;
4401  int __pyx_lineno = 0;
4402  const char *__pyx_filename = NULL;
4403  int __pyx_clineno = 0;
4404  __Pyx_RefNannySetupContext("fastcos_test", 0);
4405  __Pyx_INCREF(__pyx_v_phase);
4406 
4407  /* "WaveTools.py":81
4408  *
4409  * """
4410  * if(sinus): # <<<<<<<<<<<<<<
4411  * phase = old_div(np.pi,2.) - phase
4412  * return fastcos(phase,True)
4413  */
4414  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_sinus); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 81, __pyx_L1_error)
4415  if (__pyx_t_1) {
4416 
4417  /* "WaveTools.py":82
4418  * """
4419  * if(sinus):
4420  * phase = old_div(np.pi,2.) - phase # <<<<<<<<<<<<<<
4421  * return fastcos(phase,True)
4422  * def fastcosh_test(k,Z,fast=True):
4423  */
4424  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_old_div); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error)
4425  __Pyx_GOTREF(__pyx_t_3);
4426  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
4427  __Pyx_GOTREF(__pyx_t_4);
4428  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_pi); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 82, __pyx_L1_error)
4429  __Pyx_GOTREF(__pyx_t_5);
4430  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4431  __pyx_t_4 = NULL;
4432  __pyx_t_6 = 0;
4433  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4434  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4435  if (likely(__pyx_t_4)) {
4436  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4437  __Pyx_INCREF(__pyx_t_4);
4438  __Pyx_INCREF(function);
4439  __Pyx_DECREF_SET(__pyx_t_3, function);
4440  __pyx_t_6 = 1;
4441  }
4442  }
4443  #if CYTHON_FAST_PYCALL
4444  if (PyFunction_Check(__pyx_t_3)) {
4445  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, __pyx_float_2_};
4446  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
4447  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4448  __Pyx_GOTREF(__pyx_t_2);
4449  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4450  } else
4451  #endif
4452  #if CYTHON_FAST_PYCCALL
4453  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
4454  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, __pyx_float_2_};
4455  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
4456  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4457  __Pyx_GOTREF(__pyx_t_2);
4458  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4459  } else
4460  #endif
4461  {
4462  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 82, __pyx_L1_error)
4463  __Pyx_GOTREF(__pyx_t_7);
4464  if (__pyx_t_4) {
4465  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
4466  }
4467  __Pyx_GIVEREF(__pyx_t_5);
4468  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_5);
4469  __Pyx_INCREF(__pyx_float_2_);
4470  __Pyx_GIVEREF(__pyx_float_2_);
4471  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_float_2_);
4472  __pyx_t_5 = 0;
4473  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
4474  __Pyx_GOTREF(__pyx_t_2);
4475  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4476  }
4477  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4478  __pyx_t_3 = PyNumber_Subtract(__pyx_t_2, __pyx_v_phase); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error)
4479  __Pyx_GOTREF(__pyx_t_3);
4480  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4481  __Pyx_DECREF_SET(__pyx_v_phase, __pyx_t_3);
4482  __pyx_t_3 = 0;
4483 
4484  /* "WaveTools.py":81
4485  *
4486  * """
4487  * if(sinus): # <<<<<<<<<<<<<<
4488  * phase = old_div(np.pi,2.) - phase
4489  * return fastcos(phase,True)
4490  */
4491  }
4492 
4493  /* "WaveTools.py":83
4494  * if(sinus):
4495  * phase = old_div(np.pi,2.) - phase
4496  * return fastcos(phase,True) # <<<<<<<<<<<<<<
4497  * def fastcosh_test(k,Z,fast=True):
4498  * """Fast hyperbolic cosine function with Taylor approximation - TO BE USED FOR TESTING"
4499  */
4500  __Pyx_XDECREF(__pyx_r);
4501  __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_phase); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 83, __pyx_L1_error)
4502  __pyx_t_3 = PyFloat_FromDouble(proteus::fastcos(__pyx_t_8, 1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
4503  __Pyx_GOTREF(__pyx_t_3);
4504  __pyx_r = __pyx_t_3;
4505  __pyx_t_3 = 0;
4506  goto __pyx_L0;
4507 
4508  /* "WaveTools.py":67
4509  *
4510  *
4511  * def fastcos_test(phase,sinus=False): # <<<<<<<<<<<<<<
4512  * """Fast cosine function with Taylor approximation - TO BE USED FOR TESTING"
4513  * Parameters
4514  */
4515 
4516  /* function exit code */
4517  __pyx_L1_error:;
4518  __Pyx_XDECREF(__pyx_t_2);
4519  __Pyx_XDECREF(__pyx_t_3);
4520  __Pyx_XDECREF(__pyx_t_4);
4521  __Pyx_XDECREF(__pyx_t_5);
4522  __Pyx_XDECREF(__pyx_t_7);
4523  __Pyx_AddTraceback("WaveTools.fastcos_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
4524  __pyx_r = NULL;
4525  __pyx_L0:;
4526  __Pyx_XDECREF(__pyx_v_phase);
4527  __Pyx_XGIVEREF(__pyx_r);
4528  __Pyx_RefNannyFinishContext();
4529  return __pyx_r;
4530 }
4531 
4532 /* "WaveTools.py":84
4533  * phase = old_div(np.pi,2.) - phase
4534  * return fastcos(phase,True)
4535  * def fastcosh_test(k,Z,fast=True): # <<<<<<<<<<<<<<
4536  * """Fast hyperbolic cosine function with Taylor approximation - TO BE USED FOR TESTING"
4537  * Parameters
4538  */
4539 
4540 /* Python wrapper */
4541 static PyObject *__pyx_pw_9WaveTools_3fastcosh_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4542 static char __pyx_doc_9WaveTools_2fastcosh_test[] = "Fast hyperbolic cosine function with Taylor approximation - TO BE USED FOR TESTING\"\n Parameters\n ----------\n k : double\n Wavenumber\n Z : double\n Z coordinate\n Returns\n --------\n cosh(k*z)\n\n ";
4543 static PyMethodDef __pyx_mdef_9WaveTools_3fastcosh_test = {"fastcosh_test", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9WaveTools_3fastcosh_test, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9WaveTools_2fastcosh_test};
4544 static PyObject *__pyx_pw_9WaveTools_3fastcosh_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4545  PyObject *__pyx_v_k = 0;
4546  PyObject *__pyx_v_Z = 0;
4547  PyObject *__pyx_v_fast = 0;
4548  int __pyx_lineno = 0;
4549  const char *__pyx_filename = NULL;
4550  int __pyx_clineno = 0;
4551  PyObject *__pyx_r = 0;
4552  __Pyx_RefNannyDeclarations
4553  __Pyx_RefNannySetupContext("fastcosh_test (wrapper)", 0);
4554  {
4555  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_k,&__pyx_n_s_Z,&__pyx_n_s_fast,0};
4556  PyObject* values[3] = {0,0,0};
4557  values[2] = ((PyObject *)((PyObject *)Py_True));
4558  if (unlikely(__pyx_kwds)) {
4559  Py_ssize_t kw_args;
4560  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4561  switch (pos_args) {
4562  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4563  CYTHON_FALLTHROUGH;
4564  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4565  CYTHON_FALLTHROUGH;
4566  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4567  CYTHON_FALLTHROUGH;
4568  case 0: break;
4569  default: goto __pyx_L5_argtuple_error;
4570  }
4571  kw_args = PyDict_Size(__pyx_kwds);
4572  switch (pos_args) {
4573  case 0:
4574  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--;
4575  else goto __pyx_L5_argtuple_error;
4576  CYTHON_FALLTHROUGH;
4577  case 1:
4578  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Z)) != 0)) kw_args--;
4579  else {
4580  __Pyx_RaiseArgtupleInvalid("fastcosh_test", 0, 2, 3, 1); __PYX_ERR(0, 84, __pyx_L3_error)
4581  }
4582  CYTHON_FALLTHROUGH;
4583  case 2:
4584  if (kw_args > 0) {
4585  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fast);
4586  if (value) { values[2] = value; kw_args--; }
4587  }
4588  }
4589  if (unlikely(kw_args > 0)) {
4590  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fastcosh_test") < 0)) __PYX_ERR(0, 84, __pyx_L3_error)
4591  }
4592  } else {
4593  switch (PyTuple_GET_SIZE(__pyx_args)) {
4594  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4595  CYTHON_FALLTHROUGH;
4596  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4597  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4598  break;
4599  default: goto __pyx_L5_argtuple_error;
4600  }
4601  }
4602  __pyx_v_k = values[0];
4603  __pyx_v_Z = values[1];
4604  __pyx_v_fast = values[2];
4605  }
4606  goto __pyx_L4_argument_unpacking_done;
4607  __pyx_L5_argtuple_error:;
4608  __Pyx_RaiseArgtupleInvalid("fastcosh_test", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 84, __pyx_L3_error)
4609  __pyx_L3_error:;
4610  __Pyx_AddTraceback("WaveTools.fastcosh_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
4611  __Pyx_RefNannyFinishContext();
4612  return NULL;
4613  __pyx_L4_argument_unpacking_done:;
4614  __pyx_r = __pyx_pf_9WaveTools_2fastcosh_test(__pyx_self, __pyx_v_k, __pyx_v_Z, __pyx_v_fast);
4615 
4616  /* function exit code */
4617  __Pyx_RefNannyFinishContext();
4618  return __pyx_r;
4619 }
4620 
4621 static PyObject *__pyx_pf_9WaveTools_2fastcosh_test(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_k, PyObject *__pyx_v_Z, PyObject *__pyx_v_fast) {
4622  double __pyx_v_xx[2];
4623  PyObject *__pyx_r = NULL;
4624  __Pyx_RefNannyDeclarations
4625  double __pyx_t_1;
4626  double __pyx_t_2;
4627  bool __pyx_t_3;
4628  PyObject *__pyx_t_4 = NULL;
4629  int __pyx_lineno = 0;
4630  const char *__pyx_filename = NULL;
4631  int __pyx_clineno = 0;
4632  __Pyx_RefNannySetupContext("fastcosh_test", 0);
4633 
4634  /* "WaveTools.py":98
4635  * """
4636  * cython.declare(xx=cython.double[2])
4637  * fastcosh(xx,k,Z,fast) # <<<<<<<<<<<<<<
4638  * return xx[0]
4639  * def fastsinh_test(k,Z,fast=True):
4640  */
4641  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_k); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L1_error)
4642  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_Z); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L1_error)
4643  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_fast); if (unlikely((__pyx_t_3 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L1_error)
4644  (void)(proteus::fastcosh(__pyx_v_xx, __pyx_t_1, __pyx_t_2, __pyx_t_3));
4645 
4646  /* "WaveTools.py":99
4647  * cython.declare(xx=cython.double[2])
4648  * fastcosh(xx,k,Z,fast)
4649  * return xx[0] # <<<<<<<<<<<<<<
4650  * def fastsinh_test(k,Z,fast=True):
4651  * """Fast hyperbolic sine function with Taylor approximation - TO BE USED FOR TESTING"
4652  */
4653  __Pyx_XDECREF(__pyx_r);
4654  __pyx_t_4 = PyFloat_FromDouble((__pyx_v_xx[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
4655  __Pyx_GOTREF(__pyx_t_4);
4656  __pyx_r = __pyx_t_4;
4657  __pyx_t_4 = 0;
4658  goto __pyx_L0;
4659 
4660  /* "WaveTools.py":84
4661  * phase = old_div(np.pi,2.) - phase
4662  * return fastcos(phase,True)
4663  * def fastcosh_test(k,Z,fast=True): # <<<<<<<<<<<<<<
4664  * """Fast hyperbolic cosine function with Taylor approximation - TO BE USED FOR TESTING"
4665  * Parameters
4666  */
4667 
4668  /* function exit code */
4669  __pyx_L1_error:;
4670  __Pyx_XDECREF(__pyx_t_4);
4671  __Pyx_AddTraceback("WaveTools.fastcosh_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
4672  __pyx_r = NULL;
4673  __pyx_L0:;
4674  __Pyx_XGIVEREF(__pyx_r);
4675  __Pyx_RefNannyFinishContext();
4676  return __pyx_r;
4677 }
4678 
4679 /* "WaveTools.py":100
4680  * fastcosh(xx,k,Z,fast)
4681  * return xx[0]
4682  * def fastsinh_test(k,Z,fast=True): # <<<<<<<<<<<<<<
4683  * """Fast hyperbolic sine function with Taylor approximation - TO BE USED FOR TESTING"
4684  * Parameters
4685  */
4686 
4687 /* Python wrapper */
4688 static PyObject *__pyx_pw_9WaveTools_5fastsinh_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4689 static char __pyx_doc_9WaveTools_4fastsinh_test[] = "Fast hyperbolic sine function with Taylor approximation - TO BE USED FOR TESTING\"\n Parameters\n ----------\n k : double\n Wavenumber\n Z : double\n Z coordinate\n Returns\n --------\n sinh(k*z)\n\n ";
4690 static PyMethodDef __pyx_mdef_9WaveTools_5fastsinh_test = {"fastsinh_test", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9WaveTools_5fastsinh_test, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9WaveTools_4fastsinh_test};
4691 static PyObject *__pyx_pw_9WaveTools_5fastsinh_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4692  PyObject *__pyx_v_k = 0;
4693  PyObject *__pyx_v_Z = 0;
4694  PyObject *__pyx_v_fast = 0;
4695  int __pyx_lineno = 0;
4696  const char *__pyx_filename = NULL;
4697  int __pyx_clineno = 0;
4698  PyObject *__pyx_r = 0;
4699  __Pyx_RefNannyDeclarations
4700  __Pyx_RefNannySetupContext("fastsinh_test (wrapper)", 0);
4701  {
4702  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_k,&__pyx_n_s_Z,&__pyx_n_s_fast,0};
4703  PyObject* values[3] = {0,0,0};
4704  values[2] = ((PyObject *)((PyObject *)Py_True));
4705  if (unlikely(__pyx_kwds)) {
4706  Py_ssize_t kw_args;
4707  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4708  switch (pos_args) {
4709  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4710  CYTHON_FALLTHROUGH;
4711  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4712  CYTHON_FALLTHROUGH;
4713  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4714  CYTHON_FALLTHROUGH;
4715  case 0: break;
4716  default: goto __pyx_L5_argtuple_error;
4717  }
4718  kw_args = PyDict_Size(__pyx_kwds);
4719  switch (pos_args) {
4720  case 0:
4721  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--;
4722  else goto __pyx_L5_argtuple_error;
4723  CYTHON_FALLTHROUGH;
4724  case 1:
4725  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Z)) != 0)) kw_args--;
4726  else {
4727  __Pyx_RaiseArgtupleInvalid("fastsinh_test", 0, 2, 3, 1); __PYX_ERR(0, 100, __pyx_L3_error)
4728  }
4729  CYTHON_FALLTHROUGH;
4730  case 2:
4731  if (kw_args > 0) {
4732  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fast);
4733  if (value) { values[2] = value; kw_args--; }
4734  }
4735  }
4736  if (unlikely(kw_args > 0)) {
4737  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fastsinh_test") < 0)) __PYX_ERR(0, 100, __pyx_L3_error)
4738  }
4739  } else {
4740  switch (PyTuple_GET_SIZE(__pyx_args)) {
4741  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4742  CYTHON_FALLTHROUGH;
4743  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4744  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4745  break;
4746  default: goto __pyx_L5_argtuple_error;
4747  }
4748  }
4749  __pyx_v_k = values[0];
4750  __pyx_v_Z = values[1];
4751  __pyx_v_fast = values[2];
4752  }
4753  goto __pyx_L4_argument_unpacking_done;
4754  __pyx_L5_argtuple_error:;
4755  __Pyx_RaiseArgtupleInvalid("fastsinh_test", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 100, __pyx_L3_error)
4756  __pyx_L3_error:;
4757  __Pyx_AddTraceback("WaveTools.fastsinh_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
4758  __Pyx_RefNannyFinishContext();
4759  return NULL;
4760  __pyx_L4_argument_unpacking_done:;
4761  __pyx_r = __pyx_pf_9WaveTools_4fastsinh_test(__pyx_self, __pyx_v_k, __pyx_v_Z, __pyx_v_fast);
4762 
4763  /* function exit code */
4764  __Pyx_RefNannyFinishContext();
4765  return __pyx_r;
4766 }
4767 
4768 static PyObject *__pyx_pf_9WaveTools_4fastsinh_test(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_k, PyObject *__pyx_v_Z, PyObject *__pyx_v_fast) {
4769  double __pyx_v_xx[2];
4770  PyObject *__pyx_r = NULL;
4771  __Pyx_RefNannyDeclarations
4772  double __pyx_t_1;
4773  double __pyx_t_2;
4774  bool __pyx_t_3;
4775  PyObject *__pyx_t_4 = NULL;
4776  int __pyx_lineno = 0;
4777  const char *__pyx_filename = NULL;
4778  int __pyx_clineno = 0;
4779  __Pyx_RefNannySetupContext("fastsinh_test", 0);
4780 
4781  /* "WaveTools.py":114
4782  * """
4783  * cython.declare(xx=cython.double[2])
4784  * fastcosh(xx,k,Z,fast) # <<<<<<<<<<<<<<
4785  * return xx[1]
4786  *
4787  */
4788  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_k); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L1_error)
4789  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_Z); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L1_error)
4790  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_fast); if (unlikely((__pyx_t_3 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L1_error)
4791  (void)(proteus::fastcosh(__pyx_v_xx, __pyx_t_1, __pyx_t_2, __pyx_t_3));
4792 
4793  /* "WaveTools.py":115
4794  * cython.declare(xx=cython.double[2])
4795  * fastcosh(xx,k,Z,fast)
4796  * return xx[1] # <<<<<<<<<<<<<<
4797  *
4798  *
4799  */
4800  __Pyx_XDECREF(__pyx_r);
4801  __pyx_t_4 = PyFloat_FromDouble((__pyx_v_xx[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error)
4802  __Pyx_GOTREF(__pyx_t_4);
4803  __pyx_r = __pyx_t_4;
4804  __pyx_t_4 = 0;
4805  goto __pyx_L0;
4806 
4807  /* "WaveTools.py":100
4808  * fastcosh(xx,k,Z,fast)
4809  * return xx[0]
4810  * def fastsinh_test(k,Z,fast=True): # <<<<<<<<<<<<<<
4811  * """Fast hyperbolic sine function with Taylor approximation - TO BE USED FOR TESTING"
4812  * Parameters
4813  */
4814 
4815  /* function exit code */
4816  __pyx_L1_error:;
4817  __Pyx_XDECREF(__pyx_t_4);
4818  __Pyx_AddTraceback("WaveTools.fastsinh_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
4819  __pyx_r = NULL;
4820  __pyx_L0:;
4821  __Pyx_XGIVEREF(__pyx_r);
4822  __Pyx_RefNannyFinishContext();
4823  return __pyx_r;
4824 }
4825 
4826 /* "WaveTools.py":118
4827  *
4828  *
4829  * def coshkzd_test(k,Z,d, fast=True): # <<<<<<<<<<<<<<
4830  * """Calculation of u horizontal profile cosh(k(d+Z))/sinh(kd) using fast appoximaitons
4831  * and hyp trig relation cosh(a+b) = cosha*coshb+sinha*sinhb
4832  */
4833 
4834 /* Python wrapper */
4835 static PyObject *__pyx_pw_9WaveTools_7coshkzd_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4836 static char __pyx_doc_9WaveTools_6coshkzd_test[] = "Calculation of u horizontal profile cosh(k(d+Z))/sinh(kd) using fast appoximaitons\n and hyp trig relation cosh(a+b) = cosha*coshb+sinha*sinhb\n Parameters\n ----------\n ----------\n k : double\n Wavenumber\n Z : double\n Z coordinate\n d : double\n depth\n Returns\n --------\n cosh(k*(z+d))/sinh(kd) for Z>-d/2, 0 otherwise\n\n ";
4837 static PyMethodDef __pyx_mdef_9WaveTools_7coshkzd_test = {"coshkzd_test", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9WaveTools_7coshkzd_test, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9WaveTools_6coshkzd_test};
4838 static PyObject *__pyx_pw_9WaveTools_7coshkzd_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4839  PyObject *__pyx_v_k = 0;
4840  PyObject *__pyx_v_Z = 0;
4841  PyObject *__pyx_v_d = 0;
4842  PyObject *__pyx_v_fast = 0;
4843  int __pyx_lineno = 0;
4844  const char *__pyx_filename = NULL;
4845  int __pyx_clineno = 0;
4846  PyObject *__pyx_r = 0;
4847  __Pyx_RefNannyDeclarations
4848  __Pyx_RefNannySetupContext("coshkzd_test (wrapper)", 0);
4849  {
4850  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_k,&__pyx_n_s_Z,&__pyx_n_s_d,&__pyx_n_s_fast,0};
4851  PyObject* values[4] = {0,0,0,0};
4852  values[3] = ((PyObject *)((PyObject *)Py_True));
4853  if (unlikely(__pyx_kwds)) {
4854  Py_ssize_t kw_args;
4855  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4856  switch (pos_args) {
4857  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4858  CYTHON_FALLTHROUGH;
4859  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4860  CYTHON_FALLTHROUGH;
4861  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4862  CYTHON_FALLTHROUGH;
4863  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4864  CYTHON_FALLTHROUGH;
4865  case 0: break;
4866  default: goto __pyx_L5_argtuple_error;
4867  }
4868  kw_args = PyDict_Size(__pyx_kwds);
4869  switch (pos_args) {
4870  case 0:
4871  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--;
4872  else goto __pyx_L5_argtuple_error;
4873  CYTHON_FALLTHROUGH;
4874  case 1:
4875  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Z)) != 0)) kw_args--;
4876  else {
4877  __Pyx_RaiseArgtupleInvalid("coshkzd_test", 0, 3, 4, 1); __PYX_ERR(0, 118, __pyx_L3_error)
4878  }
4879  CYTHON_FALLTHROUGH;
4880  case 2:
4881  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--;
4882  else {
4883  __Pyx_RaiseArgtupleInvalid("coshkzd_test", 0, 3, 4, 2); __PYX_ERR(0, 118, __pyx_L3_error)
4884  }
4885  CYTHON_FALLTHROUGH;
4886  case 3:
4887  if (kw_args > 0) {
4888  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fast);
4889  if (value) { values[3] = value; kw_args--; }
4890  }
4891  }
4892  if (unlikely(kw_args > 0)) {
4893  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "coshkzd_test") < 0)) __PYX_ERR(0, 118, __pyx_L3_error)
4894  }
4895  } else {
4896  switch (PyTuple_GET_SIZE(__pyx_args)) {
4897  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4898  CYTHON_FALLTHROUGH;
4899  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4900  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4901  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4902  break;
4903  default: goto __pyx_L5_argtuple_error;
4904  }
4905  }
4906  __pyx_v_k = values[0];
4907  __pyx_v_Z = values[1];
4908  __pyx_v_d = values[2];
4909  __pyx_v_fast = values[3];
4910  }
4911  goto __pyx_L4_argument_unpacking_done;
4912  __pyx_L5_argtuple_error:;
4913  __Pyx_RaiseArgtupleInvalid("coshkzd_test", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 118, __pyx_L3_error)
4914  __pyx_L3_error:;
4915  __Pyx_AddTraceback("WaveTools.coshkzd_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
4916  __Pyx_RefNannyFinishContext();
4917  return NULL;
4918  __pyx_L4_argument_unpacking_done:;
4919  __pyx_r = __pyx_pf_9WaveTools_6coshkzd_test(__pyx_self, __pyx_v_k, __pyx_v_Z, __pyx_v_d, __pyx_v_fast);
4920 
4921  /* function exit code */
4922  __Pyx_RefNannyFinishContext();
4923  return __pyx_r;
4924 }
4925 
4926 static PyObject *__pyx_pf_9WaveTools_6coshkzd_test(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_k, PyObject *__pyx_v_Z, PyObject *__pyx_v_d, PyObject *__pyx_v_fast) {
4927  PyObject *__pyx_r = NULL;
4928  __Pyx_RefNannyDeclarations
4929  PyObject *__pyx_t_1 = NULL;
4930  PyObject *__pyx_t_2 = NULL;
4931  PyObject *__pyx_t_3 = NULL;
4932  PyObject *__pyx_t_4 = NULL;
4933  int __pyx_t_5;
4934  PyObject *__pyx_t_6 = NULL;
4935  int __pyx_t_7;
4936  PyObject *__pyx_t_8 = NULL;
4937  PyObject *__pyx_t_9 = NULL;
4938  int __pyx_lineno = 0;
4939  const char *__pyx_filename = NULL;
4940  int __pyx_clineno = 0;
4941  __Pyx_RefNannySetupContext("coshkzd_test", 0);
4942 
4943  /* "WaveTools.py":135
4944  *
4945  * """
4946  * if (Z > old_div(-d,2.)): # <<<<<<<<<<<<<<
4947  * return old_div(fastcosh_test(k,Z,fast), np.tanh(k*d)) + fastsinh_test(k,Z,fast)
4948  * else:
4949  */
4950  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_old_div); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
4951  __Pyx_GOTREF(__pyx_t_2);
4952  __pyx_t_3 = PyNumber_Negative(__pyx_v_d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
4953  __Pyx_GOTREF(__pyx_t_3);
4954  __pyx_t_4 = NULL;
4955  __pyx_t_5 = 0;
4956  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4957  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
4958  if (likely(__pyx_t_4)) {
4959  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4960  __Pyx_INCREF(__pyx_t_4);
4961  __Pyx_INCREF(function);
4962  __Pyx_DECREF_SET(__pyx_t_2, function);
4963  __pyx_t_5 = 1;
4964  }
4965  }
4966  #if CYTHON_FAST_PYCALL
4967  if (PyFunction_Check(__pyx_t_2)) {
4968  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_float_2_};
4969  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
4970  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4971  __Pyx_GOTREF(__pyx_t_1);
4972  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4973  } else
4974  #endif
4975  #if CYTHON_FAST_PYCCALL
4976  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
4977  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_float_2_};
4978  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
4979  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4980  __Pyx_GOTREF(__pyx_t_1);
4981  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4982  } else
4983  #endif
4984  {
4985  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
4986  __Pyx_GOTREF(__pyx_t_6);
4987  if (__pyx_t_4) {
4988  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
4989  }
4990  __Pyx_GIVEREF(__pyx_t_3);
4991  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
4992  __Pyx_INCREF(__pyx_float_2_);
4993  __Pyx_GIVEREF(__pyx_float_2_);
4994  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_float_2_);
4995  __pyx_t_3 = 0;
4996  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
4997  __Pyx_GOTREF(__pyx_t_1);
4998  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4999  }
5000  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5001  __pyx_t_2 = PyObject_RichCompare(__pyx_v_Z, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
5002  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5003  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 135, __pyx_L1_error)
5004  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5005  if (__pyx_t_7) {
5006 
5007  /* "WaveTools.py":136
5008  * """
5009  * if (Z > old_div(-d,2.)):
5010  * return old_div(fastcosh_test(k,Z,fast), np.tanh(k*d)) + fastsinh_test(k,Z,fast) # <<<<<<<<<<<<<<
5011  * else:
5012  * return 0.
5013  */
5014  __Pyx_XDECREF(__pyx_r);
5015  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_old_div); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
5016  __Pyx_GOTREF(__pyx_t_1);
5017  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_fastcosh_test); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
5018  __Pyx_GOTREF(__pyx_t_3);
5019  __pyx_t_4 = NULL;
5020  __pyx_t_5 = 0;
5021  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5022  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
5023  if (likely(__pyx_t_4)) {
5024  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5025  __Pyx_INCREF(__pyx_t_4);
5026  __Pyx_INCREF(function);
5027  __Pyx_DECREF_SET(__pyx_t_3, function);
5028  __pyx_t_5 = 1;
5029  }
5030  }
5031  #if CYTHON_FAST_PYCALL
5032  if (PyFunction_Check(__pyx_t_3)) {
5033  PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_k, __pyx_v_Z, __pyx_v_fast};
5034  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
5035  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5036  __Pyx_GOTREF(__pyx_t_6);
5037  } else
5038  #endif
5039  #if CYTHON_FAST_PYCCALL
5040  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
5041  PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_k, __pyx_v_Z, __pyx_v_fast};
5042  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
5043  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5044  __Pyx_GOTREF(__pyx_t_6);
5045  } else
5046  #endif
5047  {
5048  __pyx_t_8 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 136, __pyx_L1_error)
5049  __Pyx_GOTREF(__pyx_t_8);
5050  if (__pyx_t_4) {
5051  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
5052  }
5053  __Pyx_INCREF(__pyx_v_k);
5054  __Pyx_GIVEREF(__pyx_v_k);
5055  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_5, __pyx_v_k);
5056  __Pyx_INCREF(__pyx_v_Z);
5057  __Pyx_GIVEREF(__pyx_v_Z);
5058  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_5, __pyx_v_Z);
5059  __Pyx_INCREF(__pyx_v_fast);
5060  __Pyx_GIVEREF(__pyx_v_fast);
5061  PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_5, __pyx_v_fast);
5062  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
5063  __Pyx_GOTREF(__pyx_t_6);
5064  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5065  }
5066  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5067  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 136, __pyx_L1_error)
5068  __Pyx_GOTREF(__pyx_t_8);
5069  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_tanh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 136, __pyx_L1_error)
5070  __Pyx_GOTREF(__pyx_t_4);
5071  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5072  __pyx_t_8 = PyNumber_Multiply(__pyx_v_k, __pyx_v_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 136, __pyx_L1_error)
5073  __Pyx_GOTREF(__pyx_t_8);
5074  __pyx_t_9 = NULL;
5075  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
5076  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
5077  if (likely(__pyx_t_9)) {
5078  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
5079  __Pyx_INCREF(__pyx_t_9);
5080  __Pyx_INCREF(function);
5081  __Pyx_DECREF_SET(__pyx_t_4, function);
5082  }
5083  }
5084  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8);
5085  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
5086  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5087  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
5088  __Pyx_GOTREF(__pyx_t_3);
5089  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5090  __pyx_t_4 = NULL;
5091  __pyx_t_5 = 0;
5092  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
5093  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
5094  if (likely(__pyx_t_4)) {
5095  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
5096  __Pyx_INCREF(__pyx_t_4);
5097  __Pyx_INCREF(function);
5098  __Pyx_DECREF_SET(__pyx_t_1, function);
5099  __pyx_t_5 = 1;
5100  }
5101  }
5102  #if CYTHON_FAST_PYCALL
5103  if (PyFunction_Check(__pyx_t_1)) {
5104  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_6, __pyx_t_3};
5105  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
5106  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5107  __Pyx_GOTREF(__pyx_t_2);
5108  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5109  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5110  } else
5111  #endif
5112  #if CYTHON_FAST_PYCCALL
5113  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
5114  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_6, __pyx_t_3};
5115  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
5116  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5117  __Pyx_GOTREF(__pyx_t_2);
5118  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5119  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5120  } else
5121  #endif
5122  {
5123  __pyx_t_8 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 136, __pyx_L1_error)
5124  __Pyx_GOTREF(__pyx_t_8);
5125  if (__pyx_t_4) {
5126  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
5127  }
5128  __Pyx_GIVEREF(__pyx_t_6);
5129  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_5, __pyx_t_6);
5130  __Pyx_GIVEREF(__pyx_t_3);
5131  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_5, __pyx_t_3);
5132  __pyx_t_6 = 0;
5133  __pyx_t_3 = 0;
5134  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
5135  __Pyx_GOTREF(__pyx_t_2);
5136  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5137  }
5138  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5139  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_fastsinh_test); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 136, __pyx_L1_error)
5140  __Pyx_GOTREF(__pyx_t_8);
5141  __pyx_t_3 = NULL;
5142  __pyx_t_5 = 0;
5143  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
5144  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
5145  if (likely(__pyx_t_3)) {
5146  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
5147  __Pyx_INCREF(__pyx_t_3);
5148  __Pyx_INCREF(function);
5149  __Pyx_DECREF_SET(__pyx_t_8, function);
5150  __pyx_t_5 = 1;
5151  }
5152  }
5153  #if CYTHON_FAST_PYCALL
5154  if (PyFunction_Check(__pyx_t_8)) {
5155  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_k, __pyx_v_Z, __pyx_v_fast};
5156  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
5157  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5158  __Pyx_GOTREF(__pyx_t_1);
5159  } else
5160  #endif
5161  #if CYTHON_FAST_PYCCALL
5162  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
5163  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_k, __pyx_v_Z, __pyx_v_fast};
5164  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
5165  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5166  __Pyx_GOTREF(__pyx_t_1);
5167  } else
5168  #endif
5169  {
5170  __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
5171  __Pyx_GOTREF(__pyx_t_6);
5172  if (__pyx_t_3) {
5173  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
5174  }
5175  __Pyx_INCREF(__pyx_v_k);
5176  __Pyx_GIVEREF(__pyx_v_k);
5177  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_k);
5178  __Pyx_INCREF(__pyx_v_Z);
5179  __Pyx_GIVEREF(__pyx_v_Z);
5180  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_Z);
5181  __Pyx_INCREF(__pyx_v_fast);
5182  __Pyx_GIVEREF(__pyx_v_fast);
5183  PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_fast);
5184  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
5185  __Pyx_GOTREF(__pyx_t_1);
5186  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5187  }
5188  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5189  __pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 136, __pyx_L1_error)
5190  __Pyx_GOTREF(__pyx_t_8);
5191  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5192  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5193  __pyx_r = __pyx_t_8;
5194  __pyx_t_8 = 0;
5195  goto __pyx_L0;
5196 
5197  /* "WaveTools.py":135
5198  *
5199  * """
5200  * if (Z > old_div(-d,2.)): # <<<<<<<<<<<<<<
5201  * return old_div(fastcosh_test(k,Z,fast), np.tanh(k*d)) + fastsinh_test(k,Z,fast)
5202  * else:
5203  */
5204  }
5205 
5206  /* "WaveTools.py":138
5207  * return old_div(fastcosh_test(k,Z,fast), np.tanh(k*d)) + fastsinh_test(k,Z,fast)
5208  * else:
5209  * return 0. # <<<<<<<<<<<<<<
5210  *
5211  * def sinhkzd_test(k,Z,d,fast=True):
5212  */
5213  /*else*/ {
5214  __Pyx_XDECREF(__pyx_r);
5215  __Pyx_INCREF(__pyx_float_0_);
5216  __pyx_r = __pyx_float_0_;
5217  goto __pyx_L0;
5218  }
5219 
5220  /* "WaveTools.py":118
5221  *
5222  *
5223  * def coshkzd_test(k,Z,d, fast=True): # <<<<<<<<<<<<<<
5224  * """Calculation of u horizontal profile cosh(k(d+Z))/sinh(kd) using fast appoximaitons
5225  * and hyp trig relation cosh(a+b) = cosha*coshb+sinha*sinhb
5226  */
5227 
5228  /* function exit code */
5229  __pyx_L1_error:;
5230  __Pyx_XDECREF(__pyx_t_1);
5231  __Pyx_XDECREF(__pyx_t_2);
5232  __Pyx_XDECREF(__pyx_t_3);
5233  __Pyx_XDECREF(__pyx_t_4);
5234  __Pyx_XDECREF(__pyx_t_6);
5235  __Pyx_XDECREF(__pyx_t_8);
5236  __Pyx_XDECREF(__pyx_t_9);
5237  __Pyx_AddTraceback("WaveTools.coshkzd_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
5238  __pyx_r = NULL;
5239  __pyx_L0:;
5240  __Pyx_XGIVEREF(__pyx_r);
5241  __Pyx_RefNannyFinishContext();
5242  return __pyx_r;
5243 }
5244 
5245 /* "WaveTools.py":140
5246  * return 0.
5247  *
5248  * def sinhkzd_test(k,Z,d,fast=True): # <<<<<<<<<<<<<<
5249  * """Calculation of v vertical profile cosh(k(d+Z))/sinh(kd) using fast appoximaitons
5250  * and hyp trig relation sinh(a+b) = sinha*coshb+cosha*sinhb
5251  */
5252 
5253 /* Python wrapper */
5254 static PyObject *__pyx_pw_9WaveTools_9sinhkzd_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5255 static char __pyx_doc_9WaveTools_8sinhkzd_test[] = "Calculation of v vertical profile cosh(k(d+Z))/sinh(kd) using fast appoximaitons\n and hyp trig relation sinh(a+b) = sinha*coshb+cosha*sinhb\n Parameters\n ----------\n ----------\n k : double\n Wavenumber\n Z : double\n Z coordinate\n d : double\n depth\n Returns\n --------\n sinh(k*(z+d))/sinh(kd) for Z>-d/2, 0 otherwise\n\n ";
5256 static PyMethodDef __pyx_mdef_9WaveTools_9sinhkzd_test = {"sinhkzd_test", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9WaveTools_9sinhkzd_test, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9WaveTools_8sinhkzd_test};
5257 static PyObject *__pyx_pw_9WaveTools_9sinhkzd_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5258  PyObject *__pyx_v_k = 0;
5259  PyObject *__pyx_v_Z = 0;
5260  PyObject *__pyx_v_d = 0;
5261  PyObject *__pyx_v_fast = 0;
5262  int __pyx_lineno = 0;
5263  const char *__pyx_filename = NULL;
5264  int __pyx_clineno = 0;
5265  PyObject *__pyx_r = 0;
5266  __Pyx_RefNannyDeclarations
5267  __Pyx_RefNannySetupContext("sinhkzd_test (wrapper)", 0);
5268  {
5269  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_k,&__pyx_n_s_Z,&__pyx_n_s_d,&__pyx_n_s_fast,0};
5270  PyObject* values[4] = {0,0,0,0};
5271  values[3] = ((PyObject *)((PyObject *)Py_True));
5272  if (unlikely(__pyx_kwds)) {
5273  Py_ssize_t kw_args;
5274  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5275  switch (pos_args) {
5276  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5277  CYTHON_FALLTHROUGH;
5278  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5279  CYTHON_FALLTHROUGH;
5280  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5281  CYTHON_FALLTHROUGH;
5282  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5283  CYTHON_FALLTHROUGH;
5284  case 0: break;
5285  default: goto __pyx_L5_argtuple_error;
5286  }
5287  kw_args = PyDict_Size(__pyx_kwds);
5288  switch (pos_args) {
5289  case 0:
5290  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--;
5291  else goto __pyx_L5_argtuple_error;
5292  CYTHON_FALLTHROUGH;
5293  case 1:
5294  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Z)) != 0)) kw_args--;
5295  else {
5296  __Pyx_RaiseArgtupleInvalid("sinhkzd_test", 0, 3, 4, 1); __PYX_ERR(0, 140, __pyx_L3_error)
5297  }
5298  CYTHON_FALLTHROUGH;
5299  case 2:
5300  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--;
5301  else {
5302  __Pyx_RaiseArgtupleInvalid("sinhkzd_test", 0, 3, 4, 2); __PYX_ERR(0, 140, __pyx_L3_error)
5303  }
5304  CYTHON_FALLTHROUGH;
5305  case 3:
5306  if (kw_args > 0) {
5307  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fast);
5308  if (value) { values[3] = value; kw_args--; }
5309  }
5310  }
5311  if (unlikely(kw_args > 0)) {
5312  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sinhkzd_test") < 0)) __PYX_ERR(0, 140, __pyx_L3_error)
5313  }
5314  } else {
5315  switch (PyTuple_GET_SIZE(__pyx_args)) {
5316  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5317  CYTHON_FALLTHROUGH;
5318  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5319  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5320  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5321  break;
5322  default: goto __pyx_L5_argtuple_error;
5323  }
5324  }
5325  __pyx_v_k = values[0];
5326  __pyx_v_Z = values[1];
5327  __pyx_v_d = values[2];
5328  __pyx_v_fast = values[3];
5329  }
5330  goto __pyx_L4_argument_unpacking_done;
5331  __pyx_L5_argtuple_error:;
5332  __Pyx_RaiseArgtupleInvalid("sinhkzd_test", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 140, __pyx_L3_error)
5333  __pyx_L3_error:;
5334  __Pyx_AddTraceback("WaveTools.sinhkzd_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
5335  __Pyx_RefNannyFinishContext();
5336  return NULL;
5337  __pyx_L4_argument_unpacking_done:;
5338  __pyx_r = __pyx_pf_9WaveTools_8sinhkzd_test(__pyx_self, __pyx_v_k, __pyx_v_Z, __pyx_v_d, __pyx_v_fast);
5339 
5340  /* function exit code */
5341  __Pyx_RefNannyFinishContext();
5342  return __pyx_r;
5343 }
5344 
5345 static PyObject *__pyx_pf_9WaveTools_8sinhkzd_test(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_k, PyObject *__pyx_v_Z, PyObject *__pyx_v_d, PyObject *__pyx_v_fast) {
5346  PyObject *__pyx_r = NULL;
5347  __Pyx_RefNannyDeclarations
5348  PyObject *__pyx_t_1 = NULL;
5349  PyObject *__pyx_t_2 = NULL;
5350  PyObject *__pyx_t_3 = NULL;
5351  PyObject *__pyx_t_4 = NULL;
5352  int __pyx_t_5;
5353  PyObject *__pyx_t_6 = NULL;
5354  int __pyx_t_7;
5355  PyObject *__pyx_t_8 = NULL;
5356  PyObject *__pyx_t_9 = NULL;
5357  PyObject *__pyx_t_10 = NULL;
5358  int __pyx_lineno = 0;
5359  const char *__pyx_filename = NULL;
5360  int __pyx_clineno = 0;
5361  __Pyx_RefNannySetupContext("sinhkzd_test", 0);
5362 
5363  /* "WaveTools.py":158
5364  * """
5365  *
5366  * if (Z> old_div(-d,2.)): # <<<<<<<<<<<<<<
5367  * return fastcosh_test(k,Z,fast) + old_div(fastsinh_test(k,Z,fast), np.tanh(k*d))
5368  * else:
5369  */
5370  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_old_div); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
5371  __Pyx_GOTREF(__pyx_t_2);
5372  __pyx_t_3 = PyNumber_Negative(__pyx_v_d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error)
5373  __Pyx_GOTREF(__pyx_t_3);
5374  __pyx_t_4 = NULL;
5375  __pyx_t_5 = 0;
5376  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
5377  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
5378  if (likely(__pyx_t_4)) {
5379  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5380  __Pyx_INCREF(__pyx_t_4);
5381  __Pyx_INCREF(function);
5382  __Pyx_DECREF_SET(__pyx_t_2, function);
5383  __pyx_t_5 = 1;
5384  }
5385  }
5386  #if CYTHON_FAST_PYCALL
5387  if (PyFunction_Check(__pyx_t_2)) {
5388  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_float_2_};
5389  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
5390  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5391  __Pyx_GOTREF(__pyx_t_1);
5392  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5393  } else
5394  #endif
5395  #if CYTHON_FAST_PYCCALL
5396  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
5397  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_float_2_};
5398  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
5399  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5400  __Pyx_GOTREF(__pyx_t_1);
5401  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5402  } else
5403  #endif
5404  {
5405  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 158, __pyx_L1_error)
5406  __Pyx_GOTREF(__pyx_t_6);
5407  if (__pyx_t_4) {
5408  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
5409  }
5410  __Pyx_GIVEREF(__pyx_t_3);
5411  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
5412  __Pyx_INCREF(__pyx_float_2_);
5413  __Pyx_GIVEREF(__pyx_float_2_);
5414  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_float_2_);
5415  __pyx_t_3 = 0;
5416  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
5417  __Pyx_GOTREF(__pyx_t_1);
5418  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5419  }
5420  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5421  __pyx_t_2 = PyObject_RichCompare(__pyx_v_Z, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
5422  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5423  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 158, __pyx_L1_error)
5424  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5425  if (__pyx_t_7) {
5426 
5427  /* "WaveTools.py":159
5428  *
5429  * if (Z> old_div(-d,2.)):
5430  * return fastcosh_test(k,Z,fast) + old_div(fastsinh_test(k,Z,fast), np.tanh(k*d)) # <<<<<<<<<<<<<<
5431  * else:
5432  * return 0.
5433  */
5434  __Pyx_XDECREF(__pyx_r);
5435  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_fastcosh_test); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
5436  __Pyx_GOTREF(__pyx_t_1);
5437  __pyx_t_6 = NULL;
5438  __pyx_t_5 = 0;
5439  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
5440  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
5441  if (likely(__pyx_t_6)) {
5442  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
5443  __Pyx_INCREF(__pyx_t_6);
5444  __Pyx_INCREF(function);
5445  __Pyx_DECREF_SET(__pyx_t_1, function);
5446  __pyx_t_5 = 1;
5447  }
5448  }
5449  #if CYTHON_FAST_PYCALL
5450  if (PyFunction_Check(__pyx_t_1)) {
5451  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_k, __pyx_v_Z, __pyx_v_fast};
5452  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
5453  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5454  __Pyx_GOTREF(__pyx_t_2);
5455  } else
5456  #endif
5457  #if CYTHON_FAST_PYCCALL
5458  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
5459  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_k, __pyx_v_Z, __pyx_v_fast};
5460  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
5461  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5462  __Pyx_GOTREF(__pyx_t_2);
5463  } else
5464  #endif
5465  {
5466  __pyx_t_3 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
5467  __Pyx_GOTREF(__pyx_t_3);
5468  if (__pyx_t_6) {
5469  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
5470  }
5471  __Pyx_INCREF(__pyx_v_k);
5472  __Pyx_GIVEREF(__pyx_v_k);
5473  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, __pyx_v_k);
5474  __Pyx_INCREF(__pyx_v_Z);
5475  __Pyx_GIVEREF(__pyx_v_Z);
5476  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_v_Z);
5477  __Pyx_INCREF(__pyx_v_fast);
5478  __Pyx_GIVEREF(__pyx_v_fast);
5479  PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_5, __pyx_v_fast);
5480  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
5481  __Pyx_GOTREF(__pyx_t_2);
5482  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5483  }
5484  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5485  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_old_div); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
5486  __Pyx_GOTREF(__pyx_t_3);
5487  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_fastsinh_test); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
5488  __Pyx_GOTREF(__pyx_t_4);
5489  __pyx_t_8 = NULL;
5490  __pyx_t_5 = 0;
5491  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
5492  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
5493  if (likely(__pyx_t_8)) {
5494  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
5495  __Pyx_INCREF(__pyx_t_8);
5496  __Pyx_INCREF(function);
5497  __Pyx_DECREF_SET(__pyx_t_4, function);
5498  __pyx_t_5 = 1;
5499  }
5500  }
5501  #if CYTHON_FAST_PYCALL
5502  if (PyFunction_Check(__pyx_t_4)) {
5503  PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_k, __pyx_v_Z, __pyx_v_fast};
5504  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error)
5505  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
5506  __Pyx_GOTREF(__pyx_t_6);
5507  } else
5508  #endif
5509  #if CYTHON_FAST_PYCCALL
5510  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
5511  PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_k, __pyx_v_Z, __pyx_v_fast};
5512  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error)
5513  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
5514  __Pyx_GOTREF(__pyx_t_6);
5515  } else
5516  #endif
5517  {
5518  __pyx_t_9 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
5519  __Pyx_GOTREF(__pyx_t_9);
5520  if (__pyx_t_8) {
5521  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
5522  }
5523  __Pyx_INCREF(__pyx_v_k);
5524  __Pyx_GIVEREF(__pyx_v_k);
5525  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_5, __pyx_v_k);
5526  __Pyx_INCREF(__pyx_v_Z);
5527  __Pyx_GIVEREF(__pyx_v_Z);
5528  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_5, __pyx_v_Z);
5529  __Pyx_INCREF(__pyx_v_fast);
5530  __Pyx_GIVEREF(__pyx_v_fast);
5531  PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_5, __pyx_v_fast);
5532  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error)
5533  __Pyx_GOTREF(__pyx_t_6);
5534  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5535  }
5536  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5537  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
5538  __Pyx_GOTREF(__pyx_t_9);
5539  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_tanh); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 159, __pyx_L1_error)
5540  __Pyx_GOTREF(__pyx_t_8);
5541  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5542  __pyx_t_9 = PyNumber_Multiply(__pyx_v_k, __pyx_v_d); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
5543  __Pyx_GOTREF(__pyx_t_9);
5544  __pyx_t_10 = NULL;
5545  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
5546  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
5547  if (likely(__pyx_t_10)) {
5548  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
5549  __Pyx_INCREF(__pyx_t_10);
5550  __Pyx_INCREF(function);
5551  __Pyx_DECREF_SET(__pyx_t_8, function);
5552  }
5553  }
5554  __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9);
5555  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
5556  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5557  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
5558  __Pyx_GOTREF(__pyx_t_4);
5559  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5560  __pyx_t_8 = NULL;
5561  __pyx_t_5 = 0;
5562  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5563  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
5564  if (likely(__pyx_t_8)) {
5565  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5566  __Pyx_INCREF(__pyx_t_8);
5567  __Pyx_INCREF(function);
5568  __Pyx_DECREF_SET(__pyx_t_3, function);
5569  __pyx_t_5 = 1;
5570  }
5571  }
5572  #if CYTHON_FAST_PYCALL
5573  if (PyFunction_Check(__pyx_t_3)) {
5574  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_4};
5575  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
5576  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
5577  __Pyx_GOTREF(__pyx_t_1);
5578  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5579  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5580  } else
5581  #endif
5582  #if CYTHON_FAST_PYCCALL
5583  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
5584  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_4};
5585  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
5586  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
5587  __Pyx_GOTREF(__pyx_t_1);
5588  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5589  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5590  } else
5591  #endif
5592  {
5593  __pyx_t_9 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
5594  __Pyx_GOTREF(__pyx_t_9);
5595  if (__pyx_t_8) {
5596  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
5597  }
5598  __Pyx_GIVEREF(__pyx_t_6);
5599  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_5, __pyx_t_6);
5600  __Pyx_GIVEREF(__pyx_t_4);
5601  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_5, __pyx_t_4);
5602  __pyx_t_6 = 0;
5603  __pyx_t_4 = 0;
5604  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
5605  __Pyx_GOTREF(__pyx_t_1);
5606  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5607  }
5608  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5609  __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
5610  __Pyx_GOTREF(__pyx_t_3);
5611  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5612  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5613  __pyx_r = __pyx_t_3;
5614  __pyx_t_3 = 0;
5615  goto __pyx_L0;
5616 
5617  /* "WaveTools.py":158
5618  * """
5619  *
5620  * if (Z> old_div(-d,2.)): # <<<<<<<<<<<<<<
5621  * return fastcosh_test(k,Z,fast) + old_div(fastsinh_test(k,Z,fast), np.tanh(k*d))
5622  * else:
5623  */
5624  }
5625 
5626  /* "WaveTools.py":161
5627  * return fastcosh_test(k,Z,fast) + old_div(fastsinh_test(k,Z,fast), np.tanh(k*d))
5628  * else:
5629  * return 0. # <<<<<<<<<<<<<<
5630  *
5631  * def loadExistingFunction(funcName, validFunctions):
5632  */
5633  /*else*/ {
5634  __Pyx_XDECREF(__pyx_r);
5635  __Pyx_INCREF(__pyx_float_0_);
5636  __pyx_r = __pyx_float_0_;
5637  goto __pyx_L0;
5638  }
5639 
5640  /* "WaveTools.py":140
5641  * return 0.
5642  *
5643  * def sinhkzd_test(k,Z,d,fast=True): # <<<<<<<<<<<<<<
5644  * """Calculation of v vertical profile cosh(k(d+Z))/sinh(kd) using fast appoximaitons
5645  * and hyp trig relation sinh(a+b) = sinha*coshb+cosha*sinhb
5646  */
5647 
5648  /* function exit code */
5649  __pyx_L1_error:;
5650  __Pyx_XDECREF(__pyx_t_1);
5651  __Pyx_XDECREF(__pyx_t_2);
5652  __Pyx_XDECREF(__pyx_t_3);
5653  __Pyx_XDECREF(__pyx_t_4);
5654  __Pyx_XDECREF(__pyx_t_6);
5655  __Pyx_XDECREF(__pyx_t_8);
5656  __Pyx_XDECREF(__pyx_t_9);
5657  __Pyx_XDECREF(__pyx_t_10);
5658  __Pyx_AddTraceback("WaveTools.sinhkzd_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
5659  __pyx_r = NULL;
5660  __pyx_L0:;
5661  __Pyx_XGIVEREF(__pyx_r);
5662  __Pyx_RefNannyFinishContext();
5663  return __pyx_r;
5664 }
5665 
5666 /* "WaveTools.py":163
5667  * return 0.
5668  *
5669  * def loadExistingFunction(funcName, validFunctions): # <<<<<<<<<<<<<<
5670  * """Checks if a function name is known function and returns it
5671  *
5672  */
5673 
5674 /* Python wrapper */
5675 static PyObject *__pyx_pw_9WaveTools_11loadExistingFunction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5676 static char __pyx_doc_9WaveTools_10loadExistingFunction[] = "Checks if a function name is known function and returns it\n\n Checks if a function name is present in a list of functions.\n If True, the function is returned. If False, raises SystemExit.\n\n Parameters\n ----------\n funcName : string\n Function name\n validFunctions : List[function]\n List of valid functions (list of objects)\n\n Returns\n --------\n function\n\n Raises\n ---------\n SystemExit\n\n\n ";
5677 static PyMethodDef __pyx_mdef_9WaveTools_11loadExistingFunction = {"loadExistingFunction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9WaveTools_11loadExistingFunction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9WaveTools_10loadExistingFunction};
5678 static PyObject *__pyx_pw_9WaveTools_11loadExistingFunction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5679  PyObject *__pyx_v_funcName = 0;
5680  PyObject *__pyx_v_validFunctions = 0;
5681  int __pyx_lineno = 0;
5682  const char *__pyx_filename = NULL;
5683  int __pyx_clineno = 0;
5684  PyObject *__pyx_r = 0;
5685  __Pyx_RefNannyDeclarations
5686  __Pyx_RefNannySetupContext("loadExistingFunction (wrapper)", 0);
5687  {
5688  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_funcName,&__pyx_n_s_validFunctions,0};
5689  PyObject* values[2] = {0,0};
5690  if (unlikely(__pyx_kwds)) {
5691  Py_ssize_t kw_args;
5692  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5693  switch (pos_args) {
5694  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5695  CYTHON_FALLTHROUGH;
5696  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5697  CYTHON_FALLTHROUGH;
5698  case 0: break;
5699  default: goto __pyx_L5_argtuple_error;
5700  }
5701  kw_args = PyDict_Size(__pyx_kwds);
5702  switch (pos_args) {
5703  case 0:
5704  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_funcName)) != 0)) kw_args--;
5705  else goto __pyx_L5_argtuple_error;
5706  CYTHON_FALLTHROUGH;
5707  case 1:
5708  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_validFunctions)) != 0)) kw_args--;
5709  else {
5710  __Pyx_RaiseArgtupleInvalid("loadExistingFunction", 1, 2, 2, 1); __PYX_ERR(0, 163, __pyx_L3_error)
5711  }
5712  }
5713  if (unlikely(kw_args > 0)) {
5714  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loadExistingFunction") < 0)) __PYX_ERR(0, 163, __pyx_L3_error)
5715  }
5716  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5717  goto __pyx_L5_argtuple_error;
5718  } else {
5719  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5720  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5721  }
5722  __pyx_v_funcName = values[0];
5723  __pyx_v_validFunctions = values[1];
5724  }
5725  goto __pyx_L4_argument_unpacking_done;
5726  __pyx_L5_argtuple_error:;
5727  __Pyx_RaiseArgtupleInvalid("loadExistingFunction", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 163, __pyx_L3_error)
5728  __pyx_L3_error:;
5729  __Pyx_AddTraceback("WaveTools.loadExistingFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
5730  __Pyx_RefNannyFinishContext();
5731  return NULL;
5732  __pyx_L4_argument_unpacking_done:;
5733  __pyx_r = __pyx_pf_9WaveTools_10loadExistingFunction(__pyx_self, __pyx_v_funcName, __pyx_v_validFunctions);
5734 
5735  /* function exit code */
5736  __Pyx_RefNannyFinishContext();
5737  return __pyx_r;
5738 }
5739 
5740 static PyObject *__pyx_pf_9WaveTools_10loadExistingFunction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_funcName, PyObject *__pyx_v_validFunctions) {
5741  PyObject *__pyx_v_funcNames = NULL;
5742  PyObject *__pyx_v_func = NULL;
5743  PyObject *__pyx_v_func_ret = NULL;
5744  PyObject *__pyx_r = NULL;
5745  __Pyx_RefNannyDeclarations
5746  PyObject *__pyx_t_1 = NULL;
5747  Py_ssize_t __pyx_t_2;
5748  PyObject *(*__pyx_t_3)(PyObject *);
5749  PyObject *__pyx_t_4 = NULL;
5750  int __pyx_t_5;
5751  PyObject *__pyx_t_6 = NULL;
5752  int __pyx_t_7;
5753  int __pyx_t_8;
5754  PyObject *__pyx_t_9 = NULL;
5755  int __pyx_lineno = 0;
5756  const char *__pyx_filename = NULL;
5757  int __pyx_clineno = 0;
5758  __Pyx_RefNannySetupContext("loadExistingFunction", 0);
5759 
5760  /* "WaveTools.py":186
5761  *
5762  * """
5763  * funcNames = [] # <<<<<<<<<<<<<<
5764  * for func in validFunctions:
5765  * funcNames.append(func.__name__)
5766  */
5767  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
5768  __Pyx_GOTREF(__pyx_t_1);
5769  __pyx_v_funcNames = ((PyObject*)__pyx_t_1);
5770  __pyx_t_1 = 0;
5771 
5772  /* "WaveTools.py":187
5773  * """
5774  * funcNames = []
5775  * for func in validFunctions: # <<<<<<<<<<<<<<
5776  * funcNames.append(func.__name__)
5777  * if func.__name__ == funcName:
5778  */
5779  if (likely(PyList_CheckExact(__pyx_v_validFunctions)) || PyTuple_CheckExact(__pyx_v_validFunctions)) {
5780  __pyx_t_1 = __pyx_v_validFunctions; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5781  __pyx_t_3 = NULL;
5782  } else {
5783  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_validFunctions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
5784  __Pyx_GOTREF(__pyx_t_1);
5785  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
5786  }
5787  for (;;) {
5788  if (likely(!__pyx_t_3)) {
5789  if (likely(PyList_CheckExact(__pyx_t_1))) {
5790  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
5791  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5792  __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, 187, __pyx_L1_error)
5793  #else
5794  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error)
5795  __Pyx_GOTREF(__pyx_t_4);
5796  #endif
5797  } else {
5798  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
5799  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5800  __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, 187, __pyx_L1_error)
5801  #else
5802  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error)
5803  __Pyx_GOTREF(__pyx_t_4);
5804  #endif
5805  }
5806  } else {
5807  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
5808  if (unlikely(!__pyx_t_4)) {
5809  PyObject* exc_type = PyErr_Occurred();
5810  if (exc_type) {
5811  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5812  else __PYX_ERR(0, 187, __pyx_L1_error)
5813  }
5814  break;
5815  }
5816  __Pyx_GOTREF(__pyx_t_4);
5817  }
5818  __Pyx_XDECREF_SET(__pyx_v_func, __pyx_t_4);
5819  __pyx_t_4 = 0;
5820 
5821  /* "WaveTools.py":188
5822  * funcNames = []
5823  * for func in validFunctions:
5824  * funcNames.append(func.__name__) # <<<<<<<<<<<<<<
5825  * if func.__name__ == funcName:
5826  * func_ret = func
5827  */
5828  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_func, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error)
5829  __Pyx_GOTREF(__pyx_t_4);
5830  __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_funcNames, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 188, __pyx_L1_error)
5831  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5832 
5833  /* "WaveTools.py":189
5834  * for func in validFunctions:
5835  * funcNames.append(func.__name__)
5836  * if func.__name__ == funcName: # <<<<<<<<<<<<<<
5837  * func_ret = func
5838  * if funcName not in funcNames:
5839  */
5840  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_func, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error)
5841  __Pyx_GOTREF(__pyx_t_4);
5842  __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_funcName, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error)
5843  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5844  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 189, __pyx_L1_error)
5845  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5846  if (__pyx_t_7) {
5847 
5848  /* "WaveTools.py":190
5849  * funcNames.append(func.__name__)
5850  * if func.__name__ == funcName:
5851  * func_ret = func # <<<<<<<<<<<<<<
5852  * if funcName not in funcNames:
5853  * logEvent("ERROR! Wavetools.py: Wrong function type (%s) given: Valid wavetypes are %s" %(funcName,funcNames), level=0)
5854  */
5855  __Pyx_INCREF(__pyx_v_func);
5856  __Pyx_XDECREF_SET(__pyx_v_func_ret, __pyx_v_func);
5857 
5858  /* "WaveTools.py":189
5859  * for func in validFunctions:
5860  * funcNames.append(func.__name__)
5861  * if func.__name__ == funcName: # <<<<<<<<<<<<<<
5862  * func_ret = func
5863  * if funcName not in funcNames:
5864  */
5865  }
5866 
5867  /* "WaveTools.py":187
5868  * """
5869  * funcNames = []
5870  * for func in validFunctions: # <<<<<<<<<<<<<<
5871  * funcNames.append(func.__name__)
5872  * if func.__name__ == funcName:
5873  */
5874  }
5875  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5876 
5877  /* "WaveTools.py":191
5878  * if func.__name__ == funcName:
5879  * func_ret = func
5880  * if funcName not in funcNames: # <<<<<<<<<<<<<<
5881  * logEvent("ERROR! Wavetools.py: Wrong function type (%s) given: Valid wavetypes are %s" %(funcName,funcNames), level=0)
5882  * sys.exit(1)
5883  */
5884  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_funcName, __pyx_v_funcNames, Py_NE)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 191, __pyx_L1_error)
5885  __pyx_t_8 = (__pyx_t_7 != 0);
5886  if (__pyx_t_8) {
5887 
5888  /* "WaveTools.py":192
5889  * func_ret = func
5890  * if funcName not in funcNames:
5891  * logEvent("ERROR! Wavetools.py: Wrong function type (%s) given: Valid wavetypes are %s" %(funcName,funcNames), level=0) # <<<<<<<<<<<<<<
5892  * sys.exit(1)
5893  * return func_ret
5894  */
5895  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
5896  __Pyx_GOTREF(__pyx_t_1);
5897  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 192, __pyx_L1_error)
5898  __Pyx_GOTREF(__pyx_t_6);
5899  __Pyx_INCREF(__pyx_v_funcName);
5900  __Pyx_GIVEREF(__pyx_v_funcName);
5901  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_funcName);
5902  __Pyx_INCREF(__pyx_v_funcNames);
5903  __Pyx_GIVEREF(__pyx_v_funcNames);
5904  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_funcNames);
5905  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_ERROR_Wavetools_py_Wrong_functio, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 192, __pyx_L1_error)
5906  __Pyx_GOTREF(__pyx_t_4);
5907  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5908  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 192, __pyx_L1_error)
5909  __Pyx_GOTREF(__pyx_t_6);
5910  __Pyx_GIVEREF(__pyx_t_4);
5911  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
5912  __pyx_t_4 = 0;
5913  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 192, __pyx_L1_error)
5914  __Pyx_GOTREF(__pyx_t_4);
5915  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_level, __pyx_int_0) < 0) __PYX_ERR(0, 192, __pyx_L1_error)
5916  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 192, __pyx_L1_error)
5917  __Pyx_GOTREF(__pyx_t_9);
5918  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5919  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5920  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5921  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5922 
5923  /* "WaveTools.py":193
5924  * if funcName not in funcNames:
5925  * logEvent("ERROR! Wavetools.py: Wrong function type (%s) given: Valid wavetypes are %s" %(funcName,funcNames), level=0)
5926  * sys.exit(1) # <<<<<<<<<<<<<<
5927  * return func_ret
5928  *
5929  */
5930  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error)
5931  __Pyx_GOTREF(__pyx_t_4);
5932  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 193, __pyx_L1_error)
5933  __Pyx_GOTREF(__pyx_t_6);
5934  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5935  __pyx_t_4 = NULL;
5936  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
5937  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
5938  if (likely(__pyx_t_4)) {
5939  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
5940  __Pyx_INCREF(__pyx_t_4);
5941  __Pyx_INCREF(function);
5942  __Pyx_DECREF_SET(__pyx_t_6, function);
5943  }
5944  }
5945  __pyx_t_9 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_1);
5946  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5947  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 193, __pyx_L1_error)
5948  __Pyx_GOTREF(__pyx_t_9);
5949  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5950  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5951 
5952  /* "WaveTools.py":191
5953  * if func.__name__ == funcName:
5954  * func_ret = func
5955  * if funcName not in funcNames: # <<<<<<<<<<<<<<
5956  * logEvent("ERROR! Wavetools.py: Wrong function type (%s) given: Valid wavetypes are %s" %(funcName,funcNames), level=0)
5957  * sys.exit(1)
5958  */
5959  }
5960 
5961  /* "WaveTools.py":194
5962  * logEvent("ERROR! Wavetools.py: Wrong function type (%s) given: Valid wavetypes are %s" %(funcName,funcNames), level=0)
5963  * sys.exit(1)
5964  * return func_ret # <<<<<<<<<<<<<<
5965  *
5966  *
5967  */
5968  __Pyx_XDECREF(__pyx_r);
5969  if (unlikely(!__pyx_v_func_ret)) { __Pyx_RaiseUnboundLocalError("func_ret"); __PYX_ERR(0, 194, __pyx_L1_error) }
5970  __Pyx_INCREF(__pyx_v_func_ret);
5971  __pyx_r = __pyx_v_func_ret;
5972  goto __pyx_L0;
5973 
5974  /* "WaveTools.py":163
5975  * return 0.
5976  *
5977  * def loadExistingFunction(funcName, validFunctions): # <<<<<<<<<<<<<<
5978  * """Checks if a function name is known function and returns it
5979  *
5980  */
5981 
5982  /* function exit code */
5983  __pyx_L1_error:;
5984  __Pyx_XDECREF(__pyx_t_1);
5985  __Pyx_XDECREF(__pyx_t_4);
5986  __Pyx_XDECREF(__pyx_t_6);
5987  __Pyx_XDECREF(__pyx_t_9);
5988  __Pyx_AddTraceback("WaveTools.loadExistingFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
5989  __pyx_r = NULL;
5990  __pyx_L0:;
5991  __Pyx_XDECREF(__pyx_v_funcNames);
5992  __Pyx_XDECREF(__pyx_v_func);
5993  __Pyx_XDECREF(__pyx_v_func_ret);
5994  __Pyx_XGIVEREF(__pyx_r);
5995  __Pyx_RefNannyFinishContext();
5996  return __pyx_r;
5997 }
5998 
5999 /* "WaveTools.py":198
6000  *
6001  *
6002  * def setVertDir(g): # <<<<<<<<<<<<<<
6003  * """ Returns the unit vector for the vertical direction
6004  *
6005  */
6006 
6007 /* Python wrapper */
6008 static PyObject *__pyx_pw_9WaveTools_13setVertDir(PyObject *__pyx_self, PyObject *__pyx_v_g); /*proto*/
6009 static char __pyx_doc_9WaveTools_12setVertDir[] = " Returns the unit vector for the vertical direction\n\n The vertical direction is opposite to the gravity direction\n\n Parameters\n ----------\n g : numpy.ndarray\n Gravitational acceleration vector (must have 3 components)\n\n Returns\n --------\n numpy.ndarray\n\n ";
6010 static PyMethodDef __pyx_mdef_9WaveTools_13setVertDir = {"setVertDir", (PyCFunction)__pyx_pw_9WaveTools_13setVertDir, METH_O, __pyx_doc_9WaveTools_12setVertDir};
6011 static PyObject *__pyx_pw_9WaveTools_13setVertDir(PyObject *__pyx_self, PyObject *__pyx_v_g) {
6012  PyObject *__pyx_r = 0;
6013  __Pyx_RefNannyDeclarations
6014  __Pyx_RefNannySetupContext("setVertDir (wrapper)", 0);
6015  __pyx_r = __pyx_pf_9WaveTools_12setVertDir(__pyx_self, ((PyObject *)__pyx_v_g));
6016 
6017  /* function exit code */
6018  __Pyx_RefNannyFinishContext();
6019  return __pyx_r;
6020 }
6021 
6022 static PyObject *__pyx_pf_9WaveTools_12setVertDir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_g) {
6023  PyObject *__pyx_r = NULL;
6024  __Pyx_RefNannyDeclarations
6025  PyObject *__pyx_t_1 = NULL;
6026  PyObject *__pyx_t_2 = NULL;
6027  PyObject *__pyx_t_3 = NULL;
6028  PyObject *__pyx_t_4 = NULL;
6029  PyObject *__pyx_t_5 = NULL;
6030  PyObject *__pyx_t_6 = NULL;
6031  PyObject *__pyx_t_7 = NULL;
6032  double __pyx_t_8;
6033  int __pyx_t_9;
6034  int __pyx_lineno = 0;
6035  const char *__pyx_filename = NULL;
6036  int __pyx_clineno = 0;
6037  __Pyx_RefNannySetupContext("setVertDir", 0);
6038 
6039  /* "WaveTools.py":213
6040  *
6041  * """
6042  * return -np.array(old_div(g,(sqrt(g[0]**2 + g[1]**2 + g[2]**2)))) # <<<<<<<<<<<<<<
6043  *
6044  *
6045  */
6046  __Pyx_XDECREF(__pyx_r);
6047