3 #ifndef PY_SSIZE_T_CLEAN
4 #define PY_SSIZE_T_CLEAN
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+.
12 #define CYTHON_ABI "0_29_30"
13 #define CYTHON_HEX_VERSION 0x001D1EF0
14 #define CYTHON_FUTURE_DIVISION 1
17 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
19 #if !defined(WIN32) && !defined(MS_WINDOWS)
31 #define DL_IMPORT(t) t
34 #define DL_EXPORT(t) t
37 #ifndef HAVE_LONG_LONG
38 #if PY_VERSION_HEX >= 0x02070000
39 #define HAVE_LONG_LONG
43 #define PY_LONG_LONG LONG_LONG
46 #define Py_HUGE_VAL HUGE_VAL
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
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)
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
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
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
114 #ifndef CYTHON_ASSUME_SAFE_MACROS
115 #define CYTHON_ASSUME_SAFE_MACROS 1
117 #ifndef CYTHON_UNPACK_METHODS
118 #define CYTHON_UNPACK_METHODS 1
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
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
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
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
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
160 #ifndef CYTHON_USE_PYLIST_INTERNALS
161 #define CYTHON_USE_PYLIST_INTERNALS 1
163 #ifndef CYTHON_USE_UNICODE_INTERNALS
164 #define CYTHON_USE_UNICODE_INTERNALS 1
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
172 #ifndef CYTHON_AVOID_BORROWED_REFS
173 #define CYTHON_AVOID_BORROWED_REFS 0
175 #ifndef CYTHON_ASSUME_SAFE_MACROS
176 #define CYTHON_ASSUME_SAFE_MACROS 1
178 #ifndef CYTHON_UNPACK_METHODS
179 #define CYTHON_UNPACK_METHODS 1
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
187 #ifndef CYTHON_FAST_PYCALL
188 #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
190 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
191 #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
193 #ifndef CYTHON_USE_TP_FINALIZE
194 #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
196 #ifndef CYTHON_USE_DICT_VERSIONS
197 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
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)
205 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
206 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
209 #if !defined(CYTHON_FAST_PYCCALL)
210 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
212 #if CYTHON_USE_PYLONG_INTERNALS
213 #if PY_MAJOR_VERSION < 3
214 #include "longintrepr.h"
220 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P ==
sizeof(
void*)) };
223 #ifndef __has_attribute
224 #define __has_attribute(x) 0
226 #ifndef __has_cpp_attribute
227 #define __has_cpp_attribute(x) 0
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
237 #define CYTHON_RESTRICT
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__))
245 # define CYTHON_UNUSED
247 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
248 # define CYTHON_UNUSED __attribute__ ((__unused__))
250 # define CYTHON_UNUSED
253 #ifndef CYTHON_MAYBE_UNUSED_VAR
254 # if defined(__cplusplus)
255 template<
class T>
void CYTHON_MAYBE_UNUSED_VAR(
const T& ) { }
257 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
260 #ifndef CYTHON_NCP_UNUSED
261 # if CYTHON_COMPILING_IN_CPYTHON
262 # define CYTHON_NCP_UNUSED
264 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
267 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
269 #ifndef _MSC_STDINT_H_
271 typedef unsigned char uint8_t;
272 typedef unsigned int uint32_t;
274 typedef unsigned __int8 uint8_t;
275 typedef unsigned __int32 uint32_t;
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]]
291 #ifndef CYTHON_FALLTHROUGH
292 #if __has_attribute(fallthrough)
293 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
295 #define CYTHON_FALLTHROUGH
298 #if defined(__clang__ ) && defined(__apple_build_version__)
299 #if __apple_build_version__ < 7000000
300 #undef CYTHON_FALLTHROUGH
301 #define CYTHON_FALLTHROUGH
307 #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
309 #ifndef CYTHON_INLINE
310 #if defined(__clang__)
311 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
313 #define CYTHON_INLINE inline
317 void __Pyx_call_destructor(
T& x) {
321 class __Pyx_FakeReference {
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; }
334 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
335 #define Py_OptimizeFlag 0
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
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;
384 if (!(call_result = PyObject_Call(replace, empty, kwds)))
goto cleanup_code_too;
385 Py_XDECREF((PyObject*)co);
386 co = (PyCodeObject*)call_result;
390 Py_XDECREF((PyObject*)co);
395 Py_XDECREF(argcount);
396 Py_XDECREF(posonlyargcount);
397 Py_XDECREF(kwonlyargcount);
399 Py_XDECREF(stacksize);
401 Py_XDECREF(call_result);
404 PyErr_Restore(type, value, traceback);
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)
412 #define __Pyx_DefaultClassType PyType_Type
414 #ifndef Py_TPFLAGS_CHECKTYPES
415 #define Py_TPFLAGS_CHECKTYPES 0
417 #ifndef Py_TPFLAGS_HAVE_INDEX
418 #define Py_TPFLAGS_HAVE_INDEX 0
420 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
421 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
423 #ifndef Py_TPFLAGS_HAVE_FINALIZE
424 #define Py_TPFLAGS_HAVE_FINALIZE 0
426 #ifndef METH_STACKLESS
427 #define METH_STACKLESS 0
429 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
430 #ifndef METH_FASTCALL
431 #define METH_FASTCALL 0x80
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);
437 #define __Pyx_PyCFunctionFast _PyCFunctionFast
438 #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
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)))))
444 #define __Pyx_PyFastCFunction_Check(func) 0
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)
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)
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)
460 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
461 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
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()
470 #define __Pyx_PyThreadState_Current _PyThreadState_Current
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();
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;
485 static CYTHON_INLINE
void PyThread_tss_free(Py_tss_t *key) {
488 static CYTHON_INLINE
int PyThread_tss_is_created(Py_tss_t *key) {
489 return *key != Py_tss_NEEDS_INIT;
491 static CYTHON_INLINE
void PyThread_tss_delete(Py_tss_t *key) {
492 PyThread_delete_key(*key);
493 *key = Py_tss_NEEDS_INIT;
495 static CYTHON_INLINE
int PyThread_tss_set(Py_tss_t *key,
void *value) {
496 return PyThread_set_key_value(*key, value);
498 static CYTHON_INLINE
void * PyThread_tss_get(Py_tss_t *key) {
499 return PyThread_get_key_value(*key);
502 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
503 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
505 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
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)
511 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
512 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
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)
517 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
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)))
525 #define __Pyx_PyUnicode_READY(op) (0)
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))
538 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
541 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
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))
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)
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))
566 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
567 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
569 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
570 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
572 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
573 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
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)
580 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
582 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
583 #define PyObject_ASCII(o) PyObject_Repr(o)
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
595 #if PY_MAJOR_VERSION >= 3
596 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
597 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
599 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
600 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
602 #ifndef PySet_CheckExact
603 #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
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)
609 #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
610 #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
612 #if CYTHON_ASSUME_SAFE_MACROS
613 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
615 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
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
634 #if PY_MAJOR_VERSION >= 3
635 #define PyBoolObject PyLongObject
637 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
638 #ifndef PyUnicode_InternFromString
639 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
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
647 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
648 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
650 #if PY_MAJOR_VERSION >= 3
651 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
653 #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
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)
660 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
663 #define __Pyx_PyType_AsAsync(obj) NULL
665 #ifndef __Pyx_PyAsyncMethodsStruct
670 } __Pyx_PyAsyncMethodsStruct;
673 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
674 #if !defined(_USE_MATH_DEFINES)
675 #define _USE_MATH_DEFINES
680 #define __PYX_NAN() ((float) NAN)
682 static CYTHON_INLINE
float __PYX_NAN() {
684 memset(&value, 0xFF,
sizeof(value));
688 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
689 #define __Pyx_truncl trunc
691 #define __Pyx_truncl truncl
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; }
699 #ifndef __PYX_EXTERN_C
701 #define __PYX_EXTERN_C extern "C"
703 #define __PYX_EXTERN_C extern
707 #define __PYX_HAVE__WaveTools
708 #define __PYX_HAVE_API__WaveTools
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"
726 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
727 #define CYTHON_WITHOUT_ASSERTIONS
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;
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;
754 #if defined (__cplusplus) && __cplusplus >= 201103L
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)
768 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
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
781 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
782 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
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;
803 return (
size_t)(u_end -
u - 1);
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))
822 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
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))
828 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
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) {
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");
841 default_encoding = PyObject_CallMethod(sys, (
char*)
"getdefaultencoding", NULL);
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;
849 char ascii_chars[128];
851 for (
c = 0;
c < 128;
c++) {
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) {
861 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
865 Py_DECREF(ascii_chars_u);
866 Py_DECREF(ascii_chars_b);
868 Py_DECREF(default_encoding);
871 Py_XDECREF(default_encoding);
872 Py_XDECREF(ascii_chars_u);
873 Py_XDECREF(ascii_chars_b);
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)
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) {
885 PyObject* default_encoding = NULL;
886 char* default_encoding_c;
887 sys = PyImport_ImportModule(
"sys");
889 default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*)
"getdefaultencoding", NULL);
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);
900 Py_XDECREF(default_encoding);
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)
912 #define likely(x) (x)
913 #define unlikely(x) (x)
915 static CYTHON_INLINE
void __Pyx_pretend_to_initialize(
void* ptr) { (void)ptr; }
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;
930 #if !defined(CYTHON_CCOMPLEX)
931 #if defined(__cplusplus)
932 #define CYTHON_CCOMPLEX 1
933 #elif defined(_Complex_I)
934 #define CYTHON_CCOMPLEX 1
936 #define CYTHON_CCOMPLEX 0
946 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
948 #define _Complex_I 1.0fj
952 static const char *__pyx_f[] = {
953 "proteus/WaveTools.py",
955 "proteus/WaveTools.pxd",
967 typedef npy_int8 __pyx_t_5numpy_int8_t;
976 typedef npy_int16 __pyx_t_5numpy_int16_t;
985 typedef npy_int32 __pyx_t_5numpy_int32_t;
994 typedef npy_int64 __pyx_t_5numpy_int64_t;
1003 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1012 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1021 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1030 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1039 typedef npy_float32 __pyx_t_5numpy_float32_t;
1048 typedef npy_float64 __pyx_t_5numpy_float64_t;
1057 typedef npy_long __pyx_t_5numpy_int_t;
1066 typedef npy_longlong __pyx_t_5numpy_long_t;
1075 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1084 typedef npy_ulong __pyx_t_5numpy_uint_t;
1093 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1102 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1111 typedef npy_intp __pyx_t_5numpy_intp_t;
1120 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1129 typedef npy_double __pyx_t_5numpy_float_t;
1138 typedef npy_double __pyx_t_5numpy_double_t;
1147 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1151 typedef ::std::complex< float > __pyx_t_float_complex;
1153 typedef float _Complex __pyx_t_float_complex;
1156 typedef struct {
float real, imag; } __pyx_t_float_complex;
1158 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float,
float);
1163 typedef ::std::complex< double > __pyx_t_double_complex;
1165 typedef double _Complex __pyx_t_double_complex;
1168 typedef struct {
double real, imag; } __pyx_t_double_complex;
1170 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double,
double);
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;
1193 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1202 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1211 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1220 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1221 struct __pyx_defaults;
1222 typedef struct __pyx_defaults __pyx_defaults;
1231 typedef double (*__pyx_t_9WaveTools_cfeta)(
struct __pyx_obj_9WaveTools_MonochromaticWaves *,
double *, double);
1240 typedef void (*__pyx_t_9WaveTools_cfvel)(
struct __pyx_obj_9WaveTools_MonochromaticWaves *,
double *,
double *, double);
1249 typedef double (*__pyx_t_9WaveTools_cfeta2)(
struct __pyx_obj_9WaveTools_TimeSeries *,
double *, double);
1258 typedef void (*__pyx_t_9WaveTools_cfvel2)(
struct __pyx_obj_9WaveTools_TimeSeries *,
double *,
double *, double);
1259 struct __pyx_defaults {
1260 PyObject *__pyx_arg_Lgen;
1270 struct __pyx_obj_9WaveTools_SteadyCurrent {
1285 struct __pyx_obj_9WaveTools_SolitaryWave {
1296 PyArrayObject *waveDir;
1297 PyArrayObject *vDir;
1298 PyArrayObject *trans;
1310 struct __pyx_obj_9WaveTools_MonochromaticWaves {
1312 struct __pyx_vtabstruct_9WaveTools_MonochromaticWaves *__pyx_vtab;
1315 PyArrayObject *waveDir;
1316 PyArrayObject *vDir;
1317 PyArrayObject *Ycoeff;
1318 PyArrayObject *Bcoeff;
1319 PyArrayObject *kDir;
1320 PyArrayObject *tanhF;
1339 double waveDir_c[3];
1342 double Ycoeff_c[0x3E8];
1343 double Bcoeff_c[0x3E8];
1344 double tanh_c[0x3E8];
1347 __pyx_t_9WaveTools_cfeta _cpp_eta;
1348 __pyx_t_9WaveTools_cfvel _cpp_u;
1360 struct __pyx_obj_9WaveTools_NewWave {
1362 struct __pyx_vtabstruct_9WaveTools_NewWave *__pyx_vtab;
1372 double waveDir_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];
1394 PyArrayObject *Si_Jm;
1396 PyArrayObject *omega;
1397 PyArrayObject *tanhF;
1399 PyArrayObject *waveDir;
1400 PyArrayObject *vDir;
1401 PyArrayObject *kDir;
1414 struct __pyx_obj_9WaveTools_RandomWaves {
1416 struct __pyx_vtabstruct_9WaveTools_RandomWaves *__pyx_vtab;
1426 double waveDir_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];
1447 PyArrayObject *Si_Jm;
1449 PyArrayObject *omega;
1450 PyArrayObject *tanhF;
1452 PyArrayObject *waveDir;
1453 PyArrayObject *vDir;
1454 PyArrayObject *kDir;
1467 struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves {
1469 struct __pyx_vtabstruct_9WaveTools_MultiSpectraRandomWaves *__pyx_vtab;
1475 PyArrayObject *vDir;
1476 PyArrayObject *waveDir;
1477 PyArrayObject *omegaM;
1478 PyArrayObject *phiM;
1480 PyArrayObject *kDirM;
1481 PyArrayObject *tanhFM;
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];
1511 struct __pyx_obj_9WaveTools_DirectionalWaves {
1513 struct __pyx_vtabstruct_9WaveTools_DirectionalWaves *__pyx_vtab;
1519 PyArrayObject *vDir;
1520 PyArrayObject *omega;
1521 PyArrayObject *tanh;
1522 PyArrayObject *waveDir0;
1523 PyArrayObject *waveDirs;
1524 PyArrayObject *phiDirs;
1525 PyArrayObject *aiDirs;
1527 PyArrayObject *kDirs;
1528 PyArrayObject *tanhF;
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];
1557 struct __pyx_obj_9WaveTools_TimeSeries {
1559 struct __pyx_vtabstruct_9WaveTools_TimeSeries *__pyx_vtab;
1563 PyArrayObject *waveDir;
1564 PyArrayObject *vDir;
1566 PyArrayObject *kDir;
1567 PyArrayObject *tanhF;
1568 PyArrayObject *time;
1569 PyArrayObject *etaS;
1571 PyArrayObject *omega;
1592 PyObject *windows_handover;
1593 PyObject *windows_rec;
1594 PyObject *decompose_window;
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];
1615 double whand_c[0xF4240];
1621 __pyx_t_9WaveTools_cfeta2 _cpp_eta;
1622 __pyx_t_9WaveTools_cfvel2 _cpp_u;
1633 struct __pyx_obj_9WaveTools_RandomNLWaves {
1635 struct __pyx_vtabstruct_9WaveTools_RandomNLWaves *__pyx_vtab;
1637 PyArrayObject *omega;
1639 PyArrayObject *kDir;
1641 PyArrayObject *tanhKd;
1642 PyArrayObject *sinhKd;
1643 PyArrayObject *waveDir;
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];
1664 PyObject *eta_linear;
1675 struct __pyx_obj_9WaveTools___pyx_scope_struct____cinit__ {
1677 struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self;
1678 PyObject *__pyx_v_xfocus;
1689 struct __pyx_obj_9WaveTools___pyx_scope_struct_1_genexpr {
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 *);
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);
1714 static struct __pyx_vtabstruct_9WaveTools_MonochromaticWaves *__pyx_vtabptr_9WaveTools_MonochromaticWaves;
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);
1729 static struct __pyx_vtabstruct_9WaveTools_NewWave *__pyx_vtabptr_9WaveTools_NewWave;
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);
1744 static struct __pyx_vtabstruct_9WaveTools_RandomWaves *__pyx_vtabptr_9WaveTools_RandomWaves;
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);
1759 static struct __pyx_vtabstruct_9WaveTools_MultiSpectraRandomWaves *__pyx_vtabptr_9WaveTools_MultiSpectraRandomWaves;
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);
1774 static struct __pyx_vtabstruct_9WaveTools_DirectionalWaves *__pyx_vtabptr_9WaveTools_DirectionalWaves;
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);
1791 static struct __pyx_vtabstruct_9WaveTools_TimeSeries *__pyx_vtabptr_9WaveTools_TimeSeries;
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);
1807 static struct __pyx_vtabstruct_9WaveTools_RandomNLWaves *__pyx_vtabptr_9WaveTools_RandomNLWaves;
1811 #ifndef CYTHON_REFNANNY
1812 #define CYTHON_REFNANNY 0
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;
1827 #define __Pyx_RefNannySetupContext(name, 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);\
1833 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1836 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1837 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
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)
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)
1862 #define __Pyx_XDECREF_SET(r, v) do {\
1863 PyObject *tmp = (PyObject *) r;\
1864 r = v; __Pyx_XDECREF(tmp);\
1866 #define __Pyx_DECREF_SET(r, v) do {\
1867 PyObject *tmp = (PyObject *) r;\
1868 r = v; __Pyx_DECREF(tmp);\
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)
1874 #if CYTHON_USE_TYPE_SLOTS
1875 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1877 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1881 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1884 static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name);
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);
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);
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;\
1908 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1909 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
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);
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);
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);\
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);\
1935 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
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);
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);
1949 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
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)
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
1963 #include "internal/pycore_frame.h"
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
1974 #if CYTHON_FAST_PYCCALL
1975 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1977 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1981 #if CYTHON_COMPILING_IN_CPYTHON
1982 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1984 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1988 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject*
function, PyObject* arg1, PyObject* arg2);
1991 #if CYTHON_COMPILING_IN_CPYTHON
1992 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1996 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
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))) {
2005 PyList_SET_ITEM(list, len, x);
2006 __Pyx_SET_SIZE(list, len + 1);
2009 return PyList_Append(list, x);
2012 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
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));
2022 static CYTHON_INLINE
void __Pyx_RaiseUnboundLocalError(
const char *varname);
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);
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))
2054 #define __Pyx_PyNumber_Absolute(x) PyNumber_Absolute(x)
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);
2064 #if CYTHON_COMPILING_IN_CPYTHON
2065 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
2067 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
2071 #if CYTHON_USE_TYPE_SLOTS
2072 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
2074 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
2078 #if !CYTHON_COMPILING_IN_PYPY
2079 static PyObject* __Pyx_PyFloat_AddCObj(PyObject *op1, PyObject *op2,
double floatval,
int inplace,
int zerodivision_check);
2081 #define __Pyx_PyFloat_AddCObj(op1, op2, floatval, inplace, zerodivision_check)\
2082 (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
2086 #if !CYTHON_COMPILING_IN_PYPY
2087 static PyObject* __Pyx_PyFloat_SubtractObjC(PyObject *op1, PyObject *op2,
double floatval,
int inplace,
int zerodivision_check);
2089 #define __Pyx_PyFloat_SubtractObjC(op1, op2, floatval, inplace, zerodivision_check)\
2090 (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
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);
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))
2109 #define __Pyx_PyObject_AsDouble(obj)\
2110 ((likely(PyFloat_CheckExact(obj))) ?\
2111 PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
2115 #if !CYTHON_COMPILING_IN_PYPY
2116 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2,
long intval,
int inplace,
int zerodivision_check);
2118 #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
2119 (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
2123 #if CYTHON_USE_EXC_INFO_STACK
2124 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
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
2133 #define __Pyx_PyThreadState_declare
2134 #define __Pyx_PyThreadState_assign
2135 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
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);
2145 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
2146 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
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);
2154 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2158 static CYTHON_INLINE
int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
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);
2165 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
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))
2180 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
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)
2194 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
2197 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
2200 #if !CYTHON_COMPILING_IN_PYPY
2201 static PyObject* __Pyx_PyFloat_TrueDivideCObj(PyObject *op1, PyObject *op2,
double floatval,
int inplace,
int zerodivision_check);
2203 #define __Pyx_PyFloat_TrueDivideCObj(op1, op2, floatval, inplace, zerodivision_check)\
2204 (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
2211 static CYTHON_INLINE
int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2,
int equals);
2214 static CYTHON_INLINE
int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2,
int equals);
2217 #if PY_MAJOR_VERSION >= 3
2218 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
2220 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
2224 #if !CYTHON_COMPILING_IN_PYPY
2225 static PyObject* __Pyx_PyFloat_EqObjC(PyObject *op1, PyObject *op2,
double floatval,
int inplace,
int zerodivision_check);
2227 #define __Pyx_PyFloat_EqObjC(op1, op2, floatval, inplace, zerodivision_check)\
2228 (PyObject_RichCompare(op1, op2, Py_EQ))
2232 #if !CYTHON_COMPILING_IN_PYPY
2233 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2,
long intval,
int inplace,
int zerodivision_check);
2235 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
2236 (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
2240 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level);
2243 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
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))
2252 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
2253 #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
2257 static CYTHON_INLINE
void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
2260 static CYTHON_INLINE
void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
2263 static CYTHON_INLINE
int __Pyx_IterFinish(
void);
2266 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
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);
2279 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2282 static CYTHON_INLINE
void __Pyx_RaiseClosureNameError(
const char *varname);
2285 #if !CYTHON_COMPILING_IN_PYPY
2286 static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2,
double floatval,
int inplace,
int zerodivision_check);
2288 #define __Pyx_PyFloat_TrueDivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
2289 (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
2293 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2,
long intval,
long inplace);
2296 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
2299 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
2302 static CYTHON_INLINE
int __Pyx_PyObject_Append(PyObject*
L, PyObject* x);
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);
2309 #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
2310 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
2314 static CYTHON_INLINE
int __Pyx_HasAttr(PyObject *, PyObject *);
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);
2320 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
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);
2327 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
2331 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2334 static int __Pyx_setup_reduce(PyObject* type_obj);
2337 static int __Pyx_SetVtable(PyObject *dict,
void *vtable);
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
2347 static PyTypeObject *__Pyx_ImportType(PyObject* module,
const char *module_name,
const char *class_name,
size_t size,
enum __Pyx_ImportType_CheckSize check_size);
2351 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
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)
2367 PyCFunctionObject func;
2368 #if PY_VERSION_HEX < 0x030500A0
2369 PyObject *func_weakreflist;
2371 PyObject *func_dict;
2372 PyObject *func_name;
2373 PyObject *func_qualname;
2375 PyObject *func_globals;
2376 PyObject *func_code;
2377 PyObject *func_closure;
2378 PyObject *func_classobj;
2380 int defaults_pyobjects;
2381 size_t defaults_size;
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,
2393 PyObject *module, PyObject *globals,
2395 static CYTHON_INLINE
void *__Pyx_CyFunction_InitDefaults(PyObject *m,
2398 static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
2400 static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
2402 static CYTHON_INLINE
void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
2404 static int __pyx_CyFunction_init(
void);
2407 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
2408 int flags, PyObject* qualname,
2410 PyObject *module, PyObject *globals,
2414 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
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))
2424 #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value)
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);
2434 #ifdef CYTHON_CLINE_IN_TRACEBACK
2435 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2437 static int __Pyx_CLineForTraceback(PyThreadState *tstate,
int c_line);
2442 PyCodeObject* code_object;
2444 } __Pyx_CodeObjectCacheEntry;
2445 struct __Pyx_CodeObjectCache {
2448 __Pyx_CodeObjectCacheEntry* entries;
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);
2456 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
2457 int py_line,
const char *filename);
2460 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2461 #define __Pyx_HAS_GCC_DIAGNOSTIC
2467 #define __Pyx_CREAL(z) ((z).real())
2468 #define __Pyx_CIMAG(z) ((z).imag())
2470 #define __Pyx_CREAL(z) (__real__(z))
2471 #define __Pyx_CIMAG(z) (__imag__(z))
2474 #define __Pyx_CREAL(z) ((z).real)
2475 #define __Pyx_CIMAG(z) ((z).imag)
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))
2482 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2483 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
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))
2495 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2496 #define __Pyx_c_conj_float(z) (::std::conj(z))
2498 #define __Pyx_c_abs_float(z) (::std::abs(z))
2499 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2502 #define __Pyx_c_is_zero_float(z) ((z)==0)
2503 #define __Pyx_c_conj_float(z) (conjf(z))
2505 #define __Pyx_c_abs_float(z) (cabsf(z))
2506 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
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);
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);
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))
2533 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2534 #define __Pyx_c_conj_double(z) (::std::conj(z))
2536 #define __Pyx_c_abs_double(z) (::std::abs(z))
2537 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2540 #define __Pyx_c_is_zero_double(z) ((z)==0)
2541 #define __Pyx_c_conj_double(z) (conj(z))
2543 #define __Pyx_c_abs_double(z) (cabs(z))
2544 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
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);
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);
2563 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *);
2566 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value);
2569 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *);
2572 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value);
2575 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value);
2578 static CYTHON_INLINE
size_t __Pyx_PyInt_As_size_t(PyObject *);
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);
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))
2591 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
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);
2598 static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
2602 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
2603 #if CYTHON_USE_EXC_INFO_STACK
2604 #define __Pyx_ExcInfoStruct _PyErr_StackItem
2608 PyObject *exc_value;
2609 PyObject *exc_traceback;
2610 } __Pyx_ExcInfoStruct;
2614 __pyx_coroutine_body_t body;
2616 __Pyx_ExcInfoStruct gi_exc_state;
2617 PyObject *gi_weakreflist;
2619 PyObject *yieldfrom;
2621 PyObject *gi_qualname;
2622 PyObject *gi_modulename;
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)
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);\
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;\
2652 #if CYTHON_FAST_THREAD_STATE
2653 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
2654 __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
2656 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
2657 __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
2659 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
2660 static CYTHON_INLINE
void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
2663 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module,
const char* py_code);
2666 static int __Pyx_patch_abc(
void);
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);
2678 static int __Pyx_check_binary_version(
void);
2681 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2683 static double __pyx_f_9WaveTools_18MonochromaticWaves_etaLinear(
struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self,
double *__pyx_v_x,
double __pyx_v_t);
2684 static double __pyx_f_9WaveTools_18MonochromaticWaves_etaFenton(
struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self,
double *__pyx_v_x,
double __pyx_v_t);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
2716 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
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;
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 *);
2760 static PyObject *__pyx_f_9WaveTools___pyx_unpickle_SolitaryWave__set_state(
struct __pyx_obj_9WaveTools_SolitaryWave *, PyObject *);
2761 static CYTHON_INLINE PyObject *__Pyx_carray_to_py_double(
double *, Py_ssize_t);
2762 static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_double(
double *, Py_ssize_t);
2763 #define __Pyx_MODULE_NAME "WaveTools"
2764 extern int __pyx_module_is_main_WaveTools;
2765 int __pyx_module_is_main_WaveTools = 0;
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);
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);
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);
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);
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);
3760 static PyObject *__pyx_pf_9WaveTools_10loadExistingFunction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_funcName, PyObject *__pyx_v_validFunctions);
3761 static PyObject *__pyx_pf_9WaveTools_12setVertDir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_g);
3762 static PyObject *__pyx_pf_9WaveTools_14setDirVector(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vector);
3763 static PyObject *__pyx_pf_9WaveTools_16dirCheck(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v1, PyObject *__pyx_v_v2);
3764 static PyObject *__pyx_pf_9WaveTools_18reduceToIntervals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fi, PyObject *__pyx_v_df);
3765 static PyObject *__pyx_pf_9WaveTools_20returnRectangles(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_x);
3766 static PyObject *__pyx_pf_9WaveTools_22returnRectangles3D(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_x, PyObject *__pyx_v_y);
3767 static PyObject *__pyx_pf_9WaveTools_24normIntegral(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, PyObject *__pyx_v_dom);
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);
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);
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);
3771 static PyObject *__pyx_pf_9WaveTools_32sigma(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_omega, PyObject *__pyx_v_omega0);
3772 static PyObject *__pyx_pf_9WaveTools_34custom(CYTHON_UNUSED PyObject *__pyx_self);
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);
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);
3775 static PyObject *__pyx_pf_9WaveTools_40cos2s(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_theta, PyObject *__pyx_v_f, PyObject *__pyx_v_s);
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);
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);
3778 static PyObject *__pyx_pf_9WaveTools_46tophat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_l, PyObject *__pyx_v_cutoff);
3779 static PyObject *__pyx_pf_9WaveTools_48costap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_l, PyObject *__pyx_v_cutoff);
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);
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);
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);
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);
3784 static PyObject *__pyx_pf_9WaveTools_13SteadyCurrent_3mwl___get__(
struct __pyx_obj_9WaveTools_SteadyCurrent *__pyx_v_self);
3785 static int __pyx_pf_9WaveTools_13SteadyCurrent_3mwl_2__set__(
struct __pyx_obj_9WaveTools_SteadyCurrent *__pyx_v_self, PyObject *__pyx_v_value);
3786 static PyObject *__pyx_pf_9WaveTools_13SteadyCurrent_6__reduce_cython__(
struct __pyx_obj_9WaveTools_SteadyCurrent *__pyx_v_self);
3787 static PyObject *__pyx_pf_9WaveTools_13SteadyCurrent_8__setstate_cython__(
struct __pyx_obj_9WaveTools_SteadyCurrent *__pyx_v_self, PyObject *__pyx_v___pyx_state);
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);
3789 static PyObject *__pyx_pf_9WaveTools_12SolitaryWave_2eta(
struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
3790 static PyObject *__pyx_pf_9WaveTools_12SolitaryWave_4u(
struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
3791 static PyObject *__pyx_pf_9WaveTools_12SolitaryWave_3mwl___get__(
struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self);
3792 static int __pyx_pf_9WaveTools_12SolitaryWave_3mwl_2__set__(
struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self, PyObject *__pyx_v_value);
3793 static PyObject *__pyx_pf_9WaveTools_12SolitaryWave_1c___get__(
struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self);
3794 static int __pyx_pf_9WaveTools_12SolitaryWave_1c_2__set__(
struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self, PyObject *__pyx_v_value);
3795 static PyObject *__pyx_pf_9WaveTools_12SolitaryWave_6__reduce_cython__(
struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self);
3796 static PyObject *__pyx_pf_9WaveTools_12SolitaryWave_8__setstate_cython__(
struct __pyx_obj_9WaveTools_SolitaryWave *__pyx_v_self, PyObject *__pyx_v___pyx_state);
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);
3798 static PyObject *__pyx_pf_9WaveTools_18MonochromaticWaves_2eta(
struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
3799 static PyObject *__pyx_pf_9WaveTools_18MonochromaticWaves_4u(
struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
3800 static PyObject *__pyx_pf_9WaveTools_18MonochromaticWaves_10wavelength___get__(
struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self);
3801 static int __pyx_pf_9WaveTools_18MonochromaticWaves_10wavelength_2__set__(
struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self, PyObject *__pyx_v_value);
3802 static PyObject *__pyx_pf_9WaveTools_18MonochromaticWaves_3mwl___get__(
struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self);
3803 static int __pyx_pf_9WaveTools_18MonochromaticWaves_3mwl_2__set__(
struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self, PyObject *__pyx_v_value);
3804 static PyObject *__pyx_pf_9WaveTools_18MonochromaticWaves_6__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_9WaveTools_MonochromaticWaves *__pyx_v_self);
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);
3806 static PyObject *__pyx_pf_9WaveTools_7NewWave_9__cinit___genexpr(PyObject *__pyx_self);
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);
3808 static PyObject *__pyx_pf_9WaveTools_7NewWave_2eta(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
3809 static PyObject *__pyx_pf_9WaveTools_7NewWave_4u(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
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);
3811 static PyObject *__pyx_pf_9WaveTools_7NewWave_3mwl___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3812 static int __pyx_pf_9WaveTools_7NewWave_3mwl_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3813 static PyObject *__pyx_pf_9WaveTools_7NewWave_5depth___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3814 static int __pyx_pf_9WaveTools_7NewWave_5depth_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3815 static PyObject *__pyx_pf_9WaveTools_7NewWave_4gAbs___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3816 static int __pyx_pf_9WaveTools_7NewWave_4gAbs_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3817 static PyObject *__pyx_pf_9WaveTools_7NewWave_4Tlag___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3818 static int __pyx_pf_9WaveTools_7NewWave_4Tlag_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3819 static PyObject *__pyx_pf_9WaveTools_7NewWave_2Hs___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3820 static int __pyx_pf_9WaveTools_7NewWave_2Hs_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3821 static PyObject *__pyx_pf_9WaveTools_7NewWave_2Tp___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3822 static int __pyx_pf_9WaveTools_7NewWave_2Tp_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3823 static PyObject *__pyx_pf_9WaveTools_7NewWave_2fp___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3824 static int __pyx_pf_9WaveTools_7NewWave_2fp_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3825 static PyObject *__pyx_pf_9WaveTools_7NewWave_10bandFactor___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3826 static int __pyx_pf_9WaveTools_7NewWave_10bandFactor_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3827 static PyObject *__pyx_pf_9WaveTools_7NewWave_2df___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3828 static int __pyx_pf_9WaveTools_7NewWave_2df_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3829 static PyObject *__pyx_pf_9WaveTools_7NewWave_5focus___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3830 static int __pyx_pf_9WaveTools_7NewWave_5focus_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3831 static PyObject *__pyx_pf_9WaveTools_7NewWave_6tfocus___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3832 static int __pyx_pf_9WaveTools_7NewWave_6tfocus_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3833 static PyObject *__pyx_pf_9WaveTools_7NewWave_1N___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3834 static int __pyx_pf_9WaveTools_7NewWave_1N_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3835 static PyObject *__pyx_pf_9WaveTools_7NewWave_2fi___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3836 static int __pyx_pf_9WaveTools_7NewWave_2fi_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3837 static int __pyx_pf_9WaveTools_7NewWave_2fi_4__del__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3838 static PyObject *__pyx_pf_9WaveTools_7NewWave_3fim___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3839 static int __pyx_pf_9WaveTools_7NewWave_3fim_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3840 static int __pyx_pf_9WaveTools_7NewWave_3fim_4__del__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3841 static PyObject *__pyx_pf_9WaveTools_7NewWave_5Si_Jm___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3842 static int __pyx_pf_9WaveTools_7NewWave_5Si_Jm_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3843 static int __pyx_pf_9WaveTools_7NewWave_5Si_Jm_4__del__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3844 static PyObject *__pyx_pf_9WaveTools_7NewWave_2ki___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3845 static int __pyx_pf_9WaveTools_7NewWave_2ki_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3846 static int __pyx_pf_9WaveTools_7NewWave_2ki_4__del__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3847 static PyObject *__pyx_pf_9WaveTools_7NewWave_5omega___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3848 static int __pyx_pf_9WaveTools_7NewWave_5omega_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3849 static int __pyx_pf_9WaveTools_7NewWave_5omega_4__del__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3850 static PyObject *__pyx_pf_9WaveTools_7NewWave_5tanhF___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3851 static int __pyx_pf_9WaveTools_7NewWave_5tanhF_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3852 static int __pyx_pf_9WaveTools_7NewWave_5tanhF_4__del__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3853 static PyObject *__pyx_pf_9WaveTools_7NewWave_1g___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3854 static int __pyx_pf_9WaveTools_7NewWave_1g_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3855 static int __pyx_pf_9WaveTools_7NewWave_1g_4__del__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3856 static PyObject *__pyx_pf_9WaveTools_7NewWave_7waveDir___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3857 static int __pyx_pf_9WaveTools_7NewWave_7waveDir_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3858 static int __pyx_pf_9WaveTools_7NewWave_7waveDir_4__del__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3859 static PyObject *__pyx_pf_9WaveTools_7NewWave_4vDir___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3860 static int __pyx_pf_9WaveTools_7NewWave_4vDir_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3861 static int __pyx_pf_9WaveTools_7NewWave_4vDir_4__del__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3862 static PyObject *__pyx_pf_9WaveTools_7NewWave_4kDir___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3863 static int __pyx_pf_9WaveTools_7NewWave_4kDir_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3864 static int __pyx_pf_9WaveTools_7NewWave_4kDir_4__del__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3865 static PyObject *__pyx_pf_9WaveTools_7NewWave_2ai___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3866 static int __pyx_pf_9WaveTools_7NewWave_2ai_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3867 static int __pyx_pf_9WaveTools_7NewWave_2ai_4__del__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3868 static PyObject *__pyx_pf_9WaveTools_7NewWave_3phi___get__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3869 static int __pyx_pf_9WaveTools_7NewWave_3phi_2__set__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self, PyObject *__pyx_v_value);
3870 static int __pyx_pf_9WaveTools_7NewWave_3phi_4__del__(
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
3871 static PyObject *__pyx_pf_9WaveTools_7NewWave_8__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_9WaveTools_NewWave *__pyx_v_self);
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);
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);
3874 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2eta(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
3875 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_4u(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
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);
3877 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_3mwl___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3878 static int __pyx_pf_9WaveTools_11RandomWaves_3mwl_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3879 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_5depth___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3880 static int __pyx_pf_9WaveTools_11RandomWaves_5depth_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3881 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_4gAbs___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3882 static int __pyx_pf_9WaveTools_11RandomWaves_4gAbs_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3883 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_4Tlag___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3884 static int __pyx_pf_9WaveTools_11RandomWaves_4Tlag_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3885 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2Hs___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3886 static int __pyx_pf_9WaveTools_11RandomWaves_2Hs_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3887 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2Tp___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3888 static int __pyx_pf_9WaveTools_11RandomWaves_2Tp_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3889 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2fp___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3890 static int __pyx_pf_9WaveTools_11RandomWaves_2fp_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3891 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_10bandFactor___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3892 static int __pyx_pf_9WaveTools_11RandomWaves_10bandFactor_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3893 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2df___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3894 static int __pyx_pf_9WaveTools_11RandomWaves_2df_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3895 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_10wavelength___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3896 static int __pyx_pf_9WaveTools_11RandomWaves_10wavelength_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3897 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_1N___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3898 static int __pyx_pf_9WaveTools_11RandomWaves_1N_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3899 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2fi___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3900 static int __pyx_pf_9WaveTools_11RandomWaves_2fi_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3901 static int __pyx_pf_9WaveTools_11RandomWaves_2fi_4__del__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3902 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_3fim___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3903 static int __pyx_pf_9WaveTools_11RandomWaves_3fim_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3904 static int __pyx_pf_9WaveTools_11RandomWaves_3fim_4__del__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3905 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_5Si_Jm___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3906 static int __pyx_pf_9WaveTools_11RandomWaves_5Si_Jm_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3907 static int __pyx_pf_9WaveTools_11RandomWaves_5Si_Jm_4__del__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3908 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2ki___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3909 static int __pyx_pf_9WaveTools_11RandomWaves_2ki_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3910 static int __pyx_pf_9WaveTools_11RandomWaves_2ki_4__del__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3911 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_5omega___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3912 static int __pyx_pf_9WaveTools_11RandomWaves_5omega_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3913 static int __pyx_pf_9WaveTools_11RandomWaves_5omega_4__del__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3914 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_5tanhF___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3915 static int __pyx_pf_9WaveTools_11RandomWaves_5tanhF_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3916 static int __pyx_pf_9WaveTools_11RandomWaves_5tanhF_4__del__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3917 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_1g___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3918 static int __pyx_pf_9WaveTools_11RandomWaves_1g_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3919 static int __pyx_pf_9WaveTools_11RandomWaves_1g_4__del__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3920 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_7waveDir___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3921 static int __pyx_pf_9WaveTools_11RandomWaves_7waveDir_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3922 static int __pyx_pf_9WaveTools_11RandomWaves_7waveDir_4__del__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3923 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_4vDir___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3924 static int __pyx_pf_9WaveTools_11RandomWaves_4vDir_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3925 static int __pyx_pf_9WaveTools_11RandomWaves_4vDir_4__del__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3926 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_4kDir___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3927 static int __pyx_pf_9WaveTools_11RandomWaves_4kDir_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3928 static int __pyx_pf_9WaveTools_11RandomWaves_4kDir_4__del__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3929 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_2ai___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3930 static int __pyx_pf_9WaveTools_11RandomWaves_2ai_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3931 static int __pyx_pf_9WaveTools_11RandomWaves_2ai_4__del__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3932 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_3phi___get__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3933 static int __pyx_pf_9WaveTools_11RandomWaves_3phi_2__set__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3934 static int __pyx_pf_9WaveTools_11RandomWaves_3phi_4__del__(
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
3935 static PyObject *__pyx_pf_9WaveTools_11RandomWaves_8__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_9WaveTools_RandomWaves *__pyx_v_self);
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);
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);
3938 static PyObject *__pyx_pf_9WaveTools_23MultiSpectraRandomWaves_2eta(
struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
3939 static PyObject *__pyx_pf_9WaveTools_23MultiSpectraRandomWaves_4u(
struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
3940 static PyObject *__pyx_pf_9WaveTools_23MultiSpectraRandomWaves_3mwl___get__(
struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self);
3941 static int __pyx_pf_9WaveTools_23MultiSpectraRandomWaves_3mwl_2__set__(
struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3942 static PyObject *__pyx_pf_9WaveTools_23MultiSpectraRandomWaves_5depth___get__(
struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self);
3943 static int __pyx_pf_9WaveTools_23MultiSpectraRandomWaves_5depth_2__set__(
struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self, PyObject *__pyx_v_value);
3944 static PyObject *__pyx_pf_9WaveTools_23MultiSpectraRandomWaves_6__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_9WaveTools_MultiSpectraRandomWaves *__pyx_v_self);
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);
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);
3947 static PyObject *__pyx_pf_9WaveTools_16DirectionalWaves_2eta(
struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
3948 static PyObject *__pyx_pf_9WaveTools_16DirectionalWaves_4u(
struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
3949 static PyObject *__pyx_pf_9WaveTools_16DirectionalWaves_3mwl___get__(
struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self);
3950 static int __pyx_pf_9WaveTools_16DirectionalWaves_3mwl_2__set__(
struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self, PyObject *__pyx_v_value);
3951 static PyObject *__pyx_pf_9WaveTools_16DirectionalWaves_5depth___get__(
struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self);
3952 static int __pyx_pf_9WaveTools_16DirectionalWaves_5depth_2__set__(
struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self, PyObject *__pyx_v_value);
3953 static PyObject *__pyx_pf_9WaveTools_16DirectionalWaves_6__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_9WaveTools_DirectionalWaves *__pyx_v_self);
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);
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);
3956 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_2windOut(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self);
3957 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_4etaDirect(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
3958 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_6uDirect(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
3959 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_8findWindow(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_t);
3960 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_10etaWindow(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
3961 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_12uWindow(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_t);
3962 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_10wavelength___get__(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self);
3963 static int __pyx_pf_9WaveTools_10TimeSeries_10wavelength_2__set__(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_value);
3964 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_3mwl___get__(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self);
3965 static int __pyx_pf_9WaveTools_10TimeSeries_3mwl_2__set__(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_value);
3966 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_3eta___get__(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self);
3967 static int __pyx_pf_9WaveTools_10TimeSeries_3eta_2__set__(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_value);
3968 static int __pyx_pf_9WaveTools_10TimeSeries_3eta_4__del__(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self);
3969 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_1u___get__(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self);
3970 static int __pyx_pf_9WaveTools_10TimeSeries_1u_2__set__(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self, PyObject *__pyx_v_value);
3971 static int __pyx_pf_9WaveTools_10TimeSeries_1u_4__del__(
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self);
3972 static PyObject *__pyx_pf_9WaveTools_10TimeSeries_14__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_9WaveTools_TimeSeries *__pyx_v_self);
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);
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);
3975 static PyObject *__pyx_pf_9WaveTools_15RandomWavesFast_2printOut(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self);
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);
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);
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);
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);
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);
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);
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);
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);
3984 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_3eta___get__(
struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self);
3985 static int __pyx_pf_9WaveTools_13RandomNLWaves_3eta_2__set__(
struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, PyObject *__pyx_v_value);
3986 static int __pyx_pf_9WaveTools_13RandomNLWaves_3eta_4__del__(
struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self);
3987 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_1u___get__(
struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self);
3988 static int __pyx_pf_9WaveTools_13RandomNLWaves_1u_2__set__(
struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, PyObject *__pyx_v_value);
3989 static int __pyx_pf_9WaveTools_13RandomNLWaves_1u_4__del__(
struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self);
3990 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_10eta_linear___get__(
struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self);
3991 static int __pyx_pf_9WaveTools_13RandomNLWaves_10eta_linear_2__set__(
struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self, PyObject *__pyx_v_value);
3992 static int __pyx_pf_9WaveTools_13RandomNLWaves_10eta_linear_4__del__(
struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self);
3993 static PyObject *__pyx_pf_9WaveTools_13RandomNLWaves_16__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_9WaveTools_RandomNLWaves *__pyx_v_self);
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);
3995 static PyObject *__pyx_pf_9WaveTools_56__defaults__(CYTHON_UNUSED PyObject *__pyx_self);
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);
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);
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);
3999 static PyObject *__pyx_pf_9WaveTools_12CombineWaves___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_waveList);
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);
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);
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);
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);
4004 static PyObject *__pyx_tp_new_9WaveTools_SteadyCurrent(PyTypeObject *t, PyObject *a, PyObject *k);
4005 static PyObject *__pyx_tp_new_9WaveTools_SolitaryWave(PyTypeObject *t, PyObject *a, PyObject *k);
4006 static PyObject *__pyx_tp_new_9WaveTools_MonochromaticWaves(PyTypeObject *t, PyObject *a, PyObject *k);
4007 static PyObject *__pyx_tp_new_9WaveTools_NewWave(PyTypeObject *t, PyObject *a, PyObject *k);
4008 static PyObject *__pyx_tp_new_9WaveTools_RandomWaves(PyTypeObject *t, PyObject *a, PyObject *k);
4009 static PyObject *__pyx_tp_new_9WaveTools_MultiSpectraRandomWaves(PyTypeObject *t, PyObject *a, PyObject *k);
4010 static PyObject *__pyx_tp_new_9WaveTools_DirectionalWaves(PyTypeObject *t, PyObject *a, PyObject *k);
4011 static PyObject *__pyx_tp_new_9WaveTools_TimeSeries(PyTypeObject *t, PyObject *a, PyObject *k);
4012 static PyObject *__pyx_tp_new_9WaveTools_RandomNLWaves(PyTypeObject *t, PyObject *a, PyObject *k);
4013 static PyObject *__pyx_tp_new_9WaveTools___pyx_scope_struct____cinit__(PyTypeObject *t, PyObject *a, PyObject *k);
4014 static PyObject *__pyx_tp_new_9WaveTools___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k);
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;
4321 static PyObject *__pyx_pw_9WaveTools_1fastcos_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
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);
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)) {
4339 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4341 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4343 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4346 default:
goto __pyx_L5_argtuple_error;
4348 kw_args = PyDict_Size(__pyx_kwds);
4351 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phase)) != 0)) kw_args--;
4352 else goto __pyx_L5_argtuple_error;
4356 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sinus);
4357 if (value) { values[1] = value; kw_args--; }
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)
4364 switch (PyTuple_GET_SIZE(__pyx_args)) {
4365 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4367 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4369 default:
goto __pyx_L5_argtuple_error;
4372 __pyx_v_phase = values[0];
4373 __pyx_v_sinus = values[1];
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)
4379 __Pyx_AddTraceback(
"WaveTools.fastcos_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
4380 __Pyx_RefNannyFinishContext();
4382 __pyx_L4_argument_unpacking_done:;
4383 __pyx_r = __pyx_pf_9WaveTools_fastcos_test(__pyx_self, __pyx_v_phase, __pyx_v_sinus);
4386 __Pyx_RefNannyFinishContext();
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
4394 PyObject *__pyx_t_2 = NULL;
4395 PyObject *__pyx_t_3 = NULL;
4396 PyObject *__pyx_t_4 = NULL;
4397 PyObject *__pyx_t_5 = NULL;
4399 PyObject *__pyx_t_7 = NULL;
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);
4414 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_sinus);
if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 81, __pyx_L1_error)
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;
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);
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;
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;
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);
4465 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
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_);
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;
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);
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;
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);
4526 __Pyx_XDECREF(__pyx_v_phase);
4527 __Pyx_XGIVEREF(__pyx_r);
4528 __Pyx_RefNannyFinishContext();
4541 static PyObject *__pyx_pw_9WaveTools_3fastcosh_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
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);
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)) {
4560 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4562 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4564 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4566 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4569 default:
goto __pyx_L5_argtuple_error;
4571 kw_args = PyDict_Size(__pyx_kwds);
4574 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--;
4575 else goto __pyx_L5_argtuple_error;
4578 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Z)) != 0)) kw_args--;
4580 __Pyx_RaiseArgtupleInvalid(
"fastcosh_test", 0, 2, 3, 1); __PYX_ERR(0, 84, __pyx_L3_error)
4585 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fast);
4586 if (value) { values[2] = value; kw_args--; }
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)
4593 switch (PyTuple_GET_SIZE(__pyx_args)) {
4594 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4596 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4597 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4599 default:
goto __pyx_L5_argtuple_error;
4602 __pyx_v_k = values[0];
4603 __pyx_v_Z = values[1];
4604 __pyx_v_fast = values[2];
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)
4610 __Pyx_AddTraceback(
"WaveTools.fastcosh_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
4611 __Pyx_RefNannyFinishContext();
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);
4617 __Pyx_RefNannyFinishContext();
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
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);
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)
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;
4670 __Pyx_XDECREF(__pyx_t_4);
4671 __Pyx_AddTraceback(
"WaveTools.fastcosh_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
4674 __Pyx_XGIVEREF(__pyx_r);
4675 __Pyx_RefNannyFinishContext();
4688 static PyObject *__pyx_pw_9WaveTools_5fastsinh_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
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);
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)) {
4707 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4709 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4711 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4713 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4716 default:
goto __pyx_L5_argtuple_error;
4718 kw_args = PyDict_Size(__pyx_kwds);
4721 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--;
4722 else goto __pyx_L5_argtuple_error;
4725 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Z)) != 0)) kw_args--;
4727 __Pyx_RaiseArgtupleInvalid(
"fastsinh_test", 0, 2, 3, 1); __PYX_ERR(0, 100, __pyx_L3_error)
4732 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fast);
4733 if (value) { values[2] = value; kw_args--; }
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)
4740 switch (PyTuple_GET_SIZE(__pyx_args)) {
4741 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4743 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4744 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4746 default:
goto __pyx_L5_argtuple_error;
4749 __pyx_v_k = values[0];
4750 __pyx_v_Z = values[1];
4751 __pyx_v_fast = values[2];
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)
4757 __Pyx_AddTraceback(
"WaveTools.fastsinh_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
4758 __Pyx_RefNannyFinishContext();
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);
4764 __Pyx_RefNannyFinishContext();
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
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);
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)
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;
4817 __Pyx_XDECREF(__pyx_t_4);
4818 __Pyx_AddTraceback(
"WaveTools.fastsinh_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
4821 __Pyx_XGIVEREF(__pyx_r);
4822 __Pyx_RefNannyFinishContext();
4835 static PyObject *__pyx_pw_9WaveTools_7coshkzd_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
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);
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)) {
4855 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4857 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4859 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4861 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4863 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4866 default:
goto __pyx_L5_argtuple_error;
4868 kw_args = PyDict_Size(__pyx_kwds);
4871 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--;
4872 else goto __pyx_L5_argtuple_error;
4875 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Z)) != 0)) kw_args--;
4877 __Pyx_RaiseArgtupleInvalid(
"coshkzd_test", 0, 3, 4, 1); __PYX_ERR(0, 118, __pyx_L3_error)
4881 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--;
4883 __Pyx_RaiseArgtupleInvalid(
"coshkzd_test", 0, 3, 4, 2); __PYX_ERR(0, 118, __pyx_L3_error)
4888 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fast);
4889 if (value) { values[3] = value; kw_args--; }
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)
4896 switch (PyTuple_GET_SIZE(__pyx_args)) {
4897 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
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);
4903 default:
goto __pyx_L5_argtuple_error;
4906 __pyx_v_k = values[0];
4907 __pyx_v_Z = values[1];
4908 __pyx_v_d = values[2];
4909 __pyx_v_fast = values[3];
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)
4915 __Pyx_AddTraceback(
"WaveTools.coshkzd_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
4916 __Pyx_RefNannyFinishContext();
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);
4922 __Pyx_RefNannyFinishContext();
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;
4934 PyObject *__pyx_t_6 = NULL;
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);
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);
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);
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;
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;
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);
4988 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
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_);
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;
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;
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);
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);
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);
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);
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);
5051 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
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;
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);
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);
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;
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);
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;
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;
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);
5126 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
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);
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;
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);
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);
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);
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);
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);
5173 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
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;
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;
5214 __Pyx_XDECREF(__pyx_r);
5215 __Pyx_INCREF(__pyx_float_0_);
5216 __pyx_r = __pyx_float_0_;
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);
5240 __Pyx_XGIVEREF(__pyx_r);
5241 __Pyx_RefNannyFinishContext();
5254 static PyObject *__pyx_pw_9WaveTools_9sinhkzd_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
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);
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)) {
5274 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5276 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5278 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5280 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5282 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5285 default:
goto __pyx_L5_argtuple_error;
5287 kw_args = PyDict_Size(__pyx_kwds);
5290 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--;
5291 else goto __pyx_L5_argtuple_error;
5294 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Z)) != 0)) kw_args--;
5296 __Pyx_RaiseArgtupleInvalid(
"sinhkzd_test", 0, 3, 4, 1); __PYX_ERR(0, 140, __pyx_L3_error)
5300 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--;
5302 __Pyx_RaiseArgtupleInvalid(
"sinhkzd_test", 0, 3, 4, 2); __PYX_ERR(0, 140, __pyx_L3_error)
5307 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fast);
5308 if (value) { values[3] = value; kw_args--; }
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)
5315 switch (PyTuple_GET_SIZE(__pyx_args)) {
5316 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
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);
5322 default:
goto __pyx_L5_argtuple_error;
5325 __pyx_v_k = values[0];
5326 __pyx_v_Z = values[1];
5327 __pyx_v_d = values[2];
5328 __pyx_v_fast = values[3];
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)
5334 __Pyx_AddTraceback(
"WaveTools.sinhkzd_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
5335 __Pyx_RefNannyFinishContext();
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);
5341 __Pyx_RefNannyFinishContext();
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;
5353 PyObject *__pyx_t_6 = NULL;
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);
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);
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);
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;
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;
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);
5408 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
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_);
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;
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;
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);
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);
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);
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);
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);
5469 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
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;
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);
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);
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);
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);
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);
5521 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
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;
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);
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);
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;
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);
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;
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;
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);
5596 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
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);
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;
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;
5634 __Pyx_XDECREF(__pyx_r);
5635 __Pyx_INCREF(__pyx_float_0_);
5636 __pyx_r = __pyx_float_0_;
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);
5661 __Pyx_XGIVEREF(__pyx_r);
5662 __Pyx_RefNannyFinishContext();
5675 static PyObject *__pyx_pw_9WaveTools_11loadExistingFunction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
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);
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)) {
5692 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5694 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5696 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5699 default:
goto __pyx_L5_argtuple_error;
5701 kw_args = PyDict_Size(__pyx_kwds);
5704 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_funcName)) != 0)) kw_args--;
5705 else goto __pyx_L5_argtuple_error;
5708 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_validFunctions)) != 0)) kw_args--;
5710 __Pyx_RaiseArgtupleInvalid(
"loadExistingFunction", 1, 2, 2, 1); __PYX_ERR(0, 163, __pyx_L3_error)
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)
5716 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5717 goto __pyx_L5_argtuple_error;
5719 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5720 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5722 __pyx_v_funcName = values[0];
5723 __pyx_v_validFunctions = values[1];
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)
5729 __Pyx_AddTraceback(
"WaveTools.loadExistingFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
5730 __Pyx_RefNannyFinishContext();
5732 __pyx_L4_argument_unpacking_done:;
5733 __pyx_r = __pyx_pf_9WaveTools_10loadExistingFunction(__pyx_self, __pyx_v_funcName, __pyx_v_validFunctions);
5736 __Pyx_RefNannyFinishContext();
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;
5751 PyObject *__pyx_t_6 = NULL;
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);
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);
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;
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)
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)
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);
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)
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);
5807 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
5808 if (unlikely(!__pyx_t_4)) {
5809 PyObject* exc_type = PyErr_Occurred();
5811 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5812 else __PYX_ERR(0, 187, __pyx_L1_error)
5816 __Pyx_GOTREF(__pyx_t_4);
5818 __Pyx_XDECREF_SET(__pyx_v_func, __pyx_t_4);
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;
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;
5855 __Pyx_INCREF(__pyx_v_func);
5856 __Pyx_XDECREF_SET(__pyx_v_func_ret, __pyx_v_func);
5875 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
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);
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);
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;
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;
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);
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;
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;
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);
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();
6008 static PyObject *__pyx_pw_9WaveTools_13setVertDir(PyObject *__pyx_self, PyObject *__pyx_v_g);
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));
6018 __Pyx_RefNannyFinishContext();
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;
6034 int __pyx_lineno = 0;
6035 const char *__pyx_filename = NULL;
6036 int __pyx_clineno = 0;
6037 __Pyx_RefNannySetupContext(
"setVertDir", 0);
6046 __Pyx_XDECREF(__pyx_r);