diff --git a/setup.py b/setup.py index c35716f..9691cb2 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ import os +import sys from Cython.Build import cythonize from Cython.Compiler import Options @@ -9,20 +10,44 @@ Options.embed_pos_in_docstring = False Options.annotate = False Options.fast_fail = True +DEBUG = bool(os.getenv("DOPT_DEBUG", None)) + +linetrace_opt: bool = False +if DEBUG: + linetrace_opt = True + ext_modules = cythonize( ["src/dopt_sensor_anomalies/detection.py"], compiler_directives={ "language_level": 3, + "boundscheck": False, + "wraparound": False, "embedsignature": False, "annotation_typing": True, - "linetrace": True, + "linetrace": linetrace_opt, }, ) -DEBUG = bool(os.getenv("DOPT_DEBUG", None)) - if DEBUG: ext_modules[0].define_macros.append(("CYTHON_TRACE", "1")) +compiler_args: list[str] = [] +linker_args: list[str] = [] + + +if sys.platform.startswith("win") and not DEBUG: + c_args = ("/O2", "/GL", "/Gy") + l_args = ("/LTCG", "/OPT:REF", "/OPT:ICF") +else: + c_args = tuple() + l_args = tuple() + +compiler_args.extend(c_args) +linker_args.extend(l_args) + +for ext in ext_modules: + ext.extra_compile_args.extend(compiler_args) + ext.extra_link_args.extend(linker_args) + setup(ext_modules=ext_modules) diff --git a/src/dopt_sensor_anomalies/detection.c b/src/dopt_sensor_anomalies/detection.c index 94092f4..1bbeded 100644 --- a/src/dopt_sensor_anomalies/detection.c +++ b/src/dopt_sensor_anomalies/detection.c @@ -1,4 +1,4 @@ -/* Generated by Cython 3.1.5 */ +/* Generated by Cython 3.1.6 */ /* BEGIN: Cython Metadata { @@ -34,8 +34,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x03080000 #error Cython requires Python 3.8+. #else -#define __PYX_ABI_VERSION "3_1_5" -#define CYTHON_HEX_VERSION 0x030105F0 +#define __PYX_ABI_VERSION "3_1_6" +#define CYTHON_HEX_VERSION 0x030106F0 #define CYTHON_FUTURE_DIVISION 1 /* CModulePreamble */ #include @@ -1481,62 +1481,6 @@ static const char* const __pyx_f[] = { __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) #endif -/* Profile_config.proto */ -#ifndef CYTHON_PROFILE -#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY - #define CYTHON_PROFILE 0 -#else - #define CYTHON_PROFILE 1 -#endif -#endif -#ifndef CYTHON_TRACE_NOGIL - #define CYTHON_TRACE_NOGIL 0 -#else - #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE) - #define CYTHON_TRACE 1 - #endif -#endif -#ifndef CYTHON_TRACE - #define CYTHON_TRACE 0 -#endif -#if CYTHON_PROFILE || CYTHON_TRACE -#if CYTHON_USE_SYS_MONITORING - typedef enum { - __Pyx_Monitoring_PY_START = 0, - __Pyx_Monitoring_PY_RETURN, - __Pyx_Monitoring_PY_UNWIND, - __Pyx_Monitoring_LINE, - __Pyx_Monitoring_RAISE, - __Pyx_Monitoring_RERAISE, - __Pyx_Monitoring_EXCEPTION_HANDLED, - __Pyx_Monitoring_PY_RESUME, - __Pyx_Monitoring_PY_YIELD, - __Pyx_Monitoring_STOP_ITERATION, - } __Pyx_Monitoring_Event_Index; - static const unsigned char __Pyx_MonitoringEventTypes[] = { - PY_MONITORING_EVENT_PY_START, - PY_MONITORING_EVENT_PY_RETURN, - PY_MONITORING_EVENT_PY_UNWIND, - PY_MONITORING_EVENT_LINE, - PY_MONITORING_EVENT_RAISE, - PY_MONITORING_EVENT_RERAISE, - PY_MONITORING_EVENT_EXCEPTION_HANDLED, - PY_MONITORING_EVENT_PY_RESUME, - PY_MONITORING_EVENT_PY_YIELD, - PY_MONITORING_EVENT_STOP_ITERATION, - }; - #define __Pyx_MonitoringEventTypes_CyFunc_count (sizeof(__Pyx_MonitoringEventTypes) - 3) - #define __Pyx_MonitoringEventTypes_CyGen_count (sizeof(__Pyx_MonitoringEventTypes)) -#endif -#endif - -/* NoFastGil.proto */ -#define __Pyx_PyGILState_Ensure PyGILState_Ensure -#define __Pyx_PyGILState_Release PyGILState_Release -#define __Pyx_FastGIL_Remember() -#define __Pyx_FastGIL_Forget() -#define __Pyx_FastGilFuncInit() - /* CriticalSections.proto */ #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #define __Pyx_PyCriticalSection void* @@ -2006,432 +1950,6 @@ static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction * static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); -/* Profile.proto */ -#if CYTHON_TRACE - #undef CYTHON_PROFILE_REUSE_FRAME -#endif -#if CYTHON_USE_MODULE_STATE - #undef CYTHON_PROFILE_REUSE_CODEOBJ - #define CYTHON_PROFILE_REUSE_CODEOBJ 0 - #undef CYTHON_PROFILE_REUSE_FRAME -#endif -#ifndef CYTHON_PROFILE_REUSE_CODEOBJ - #define CYTHON_PROFILE_REUSE_CODEOBJ 1 -#endif -#ifndef CYTHON_PROFILE_REUSE_FRAME - #define CYTHON_PROFILE_REUSE_FRAME 0 -#endif -#if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE) - #define __PYX_MONITORING_ABI_SUFFIX "_mon" -#else - #define __PYX_MONITORING_ABI_SUFFIX -#endif -#if CYTHON_PROFILE || CYTHON_TRACE -#if CYTHON_USE_SYS_MONITORING - typedef uint64_t __pyx_monitoring_version_type; - #define __Pyx_TraceDeclarationsFunc\ - PyObject *__pyx_frame_code = NULL;\ - PyMonitoringState __pyx_pymonitoring_state[__Pyx_MonitoringEventTypes_CyFunc_count];\ - int __pyx_exception_already_reported = 0;\ - const int __pyx_sys_monitoring_disabled_in_parallel = 0; CYTHON_UNUSED_VAR(__pyx_sys_monitoring_disabled_in_parallel); - #define __Pyx_TraceDeclarationsGen\ - PyObject *__pyx_frame_code = Py_NewRef(__pyx_generator->gi_code);\ - PyMonitoringState* __pyx_pymonitoring_state = __pyx_generator->__pyx_pymonitoring_state;\ - __pyx_monitoring_version_type __pyx_pymonitoring_version = __pyx_generator->__pyx_pymonitoring_version;\ - int __pyx_exception_already_reported = 0;\ - const int __pyx_sys_monitoring_disabled_in_parallel = 0; CYTHON_UNUSED_VAR(__pyx_sys_monitoring_disabled_in_parallel); - #define __Pyx_IsTracing(event_id) ((!__pyx_sys_monitoring_disabled_in_parallel) && (__pyx_pymonitoring_state[event_id]).active) - #define __Pyx_TraceFrameInit(codeobj)\ - if (codeobj) __pyx_frame_code = codeobj; - #define __Pyx_TurnOffSysMonitoringInParallel\ - const int __pyx_sys_monitoring_disabled_in_parallel = 1;\ - CYTHON_UNUSED_VAR(__pyx_sys_monitoring_disabled_in_parallel); - CYTHON_UNUSED static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); - CYTHON_UNUSED static int __Pyx__TraceStartFunc(PyMonitoringState *state_array, PyObject *code_obj, int offset, int skip_event); - CYTHON_UNUSED static int __Pyx__TraceStartGen(PyMonitoringState *state_array, __pyx_monitoring_version_type *version, PyObject *code_obj, int offset); - CYTHON_UNUSED static int __Pyx__TraceResumeGen(PyMonitoringState *state_array, __pyx_monitoring_version_type *version, PyObject *code_obj, int offset); - CYTHON_UNUSED static void __Pyx__TraceException(PyMonitoringState *monitoring_state, PyObject *code_obj, int offset, int reraised); - #define __Pyx_PyMonitoring_ExitScope(nogil)\ - if (nogil) {\ - (void) __pyx_exception_already_reported;\ - if (CYTHON_TRACE_NOGIL) {\ - PyGILState_STATE state = PyGILState_Ensure();\ - PyMonitoring_ExitScope();\ - Py_XDECREF(__pyx_frame_code);\ - PyGILState_Release(state);\ - }\ - } else {\ - PyMonitoring_ExitScope();\ - Py_XDECREF(__pyx_frame_code);\ - } - #define __Pyx_TraceStartFunc(funcname, srcfile, firstlineno, offset, nogil, skip_event, goto_error)\ - if ((0) ); else {\ - int ret = 0;\ - memset(__pyx_pymonitoring_state, 0, sizeof(__pyx_pymonitoring_state));\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyGILState_STATE state = PyGILState_Ensure();\ - if (!__Pyx_PyThreadState_Current->tracing) {\ - if (likely(__pyx_frame_code)) Py_INCREF(__pyx_frame_code);\ - else __pyx_frame_code = (PyObject*) __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);\ - if (unlikely(!__pyx_frame_code)) ret = -1;\ - else ret = __Pyx__TraceStartFunc(__pyx_pymonitoring_state, __pyx_frame_code, offset, skip_event);\ - } else __pyx_frame_code = NULL;\ - PyGILState_Release(state);\ - } else __pyx_frame_code = NULL;\ - } else {\ - if (!__Pyx_PyThreadState_Current->tracing) {\ - if (likely(__pyx_frame_code)) Py_INCREF(__pyx_frame_code);\ - else __pyx_frame_code = (PyObject*) __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);\ - if (unlikely(!__pyx_frame_code)) ret = -1;\ - else ret = __Pyx__TraceStartFunc(__pyx_pymonitoring_state, __pyx_frame_code, offset, skip_event);\ - } else __pyx_frame_code = NULL;\ - }\ - if (unlikely(ret == -1)) goto_error;\ - } - #define __Pyx_TraceStartGen(funcname, srcfile, firstlineno, offset, nogil, skip_event, goto_error)\ - if ((0) ); else {\ - int ret = __Pyx__TraceStartGen(__pyx_pymonitoring_state, &__pyx_pymonitoring_version, __pyx_frame_code, offset);\ - if (unlikely(ret == -1)) goto_error;\ - } - #define __Pyx_TraceResumeGen(funcname, srcfile, firstlineno, offset, goto_error)\ - if ((0) ); else {\ - int ret = __Pyx__TraceResumeGen(__pyx_pymonitoring_state, &__pyx_pymonitoring_version, __pyx_frame_code, offset);\ - if (unlikely(ret == -1)) goto_error;\ - } - #define __Pyx_TraceYield(result, offset, goto_error)\ - if (!__Pyx_IsTracing(__Pyx_Monitoring_PY_YIELD)); else {\ - int ret = PyMonitoring_FirePyYieldEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_RETURN], __pyx_frame_code, offset, result);\ - PyMonitoring_ExitScope();\ - if (unlikely(ret == -1)) goto_error;\ - } - #define __Pyx_TraceException(offset, reraised, fresh)\ - if (!__Pyx_IsTracing((reraised) ? __Pyx_Monitoring_RERAISE : __Pyx_Monitoring_RAISE)); else {\ - if (fresh || reraised || !__pyx_exception_already_reported) {\ - __Pyx__TraceException(&__pyx_pymonitoring_state[(reraised) ? __Pyx_Monitoring_RERAISE : __Pyx_Monitoring_RAISE], __pyx_frame_code, offset, reraised);\ - }\ - __pyx_exception_already_reported = 1;\ - } - #define __Pyx_TraceExceptionDone() __pyx_exception_already_reported = 0 - #define __Pyx_TraceExceptionHandled(offset)\ - if (!__Pyx_IsTracing(__Pyx_Monitoring_EXCEPTION_HANDLED)); else {\ - (void) PyMonitoring_FireExceptionHandledEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_EXCEPTION_HANDLED], __pyx_frame_code, offset);\ - __pyx_exception_already_reported = 0;\ - } - #define __Pyx_TraceReturnValue(result, offset, nogil, goto_error)\ - if (!__Pyx_IsTracing(__Pyx_Monitoring_PY_RETURN)); else {\ - int ret = 0;\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyGILState_STATE state = PyGILState_Ensure();\ - ret = PyMonitoring_FirePyReturnEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_RETURN], __pyx_frame_code, offset, result);\ - PyGILState_Release(state);\ - }\ - } else {\ - ret = PyMonitoring_FirePyReturnEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_RETURN], __pyx_frame_code, offset, result);\ - }\ - if (unlikely(ret == -1)) goto_error;\ - } - #define __Pyx_TraceReturnCValue(cresult, convert_function, offset, nogil, goto_error)\ - if (!__Pyx_IsTracing(__Pyx_Monitoring_PY_RETURN)); else {\ - int ret = 0;\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyGILState_STATE state = PyGILState_Ensure();\ - PyObject *pyvalue = convert_function(cresult);\ - if (unlikely(!pyvalue)) {\ - PyErr_Clear();\ - pyvalue = Py_None; Py_INCREF(Py_None);\ - }\ - ret = PyMonitoring_FirePyReturnEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_RETURN], __pyx_frame_code, offset, pyvalue);\ - Py_DECREF(pyvalue);\ - PyGILState_Release(state);\ - }\ - } else {\ - PyObject *pyvalue = convert_function(cresult);\ - if (unlikely(!pyvalue)) {\ - PyErr_Clear();\ - pyvalue = Py_None; Py_INCREF(Py_None);\ - }\ - ret = PyMonitoring_FirePyReturnEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_RETURN], __pyx_frame_code, offset, pyvalue);\ - Py_DECREF(pyvalue);\ - }\ - if (unlikely(ret == -1)) goto_error;\ - } - #define __Pyx_TraceExceptionUnwind(offset, nogil)\ - if (!__Pyx_IsTracing(__Pyx_Monitoring_PY_UNWIND)); else {\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyGILState_STATE state = PyGILState_Ensure();\ - (void) PyMonitoring_FirePyUnwindEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_UNWIND], __pyx_frame_code, offset);\ - PyGILState_Release(state);\ - }\ - } else {\ - (void) PyMonitoring_FirePyUnwindEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_UNWIND], __pyx_frame_code, offset);\ - }\ - } - #if CYTHON_TRACE - CYTHON_UNUSED static int __Pyx__TraceLine(PyMonitoringState *monitoring_state, PyObject *code_obj, int line, int offset); - #define __Pyx_TraceLine(line, offset, nogil, goto_error)\ - if (!__Pyx_IsTracing(__Pyx_Monitoring_LINE)); else {\ - int ret = 0;\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyGILState_STATE state = PyGILState_Ensure();\ - ret = __Pyx__TraceLine(&__pyx_pymonitoring_state[__Pyx_Monitoring_LINE], __pyx_frame_code, line, offset);\ - PyGILState_Release(state);\ - }\ - } else {\ - ret = __Pyx__TraceLine(&__pyx_pymonitoring_state[__Pyx_Monitoring_LINE], __pyx_frame_code, line, offset);\ - }\ - if (unlikely(ret == -1)) goto_error;\ - } - #endif -#else - #include "compile.h" - #include "frameobject.h" - #include "traceback.h" -#if PY_VERSION_HEX >= 0x030b00a6 && !defined(PYPY_VERSION) - #ifndef Py_BUILD_CORE - #define Py_BUILD_CORE 1 - #endif - #include "internal/pycore_frame.h" -#endif - #if CYTHON_PROFILE_REUSE_FRAME - #define CYTHON_FRAME_MODIFIER static - #define CYTHON_FRAME_DEL(frame) - #else - #define CYTHON_FRAME_MODIFIER - #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame) - #endif - #if CYTHON_PROFILE_REUSE_CODEOBJ - #define CYTHON_CODEOBJ_MODIFIER static - #else - #define CYTHON_CODEOBJ_MODIFIER - #endif - #define __Pyx_TraceDeclarationsFunc\ - CYTHON_CODEOBJ_MODIFIER PyCodeObject *__pyx_frame_code = NULL;\ - CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\ - int __Pyx_use_tracing = 0; - #define __Pyx_TraceDeclarationsGen\ - PyObject *__pyx_frame_code = __pyx_generator->gi_code;\ - CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\ - int __Pyx_use_tracing = 0; - #define __Pyx_TraceFrameInit(codeobj)\ - if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj; - #define __Pyx_PyMonitoring_ExitScope(nogil)\ - if (!CYTHON_PROFILE_REUSE_FRAME && nogil) {\ - PyGILState_STATE state = PyGILState_Ensure();\ - CYTHON_FRAME_DEL(__pyx_frame);\ - PyGILState_Release(state);\ - } else {\ - CYTHON_FRAME_DEL(__pyx_frame);\ - } - #define __Pyx_TraceException(offset, reraised, fresh) {} - #define __Pyx_TraceExceptionHandled(offset) {} - #define __Pyx_TraceExceptionDone() {} - #define __Pyx_TurnOffSysMonitoringInParallel {} // Only needed for freethreading -#if PY_VERSION_HEX >= 0x030b00a2 - #if PY_VERSION_HEX >= 0x030C00b1 - #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\ - ((!(check_tracing) || !(tstate)->tracing) &&\ - (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) - #else - #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\ - (unlikely((tstate)->cframe->use_tracing) &&\ - (!(check_tracing) || !(tstate)->tracing) &&\ - (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) - #endif - #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate) - #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate) -#elif PY_VERSION_HEX >= 0x030a00b1 - #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\ - (unlikely((tstate)->cframe->use_tracing) &&\ - (!(check_tracing) || !(tstate)->tracing) &&\ - (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) - #define __Pyx_EnterTracing(tstate)\ - do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0) - #define __Pyx_LeaveTracing(tstate)\ - do {\ - tstate->tracing--;\ - tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\ - || tstate->c_profilefunc != NULL);\ - } while (0) -#else - #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\ - (unlikely((tstate)->use_tracing) &&\ - (!(check_tracing) || !(tstate)->tracing) &&\ - (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) - #define __Pyx_EnterTracing(tstate)\ - do { tstate->tracing++; tstate->use_tracing = 0; } while (0) - #define __Pyx_LeaveTracing(tstate)\ - do {\ - tstate->tracing--;\ - tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\ - || tstate->c_profilefunc != NULL);\ - } while (0) -#endif - #define __Pyx_TraceStartFunc(funcname, srcfile, firstlineno, offset, nogil, skip_event, goto_error)\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (__Pyx_IsTracing(tstate, 1, 1)) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall((PyCodeObject**)&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno, skip_event);\ - }\ - PyGILState_Release(state);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ - } else {\ - PyThreadState* tstate = PyThreadState_GET();\ - if (__Pyx_IsTracing(tstate, 1, 1)) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall((PyCodeObject**)&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno, skip_event);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ - } - #define __Pyx_TraceStartGen __Pyx_TraceStartFunc - #define __Pyx_TraceYield(result, offset, goto_error)\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (__Pyx_IsTracing(tstate, 0, 0)) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - if ((1)); else goto_error;\ - } - #define __Pyx_TraceResumeGen(funcname, srcfile, firstlineno, offset, goto_error)\ - __Pyx_TraceStartFunc(funcname, srcfile, firstlineno, offset, 0, 0, goto_error) - CYTHON_UNUSED static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) { - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - __Pyx_EnterTracing(tstate); - if (CYTHON_TRACE && tstate->c_tracefunc) - tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result); - if (tstate->c_profilefunc) - tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result); - __Pyx_LeaveTracing(tstate); - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } - #define __Pyx_TraceReturnValue(result, offset, nogil, goto_error)\ - if (likely(!__Pyx_use_tracing)); else {\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (__Pyx_IsTracing(tstate, 0, 0)) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - PyGILState_Release(state);\ - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (__Pyx_IsTracing(tstate, 0, 0)) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - }\ - if ((1)); else goto_error;\ - } - #define __Pyx_TraceReturnCValue(cresult, convert_function, offset, nogil, goto_error)\ - if (likely(!__Pyx_use_tracing)); else {\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (__Pyx_IsTracing(tstate, 0, 0)) {\ - PyObject *pyvalue = convert_function(cresult);\ - if (unlikely(!pyvalue)) {\ - PyErr_Clear();\ - pyvalue = Py_None; Py_INCREF(Py_None);\ - }\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, pyvalue);\ - Py_DECREF(pyvalue);\ - }\ - PyGILState_Release(state);\ - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (__Pyx_IsTracing(tstate, 0, 0)) {\ - PyObject *pyvalue = convert_function(cresult);\ - if (unlikely(!pyvalue)) {\ - PyErr_Clear();\ - pyvalue = Py_None; Py_INCREF(Py_None);\ - }\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, pyvalue);\ - Py_DECREF(pyvalue);\ - }\ - }\ - if ((1)); else goto_error;\ - } - #define __Pyx_TraceExceptionUnwind(offset, nogil)\ - if (likely(!__Pyx_use_tracing)); else {\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (__Pyx_IsTracing(tstate, 0, 0)) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, Py_None);\ - }\ - PyGILState_Release(state);\ - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (__Pyx_IsTracing(tstate, 0, 0)) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, Py_None);\ - }\ - }\ - } - static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno, int skip_event); -#if CYTHON_TRACE - CYTHON_UNUSED static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int line); - #define __Pyx_TraceLine(line, offset, nogil, goto_error)\ - if (likely(!__Pyx_use_tracing)); else {\ - int ret = 0;\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyThreadState *tstate;\ - PyGILState_STATE state = __Pyx_PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\ - ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, line);\ - }\ - __Pyx_PyGILState_Release(state);\ - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\ - ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, line);\ - }\ - }\ - if (unlikely(ret)) goto_error;\ - } -#endif -#endif -#else - #define __Pyx_TraceDeclarationsFunc - #define __Pyx_TraceDeclarationsGen - #define __Pyx_TraceExceptionDone() {} - #define __Pyx_TraceFrameInit(codeobj) {} - #define __Pyx_TurnOffSysMonitoringInParallel {} - #define __Pyx_PyMonitoring_ExitScope(nogil) {} - #define __Pyx_TraceException(offset, reraised, fresh) {} - #define __Pyx_TraceExceptionUnwind(offset, nogil) {} - #define __Pyx_TraceExceptionHandled(offset) {} - #define __Pyx_TraceStartFunc(funcname, srcfile, firstlineno, offset, nogil, skip_event, goto_error) if ((1)); else goto_error; - #define __Pyx_TraceStartGen __Pyx_TraceStartFunc - #define __Pyx_TraceResumeGen(funcname, srcfile, firstlineno, offset, goto_error) if ((1)); else goto_error; - #define __Pyx_TraceYield(result, offset, goto_error) if ((1)); else goto_error; - #define __Pyx_TraceReturnValue(result, offset, nogil, goto_error)\ - if ((1)); else goto_error; - #define __Pyx_TraceReturnCValue(cresult, convert_function, offset, nogil, goto_error)\ - if ((1)); else { (void) convert_function; goto_error } -#endif -#if !CYTHON_TRACE - #define __Pyx_TraceLine(line, offset, nogil, goto_error) if ((1)); else goto_error; -#endif - /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ @@ -3221,9 +2739,9 @@ static const char __pyx_k__2[] = "."; static const char __pyx_k__3[] = ","; static const char __pyx_k__4[] = ";"; static const char __pyx_k__5[] = "?"; -static const char __pyx_k__6[] = "_"; -static const char __pyx_k__7[] = "\230!"; -static const char __pyx_k__8[] = "\240\001"; +static const char __pyx_k__6[] = "\230!"; +static const char __pyx_k__7[] = "\240\001"; +static const char __pyx_k__8[] = "_"; static const char __pyx_k_ax[] = "ax"; static const char __pyx_k_bl[] = "bl"; static const char __pyx_k_br[] = "br"; @@ -3747,7 +3265,7 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #define __pyx_kp_u__3 __pyx_string_tab[46] #define __pyx_kp_u__4 __pyx_string_tab[47] #define __pyx_kp_u__5 __pyx_string_tab[48] -#define __pyx_n_u__6 __pyx_string_tab[49] +#define __pyx_n_u__8 __pyx_string_tab[49] #define __pyx_n_u_accepted_boxes __pyx_string_tab[50] #define __pyx_kp_u_add_note __pyx_string_tab[51] #define __pyx_n_u_all __pyx_string_tab[52] @@ -4224,7 +3742,6 @@ PyObject *__pyx_args, PyObject *__pyx_kwds static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_midpoint(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pt_A, PyObject *__pyx_v_pt_B) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarationsFunc __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -4233,9 +3750,7 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_midpoint(CYTHON_UNU int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])) __Pyx_RefNannySetupContext("midpoint", 0); - __Pyx_TraceStartFunc("midpoint", __pyx_f[0], 32, 0, 0, 0, __PYX_ERR(0, 32, __pyx_L1_error)); /* "dopt_sensor_anomalies/detection.py":36 * pt_B: npt.NDArray[np.floating], @@ -4244,11 +3759,10 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_midpoint(CYTHON_UNU * * */ - __Pyx_TraceLine(36,4,0,__PYX_ERR(0, 36, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_pt_A, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_pt_A, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pt_B, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pt_B, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -4257,9 +3771,9 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_midpoint(CYTHON_UNU __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_mstate_global->__pyx_float_0_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pt_A, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pt_A, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_pt_B, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_pt_B, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -4278,7 +3792,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_midpoint(CYTHON_UNU __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; - __Pyx_TraceReturnValue(__pyx_r, 4, 0, __PYX_ERR(0, 36, __pyx_L1_error)); goto __pyx_L0; /* "dopt_sensor_anomalies/detection.py":32 @@ -4295,17 +3808,10 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_midpoint(CYTHON_UNU __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_TraceException(__pyx_lineno, 0, 0); - #if CYTHON_USE_SYS_MONITORING - __Pyx_TraceExceptionUnwind(0, 0); - #else - __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 32, __pyx_L1_error)); - #endif __Pyx_AddTraceback("dopt_sensor_anomalies.detection.midpoint", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_PyMonitoring_ExitScope(0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -4437,7 +3943,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_2check_box_redundan PyObject *__pyx_v_center_dist = NULL; PyObject *__pyx_v_size_diff = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarationsFunc __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -4457,9 +3962,7 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_2check_box_redundan int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])) __Pyx_RefNannySetupContext("check_box_redundancy", 0); - __Pyx_TraceStartFunc("check_box_redundancy", __pyx_f[0], 39, 0, 0, 0, __PYX_ERR(0, 39, __pyx_L1_error)); /* "dopt_sensor_anomalies/detection.py":44 * tolerance: float = 5.0, @@ -4468,7 +3971,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_2check_box_redundan * c2, s2, _ = box_2 * s1 = sorted(s1) */ - __Pyx_TraceLine(44,9,0,__PYX_ERR(0, 44, __pyx_L1_error)) if ((likely(PyTuple_CheckExact(__pyx_v_box_1))) || (PyList_CheckExact(__pyx_v_box_1))) { PyObject* sequence = __pyx_v_box_1; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); @@ -4540,7 +4042,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_2check_box_redundan * s1 = sorted(s1) * s2 = sorted(s2) */ - __Pyx_TraceLine(45,13,0,__PYX_ERR(0, 45, __pyx_L1_error)) if ((likely(PyTuple_CheckExact(__pyx_v_box_2))) || (PyList_CheckExact(__pyx_v_box_2))) { PyObject* sequence = __pyx_v_box_2; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); @@ -4612,7 +4113,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_2check_box_redundan * s2 = sorted(s2) * */ - __Pyx_TraceLine(46,15,0,__PYX_ERR(0, 46, __pyx_L1_error)) __pyx_t_1 = PySequence_List(__pyx_v_s1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely((PyList_Sort(__pyx_t_1) < 0))) __PYX_ERR(0, 46, __pyx_L1_error) @@ -4626,7 +4126,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_2check_box_redundan * * center_dist = cast(float, np.linalg.norm(np.array(c1) - np.array(c2))) */ - __Pyx_TraceLine(47,18,0,__PYX_ERR(0, 47, __pyx_L1_error)) __pyx_t_1 = PySequence_List(__pyx_v_s2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely((PyList_Sort(__pyx_t_1) < 0))) __PYX_ERR(0, 47, __pyx_L1_error) @@ -4640,7 +4139,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_2check_box_redundan * size_diff = cast(float, np.linalg.norm(np.array(s1) - np.array(s2))) * */ - __Pyx_TraceLine(49,22,0,__PYX_ERR(0, 49, __pyx_L1_error)) __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -4748,7 +4246,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_2check_box_redundan * * return bool(center_dist < tolerance and size_diff < tolerance) */ - __Pyx_TraceLine(50,39,0,__PYX_ERR(0, 50, __pyx_L1_error)) __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_cast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -4856,7 +4353,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_2check_box_redundan * * */ - __Pyx_TraceLine(52,54,0,__PYX_ERR(0, 52, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_tolerance); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -4881,7 +4377,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_2check_box_redundan __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; - __Pyx_TraceReturnValue(__pyx_r, 54, 0, __PYX_ERR(0, 52, __pyx_L1_error)); goto __pyx_L0; /* "dopt_sensor_anomalies/detection.py":39 @@ -4905,12 +4400,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_2check_box_redundan __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_13); - __Pyx_TraceException(__pyx_lineno, 0, 0); - #if CYTHON_USE_SYS_MONITORING - __Pyx_TraceExceptionUnwind(0, 0); - #else - __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 39, __pyx_L1_error)); - #endif __Pyx_AddTraceback("dopt_sensor_anomalies.detection.check_box_redundancy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -4922,7 +4411,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_2check_box_redundan __Pyx_XDECREF(__pyx_v_center_dist); __Pyx_XDECREF(__pyx_v_size_diff); __Pyx_XGIVEREF(__pyx_r); - __Pyx_PyMonitoring_ExitScope(0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -5065,7 +4553,7 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_14measure_length_ge __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_measure_length_locals_genexpr, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection); if (unlikely(!gen)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_measure_length_locals_genexpr, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection); if (unlikely(!gen)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5085,7 +4573,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_2g { struct __pyx_obj_21dopt_sensor_anomalies_9detection___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_21dopt_sensor_anomalies_9detection___pyx_scope_struct_1_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarationsGen PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); @@ -5103,13 +4590,10 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_2g case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L8_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceStartGen("genexpr", __pyx_f[0], 84, 0, 0, 0, __PYX_ERR(0, 84, __pyx_L1_error)); - __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 84, __pyx_L1_error)); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - __Pyx_TraceStartGen("genexpr", __pyx_f[0], 84, 0, 0, 0, __PYX_ERR(0, 84, __pyx_L1_error)); if (unlikely(__pyx_sent_value != Py_None)) { if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); __PYX_ERR(0, 84, __pyx_L1_error) @@ -5222,7 +4706,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_2g __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_TraceLine(84,0,0,__PYX_ERR(0, 84, __pyx_L1_error)) __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_x1, __pyx_cur_scope->__pyx_v_x2, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error) __pyx_r = __pyx_t_4; __pyx_t_4 = 0; @@ -5230,7 +4713,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_2g __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; - __Pyx_TraceYield(__pyx_r, 0, __PYX_ERR(0, 84, __pyx_L1_error)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); @@ -5238,7 +4720,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_2g __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L8_resume_from_yield:; - __Pyx_TraceResumeGen("genexpr", __pyx_f[0], 84, 0, __PYX_ERR(0, 84, __pyx_L1_error)); __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); @@ -5248,7 +4729,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_2g } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 84, __pyx_L1_error)); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -5260,14 +4740,11 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_2g __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); if (__Pyx_PyErr_Occurred()) { - __Pyx_TraceException(__pyx_lineno, 0, 0); __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_TraceExceptionUnwind(0, 0); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_PyMonitoring_ExitScope(0); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif @@ -5309,7 +4786,7 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_14measure_length_3g __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_5generator1, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_measure_length_locals_genexpr, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection); if (unlikely(!gen)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_5generator1, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_measure_length_locals_genexpr, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection); if (unlikely(!gen)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5329,7 +4806,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_5g { struct __pyx_obj_21dopt_sensor_anomalies_9detection___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_21dopt_sensor_anomalies_9detection___pyx_scope_struct_2_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarationsGen PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; @@ -5345,13 +4821,10 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_5g switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ - __Pyx_TraceStartGen("genexpr", __pyx_f[0], 112, 0, 0, 0, __PYX_ERR(0, 112, __pyx_L1_error)); - __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 112, __pyx_L1_error)); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - __Pyx_TraceStartGen("genexpr", __pyx_f[0], 112, 0, 0, 0, __PYX_ERR(0, 112, __pyx_L1_error)); if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 112, __pyx_L1_error) if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 112, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); @@ -5372,7 +4845,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_5g __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_existing, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_TraceLine(112,0,0,__PYX_ERR(0, 112, __pyx_L1_error)) __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_check_box_redundancy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -5408,7 +4880,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_5g * check_box_redundancy(rbox, existing) for existing in accepted_boxes * ) */ - __Pyx_TraceLine(111,233,0,__PYX_ERR(0, 111, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); /* "dopt_sensor_anomalies/detection.py":112 @@ -5418,10 +4889,8 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_5g * ) * if is_duplicate: */ - __Pyx_TraceLine(112,0,0,__PYX_ERR(0, 112, __pyx_L1_error)) __Pyx_INCREF(Py_True); __pyx_r = Py_True; - __Pyx_TraceReturnValue(__pyx_r, 233, 0, __PYX_ERR(0, 111, __pyx_L1_error)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } @@ -5436,7 +4905,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_5g * check_box_redundancy(rbox, existing) for existing in accepted_boxes * ) */ - __Pyx_TraceLine(111,233,0,__PYX_ERR(0, 111, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); /* "dopt_sensor_anomalies/detection.py":112 @@ -5446,14 +4914,11 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_5g * ) * if is_duplicate: */ - __Pyx_TraceLine(112,0,0,__PYX_ERR(0, 112, __pyx_L1_error)) __Pyx_INCREF(Py_False); __pyx_r = Py_False; - __Pyx_TraceReturnValue(__pyx_r, 233, 0, __PYX_ERR(0, 111, __pyx_L1_error)); goto __pyx_L0; } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 112, __pyx_L1_error)); /* function exit code */ goto __pyx_L0; @@ -5463,14 +4928,11 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_5g __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); if (__Pyx_PyErr_Occurred()) { - __Pyx_TraceException(__pyx_lineno, 0, 0); __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_TraceExceptionUnwind(0, 0); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_PyMonitoring_ExitScope(0); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif @@ -5509,7 +4971,7 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_14measure_length_6g __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_8generator2, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_measure_length_locals_genexpr, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection); if (unlikely(!gen)) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_8generator2, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_measure_length_locals_genexpr, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection); if (unlikely(!gen)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5529,7 +4991,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_8g { struct __pyx_obj_21dopt_sensor_anomalies_9detection___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_21dopt_sensor_anomalies_9detection___pyx_scope_struct_3_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarationsGen PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; @@ -5546,13 +5007,10 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_8g case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceStartGen("genexpr", __pyx_f[0], 143, 0, 0, 0, __PYX_ERR(0, 143, __pyx_L1_error)); - __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 143, __pyx_L1_error)); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - __Pyx_TraceStartGen("genexpr", __pyx_f[0], 143, 0, 0, 0, __PYX_ERR(0, 143, __pyx_L1_error)); if (unlikely(__pyx_sent_value != Py_None)) { if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); __PYX_ERR(0, 143, __pyx_L1_error) @@ -5576,7 +5034,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_8g __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_TraceLine(143,0,0,__PYX_ERR(0, 143, __pyx_L1_error)) __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -5611,7 +5068,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_8g __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; - __Pyx_TraceYield(__pyx_r, 0, __PYX_ERR(0, 143, __pyx_L1_error)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); @@ -5619,7 +5075,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_8g __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; - __Pyx_TraceResumeGen("genexpr", __pyx_f[0], 143, 0, __PYX_ERR(0, 143, __pyx_L1_error)); __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); @@ -5628,7 +5083,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_8g } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 143, __pyx_L1_error)); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -5640,14 +5094,11 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_8g __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); if (__Pyx_PyErr_Occurred()) { - __Pyx_TraceException(__pyx_lineno, 0, 0); __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_TraceExceptionUnwind(0, 0); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_PyMonitoring_ExitScope(0); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif @@ -5686,7 +5137,7 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_14measure_length_9g __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_11generator3, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_measure_length_locals_genexpr, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection); if (unlikely(!gen)) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_11generator3, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_measure_length_locals_genexpr, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection); if (unlikely(!gen)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5706,7 +5157,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_11 { struct __pyx_obj_21dopt_sensor_anomalies_9detection___pyx_scope_struct_4_genexpr *__pyx_cur_scope = ((struct __pyx_obj_21dopt_sensor_anomalies_9detection___pyx_scope_struct_4_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarationsGen PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; @@ -5723,13 +5173,10 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_11 case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceStartGen("genexpr", __pyx_f[0], 144, 0, 0, 0, __PYX_ERR(0, 144, __pyx_L1_error)); - __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 144, __pyx_L1_error)); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - __Pyx_TraceStartGen("genexpr", __pyx_f[0], 144, 0, 0, 0, __PYX_ERR(0, 144, __pyx_L1_error)); if (unlikely(__pyx_sent_value != Py_None)) { if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); __PYX_ERR(0, 144, __pyx_L1_error) @@ -5753,7 +5200,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_11 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_TraceLine(144,0,0,__PYX_ERR(0, 144, __pyx_L1_error)) __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -5788,7 +5234,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_11 __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; - __Pyx_TraceYield(__pyx_r, 0, __PYX_ERR(0, 144, __pyx_L1_error)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); @@ -5796,7 +5241,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_11 __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; - __Pyx_TraceResumeGen("genexpr", __pyx_f[0], 144, 0, __PYX_ERR(0, 144, __pyx_L1_error)); __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); @@ -5805,7 +5249,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_11 } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 144, __pyx_L1_error)); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -5817,14 +5260,11 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_11 __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); if (__Pyx_PyErr_Occurred()) { - __Pyx_TraceException(__pyx_lineno, 0, 0); __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_TraceExceptionUnwind(0, 0); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_PyMonitoring_ExitScope(0); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif @@ -5863,7 +5303,7 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_14measure_length_12 __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_14generator4, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_measure_length_locals_genexpr, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection); if (unlikely(!gen)) __PYX_ERR(0, 145, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_14generator4, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_measure_length_locals_genexpr, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection); if (unlikely(!gen)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5883,7 +5323,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_14 { struct __pyx_obj_21dopt_sensor_anomalies_9detection___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_21dopt_sensor_anomalies_9detection___pyx_scope_struct_5_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarationsGen PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; @@ -5900,13 +5339,10 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_14 case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceStartGen("genexpr", __pyx_f[0], 145, 0, 0, 0, __PYX_ERR(0, 145, __pyx_L1_error)); - __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 145, __pyx_L1_error)); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - __Pyx_TraceStartGen("genexpr", __pyx_f[0], 145, 0, 0, 0, __PYX_ERR(0, 145, __pyx_L1_error)); if (unlikely(__pyx_sent_value != Py_None)) { if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); __PYX_ERR(0, 145, __pyx_L1_error) @@ -5930,7 +5366,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_14 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_TraceLine(145,0,0,__PYX_ERR(0, 145, __pyx_L1_error)) __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -5965,7 +5400,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_14 __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; - __Pyx_TraceYield(__pyx_r, 0, __PYX_ERR(0, 145, __pyx_L1_error)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); @@ -5973,7 +5407,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_14 __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; - __Pyx_TraceResumeGen("genexpr", __pyx_f[0], 145, 0, __PYX_ERR(0, 145, __pyx_L1_error)); __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); @@ -5982,7 +5415,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_14 } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 145, __pyx_L1_error)); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -5994,14 +5426,11 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_14 __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); if (__Pyx_PyErr_Occurred()) { - __Pyx_TraceException(__pyx_lineno, 0, 0); __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_TraceExceptionUnwind(0, 0); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_PyMonitoring_ExitScope(0); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif @@ -6040,7 +5469,7 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_14measure_length_15 __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_17generator5, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_measure_length_locals_genexpr, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection); if (unlikely(!gen)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_17generator5, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_measure_length_locals_genexpr, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection); if (unlikely(!gen)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -6060,7 +5489,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_17 { struct __pyx_obj_21dopt_sensor_anomalies_9detection___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_21dopt_sensor_anomalies_9detection___pyx_scope_struct_6_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarationsGen PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; @@ -6077,13 +5505,10 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_17 case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceStartGen("genexpr", __pyx_f[0], 146, 0, 0, 0, __PYX_ERR(0, 146, __pyx_L1_error)); - __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 146, __pyx_L1_error)); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - __Pyx_TraceStartGen("genexpr", __pyx_f[0], 146, 0, 0, 0, __PYX_ERR(0, 146, __pyx_L1_error)); if (unlikely(__pyx_sent_value != Py_None)) { if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); __PYX_ERR(0, 146, __pyx_L1_error) @@ -6107,7 +5532,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_17 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_TraceLine(146,0,0,__PYX_ERR(0, 146, __pyx_L1_error)) __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -6142,7 +5566,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_17 __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; - __Pyx_TraceYield(__pyx_r, 0, __PYX_ERR(0, 146, __pyx_L1_error)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); @@ -6150,7 +5573,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_17 __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; - __Pyx_TraceResumeGen("genexpr", __pyx_f[0], 146, 0, __PYX_ERR(0, 146, __pyx_L1_error)); __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); @@ -6159,7 +5581,6 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_17 } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 146, __pyx_L1_error)); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -6171,14 +5592,11 @@ static PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_17 __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); if (__Pyx_PyErr_Occurred()) { - __Pyx_TraceException(__pyx_lineno, 0, 0); __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_TraceExceptionUnwind(0, 0); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_PyMonitoring_ExitScope(0); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif @@ -6250,7 +5668,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_14generator4 = 0; PyObject *__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_17generator5 = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarationsFunc __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -6275,7 +5692,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])) __Pyx_RefNannySetupContext("measure_length", 0); __pyx_cur_scope = (struct __pyx_obj_21dopt_sensor_anomalies_9detection___pyx_scope_struct__measure_length *)__pyx_tp_new_21dopt_sensor_anomalies_9detection___pyx_scope_struct__measure_length(__pyx_mstate_global->__pyx_ptype_21dopt_sensor_anomalies_9detection___pyx_scope_struct__measure_length, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { @@ -6285,16 +5701,14 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } - __Pyx_TraceStartFunc("measure_length", __pyx_f[0], 55, 0, 0, 0, __PYX_ERR(0, 55, __pyx_L1_error)); /* "dopt_sensor_anomalies/detection.py":60 * pixels_per_metric_Y: float, * ) -> tuple[t.CsvData, t.SensorImages]: * data_csv: list[str | int] = [] # <<<<<<<<<<<<<< * image = cv2.imread(str(img_path)) - * if image is None: # pragma: no cover + * if image is None: */ - __Pyx_TraceLine(60,6,0,__PYX_ERR(0, 60, __pyx_L1_error)) __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_data_csv = ((PyObject*)__pyx_t_1); @@ -6304,10 +5718,9 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * ) -> tuple[t.CsvData, t.SensorImages]: * data_csv: list[str | int] = [] * image = cv2.imread(str(img_path)) # <<<<<<<<<<<<<< - * if image is None: # pragma: no cover + * if image is None: * raise errors.ImageNotReadError(f"Image could not be read from: >{img_path}<") */ - __Pyx_TraceLine(61,10,0,__PYX_ERR(0, 61, __pyx_L1_error)) __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cv2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -6343,22 +5756,20 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT /* "dopt_sensor_anomalies/detection.py":62 * data_csv: list[str | int] = [] * image = cv2.imread(str(img_path)) - * if image is None: # pragma: no cover # <<<<<<<<<<<<<< + * if image is None: # <<<<<<<<<<<<<< * raise errors.ImageNotReadError(f"Image could not be read from: >{img_path}<") * */ - __Pyx_TraceLine(62,17,0,__PYX_ERR(0, 62, __pyx_L1_error)) __pyx_t_6 = (__pyx_v_image == Py_None); if (unlikely(__pyx_t_6)) { /* "dopt_sensor_anomalies/detection.py":63 * image = cv2.imread(str(img_path)) - * if image is None: # pragma: no cover + * if image is None: * raise errors.ImageNotReadError(f"Image could not be read from: >{img_path}<") # <<<<<<<<<<<<<< * * cropped = image[500:1500, 100 : image.shape[1] - 100] */ - __Pyx_TraceLine(63,21,0,__PYX_ERR(0, 63, __pyx_L1_error)) __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -6402,7 +5813,7 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT /* "dopt_sensor_anomalies/detection.py":62 * data_csv: list[str | int] = [] * image = cv2.imread(str(img_path)) - * if image is None: # pragma: no cover # <<<<<<<<<<<<<< + * if image is None: # <<<<<<<<<<<<<< * raise errors.ImageNotReadError(f"Image could not be read from: >{img_path}<") * */ @@ -6415,10 +5826,9 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * orig = cropped.copy() * */ - __Pyx_TraceLine(65,32,0,__PYX_ERR(0, 65, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_image, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyLong_SubtractObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_100, 0x64, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) @@ -6448,7 +5858,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * * gray = cv2.cvtColor(cropped, cv2.COLOR_BGR2GRAY) */ - __Pyx_TraceLine(66,38,0,__PYX_ERR(0, 66, __pyx_L1_error)) __pyx_t_1 = __pyx_v_cropped; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; @@ -6469,7 +5878,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * _, binary = cv2.threshold(gray, const.THRESHOLD_BW, 255, cv2.THRESH_BINARY) * */ - __Pyx_TraceLine(68,44,0,__PYX_ERR(0, 68, __pyx_L1_error)) __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_cv2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); @@ -6512,7 +5920,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * * kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (5, 5)) */ - __Pyx_TraceLine(69,52,0,__PYX_ERR(0, 69, __pyx_L1_error)) __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cv2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -6613,7 +6020,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * closed = cv2.morphologyEx(binary, cv2.MORPH_CLOSE, kernel) * edged = cv2.Canny(closed, 50, 100) */ - __Pyx_TraceLine(71,62,0,__PYX_ERR(0, 71, __pyx_L1_error)) __pyx_t_9 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_cv2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -6656,7 +6062,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * edged = cv2.Canny(closed, 50, 100) * */ - __Pyx_TraceLine(72,70,0,__PYX_ERR(0, 72, __pyx_L1_error)) __pyx_t_8 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_cv2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -6699,7 +6104,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * * cnts = cv2.findContours(edged.copy(), cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) */ - __Pyx_TraceLine(73,78,0,__PYX_ERR(0, 73, __pyx_L1_error)) __pyx_t_9 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_cv2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -6736,7 +6140,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * cnts = imutils.grab_contours(cnts) * if cnts is None: # pragma: no cover */ - __Pyx_TraceLine(75,85,0,__PYX_ERR(0, 75, __pyx_L1_error)) __pyx_t_8 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_cv2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -6796,7 +6199,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * if cnts is None: # pragma: no cover * raise errors.ContourCalculationError( */ - __Pyx_TraceLine(76,96,0,__PYX_ERR(0, 76, __pyx_L1_error)) __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_imutils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); @@ -6833,7 +6235,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * raise errors.ContourCalculationError( * "No contours were found in the provided image. Can not continue analysis." */ - __Pyx_TraceLine(77,101,0,__PYX_ERR(0, 77, __pyx_L1_error)) __pyx_t_6 = (__pyx_v_cnts == Py_None); if (unlikely(__pyx_t_6)) { @@ -6844,7 +6245,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * "No contours were found in the provided image. Can not continue analysis." * ) */ - __Pyx_TraceLine(78,105,0,__PYX_ERR(0, 78, __pyx_L1_error)) __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -6891,7 +6291,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * x_coords = [cv2.boundingRect(c)[0] for c in cnts] * is_sorted = np.all(x1 <= x2 for x1, x2 in zip(x_coords, x_coords[1:])) # type: ignore */ - __Pyx_TraceLine(82,111,0,__PYX_ERR(0, 82, __pyx_L1_error)) __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_contours); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -6980,7 +6379,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * is_sorted = np.all(x1 <= x2 for x1, x2 in zip(x_coords, x_coords[1:])) # type: ignore * if not is_sorted: # pragma: no cover */ - __Pyx_TraceLine(83,114,0,__PYX_ERR(0, 83, __pyx_L1_error)) { /* enter inner scope */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); @@ -7035,7 +6433,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_c, __pyx_t_1); __pyx_t_1 = 0; - __Pyx_TraceLine(83,121,0,__PYX_ERR(0, 83, __pyx_L11_error)) __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_cv2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 83, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_9); @@ -7062,7 +6459,7 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_1); } - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 83, __pyx_L11_error) + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 83, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 83, __pyx_L11_error) @@ -7086,7 +6483,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * if not is_sorted: # pragma: no cover * raise errors.ContourCalculationError( */ - __Pyx_TraceLine(84,127,0,__PYX_ERR(0, 84, __pyx_L1_error)) __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); @@ -7142,7 +6538,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * raise errors.ContourCalculationError( * "Contour detection not valid: contours are not " */ - __Pyx_TraceLine(85,131,0,__PYX_ERR(0, 85, __pyx_L1_error)) __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_is_sorted); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 85, __pyx_L1_error) __pyx_t_14 = (!__pyx_t_6); if (unlikely(__pyx_t_14)) { @@ -7154,7 +6549,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * "Contour detection not valid: contours are not " * "properly sorted from left to right." */ - __Pyx_TraceLine(86,135,0,__PYX_ERR(0, 86, __pyx_L1_error)) __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -7201,7 +6595,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * filtered_cnts: list[Any] = [] * */ - __Pyx_TraceLine(90,138,0,__PYX_ERR(0, 90, __pyx_L1_error)) __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_accepted_boxes = ((PyObject*)__pyx_t_2); @@ -7214,7 +6607,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * * for c in cnts: */ - __Pyx_TraceLine(91,140,0,__PYX_ERR(0, 91, __pyx_L1_error)) __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_filtered_cnts = ((PyObject*)__pyx_t_2); @@ -7227,7 +6619,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * rbox = cast(t.Box, cv2.minAreaRect(c)) * box = cv2.boxPoints(rbox) */ - __Pyx_TraceLine(93,143,0,__PYX_ERR(0, 93, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_cnts)) || PyTuple_CheckExact(__pyx_v_cnts)) { __pyx_t_2 = __pyx_v_cnts; __Pyx_INCREF(__pyx_t_2); __pyx_t_12 = 0; @@ -7279,7 +6670,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT __Pyx_GOTREF(__pyx_t_11); __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_11); __pyx_t_11 = 0; - __Pyx_TraceLine(93,141,0,__PYX_ERR(0, 93, __pyx_L1_error)) /* "dopt_sensor_anomalies/detection.py":94 * @@ -7288,7 +6678,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * box = cv2.boxPoints(rbox) * box = np.array(box, dtype=np.int32) */ - __Pyx_TraceLine(94,146,0,__PYX_ERR(0, 94, __pyx_L1_error)) __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_cast); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -7357,7 +6746,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * box = np.array(box, dtype=np.int32) * box = cast(npt.NDArray[np.float32], perspective.order_points(box)) */ - __Pyx_TraceLine(95,156,0,__PYX_ERR(0, 95, __pyx_L1_error)) __pyx_t_9 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_cv2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); @@ -7394,7 +6782,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * box = cast(npt.NDArray[np.float32], perspective.order_points(box)) * */ - __Pyx_TraceLine(96,161,0,__PYX_ERR(0, 96, __pyx_L1_error)) __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -7441,7 +6828,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * * (tl, tr, br, bl) = box */ - __Pyx_TraceLine(97,168,0,__PYX_ERR(0, 97, __pyx_L1_error)) __pyx_t_8 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_cast); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -7517,7 +6903,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * (tltrX, tltrY) = midpoint(tl, tr) * (blbrX, blbrY) = midpoint(bl, br) */ - __Pyx_TraceLine(99,182,0,__PYX_ERR(0, 99, __pyx_L1_error)) if ((likely(PyTuple_CheckExact(__pyx_v_box))) || (PyList_CheckExact(__pyx_v_box))) { PyObject* sequence = __pyx_v_box; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); @@ -7599,7 +6984,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * (blbrX, blbrY) = midpoint(bl, br) * (tlblX, tlblY) = midpoint(tl, bl) */ - __Pyx_TraceLine(100,186,0,__PYX_ERR(0, 100, __pyx_L1_error)) __pyx_t_16 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_midpoint); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -7685,7 +7069,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * (tlblX, tlblY) = midpoint(tl, bl) * (trbrX, trbrY) = midpoint(tr, br) */ - __Pyx_TraceLine(101,192,0,__PYX_ERR(0, 101, __pyx_L1_error)) __pyx_t_16 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_midpoint); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -7771,7 +7154,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * (trbrX, trbrY) = midpoint(tr, br) * */ - __Pyx_TraceLine(102,198,0,__PYX_ERR(0, 102, __pyx_L1_error)) __pyx_t_16 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_midpoint); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -7857,7 +7239,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * * dA = dist.euclidean((tltrX, tltrY), (blbrX, blbrY)) */ - __Pyx_TraceLine(103,204,0,__PYX_ERR(0, 103, __pyx_L1_error)) __pyx_t_16 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_midpoint); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -7943,7 +7324,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * dB = dist.euclidean((tlblX, tlblY), (trbrX, trbrY)) * */ - __Pyx_TraceLine(105,210,0,__PYX_ERR(0, 105, __pyx_L1_error)) __pyx_t_16 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_dist); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -7998,7 +7378,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * * if dA < 100 or dB < 100: */ - __Pyx_TraceLine(106,218,0,__PYX_ERR(0, 106, __pyx_L1_error)) __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_dist); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); @@ -8053,7 +7432,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * continue * */ - __Pyx_TraceLine(108,224,0,__PYX_ERR(0, 108, __pyx_L1_error)) __pyx_t_1 = PyObject_RichCompare(__pyx_v_dA, __pyx_mstate_global->__pyx_int_100, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8076,7 +7454,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * * is_duplicate = any( */ - __Pyx_TraceLine(109,231,0,__PYX_ERR(0, 109, __pyx_L1_error)) goto __pyx_L17_continue; /* "dopt_sensor_anomalies/detection.py":108 @@ -8095,7 +7472,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * ) * if is_duplicate: */ - __Pyx_TraceLine(112,234,0,__PYX_ERR(0, 112, __pyx_L1_error)) __pyx_t_1 = __pyx_pf_21dopt_sensor_anomalies_9detection_14measure_length_3genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_accepted_boxes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 112, __pyx_L1_error) @@ -8111,7 +7487,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * continue * */ - __Pyx_TraceLine(114,236,0,__PYX_ERR(0, 114, __pyx_L1_error)) __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_is_duplicate); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 114, __pyx_L1_error) if (__pyx_t_14) { @@ -8122,7 +7497,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * * accepted_boxes.append(rbox) */ - __Pyx_TraceLine(115,237,0,__PYX_ERR(0, 115, __pyx_L1_error)) goto __pyx_L17_continue; /* "dopt_sensor_anomalies/detection.py":114 @@ -8141,7 +7515,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * filtered_cnts.append(c) * */ - __Pyx_TraceLine(117,241,0,__PYX_ERR(0, 117, __pyx_L1_error)) __pyx_t_9 = __pyx_cur_scope->__pyx_v_rbox; __Pyx_INCREF(__pyx_t_9); __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_accepted_boxes, __pyx_t_9); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 117, __pyx_L1_error) @@ -8154,7 +7527,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * * dimA = dA / pixels_per_metric_Y */ - __Pyx_TraceLine(118,244,0,__PYX_ERR(0, 118, __pyx_L1_error)) __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_filtered_cnts, __pyx_v_c); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 118, __pyx_L1_error) /* "dopt_sensor_anomalies/detection.py":120 @@ -8164,7 +7536,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * dimB = dB / pixels_per_metric_X * */ - __Pyx_TraceLine(120,249,0,__PYX_ERR(0, 120, __pyx_L1_error)) __pyx_t_9 = PyFloat_FromDouble(__pyx_v_pixels_per_metric_Y); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_dA, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) @@ -8180,7 +7551,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * * data_csv.extend( */ - __Pyx_TraceLine(121,253,0,__PYX_ERR(0, 121, __pyx_L1_error)) __pyx_t_1 = PyFloat_FromDouble(__pyx_v_pixels_per_metric_X); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyNumber_Divide(__pyx_v_dB, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 121, __pyx_L1_error) @@ -8196,7 +7566,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * f"{dimA:.3f}".replace(".", ","), * f"{dimA * dimB:.1f}".replace(".", ","), */ - __Pyx_TraceLine(125,258,0,__PYX_ERR(0, 125, __pyx_L1_error)) __pyx_t_9 = __Pyx_PyObject_Format(__pyx_v_dimB, __pyx_mstate_global->__pyx_kp_u_3f); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = PyUnicode_Replace(((PyObject*)__pyx_t_9), __pyx_mstate_global->__pyx_kp_u__2, __pyx_mstate_global->__pyx_kp_u__3, -1L); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) @@ -8210,7 +7579,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * f"{dimA * dimB:.1f}".replace(".", ","), * ] */ - __Pyx_TraceLine(126,264,0,__PYX_ERR(0, 126, __pyx_L1_error)) __pyx_t_9 = __Pyx_PyObject_Format(__pyx_v_dimA, __pyx_mstate_global->__pyx_kp_u_3f); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_16 = PyUnicode_Replace(((PyObject*)__pyx_t_9), __pyx_mstate_global->__pyx_kp_u__2, __pyx_mstate_global->__pyx_kp_u__3, -1L); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 126, __pyx_L1_error) @@ -8224,7 +7592,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * ] * ) */ - __Pyx_TraceLine(127,272,0,__PYX_ERR(0, 127, __pyx_L1_error)) __pyx_t_9 = PyNumber_Multiply(__pyx_v_dimA, __pyx_v_dimB); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __Pyx_PyObject_Format(__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_1f); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 127, __pyx_L1_error) @@ -8241,7 +7608,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * [ * f"{dimB:.3f}".replace(".", ","), */ - __Pyx_TraceLine(123,256,0,__PYX_ERR(0, 123, __pyx_L1_error)) __pyx_t_17 = __Pyx_ListComp_Append(__pyx_v_data_csv, __pyx_t_1); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 123, __pyx_L1_error) __pyx_t_18 = __Pyx_ListComp_Append(__pyx_v_data_csv, __pyx_t_16); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 123, __pyx_L1_error) __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_data_csv, __pyx_t_9); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 123, __pyx_L1_error) @@ -8257,7 +7623,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * rbox = cast(t.Box, cv2.minAreaRect(c)) * box = cv2.boxPoints(rbox) */ - __Pyx_TraceLine(93,141,0,__PYX_ERR(0, 93, __pyx_L1_error)) __pyx_L17_continue:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -8269,7 +7634,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * raise errors.ContourCalculationError( * "Contour detection not valid: no contours recognized" */ - __Pyx_TraceLine(131,280,0,__PYX_ERR(0, 131, __pyx_L1_error)) { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_filtered_cnts); if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 131, __pyx_L1_error) @@ -8286,7 +7650,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * "Contour detection not valid: no contours recognized" * ) */ - __Pyx_TraceLine(132,284,0,__PYX_ERR(0, 132, __pyx_L1_error)) __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); @@ -8333,7 +7696,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * if num_contours != const.NUM_VALID_ELECTRODES: # pragma: no cover * raise errors.InvalidElectrodeCount( */ - __Pyx_TraceLine(136,288,0,__PYX_ERR(0, 136, __pyx_L1_error)) __pyx_t_12 = __Pyx_PyList_GET_SIZE(__pyx_v_filtered_cnts); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 136, __pyx_L1_error) __pyx_v_num_contours = __pyx_t_12; @@ -8344,7 +7706,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * raise errors.InvalidElectrodeCount( * f"Number of counted electrodes does not match the " */ - __Pyx_TraceLine(137,291,0,__PYX_ERR(0, 137, __pyx_L1_error)) __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_num_contours); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_const); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 137, __pyx_L1_error) @@ -8366,7 +7727,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * f"Number of counted electrodes does not match the " * f"expected value: count = {num_contours}, expected = {const.NUM_VALID_ELECTRODES}" */ - __Pyx_TraceLine(138,298,0,__PYX_ERR(0, 138, __pyx_L1_error)) __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -8381,7 +7741,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * ) * */ - __Pyx_TraceLine(140,301,0,__PYX_ERR(0, 140, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_num_contours, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_const); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 140, __pyx_L1_error) @@ -8404,7 +7763,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * f"expected value: count = {num_contours}, expected = {const.NUM_VALID_ELECTRODES}" * ) */ - __Pyx_TraceLine(139,299,0,__PYX_ERR(0, 139, __pyx_L1_error)) __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_20, 4, 72 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); @@ -8451,7 +7809,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * x_max = max(np.max(c[:, 0, 0]) for c in filtered_cnts) + 20 * y_min = min(np.min(c[:, 0, 1]) for c in filtered_cnts) - 20 */ - __Pyx_TraceLine(143,307,0,__PYX_ERR(0, 143, __pyx_L1_error)) __pyx_t_16 = NULL; __Pyx_INCREF(__pyx_builtin_min); __pyx_t_11 = __pyx_builtin_min; @@ -8480,7 +7837,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * y_min = min(np.min(c[:, 0, 1]) for c in filtered_cnts) - 20 * y_max = max(np.max(c[:, 0, 1]) for c in filtered_cnts) + 20 */ - __Pyx_TraceLine(144,313,0,__PYX_ERR(0, 144, __pyx_L1_error)) __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_builtin_max); __pyx_t_1 = __pyx_builtin_max; @@ -8509,7 +7865,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * y_max = max(np.max(c[:, 0, 1]) for c in filtered_cnts) + 20 * */ - __Pyx_TraceLine(145,319,0,__PYX_ERR(0, 145, __pyx_L1_error)) __pyx_t_11 = NULL; __Pyx_INCREF(__pyx_builtin_min); __pyx_t_16 = __pyx_builtin_min; @@ -8538,7 +7893,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * * rightmost_x_third = max(filtered_cnts[2][:, 0, 0]) */ - __Pyx_TraceLine(146,325,0,__PYX_ERR(0, 146, __pyx_L1_error)) __pyx_t_1 = NULL; __Pyx_INCREF(__pyx_builtin_max); __pyx_t_9 = __pyx_builtin_max; @@ -8567,21 +7921,17 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * leftmost_x_fourth = min(filtered_cnts[3][:, 0, 0]) * x_middle = rightmost_x_third + int((leftmost_x_fourth - rightmost_x_third) / 2.0) */ - __Pyx_TraceLine(148,331,0,__PYX_ERR(0, 148, __pyx_L1_error)) __pyx_t_16 = NULL; __Pyx_INCREF(__pyx_builtin_max); __pyx_t_11 = __pyx_builtin_max; - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_filtered_cnts, 2, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__Pyx_PyList_GET_ITEM(__pyx_v_filtered_cnts, 2), __pyx_mstate_global->__pyx_tuple[0]); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0]); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 148, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = 1; { - PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_t_8}; + PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_t_1}; __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -8596,22 +7946,18 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * x_middle = rightmost_x_third + int((leftmost_x_fourth - rightmost_x_third) / 2.0) * */ - __Pyx_TraceLine(149,340,0,__PYX_ERR(0, 149, __pyx_L1_error)) __pyx_t_11 = NULL; __Pyx_INCREF(__pyx_builtin_min); - __pyx_t_8 = __pyx_builtin_min; - __pyx_t_16 = __Pyx_GetItemInt_List(__pyx_v_filtered_cnts, 3, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_1 = __pyx_builtin_min; + __pyx_t_16 = __Pyx_PyObject_GetItem(__Pyx_PyList_GET_ITEM(__pyx_v_filtered_cnts, 3), __pyx_mstate_global->__pyx_tuple[0]); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_16, __pyx_mstate_global->__pyx_tuple[0]); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_5 = 1; { - PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_1}; - __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_16}; + __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } @@ -8625,20 +7971,19 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * * cropped_sensor_left = orig[y_min:y_max, x_min:x_middle] */ - __Pyx_TraceLine(150,353,0,__PYX_ERR(0, 150, __pyx_L1_error)) __pyx_t_9 = PyNumber_Subtract(__pyx_v_leftmost_x_fourth, __pyx_v_rightmost_x_third); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_9, __pyx_mstate_global->__pyx_float_2_0, 2.0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 150, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_9, __pyx_mstate_global->__pyx_float_2_0, 2.0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyNumber_Int(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_Add(__pyx_v_rightmost_x_third, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 150, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_Add(__pyx_v_rightmost_x_third, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_v_x_middle = __pyx_t_8; - __pyx_t_8 = 0; + __pyx_v_x_middle = __pyx_t_1; + __pyx_t_1 = 0; /* "dopt_sensor_anomalies/detection.py":152 * x_middle = rightmost_x_third + int((leftmost_x_fourth - rightmost_x_third) / 2.0) @@ -8647,22 +7992,21 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * cropped_sensor_right = orig[y_min:y_max, x_middle:x_max] * */ - __Pyx_TraceLine(152,359,0,__PYX_ERR(0, 152, __pyx_L1_error)) - __pyx_t_8 = PySlice_New(__pyx_v_y_min, __pyx_v_y_max, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 152, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = PySlice_New(__pyx_v_y_min, __pyx_v_y_max, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PySlice_New(__pyx_v_x_min, __pyx_v_x_middle, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8) != (0)) __PYX_ERR(0, 152, __pyx_L1_error); + __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 152, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_9); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 152, __pyx_L1_error); - __pyx_t_8 = 0; + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 152, __pyx_L1_error); + __pyx_t_1 = 0; __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_orig, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_orig, __pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_v_cropped_sensor_left = __pyx_t_9; __pyx_t_9 = 0; @@ -8673,24 +8017,23 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * * return data_csv, t.SensorImages(left=cropped_sensor_left, right=cropped_sensor_right) */ - __Pyx_TraceLine(153,366,0,__PYX_ERR(0, 153, __pyx_L1_error)) __pyx_t_9 = PySlice_New(__pyx_v_y_min, __pyx_v_y_max, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_1 = PySlice_New(__pyx_v_x_middle, __pyx_v_x_max, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) + __pyx_t_16 = PySlice_New(__pyx_v_x_middle, __pyx_v_x_max, Py_None); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 153, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9) != (0)) __PYX_ERR(0, 153, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 153, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9) != (0)) __PYX_ERR(0, 153, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_16); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_16) != (0)) __PYX_ERR(0, 153, __pyx_L1_error); __pyx_t_9 = 0; - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_orig, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_v_cropped_sensor_right = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_16 = 0; + __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_v_orig, __pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_cropped_sensor_right = __pyx_t_16; + __pyx_t_16 = 0; /* "dopt_sensor_anomalies/detection.py":155 * cropped_sensor_right = orig[y_min:y_max, x_middle:x_max] @@ -8699,9 +8042,8 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT * * */ - __Pyx_TraceLine(155,371,0,__PYX_ERR(0, 155, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = NULL; + __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_t); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SensorImages); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error) @@ -8710,39 +8052,38 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11); - assert(__pyx_t_8); + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11); + assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); - __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_5 = 0; } #endif { - PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_8, NULL}; + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_1, NULL}; __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_left, __pyx_v_cropped_sensor_left, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 155, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_right, __pyx_v_cropped_sensor_right, __pyx_t_9, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 155, __pyx_L1_error) - __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_11, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_16 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_11, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); } __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_v_data_csv); __Pyx_GIVEREF(__pyx_v_data_csv); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_data_csv) != (0)) __PYX_ERR(0, 155, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 155, __pyx_L1_error); - __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_16); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_16) != (0)) __PYX_ERR(0, 155, __pyx_L1_error); + __pyx_t_16 = 0; __pyx_r = ((PyObject*)__pyx_t_11); __pyx_t_11 = 0; - __Pyx_TraceReturnValue(__pyx_r, 371, 0, __PYX_ERR(0, 155, __pyx_L1_error)); goto __pyx_L0; /* "dopt_sensor_anomalies/detection.py":55 @@ -8764,12 +8105,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); - __Pyx_TraceException(__pyx_lineno, 0, 0); - #if CYTHON_USE_SYS_MONITORING - __Pyx_TraceExceptionUnwind(0, 0); - #else - __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 55, __pyx_L1_error)); - #endif __Pyx_AddTraceback("dopt_sensor_anomalies.detection.measure_length", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -8825,7 +8160,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_4measure_length(CYT __Pyx_XDECREF(__pyx_gb_21dopt_sensor_anomalies_9detection_14measure_length_17generator5); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); - __Pyx_PyMonitoring_ExitScope(0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -8944,7 +8278,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON PyObject *__pyx_v_img_np = NULL; PyObject *__pyx_v_anomaly_map_resized = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarationsFunc __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -8965,9 +8298,7 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])) __Pyx_RefNannySetupContext("infer_image", 0); - __Pyx_TraceStartFunc("infer_image", __pyx_f[0], 158, 0, 0, 0, __PYX_ERR(0, 158, __pyx_L1_error)); /* "dopt_sensor_anomalies/detection.py":162 * model: Patchcore, @@ -8976,7 +8307,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * model.to(torch_device) * */ - __Pyx_TraceLine(162,7,0,__PYX_ERR(0, 162, __pyx_L1_error)) __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_torch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -9039,7 +8369,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * * image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) */ - __Pyx_TraceLine(163,14,0,__PYX_ERR(0, 163, __pyx_L1_error)) __pyx_t_4 = __pyx_v_model; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0; @@ -9059,7 +8388,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * pil_image = Image.fromarray(image_rgb) * pil_image = pil_image.convert("RGB") */ - __Pyx_TraceLine(165,21,0,__PYX_ERR(0, 165, __pyx_L1_error)) __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cv2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -9102,7 +8430,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * pil_image = pil_image.convert("RGB") * image_np = np.array(pil_image).astype(np.float32) / 255.0 */ - __Pyx_TraceLine(166,28,0,__PYX_ERR(0, 166, __pyx_L1_error)) __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Image); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -9139,7 +8466,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * image_np = np.array(pil_image).astype(np.float32) / 255.0 * input_tensor = torch.from_numpy(image_np).permute(2, 0, 1) */ - __Pyx_TraceLine(167,31,0,__PYX_ERR(0, 167, __pyx_L1_error)) __pyx_t_4 = __pyx_v_pil_image; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0; @@ -9160,7 +8486,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * input_tensor = torch.from_numpy(image_np).permute(2, 0, 1) * */ - __Pyx_TraceLine(168,38,0,__PYX_ERR(0, 168, __pyx_L1_error)) __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -9217,7 +8542,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * * input_tensor = input_tensor.unsqueeze(0) */ - __Pyx_TraceLine(169,49,0,__PYX_ERR(0, 169, __pyx_L1_error)) __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_torch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -9260,7 +8584,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * input_tensor = input_tensor.to(torch_device) * */ - __Pyx_TraceLine(171,57,0,__PYX_ERR(0, 171, __pyx_L1_error)) __pyx_t_4 = __pyx_v_input_tensor; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0; @@ -9281,7 +8604,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * * model.eval() */ - __Pyx_TraceLine(172,62,0,__PYX_ERR(0, 172, __pyx_L1_error)) __pyx_t_4 = __pyx_v_input_tensor; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0; @@ -9302,7 +8624,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * with torch.no_grad(): * output = model(input_tensor) */ - __Pyx_TraceLine(174,66,0,__PYX_ERR(0, 174, __pyx_L1_error)) __pyx_t_4 = __pyx_v_model; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0; @@ -9322,7 +8643,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * output = model(input_tensor) * */ - __Pyx_TraceLine(175,69,0,__PYX_ERR(0, 175, __pyx_L1_error)) /*with:*/ { __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_torch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) @@ -9394,7 +8714,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * * anomaly_score = output.pred_score.item() */ - __Pyx_TraceLine(176,74,0,__PYX_ERR(0, 176, __pyx_L7_error)) __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_model); __pyx_t_1 = __pyx_v_model; @@ -9442,15 +8761,12 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_TraceException(__pyx_lineno, 0, 0); /*except:*/ { __Pyx_AddTraceback("dopt_sensor_anomalies.detection.infer_image", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_TraceExceptionHandled(69); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_5) < 0) __PYX_ERR(0, 175, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_5); - __Pyx_TraceExceptionDone(); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_4, NULL); @@ -9468,7 +8784,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_1, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_5 = 0; - __Pyx_TraceException(69, 1, 0); __PYX_ERR(0, 175, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -9517,7 +8832,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * anomaly_label = output.pred_label.item() * anomaly_map = output.anomaly_map.squeeze().cpu().numpy() */ - __Pyx_TraceLine(178,77,0,__PYX_ERR(0, 178, __pyx_L1_error)) if (unlikely(!__pyx_v_output)) { __Pyx_RaiseUnboundLocalError("output"); __PYX_ERR(0, 178, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_pred_score); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -9542,7 +8856,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * anomaly_map = output.anomaly_map.squeeze().cpu().numpy() * */ - __Pyx_TraceLine(179,82,0,__PYX_ERR(0, 179, __pyx_L1_error)) if (unlikely(!__pyx_v_output)) { __Pyx_RaiseUnboundLocalError("output"); __PYX_ERR(0, 179, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_pred_label); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -9567,7 +8880,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * * img_np = np.array(pil_image) */ - __Pyx_TraceLine(180,87,0,__PYX_ERR(0, 180, __pyx_L1_error)) if (unlikely(!__pyx_v_output)) { __Pyx_RaiseUnboundLocalError("output"); __PYX_ERR(0, 180, __pyx_L1_error) } __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_anomaly_map); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -9614,7 +8926,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * anomaly_map_resized = cv2.resize(anomaly_map, (img_np.shape[1], img_np.shape[0])) * */ - __Pyx_TraceLine(182,98,0,__PYX_ERR(0, 182, __pyx_L1_error)) __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -9651,7 +8962,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * * return t.InferenceResult( */ - __Pyx_TraceLine(183,103,0,__PYX_ERR(0, 183, __pyx_L1_error)) __pyx_t_8 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_cv2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -9660,12 +8970,12 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_img_np, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 183, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_img_np, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 183, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) @@ -9707,7 +9017,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * img=img_np, * anomaly_map_resized=anomaly_map_resized, */ - __Pyx_TraceLine(185,113,0,__PYX_ERR(0, 185, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error) @@ -9723,7 +9032,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON * ) * */ - __Pyx_TraceLine(189,124,0,__PYX_ERR(0, 189, __pyx_L1_error)) __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { @@ -9753,7 +9061,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON } __pyx_r = __pyx_t_5; __pyx_t_5 = 0; - __Pyx_TraceReturnValue(__pyx_r, 113, 0, __PYX_ERR(0, 185, __pyx_L1_error)); goto __pyx_L0; /* "dopt_sensor_anomalies/detection.py":158 @@ -9774,12 +9081,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_TraceException(__pyx_lineno, 0, 0); - #if CYTHON_USE_SYS_MONITORING - __Pyx_TraceExceptionUnwind(0, 0); - #else - __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 158, __pyx_L1_error)); - #endif __Pyx_AddTraceback("dopt_sensor_anomalies.detection.infer_image", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -9795,7 +9096,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_6infer_image(CYTHON __Pyx_XDECREF(__pyx_v_img_np); __Pyx_XDECREF(__pyx_v_anomaly_map_resized); __Pyx_XGIVEREF(__pyx_r); - __Pyx_PyMonitoring_ExitScope(0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -9931,7 +9231,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( PyObject *__pyx_v_ax = NULL; PyObject *__pyx_v_df = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarationsFunc __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -9951,9 +9250,7 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])) __Pyx_RefNannySetupContext("anomaly_detection", 0); - __Pyx_TraceStartFunc("anomaly_detection", __pyx_f[0], 193, 0, 0, 0, __PYX_ERR(0, 193, __pyx_L1_error)); /* "dopt_sensor_anomalies/detection.py":199 * sensor_images: t.SensorImages, @@ -9962,7 +9259,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * folder_path = img_path.parent * */ - __Pyx_TraceLine(199,8,0,__PYX_ERR(0, 199, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_img_path, __pyx_mstate_global->__pyx_n_u_stem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_file_stem = __pyx_t_1; @@ -9975,7 +9271,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * * model = Patchcore( */ - __Pyx_TraceLine(200,11,0,__PYX_ERR(0, 200, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_img_path, __pyx_mstate_global->__pyx_n_u_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_folder_path = __pyx_t_1; @@ -9988,7 +9283,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * backbone=const.BACKBONE, layers=const.LAYERS, coreset_sampling_ratio=const.RATIO * ) */ - __Pyx_TraceLine(202,14,0,__PYX_ERR(0, 202, __pyx_L1_error)) __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Patchcore); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -10000,7 +9294,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * ) * _, axes = plt.subplots(1, 2, figsize=(12, 6)) */ - __Pyx_TraceLine(203,16,0,__PYX_ERR(0, 203, __pyx_L1_error)) __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_const); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_BACKBONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 203, __pyx_L1_error) @@ -10055,7 +9348,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * * for i, (side, image) in enumerate(sensor_images.items()): */ - __Pyx_TraceLine(205,26,0,__PYX_ERR(0, 205, __pyx_L1_error)) __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_plt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_subplots); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error) @@ -10130,7 +9422,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * image = cast(npt.NDArray[np.uint8], image) * checkpoint = torch.load(detection_models[side]) */ - __Pyx_TraceLine(207,34,0,__PYX_ERR(0, 207, __pyx_L1_error)) __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_t_4 = __pyx_mstate_global->__pyx_int_0; __pyx_t_10 = 0; @@ -10168,7 +9459,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * checkpoint = torch.load(detection_models[side]) * model.load_state_dict(checkpoint["model_state_dict"]) */ - __Pyx_TraceLine(208,45,0,__PYX_ERR(0, 208, __pyx_L1_error)) __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_cast); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -10217,7 +9507,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * model.load_state_dict(checkpoint["model_state_dict"]) * */ - __Pyx_TraceLine(209,55,0,__PYX_ERR(0, 209, __pyx_L1_error)) __pyx_t_6 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_torch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -10257,7 +9546,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * * result = infer_image(image, model) */ - __Pyx_TraceLine(210,59,0,__PYX_ERR(0, 210, __pyx_L1_error)) __pyx_t_1 = __pyx_v_model; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_checkpoint, __pyx_mstate_global->__pyx_n_u_model_state_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error) @@ -10280,7 +9568,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * data_csv.extend([int(result.anomaly_label)]) * */ - __Pyx_TraceLine(212,67,0,__PYX_ERR(0, 212, __pyx_L1_error)) __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_infer_image); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -10314,7 +9601,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * * ax = axes[i] */ - __Pyx_TraceLine(213,70,0,__PYX_ERR(0, 213, __pyx_L1_error)) __pyx_t_1 = __pyx_v_data_csv; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_anomaly_label); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error) @@ -10345,7 +9631,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * ax.axis("off") * ax.imshow(image, alpha=0.8) */ - __Pyx_TraceLine(215,80,0,__PYX_ERR(0, 215, __pyx_L1_error)) __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_axes, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_ax, __pyx_t_7); @@ -10358,7 +9643,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * ax.imshow(image, alpha=0.8) * ax.imshow(result.anomaly_map_resized, cmap="jet", alpha=0.5) */ - __Pyx_TraceLine(216,82,0,__PYX_ERR(0, 216, __pyx_L1_error)) __pyx_t_5 = __pyx_v_ax; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; @@ -10378,7 +9662,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * ax.imshow(result.anomaly_map_resized, cmap="jet", alpha=0.5) * */ - __Pyx_TraceLine(217,86,0,__PYX_ERR(0, 217, __pyx_L1_error)) __pyx_t_5 = __pyx_v_ax; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; @@ -10402,7 +9685,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * * plt.subplots_adjust(wspace=0, hspace=0) */ - __Pyx_TraceLine(218,92,0,__PYX_ERR(0, 218, __pyx_L1_error)) __pyx_t_1 = __pyx_v_ax; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_anomaly_map_resized); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L1_error) @@ -10433,7 +9715,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * plt.savefig( * (folder_path / f"{file_stem}{const.HEATMAP_FILENAME_SUFFIX}.png"), */ - __Pyx_TraceLine(220,103,0,__PYX_ERR(0, 220, __pyx_L1_error)) __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_plt); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -10474,7 +9755,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * (folder_path / f"{file_stem}{const.HEATMAP_FILENAME_SUFFIX}.png"), * bbox_inches="tight", */ - __Pyx_TraceLine(221,110,0,__PYX_ERR(0, 221, __pyx_L1_error)) __pyx_t_6 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_plt); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -10489,7 +9769,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * bbox_inches="tight", * pad_inches=0, */ - __Pyx_TraceLine(222,114,0,__PYX_ERR(0, 222, __pyx_L1_error)) __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_file_stem, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_const); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L1_error) @@ -10546,7 +9825,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * * df = DataFrame([data_csv]) */ - __Pyx_TraceLine(226,124,0,__PYX_ERR(0, 226, __pyx_L1_error)) __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_plt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -10582,7 +9860,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * df.to_csv( * (folder_path / f"{file_stem}.csv"), */ - __Pyx_TraceLine(228,127,0,__PYX_ERR(0, 228, __pyx_L1_error)) __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DataFrame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -10622,7 +9899,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * (folder_path / f"{file_stem}.csv"), * mode="w", */ - __Pyx_TraceLine(229,130,0,__PYX_ERR(0, 229, __pyx_L1_error)) __pyx_t_3 = __pyx_v_df; __Pyx_INCREF(__pyx_t_3); @@ -10633,7 +9909,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * mode="w", * index=False, */ - __Pyx_TraceLine(230,136,0,__PYX_ERR(0, 230, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_file_stem, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_csv); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 230, __pyx_L1_error) @@ -10650,7 +9925,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( * sep=";", * ) */ - __Pyx_TraceLine(234,145,0,__PYX_ERR(0, 234, __pyx_L1_error)) __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_csv_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_QUOTE_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error) @@ -10686,7 +9960,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); - __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 193, __pyx_L1_error)); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); @@ -10697,12 +9970,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_14); - __Pyx_TraceException(__pyx_lineno, 0, 0); - #if CYTHON_USE_SYS_MONITORING - __Pyx_TraceExceptionUnwind(0, 0); - #else - __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 193, __pyx_L1_error)); - #endif __Pyx_AddTraceback("dopt_sensor_anomalies.detection.anomaly_detection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -10719,7 +9986,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_8anomaly_detection( __Pyx_XDECREF(__pyx_v_ax); __Pyx_XDECREF(__pyx_v_df); __Pyx_XGIVEREF(__pyx_r); - __Pyx_PyMonitoring_ExitScope(0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -10850,7 +10116,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_10pipeline(CYTHON_U PyObject *__pyx_v_data_csv = NULL; PyObject *__pyx_v_sensor_images = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarationsFunc __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -10864,9 +10129,7 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_10pipeline(CYTHON_U int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])) __Pyx_RefNannySetupContext("pipeline", 0); - __Pyx_TraceStartFunc("pipeline", __pyx_f[0], 239, 0, 0, 0, __PYX_ERR(0, 239, __pyx_L1_error)); /* "dopt_sensor_anomalies/detection.py":245 * pixels_per_metric_Y: float, @@ -10875,7 +10138,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_10pipeline(CYTHON_U * if not file_path.exists(): * raise FileNotFoundError("The provided path seems not to exist") */ - __Pyx_TraceLine(245,7,0,__PYX_ERR(0, 245, __pyx_L1_error)) __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -10909,7 +10171,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_10pipeline(CYTHON_U * raise FileNotFoundError("The provided path seems not to exist") * */ - __Pyx_TraceLine(246,11,0,__PYX_ERR(0, 246, __pyx_L1_error)) __pyx_t_3 = __pyx_v_file_path; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; @@ -10932,7 +10193,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_10pipeline(CYTHON_U * * MODEL_FOLDER: Final[Path] = dopt_sensor_anomalies._find_paths.get_model_folder() */ - __Pyx_TraceLine(247,16,0,__PYX_ERR(0, 247, __pyx_L1_error)) __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_builtin_FileNotFoundError); __pyx_t_2 = __pyx_builtin_FileNotFoundError; @@ -10965,7 +10225,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_10pipeline(CYTHON_U * DETECTION_MODELS: Final[t.DetectionModels] = ( * dopt_sensor_anomalies._find_paths.get_detection_models(MODEL_FOLDER) */ - __Pyx_TraceLine(249,19,0,__PYX_ERR(0, 249, __pyx_L1_error)) __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_find_paths); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 249, __pyx_L1_error) @@ -10992,7 +10251,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_10pipeline(CYTHON_U * ) * */ - __Pyx_TraceLine(251,24,0,__PYX_ERR(0, 251, __pyx_L1_error)) __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_find_paths); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error) @@ -11019,7 +10277,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_10pipeline(CYTHON_U * file_path, pixels_per_metric_X, pixels_per_metric_Y * ) */ - __Pyx_TraceLine(254,32,0,__PYX_ERR(0, 254, __pyx_L1_error)) __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_measure_length); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -11031,7 +10288,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_10pipeline(CYTHON_U * ) * anomaly_detection( */ - __Pyx_TraceLine(255,34,0,__PYX_ERR(0, 255, __pyx_L1_error)) __pyx_t_2 = PyFloat_FromDouble(__pyx_v_pixels_per_metric_X); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_pixels_per_metric_Y); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 255, __pyx_L1_error) @@ -11116,7 +10372,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_10pipeline(CYTHON_U * file_path, pixels_per_metric_X, pixels_per_metric_Y * ) */ - __Pyx_TraceLine(254,29,0,__PYX_ERR(0, 254, __pyx_L1_error)) __pyx_v_data_csv = __pyx_t_7; __pyx_t_7 = 0; __pyx_v_sensor_images = __pyx_t_8; @@ -11129,7 +10384,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_10pipeline(CYTHON_U * img_path=file_path, * detection_models=DETECTION_MODELS, */ - __Pyx_TraceLine(257,37,0,__PYX_ERR(0, 257, __pyx_L1_error)) __pyx_t_8 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_anomaly_detection); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -11140,7 +10394,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_10pipeline(CYTHON_U * sensor_images=sensor_images, # <<<<<<<<<<<<<< * ) */ - __Pyx_TraceLine(261,45,0,__PYX_ERR(0, 261, __pyx_L1_error)) __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { @@ -11180,7 +10433,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_10pipeline(CYTHON_U /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); - __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 239, __pyx_L1_error)); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); @@ -11188,12 +10440,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_10pipeline(CYTHON_U __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_TraceException(__pyx_lineno, 0, 0); - #if CYTHON_USE_SYS_MONITORING - __Pyx_TraceExceptionUnwind(0, 0); - #else - __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 239, __pyx_L1_error)); - #endif __Pyx_AddTraceback("dopt_sensor_anomalies.detection.pipeline", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -11203,7 +10449,6 @@ static PyObject *__pyx_pf_21dopt_sensor_anomalies_9detection_10pipeline(CYTHON_U __Pyx_XDECREF(__pyx_v_data_csv); __Pyx_XDECREF(__pyx_v_sensor_images); __Pyx_XGIVEREF(__pyx_r); - __Pyx_PyMonitoring_ExitScope(0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -12736,7 +11981,6 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_detection(PyObject *__pyx_pyinit_m int pystate_addmodule_run = 0; #endif __pyx_mstatetype *__pyx_mstate = NULL; - __Pyx_TraceDeclarationsFunc PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; @@ -12850,14 +12094,12 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); (void)__Pyx_modinit_variable_import_code(__pyx_mstate); (void)__Pyx_modinit_function_import_code(__pyx_mstate); /*--- Execution code ---*/ - __Pyx_TraceStartFunc("PyInit_detection", __pyx_f[0], 1, 0, 0, 0, __PYX_ERR(0, 1, __pyx_L1_error)); /* "dopt_sensor_anomalies/detection.py":1 * import csv # <<<<<<<<<<<<<< * import warnings * from pathlib import Path */ - __Pyx_TraceLine(1,1,0,__PYX_ERR(0, 1, __pyx_L1_error)) __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_csv_2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_csv_2, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) @@ -12869,7 +12111,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * from pathlib import Path * from typing import Any, Final, cast */ - __Pyx_TraceLine(2,2,0,__PYX_ERR(0, 2, __pyx_L1_error)) __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_warnings, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_2) < (0)) __PYX_ERR(0, 2, __pyx_L1_error) @@ -12882,7 +12123,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * from typing import Any, Final, cast * */ - __Pyx_TraceLine(3,5,0,__PYX_ERR(0, 3, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_Path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pathlib, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3, __pyx_L1_error) @@ -12901,7 +12141,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * * import cv2 */ - __Pyx_TraceLine(4,8,0,__PYX_ERR(0, 4, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyList_Pack(3, __pyx_mstate_global->__pyx_n_u_Any, __pyx_mstate_global->__pyx_n_u_Final, __pyx_mstate_global->__pyx_n_u_cast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4, __pyx_L1_error) @@ -12928,7 +12167,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * import imutils * import matplotlib.pyplot as plt */ - __Pyx_TraceLine(6,11,0,__PYX_ERR(0, 6, __pyx_L1_error)) __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_cv2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cv2, __pyx_t_2) < (0)) __PYX_ERR(0, 6, __pyx_L1_error) @@ -12941,7 +12179,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * import matplotlib.pyplot as plt * import numpy as np */ - __Pyx_TraceLine(7,12,0,__PYX_ERR(0, 7, __pyx_L1_error)) __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_imutils, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_imutils, __pyx_t_2) < (0)) __PYX_ERR(0, 7, __pyx_L1_error) @@ -12954,7 +12191,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * import numpy as np * import numpy.typing as npt */ - __Pyx_TraceLine(8,13,0,__PYX_ERR(0, 8, __pyx_L1_error)) __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_matplotlib_pyplot, __pyx_mstate_global->__pyx_tuple[7]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_plt, __pyx_t_2) < (0)) __PYX_ERR(0, 8, __pyx_L1_error) @@ -12967,7 +12203,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * import numpy.typing as npt * import torch */ - __Pyx_TraceLine(9,14,0,__PYX_ERR(0, 9, __pyx_L1_error)) __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_numpy, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_2) < (0)) __PYX_ERR(0, 9, __pyx_L1_error) @@ -12980,7 +12215,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * import torch * from anomalib.models import Patchcore */ - __Pyx_TraceLine(10,15,0,__PYX_ERR(0, 10, __pyx_L1_error)) __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_numpy_typing, __pyx_mstate_global->__pyx_tuple[8]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_npt, __pyx_t_2) < (0)) __PYX_ERR(0, 10, __pyx_L1_error) @@ -12993,7 +12227,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * from anomalib.models import Patchcore * from dopt_basics import result_pattern */ - __Pyx_TraceLine(11,16,0,__PYX_ERR(0, 11, __pyx_L1_error)) __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_torch, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_torch, __pyx_t_2) < (0)) __PYX_ERR(0, 11, __pyx_L1_error) @@ -13006,7 +12239,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * from dopt_basics import result_pattern * from imutils import contours, perspective */ - __Pyx_TraceLine(12,19,0,__PYX_ERR(0, 12, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_Patchcore); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_anomalib_models, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error) @@ -13025,7 +12257,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * from imutils import contours, perspective * from pandas import DataFrame */ - __Pyx_TraceLine(13,22,0,__PYX_ERR(0, 13, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_result_pattern); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_dopt_basics, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error) @@ -13044,7 +12275,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * from pandas import DataFrame * from PIL import Image */ - __Pyx_TraceLine(14,25,0,__PYX_ERR(0, 14, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyList_Pack(2, __pyx_mstate_global->__pyx_n_u_contours, __pyx_mstate_global->__pyx_n_u_perspective); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_imutils, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error) @@ -13067,7 +12297,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * from PIL import Image * from scipy.spatial import distance as dist */ - __Pyx_TraceLine(15,29,0,__PYX_ERR(0, 15, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_DataFrame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pandas, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) @@ -13086,7 +12315,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * from scipy.spatial import distance as dist * */ - __Pyx_TraceLine(16,32,0,__PYX_ERR(0, 16, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_Image); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_PIL, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16, __pyx_L1_error) @@ -13105,7 +12333,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * * import dopt_sensor_anomalies._find_paths */ - __Pyx_TraceLine(17,35,0,__PYX_ERR(0, 17, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_distance); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_scipy_spatial, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) @@ -13124,7 +12351,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * from dopt_sensor_anomalies import constants as const * from dopt_sensor_anomalies import errors */ - __Pyx_TraceLine(19,36,0,__PYX_ERR(0, 19, __pyx_L1_error)) __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies__find_path, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies, __pyx_t_2) < (0)) __PYX_ERR(0, 19, __pyx_L1_error) @@ -13137,7 +12363,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * from dopt_sensor_anomalies import errors * from dopt_sensor_anomalies import types as t */ - __Pyx_TraceLine(20,39,0,__PYX_ERR(0, 20, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_constants); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error) @@ -13156,7 +12381,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * from dopt_sensor_anomalies import types as t * */ - __Pyx_TraceLine(21,42,0,__PYX_ERR(0, 21, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error) @@ -13175,7 +12399,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * * # Suppress the specific HuggingFace cache symlink warning */ - __Pyx_TraceLine(22,45,0,__PYX_ERR(0, 22, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22, __pyx_L1_error) @@ -13194,7 +12417,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * "ignore", * message=".*huggingface_hub.*cache-system uses symlinks.*", */ - __Pyx_TraceLine(25,48,0,__PYX_ERR(0, 25, __pyx_L1_error)) __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -13209,7 +12431,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * ) * */ - __Pyx_TraceLine(28,53,0,__PYX_ERR(0, 28, __pyx_L1_error)) __pyx_t_6 = 1; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ignore}; @@ -13233,13 +12454,12 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * pt_A: npt.NDArray[np.floating], * pt_B: npt.NDArray[np.floating], */ - __Pyx_TraceLine(32,54,0,__PYX_ERR(0, 32, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pt_A, __pyx_mstate_global->__pyx_kp_u_npt_NDArray_np_floating) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pt_B, __pyx_mstate_global->__pyx_kp_u_npt_NDArray_np_floating) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_tuple_float_float) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_21dopt_sensor_anomalies_9detection_1midpoint, 0, __pyx_mstate_global->__pyx_n_u_midpoint, NULL, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_21dopt_sensor_anomalies_9detection_1midpoint, 0, __pyx_mstate_global->__pyx_n_u_midpoint, NULL, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -13253,7 +12473,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * ) -> bool: * c1, s1, _ = box_1 */ - __Pyx_TraceLine(42,65,0,__PYX_ERR(0, 42, __pyx_L1_error)) __pyx_t_5 = PyFloat_FromDouble(((double)5.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -13264,7 +12483,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * box_1: t.Box, * box_2: t.Box, */ - __Pyx_TraceLine(39,60,0,__PYX_ERR(0, 39, __pyx_L1_error)) __pyx_t_3 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -13274,7 +12492,7 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_box_2, __pyx_mstate_global->__pyx_kp_u_t_Box) < (0)) __PYX_ERR(0, 39, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tolerance, __pyx_mstate_global->__pyx_n_u_float) < (0)) __PYX_ERR(0, 39, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 39, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_21dopt_sensor_anomalies_9detection_3check_box_redundancy, 0, __pyx_mstate_global->__pyx_n_u_check_box_redundancy, NULL, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_21dopt_sensor_anomalies_9detection_3check_box_redundancy, 0, __pyx_mstate_global->__pyx_n_u_check_box_redundancy, NULL, __pyx_mstate_global->__pyx_n_u_dopt_sensor_anomalies_detection, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_5); @@ -13290,7 +12508,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * img_path: Path, * pixels_per_metric_X: float, */ - __Pyx_TraceLine(55,68,0,__PYX_ERR(0, 55, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_img_path, __pyx_mstate_global->__pyx_n_u_Path) < (0)) __PYX_ERR(0, 55, __pyx_L1_error) @@ -13311,7 +12528,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * image: npt.NDArray[np.uint8], * model: Patchcore, */ - __Pyx_TraceLine(158,76,0,__PYX_ERR(0, 158, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_image, __pyx_mstate_global->__pyx_kp_u_npt_NDArray_np_uint8) < (0)) __PYX_ERR(0, 158, __pyx_L1_error) @@ -13331,7 +12547,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * img_path: Path, * detection_models: t.DetectionModels, */ - __Pyx_TraceLine(193,82,0,__PYX_ERR(0, 193, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_img_path, __pyx_mstate_global->__pyx_n_u_Path) < (0)) __PYX_ERR(0, 193, __pyx_L1_error) @@ -13353,7 +12568,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * def pipeline( * user_img_path: str, */ - __Pyx_TraceLine(239,92,0,__PYX_ERR(0, 239, __pyx_L1_error)) __pyx_t_4 = NULL; __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_result_pattern); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 239, __pyx_L1_error) @@ -13398,13 +12612,10 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); * import warnings * from pathlib import Path */ - __Pyx_TraceLine(1,0,0,__PYX_ERR(0, 1, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_5) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 1, __pyx_L1_error)); - __Pyx_PyMonitoring_ExitScope(0); /*--- Wrapped vars code ---*/ @@ -13416,8 +12627,6 @@ __Pyx_RefNannySetupContext("PyInit_detection", 0); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_TraceException(__pyx_lineno, 0, 0); - __Pyx_TraceExceptionUnwind(0, 0); if (__pyx_m) { if (__pyx_mstate->__pyx_d && stringtab_initialized) { __Pyx_AddTraceback("init dopt_sensor_anomalies.detection", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -13520,7 +12729,7 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__3 */ {__pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__4 */ {__pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__5 */ - {__pyx_k__6, sizeof(__pyx_k__6), 0, 1, 1}, /* PyObject cname: __pyx_n_u__6 */ + {__pyx_k__8, sizeof(__pyx_k__8), 0, 1, 1}, /* PyObject cname: __pyx_n_u__8 */ {__pyx_k_accepted_boxes, sizeof(__pyx_k_accepted_boxes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_accepted_boxes */ {__pyx_k_add_note, sizeof(__pyx_k_add_note), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_add_note */ {__pyx_k_all, sizeof(__pyx_k_all), 0, 1, 1}, /* PyObject cname: __pyx_n_u_all */ @@ -13980,49 +13189,49 @@ static PyObject* __Pyx_PyCode_New( static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { PyObject* tuple_dedup_map = PyDict_New(); if (unlikely(!tuple_dedup_map)) return -1; - { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 32, 52}; - PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pt_A, __pyx_mstate->__pyx_n_u_pt_B}; - __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_midpoint, __pyx_k_AT_Rt1D_AS_at2Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; - } - { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 39, 139}; - PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_box_1, __pyx_mstate->__pyx_n_u_box_2, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_c1, __pyx_mstate->__pyx_n_u_s1, __pyx_mstate->__pyx_n_u__6, __pyx_mstate->__pyx_n_u_c2, __pyx_mstate->__pyx_n_u_s2, __pyx_mstate->__pyx_n_u_center_dist, __pyx_mstate->__pyx_n_u_size_diff}; - __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_check_box_redundancy, __pyx_k_q_D_D_q_q_awb_uARvQd_BfAQ_AWBgU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; - } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 84, 2}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x1, __pyx_mstate->__pyx_n_u_x2}; - __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k__7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k__6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 112, 2}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_existing}; - __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k__8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k__7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 143, 2}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_c}; - __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 144, 2}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_c}; - __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 145, 2}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_c}; - __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 146, 2}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_c}; - __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 32, 52}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pt_A, __pyx_mstate->__pyx_n_u_pt_B}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_midpoint, __pyx_k_AT_Rt1D_AS_at2Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 39, 139}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_box_1, __pyx_mstate->__pyx_n_u_box_2, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_c1, __pyx_mstate->__pyx_n_u_s1, __pyx_mstate->__pyx_n_u__8, __pyx_mstate->__pyx_n_u_c2, __pyx_mstate->__pyx_n_u_s2, __pyx_mstate->__pyx_n_u_center_dist, __pyx_mstate->__pyx_n_u_size_diff}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_check_box_redundancy, __pyx_k_q_D_D_q_q_awb_uARvQd_BfAQ_AWBgU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 56, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 55, 860}; - PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_img_path, __pyx_mstate->__pyx_n_u_pixels_per_metric_X, __pyx_mstate->__pyx_n_u_pixels_per_metric_Y, __pyx_mstate->__pyx_n_u_data_csv, __pyx_mstate->__pyx_n_u_image, __pyx_mstate->__pyx_n_u_cropped, __pyx_mstate->__pyx_n_u_orig, __pyx_mstate->__pyx_n_u_gray, __pyx_mstate->__pyx_n_u__6, __pyx_mstate->__pyx_n_u_binary, __pyx_mstate->__pyx_n_u_kernel, __pyx_mstate->__pyx_n_u_closed, __pyx_mstate->__pyx_n_u_edged, __pyx_mstate->__pyx_n_u_cnts, __pyx_mstate->__pyx_n_u_x_coords, __pyx_mstate->__pyx_n_u_is_sorted, __pyx_mstate->__pyx_n_u_accepted_boxes, __pyx_mstate->__pyx_n_u_filtered_cnts, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_rbox, __pyx_mstate->__pyx_n_u_box, __pyx_mstate->__pyx_n_u_tl, __pyx_mstate->__pyx_n_u_tr, __pyx_mstate->__pyx_n_u_br, __pyx_mstate->__pyx_n_u_bl, __pyx_mstate->__pyx_n_u_tltrX, __pyx_mstate->__pyx_n_u_tltrY, __pyx_mstate->__pyx_n_u_blbrX, __pyx_mstate->__pyx_n_u_blbrY, __pyx_mstate->__pyx_n_u_tlblX, __pyx_mstate->__pyx_n_u_tlblY, __pyx_mstate->__pyx_n_u_trbrX, __pyx_mstate->__pyx_n_u_trbrY, __pyx_mstate->__pyx_n_u_dA, __pyx_mstate->__pyx_n_u_dB, __pyx_mstate->__pyx_n_u_is_duplicate, __pyx_mstate->__pyx_n_u_dimA, __pyx_mstate->__pyx_n_u_dimB, __pyx_mstate->__pyx_n_u_num_contours, __pyx_mstate->__pyx_n_u_x_min, __pyx_mstate->__pyx_n_u_x_max, __pyx_mstate->__pyx_n_u_y_min, __pyx_mstate->__pyx_n_u_y_max, __pyx_mstate->__pyx_n_u_rightmost_x_third, __pyx_mstate->__pyx_n_u_leftmost_x_fourth, __pyx_mstate->__pyx_n_u_x_middle, __pyx_mstate->__pyx_n_u_cropped_sensor_left, __pyx_mstate->__pyx_n_u_cropped_sensor_right, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_img_path, __pyx_mstate->__pyx_n_u_pixels_per_metric_X, __pyx_mstate->__pyx_n_u_pixels_per_metric_Y, __pyx_mstate->__pyx_n_u_data_csv, __pyx_mstate->__pyx_n_u_image, __pyx_mstate->__pyx_n_u_cropped, __pyx_mstate->__pyx_n_u_orig, __pyx_mstate->__pyx_n_u_gray, __pyx_mstate->__pyx_n_u__8, __pyx_mstate->__pyx_n_u_binary, __pyx_mstate->__pyx_n_u_kernel, __pyx_mstate->__pyx_n_u_closed, __pyx_mstate->__pyx_n_u_edged, __pyx_mstate->__pyx_n_u_cnts, __pyx_mstate->__pyx_n_u_x_coords, __pyx_mstate->__pyx_n_u_is_sorted, __pyx_mstate->__pyx_n_u_accepted_boxes, __pyx_mstate->__pyx_n_u_filtered_cnts, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_rbox, __pyx_mstate->__pyx_n_u_box, __pyx_mstate->__pyx_n_u_tl, __pyx_mstate->__pyx_n_u_tr, __pyx_mstate->__pyx_n_u_br, __pyx_mstate->__pyx_n_u_bl, __pyx_mstate->__pyx_n_u_tltrX, __pyx_mstate->__pyx_n_u_tltrY, __pyx_mstate->__pyx_n_u_blbrX, __pyx_mstate->__pyx_n_u_blbrY, __pyx_mstate->__pyx_n_u_tlblX, __pyx_mstate->__pyx_n_u_tlblY, __pyx_mstate->__pyx_n_u_trbrX, __pyx_mstate->__pyx_n_u_trbrY, __pyx_mstate->__pyx_n_u_dA, __pyx_mstate->__pyx_n_u_dB, __pyx_mstate->__pyx_n_u_is_duplicate, __pyx_mstate->__pyx_n_u_dimA, __pyx_mstate->__pyx_n_u_dimB, __pyx_mstate->__pyx_n_u_num_contours, __pyx_mstate->__pyx_n_u_x_min, __pyx_mstate->__pyx_n_u_x_max, __pyx_mstate->__pyx_n_u_y_min, __pyx_mstate->__pyx_n_u_y_max, __pyx_mstate->__pyx_n_u_rightmost_x_third, __pyx_mstate->__pyx_n_u_leftmost_x_fourth, __pyx_mstate->__pyx_n_u_x_middle, __pyx_mstate->__pyx_n_u_cropped_sensor_left, __pyx_mstate->__pyx_n_u_cropped_sensor_right, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_measure_length, __pyx_k_Cwas_1_vS_f_ar_LA_e1D_fE_q_2Q_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; } { @@ -14032,7 +13241,7 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 193, 338}; - PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_img_path, __pyx_mstate->__pyx_n_u_detection_models, __pyx_mstate->__pyx_n_u_data_csv, __pyx_mstate->__pyx_n_u_sensor_images, __pyx_mstate->__pyx_n_u_file_stem, __pyx_mstate->__pyx_n_u_folder_path, __pyx_mstate->__pyx_n_u_model, __pyx_mstate->__pyx_n_u__6, __pyx_mstate->__pyx_n_u_axes, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_side, __pyx_mstate->__pyx_n_u_image, __pyx_mstate->__pyx_n_u_checkpoint, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_ax, __pyx_mstate->__pyx_n_u_df}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_img_path, __pyx_mstate->__pyx_n_u_detection_models, __pyx_mstate->__pyx_n_u_data_csv, __pyx_mstate->__pyx_n_u_sensor_images, __pyx_mstate->__pyx_n_u_file_stem, __pyx_mstate->__pyx_n_u_folder_path, __pyx_mstate->__pyx_n_u_model, __pyx_mstate->__pyx_n_u__8, __pyx_mstate->__pyx_n_u_axes, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_side, __pyx_mstate->__pyx_n_u_image, __pyx_mstate->__pyx_n_u_checkpoint, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_ax, __pyx_mstate->__pyx_n_u_df}; __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_dopt_sensor_anomalies_detect, __pyx_mstate->__pyx_n_u_anomaly_detection, __pyx_k_IQ_k_Y6MURS_wc_3c_a_F_IQm6_AS_9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; } { @@ -15287,124 +14496,6 @@ static void __Pyx_RaiseArgtupleInvalid( (num_expected == 1) ? "" : "s", num_found); } -/* Profile */ -#if CYTHON_PROFILE || CYTHON_TRACE -#if CYTHON_TRACE && !CYTHON_USE_SYS_MONITORING -static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int line) { - int ret; - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - __Pyx_PyFrame_SetLineNumber(frame, line); - __Pyx_EnterTracing(tstate); - ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL); - __Pyx_LeaveTracing(tstate); - if (likely(!ret)) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } else { - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(traceback); - } - return ret; -} -#endif -CYTHON_UNUSED static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) { - PyCodeObject *py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno); - if (likely(py_code)) { - py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS; - } - return py_code; -} -#if CYTHON_USE_SYS_MONITORING -CYTHON_UNUSED static int __Pyx__TraceStartFunc(PyMonitoringState *state_array, PyObject *code_obj, int offset, int skip_event) { - int ret; - __pyx_monitoring_version_type version = 0; - ret = PyMonitoring_EnterScope(state_array, &version, __Pyx_MonitoringEventTypes, __Pyx_MonitoringEventTypes_CyFunc_count); - if (unlikely(ret == -1)) return -1; - return skip_event ? 0 : PyMonitoring_FirePyStartEvent(&state_array[__Pyx_Monitoring_PY_START], code_obj, offset); -} -CYTHON_UNUSED static int __Pyx__TraceStartGen(PyMonitoringState *state_array, __pyx_monitoring_version_type *version, PyObject *code_obj, int offset) { - int ret; - ret = PyMonitoring_EnterScope(state_array, version, __Pyx_MonitoringEventTypes, __Pyx_MonitoringEventTypes_CyGen_count); - if (unlikely(ret == -1)) return -1; - return PyMonitoring_FirePyStartEvent(&state_array[__Pyx_Monitoring_PY_START], code_obj, offset); -} -CYTHON_UNUSED static int __Pyx__TraceResumeGen(PyMonitoringState *state_array, __pyx_monitoring_version_type *version, PyObject *code_obj, int offset) { - int ret; - ret = PyMonitoring_EnterScope(state_array, version, __Pyx_MonitoringEventTypes, __Pyx_MonitoringEventTypes_CyGen_count); - if (unlikely(ret == -1)) return -1; - return PyMonitoring_FirePyResumeEvent(&state_array[__Pyx_Monitoring_PY_RESUME], code_obj, offset); -} -CYTHON_UNUSED static void __Pyx__TraceException(PyMonitoringState *monitoring_state, PyObject *code_obj, int offset, int reraised) { - if (reraised) { - (void) PyMonitoring_FireReraiseEvent(monitoring_state, code_obj, offset); - } else { - (void) PyMonitoring_FireRaiseEvent(monitoring_state, code_obj, offset); - } -} -#if CYTHON_TRACE -CYTHON_UNUSED static int __Pyx__TraceLine(PyMonitoringState *monitoring_state, PyObject *code_obj, int line, int offset) { - int ret; - PyObject *exc = PyErr_GetRaisedException(); - ret = PyMonitoring_FireLineEvent(monitoring_state, code_obj, offset, line); - if (exc) PyErr_SetRaisedException(exc); - return ret; -} -#endif -#else -static int __Pyx_TraceSetupAndCall(PyCodeObject** code, - PyFrameObject** frame, - PyThreadState* tstate, - const char *funcname, - const char *srcfile, - int firstlineno, - int skip_event) { - if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) { - int needs_new_code_obj = (*code == NULL); - if (needs_new_code_obj) { - *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno); - if (*code == NULL) return 0; - } - *frame = PyFrame_New( - tstate, /*PyThreadState *tstate*/ - *code, /*PyCodeObject *code*/ - __pyx_mstate_global->__pyx_d, /*PyObject *globals*/ - 0 /*PyObject *locals*/ - ); - if (needs_new_code_obj && !CYTHON_PROFILE_REUSE_CODEOBJ) - Py_CLEAR(*code); // otherwise the reference is owned externally - if (*frame == NULL) return 0; - if (CYTHON_TRACE && (*frame)->f_trace == NULL) { - Py_INCREF(Py_None); - (*frame)->f_trace = Py_None; - } - } - if (!skip_event) { - PyObject *type, *value, *traceback; - int retval = 1; - __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); - __Pyx_EnterTracing(tstate); - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - #if CYTHON_TRACE - if (tstate->c_tracefunc) - retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0; - if (retval && tstate->c_profilefunc) - #endif - retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0; - __Pyx_LeaveTracing(tstate); - if (unlikely(!retval)) { - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(traceback); - return -1; - } - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } - return __Pyx_IsTracing(tstate, 0, 0); -} -#endif -#endif - /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r;