Generated by Cython 0.17 on Wed Dec 19 21:04:29 2012
Raw output: splitBBox.c
1: #!/usr/bin/env python
/* "splitBBox.pyx":1 * #!/usr/bin/env python #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* # -*- coding: utf-8 -*- * # */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_3))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
2: # -*- coding: utf-8 -*-
3: #
4: # Project: Azimuthal integration
5: # https://forge.epn-campus.eu/projects/azimuthal
6: #
7: # File: "$Id$"
8: #
9: # Copyright (C) European Synchrotron Radiation Facility, Grenoble, France
10: #
11: # Principal author: Jérôme Kieffer (Jerome.Kieffer@ESRF.eu)
12: #
13: # This program is free software: you can redistribute it and/or modify
14: # it under the terms of the GNU General Public License as published by
15: # the Free Software Foundation, either version 3 of the License, or
16: # (at your option) any later version.
17: #
18: # This program is distributed in the hope that it will be useful,
19: # but WITHOUT ANY WARRANTY; without even the implied warranty of
20: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21: # GNU General Public License for more details.
22: #
23: # You should have received a copy of the GNU General Public License
24: # along with this program. If not, see <http://www.gnu.org/licenses/>.
25: #
26:
27:
28: import cython
29: cimport numpy
30: import numpy
/* "splitBBox.pyx":30 * import cython * cimport numpy * import numpy #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* from libc.math cimport fabs * */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__numpy, __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31: from libc.math cimport fabs
32:
33: EPS32 = (1 + numpy.finfo(numpy.float32).eps)
/* "splitBBox.pyx":33 * from libc.math cimport fabs * * EPS32 = (1 + numpy.finfo(numpy.float32).eps) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * @cython.cdivision(True) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__finfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__eps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_int_1, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyObject_SetAttr(__pyx_m, __pyx_n_s__EPS32, __pyx_t_3)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
34:
35: @cython.cdivision(True)
36: cdef float getBinNr(float x0, float pos0_min, float delta) nogil:
/* "splitBBox.pyx":36 * * @cython.cdivision(True) * cdef float getBinNr(float x0, float pos0_min, float delta) nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* """ * calculate the bin number for any point */ static float __pyx_f_9splitBBox_getBinNr(float __pyx_v_x0, float __pyx_v_pos0_min, float __pyx_v_delta) { float __pyx_r;
37: """
38: calculate the bin number for any point
39: param x0: current position
40: param pos0_min: position minimum
41: param delta: bin width
42: """
43: return (x0 - pos0_min) / delta
/* "splitBBox.pyx":43 * param delta: bin width * """ * return (x0 - pos0_min) / delta #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * */ __pyx_r = ((__pyx_v_x0 - __pyx_v_pos0_min) / __pyx_v_delta); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9splitBBox_1histoBBox1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9splitBBox_histoBBox1d[] = "\n Calculates histogram of pos0 (tth) weighted by weights\n\n Splitting is done on the pixel's bounding box like fit2D\n\n @param weights: array with intensities\n @param pos0: 1D array with pos0: tth or q_vect\n @param delta_pos0: 1D array with delta pos0: max center-corner distance\n @param pos1: 1D array with pos1: chi\n @param delta_pos1: 1D array with max pos1: max center-corner distance, unused !\n @param bins: number of output bins\n @param pos0Range: minimum and maximum of the 2th range\n @param pos1Range: minimum and maximum of the chi range\n @param dummy: value for bins without pixels & value of \"no good\" pixels\n @param delta_dummy: precision of dummy value\n @param mask: array (of int8) with masked pixels with 1 (0=not masked)\n @param dark: array (of float32) with dark noise to be subtracted (or None)\n @param flat: array (of float32) with flat-field image\n @param polarization: array (of float32) with polarization corrections\n @param solidangle: array (of float32) with solid angle corrections\n\n @return 2theta, I, weighted histogram, unweighted histogram\n "; static PyMethodDef __pyx_mdef_9splitBBox_1histoBBox1d = {__Pyx_NAMESTR("histoBBox1d"), (PyCFunction)__pyx_pw_9splitBBox_1histoBBox1d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9splitBBox_histoBBox1d)}; static PyObject *__pyx_pw_9splitBBox_1histoBBox1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_weights = 0; PyArrayObject *__pyx_v_pos0 = 0; PyArrayObject *__pyx_v_delta_pos0 = 0; PyObject *__pyx_v_pos1 = 0; PyObject *__pyx_v_delta_pos1 = 0; size_t __pyx_v_bins; PyObject *__pyx_v_pos0Range = 0; PyObject *__pyx_v_pos1Range = 0; PyObject *__pyx_v_dummy = 0; PyObject *__pyx_v_delta_dummy = 0; PyObject *__pyx_v_mask = 0; PyObject *__pyx_v_dark = 0; PyObject *__pyx_v_flat = 0; PyObject *__pyx_v_solidangle = 0; PyObject *__pyx_v_polarization = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("histoBBox1d (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__weights,&__pyx_n_s__pos0,&__pyx_n_s__delta_pos0,&__pyx_n_s__pos1,&__pyx_n_s__delta_pos1,&__pyx_n_s__bins,&__pyx_n_s__pos0Range,&__pyx_n_s__pos1Range,&__pyx_n_s__dummy,&__pyx_n_s__delta_dummy,&__pyx_n_s__mask,&__pyx_n_s__dark,&__pyx_n_s__flat,&__pyx_n_s__solidangle,&__pyx_n_s__polarization,0}; PyObject* values[15] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
44:
45:
46: @cython.cdivision(True)
47: @cython.boundscheck(False)
48: @cython.wraparound(False)
49: def histoBBox1d(numpy.ndarray weights not None,
/* "splitBBox.pyx":49 * @cython.boundscheck(False) * @cython.wraparound(False) * def histoBBox1d(numpy.ndarray weights not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray pos0 not None, * numpy.ndarray delta_pos0 not None, */ static PyObject *__pyx_pf_9splitBBox_histoBBox1d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_weights, PyArrayObject *__pyx_v_pos0, PyArrayObject *__pyx_v_delta_pos0, PyObject *__pyx_v_pos1, PyObject *__pyx_v_delta_pos1, size_t __pyx_v_bins, PyObject *__pyx_v_pos0Range, PyObject *__pyx_v_pos1Range, PyObject *__pyx_v_dummy, PyObject *__pyx_v_delta_dummy, PyObject *__pyx_v_mask, PyObject *__pyx_v_dark, PyObject *__pyx_v_flat, PyObject *__pyx_v_solidangle, PyObject *__pyx_v_polarization) { size_t __pyx_v_size; Py_ssize_t __pyx_v_bin0_max; Py_ssize_t __pyx_v_bin0_min; CYTHON_UNUSED Py_ssize_t __pyx_v_bin; float __pyx_v_data; float __pyx_v_deltaR; float __pyx_v_deltaL; float __pyx_v_deltaA; float __pyx_v_epsilon; float __pyx_v_cdummy; float __pyx_v_ddummy; float __pyx_v_pos0_min; float __pyx_v_pos0_max; float __pyx_v_pos0_maxin; float __pyx_v_pos1_min; float __pyx_v_pos1_max; float __pyx_v_pos1_maxin; float __pyx_v_min0; float __pyx_v_max0; float __pyx_v_fbin0_min; float __pyx_v_fbin0_max; int __pyx_v_check_pos1; int __pyx_v_check_mask; int __pyx_v_check_dummy; int __pyx_v_do_dark; int __pyx_v_do_flat; int __pyx_v_do_polarization; int __pyx_v_do_solidangle; PyArrayObject *__pyx_v_cdata = 0; PyArrayObject *__pyx_v_cpos0 = 0; PyArrayObject *__pyx_v_dpos0 = 0; PyArrayObject *__pyx_v_cpos1 = 0; PyArrayObject *__pyx_v_dpos1 = 0; PyArrayObject *__pyx_v_cpos0_lower = 0; PyArrayObject *__pyx_v_cpos0_upper = 0; __Pyx_memviewslice __pyx_v_cmask = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_cflat = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_cdark = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_cpolarization = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_csolidangle = { 0, 0, { 0 }, { 0 }, { 0 } }; PyArrayObject *__pyx_v_outData = 0; PyArrayObject *__pyx_v_outCount = 0; PyArrayObject *__pyx_v_outMerge = 0; size_t __pyx_v_idx; float __pyx_v_delta; PyObject *__pyx_v_outPos = NULL; size_t __pyx_v_i; __Pyx_LocalBuf_ND __pyx_pybuffernd_cdata; __Pyx_Buffer __pyx_pybuffer_cdata; __Pyx_LocalBuf_ND __pyx_pybuffernd_cpos0; __Pyx_Buffer __pyx_pybuffer_cpos0; __Pyx_LocalBuf_ND __pyx_pybuffernd_cpos0_lower; __Pyx_Buffer __pyx_pybuffer_cpos0_lower; __Pyx_LocalBuf_ND __pyx_pybuffernd_cpos0_upper; __Pyx_Buffer __pyx_pybuffer_cpos0_upper; __Pyx_LocalBuf_ND __pyx_pybuffernd_cpos1; __Pyx_Buffer __pyx_pybuffer_cpos1; __Pyx_LocalBuf_ND __pyx_pybuffernd_dpos0; __Pyx_Buffer __pyx_pybuffer_dpos0; __Pyx_LocalBuf_ND __pyx_pybuffernd_dpos1; __Pyx_Buffer __pyx_pybuffer_dpos1; __Pyx_LocalBuf_ND __pyx_pybuffernd_outCount; __Pyx_Buffer __pyx_pybuffer_outCount; __Pyx_LocalBuf_ND __pyx_pybuffernd_outData; __Pyx_Buffer __pyx_pybuffer_outData; __Pyx_LocalBuf_ND __pyx_pybuffernd_outMerge; __Pyx_Buffer __pyx_pybuffer_outMerge; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("histoBBox1d", 0); __pyx_pybuffer_cdata.pybuffer.buf = NULL; __pyx_pybuffer_cdata.refcount = 0; __pyx_pybuffernd_cdata.data = NULL; __pyx_pybuffernd_cdata.rcbuffer = &__pyx_pybuffer_cdata; __pyx_pybuffer_cpos0.pybuffer.buf = NULL; __pyx_pybuffer_cpos0.refcount = 0; __pyx_pybuffernd_cpos0.data = NULL; __pyx_pybuffernd_cpos0.rcbuffer = &__pyx_pybuffer_cpos0; __pyx_pybuffer_dpos0.pybuffer.buf = NULL; __pyx_pybuffer_dpos0.refcount = 0; __pyx_pybuffernd_dpos0.data = NULL; __pyx_pybuffernd_dpos0.rcbuffer = &__pyx_pybuffer_dpos0; __pyx_pybuffer_cpos1.pybuffer.buf = NULL; __pyx_pybuffer_cpos1.refcount = 0; __pyx_pybuffernd_cpos1.data = NULL; __pyx_pybuffernd_cpos1.rcbuffer = &__pyx_pybuffer_cpos1; __pyx_pybuffer_dpos1.pybuffer.buf = NULL; __pyx_pybuffer_dpos1.refcount = 0; __pyx_pybuffernd_dpos1.data = NULL; __pyx_pybuffernd_dpos1.rcbuffer = &__pyx_pybuffer_dpos1; __pyx_pybuffer_cpos0_lower.pybuffer.buf = NULL; __pyx_pybuffer_cpos0_lower.refcount = 0; __pyx_pybuffernd_cpos0_lower.data = NULL; __pyx_pybuffernd_cpos0_lower.rcbuffer = &__pyx_pybuffer_cpos0_lower; __pyx_pybuffer_cpos0_upper.pybuffer.buf = NULL; __pyx_pybuffer_cpos0_upper.refcount = 0; __pyx_pybuffernd_cpos0_upper.data = NULL; __pyx_pybuffernd_cpos0_upper.rcbuffer = &__pyx_pybuffer_cpos0_upper; __pyx_pybuffer_outData.pybuffer.buf = NULL; __pyx_pybuffer_outData.refcount = 0; __pyx_pybuffernd_outData.data = NULL; __pyx_pybuffernd_outData.rcbuffer = &__pyx_pybuffer_outData; __pyx_pybuffer_outCount.pybuffer.buf = NULL; __pyx_pybuffer_outCount.refcount = 0; __pyx_pybuffernd_outCount.data = NULL; __pyx_pybuffernd_outCount.rcbuffer = &__pyx_pybuffer_outCount; __pyx_pybuffer_outMerge.pybuffer.buf = NULL; __pyx_pybuffer_outMerge.refcount = 0; __pyx_pybuffernd_outMerge.data = NULL; __pyx_pybuffernd_outMerge.rcbuffer = &__pyx_pybuffer_outMerge; /* "splitBBox.pyx":49 * @cython.boundscheck(False) * @cython.wraparound(False) * def histoBBox1d(numpy.ndarray weights not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray pos0 not None, * numpy.ndarray delta_pos0 not None, */ __pyx_k_tuple_47 = PyTuple_New(63); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_47); __Pyx_INCREF(((PyObject *)__pyx_n_s__weights)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 0, ((PyObject *)__pyx_n_s__weights)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__weights)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos0)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 1, ((PyObject *)__pyx_n_s__pos0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__delta_pos0)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 2, ((PyObject *)__pyx_n_s__delta_pos0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta_pos0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos1)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 3, ((PyObject *)__pyx_n_s__pos1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__delta_pos1)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 4, ((PyObject *)__pyx_n_s__delta_pos1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta_pos1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bins)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 5, ((PyObject *)__pyx_n_s__bins)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bins)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos0Range)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 6, ((PyObject *)__pyx_n_s__pos0Range)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos0Range)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos1Range)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 7, ((PyObject *)__pyx_n_s__pos1Range)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos1Range)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dummy)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 8, ((PyObject *)__pyx_n_s__dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__delta_dummy)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 9, ((PyObject *)__pyx_n_s__delta_dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta_dummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__mask)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 10, ((PyObject *)__pyx_n_s__mask)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dark)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 11, ((PyObject *)__pyx_n_s__dark)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dark)); __Pyx_INCREF(((PyObject *)__pyx_n_s__flat)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 12, ((PyObject *)__pyx_n_s__flat)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__flat)); __Pyx_INCREF(((PyObject *)__pyx_n_s__solidangle)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 13, ((PyObject *)__pyx_n_s__solidangle)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__solidangle)); __Pyx_INCREF(((PyObject *)__pyx_n_s__polarization)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 14, ((PyObject *)__pyx_n_s__polarization)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__polarization)); __Pyx_INCREF(((PyObject *)__pyx_n_s__size)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 15, ((PyObject *)__pyx_n_s__size)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__size)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bin0_max)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 16, ((PyObject *)__pyx_n_s__bin0_max)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bin0_max)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bin0_min)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 17, ((PyObject *)__pyx_n_s__bin0_min)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bin0_min)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bin)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 18, ((PyObject *)__pyx_n_s__bin)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bin)); __Pyx_INCREF(((PyObject *)__pyx_n_s__data)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 19, ((PyObject *)__pyx_n_s__data)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data)); __Pyx_INCREF(((PyObject *)__pyx_n_s__deltaR)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 20, ((PyObject *)__pyx_n_s__deltaR)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__deltaR)); __Pyx_INCREF(((PyObject *)__pyx_n_s__deltaL)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 21, ((PyObject *)__pyx_n_s__deltaL)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__deltaL)); __Pyx_INCREF(((PyObject *)__pyx_n_s__deltaA)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 22, ((PyObject *)__pyx_n_s__deltaA)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__deltaA)); __Pyx_INCREF(((PyObject *)__pyx_n_s__p1)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 23, ((PyObject *)__pyx_n_s__p1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__p1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__epsilon)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 24, ((PyObject *)__pyx_n_s__epsilon)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__epsilon)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cdummy)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 25, ((PyObject *)__pyx_n_s__cdummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cdummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__ddummy)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 26, ((PyObject *)__pyx_n_s__ddummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ddummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos0_min)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 27, ((PyObject *)__pyx_n_s__pos0_min)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos0_min)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos0_max)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 28, ((PyObject *)__pyx_n_s__pos0_max)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos0_max)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos0_maxin)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 29, ((PyObject *)__pyx_n_s__pos0_maxin)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos0_maxin)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos1_min)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 30, ((PyObject *)__pyx_n_s__pos1_min)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos1_min)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos1_max)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 31, ((PyObject *)__pyx_n_s__pos1_max)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos1_max)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos1_maxin)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 32, ((PyObject *)__pyx_n_s__pos1_maxin)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos1_maxin)); __Pyx_INCREF(((PyObject *)__pyx_n_s__min0)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 33, ((PyObject *)__pyx_n_s__min0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__min0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__max0)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 34, ((PyObject *)__pyx_n_s__max0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__max0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__fbin0_min)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 35, ((PyObject *)__pyx_n_s__fbin0_min)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fbin0_min)); __Pyx_INCREF(((PyObject *)__pyx_n_s__fbin0_max)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 36, ((PyObject *)__pyx_n_s__fbin0_max)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fbin0_max)); __Pyx_INCREF(((PyObject *)__pyx_n_s__check_pos1)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 37, ((PyObject *)__pyx_n_s__check_pos1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__check_pos1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__check_mask)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 38, ((PyObject *)__pyx_n_s__check_mask)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__check_mask)); __Pyx_INCREF(((PyObject *)__pyx_n_s__check_dummy)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 39, ((PyObject *)__pyx_n_s__check_dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__check_dummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_dark)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 40, ((PyObject *)__pyx_n_s__do_dark)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_dark)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_flat)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 41, ((PyObject *)__pyx_n_s__do_flat)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_flat)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_polarization)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 42, ((PyObject *)__pyx_n_s__do_polarization)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_polarization)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_solidangle)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 43, ((PyObject *)__pyx_n_s__do_solidangle)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_solidangle)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cdata)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 44, ((PyObject *)__pyx_n_s__cdata)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cdata)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cpos0)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 45, ((PyObject *)__pyx_n_s__cpos0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cpos0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dpos0)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 46, ((PyObject *)__pyx_n_s__dpos0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dpos0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cpos1)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 47, ((PyObject *)__pyx_n_s__cpos1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cpos1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dpos1)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 48, ((PyObject *)__pyx_n_s__dpos1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dpos1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cpos0_lower)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 49, ((PyObject *)__pyx_n_s__cpos0_lower)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cpos0_lower)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cpos0_upper)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 50, ((PyObject *)__pyx_n_s__cpos0_upper)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cpos0_upper)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cmask)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 51, ((PyObject *)__pyx_n_s__cmask)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cmask)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cflat)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 52, ((PyObject *)__pyx_n_s__cflat)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cflat)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cdark)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 53, ((PyObject *)__pyx_n_s__cdark)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cdark)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cpolarization)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 54, ((PyObject *)__pyx_n_s__cpolarization)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cpolarization)); __Pyx_INCREF(((PyObject *)__pyx_n_s__csolidangle)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 55, ((PyObject *)__pyx_n_s__csolidangle)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__csolidangle)); __Pyx_INCREF(((PyObject *)__pyx_n_s__outData)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 56, ((PyObject *)__pyx_n_s__outData)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outData)); __Pyx_INCREF(((PyObject *)__pyx_n_s__outCount)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 57, ((PyObject *)__pyx_n_s__outCount)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outCount)); __Pyx_INCREF(((PyObject *)__pyx_n_s__outMerge)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 58, ((PyObject *)__pyx_n_s__outMerge)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outMerge)); __Pyx_INCREF(((PyObject *)__pyx_n_s__idx)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 59, ((PyObject *)__pyx_n_s__idx)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx)); __Pyx_INCREF(((PyObject *)__pyx_n_s__delta)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 60, ((PyObject *)__pyx_n_s__delta)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta)); __Pyx_INCREF(((PyObject *)__pyx_n_s__outPos)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 61, ((PyObject *)__pyx_n_s__outPos)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outPos)); __Pyx_INCREF(((PyObject *)__pyx_n_s__i)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 62, ((PyObject *)__pyx_n_s__i)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47)); /* "splitBBox.pyx":49 * @cython.boundscheck(False) * @cython.wraparound(False) * def histoBBox1d(numpy.ndarray weights not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray pos0 not None, * numpy.ndarray delta_pos0 not None, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_9splitBBox_1histoBBox1d, NULL, __pyx_n_s__splitBBox); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__histoBBox1d, __pyx_t_3)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_codeobj_48 = (PyObject*)__Pyx_PyCode_New(15, 0, 63, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_49, __pyx_n_s__histoBBox1d, 49, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
50: numpy.ndarray pos0 not None,
51: numpy.ndarray delta_pos0 not None,
52: pos1=None,
/* "splitBBox.pyx":52 * numpy.ndarray pos0 not None, * numpy.ndarray delta_pos0 not None, * pos1=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* delta_pos1=None, * size_t bins=100, */ values[3] = ((PyObject *)Py_None);
53: delta_pos1=None,
/* "splitBBox.pyx":53 * numpy.ndarray delta_pos0 not None, * pos1=None, * delta_pos1=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* size_t bins=100, * pos0Range=None, */ values[4] = ((PyObject *)Py_None);
54: size_t bins=100,
55: pos0Range=None,
/* "splitBBox.pyx":55 * delta_pos1=None, * size_t bins=100, * pos0Range=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1Range=None, * dummy=None, */ values[6] = ((PyObject *)Py_None);
56: pos1Range=None,
/* "splitBBox.pyx":56 * size_t bins=100, * pos0Range=None, * pos1Range=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* dummy=None, * delta_dummy=None, */ values[7] = ((PyObject *)Py_None);
57: dummy=None,
/* "splitBBox.pyx":57 * pos0Range=None, * pos1Range=None, * dummy=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* delta_dummy=None, * mask=None, */ values[8] = ((PyObject *)Py_None);
58: delta_dummy=None,
/* "splitBBox.pyx":58 * pos1Range=None, * dummy=None, * delta_dummy=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* mask=None, * dark=None, */ values[9] = ((PyObject *)Py_None);
59: mask=None,
/* "splitBBox.pyx":59 * dummy=None, * delta_dummy=None, * mask=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* dark=None, * flat=None, */ values[10] = ((PyObject *)Py_None);
60: dark=None,
/* "splitBBox.pyx":60 * delta_dummy=None, * mask=None, * dark=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* flat=None, * solidangle=None, */ values[11] = ((PyObject *)Py_None);
61: flat=None,
/* "splitBBox.pyx":61 * mask=None, * dark=None, * flat=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* solidangle=None, * polarization=None): */ values[12] = ((PyObject *)Py_None);
62: solidangle=None,
/* "splitBBox.pyx":62 * dark=None, * flat=None, * solidangle=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* polarization=None): * */ values[13] = ((PyObject *)Py_None);
63: polarization=None):
/* "splitBBox.pyx":63 * flat=None, * solidangle=None, * polarization=None): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * """ */ values[14] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14); case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13); case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__weights)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos0)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("histoBBox1d", 0, 3, 15, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__delta_pos0)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("histoBBox1d", 0, 3, 15, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos1); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__delta_pos1); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos0Range); if (value) { values[6] = value; kw_args--; } } case 7: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos1Range); if (value) { values[7] = value; kw_args--; } } case 8: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy); if (value) { values[8] = value; kw_args--; } } case 9: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__delta_dummy); if (value) { values[9] = value; kw_args--; } } case 10: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask); if (value) { values[10] = value; kw_args--; } } case 11: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dark); if (value) { values[11] = value; kw_args--; } } case 12: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__flat); if (value) { values[12] = value; kw_args--; } } case 13: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__solidangle); if (value) { values[13] = value; kw_args--; } } case 14: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__polarization); if (value) { values[14] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "histoBBox1d")<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14); case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13); case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_weights = ((PyArrayObject *)values[0]); __pyx_v_pos0 = ((PyArrayObject *)values[1]); __pyx_v_delta_pos0 = ((PyArrayObject *)values[2]); __pyx_v_pos1 = values[3]; __pyx_v_delta_pos1 = values[4]; if (values[5]) { __pyx_v_bins = __Pyx_PyInt_AsSize_t(values[5]); if (unlikely((__pyx_v_bins == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_bins = ((size_t)100); } __pyx_v_pos0Range = values[6]; __pyx_v_pos1Range = values[7]; __pyx_v_dummy = values[8]; __pyx_v_delta_dummy = values[9]; __pyx_v_mask = values[10]; __pyx_v_dark = values[11]; __pyx_v_flat = values[12]; __pyx_v_solidangle = values[13]; __pyx_v_polarization = values[14]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("histoBBox1d", 0, 3, 15, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("splitBBox.histoBBox1d", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weights), __pyx_ptype_5numpy_ndarray, 0, "weights", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos0), __pyx_ptype_5numpy_ndarray, 0, "pos0", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_delta_pos0), __pyx_ptype_5numpy_ndarray, 0, "delta_pos0", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_9splitBBox_histoBBox1d(__pyx_self, __pyx_v_weights, __pyx_v_pos0, __pyx_v_delta_pos0, __pyx_v_pos1, __pyx_v_delta_pos1, __pyx_v_bins, __pyx_v_pos0Range, __pyx_v_pos1Range, __pyx_v_dummy, __pyx_v_delta_dummy, __pyx_v_mask, __pyx_v_dark, __pyx_v_flat, __pyx_v_solidangle, __pyx_v_polarization); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
64:
65: """
66: Calculates histogram of pos0 (tth) weighted by weights
67:
68: Splitting is done on the pixel's bounding box like fit2D
69:
70: @param weights: array with intensities
71: @param pos0: 1D array with pos0: tth or q_vect
72: @param delta_pos0: 1D array with delta pos0: max center-corner distance
73: @param pos1: 1D array with pos1: chi
74: @param delta_pos1: 1D array with max pos1: max center-corner distance, unused !
75: @param bins: number of output bins
76: @param pos0Range: minimum and maximum of the 2th range
77: @param pos1Range: minimum and maximum of the chi range
78: @param dummy: value for bins without pixels & value of "no good" pixels
79: @param delta_dummy: precision of dummy value
80: @param mask: array (of int8) with masked pixels with 1 (0=not masked)
81: @param dark: array (of float32) with dark noise to be subtracted (or None)
82: @param flat: array (of float32) with flat-field image
83: @param polarization: array (of float32) with polarization corrections
84: @param solidangle: array (of float32) with solid angle corrections
85:
86: @return 2theta, I, weighted histogram, unweighted histogram
87: """
88: cdef size_t size = weights.size
/* "splitBBox.pyx":88 * @return 2theta, I, weighted histogram, unweighted histogram * """ * cdef size_t size = weights.size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert pos0.size == size * assert delta_pos0.size == size */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_weights), __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AsSize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_size = __pyx_t_2;
89: assert pos0.size == size
/* "splitBBox.pyx":89 * """ * cdef size_t size = weights.size * assert pos0.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert delta_pos0.size == size * assert bins > 1 */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_pos0), __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
90: assert delta_pos0.size == size
/* "splitBBox.pyx":90 * cdef size_t size = weights.size * assert pos0.size == size * assert delta_pos0.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert bins > 1 * cdef ssize_t bin0_max, bin0_min, bin = 0 */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_delta_pos0), __pyx_n_s__size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_5)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
91: assert bins > 1
/* "splitBBox.pyx":91 * assert pos0.size == size * assert delta_pos0.size == size * assert bins > 1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef ssize_t bin0_max, bin0_min, bin = 0 * cdef float data, deltaR, deltaL, deltaA,p1, epsilon = 1e-10, cdummy = 0, ddummy = 0 */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!(__pyx_v_bins > 1))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
92: cdef ssize_t bin0_max, bin0_min, bin = 0
/* "splitBBox.pyx":92 * assert delta_pos0.size == size * assert bins > 1 * cdef ssize_t bin0_max, bin0_min, bin = 0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef float data, deltaR, deltaL, deltaA,p1, epsilon = 1e-10, cdummy = 0, ddummy = 0 * cdef float pos0_min=0, pos0_max=0, pos0_maxin=0, pos1_min=0, pos1_max=0, pos1_maxin=0, min0=0, max0=0, fbin0_min=0, fbin0_max=0 */ __pyx_v_bin = 0;
93: cdef float data, deltaR, deltaL, deltaA,p1, epsilon = 1e-10, cdummy = 0, ddummy = 0
/* "splitBBox.pyx":93 * assert bins > 1 * cdef ssize_t bin0_max, bin0_min, bin = 0 * cdef float data, deltaR, deltaL, deltaA,p1, epsilon = 1e-10, cdummy = 0, ddummy = 0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef float pos0_min=0, pos0_max=0, pos0_maxin=0, pos1_min=0, pos1_max=0, pos1_maxin=0, min0=0, max0=0, fbin0_min=0, fbin0_max=0 * cdef bint check_pos1=False, check_mask=False, check_dummy=False, do_dark=False, do_flat=False, do_polarization=False, do_solidangle=False */ __pyx_v_epsilon = 1e-10; __pyx_v_cdummy = 0.0; __pyx_v_ddummy = 0.0;
94: cdef float pos0_min=0, pos0_max=0, pos0_maxin=0, pos1_min=0, pos1_max=0, pos1_maxin=0, min0=0, max0=0, fbin0_min=0, fbin0_max=0
/* "splitBBox.pyx":94 * cdef ssize_t bin0_max, bin0_min, bin = 0 * cdef float data, deltaR, deltaL, deltaA,p1, epsilon = 1e-10, cdummy = 0, ddummy = 0 * cdef float pos0_min=0, pos0_max=0, pos0_maxin=0, pos1_min=0, pos1_max=0, pos1_maxin=0, min0=0, max0=0, fbin0_min=0, fbin0_max=0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef bint check_pos1=False, check_mask=False, check_dummy=False, do_dark=False, do_flat=False, do_polarization=False, do_solidangle=False * */ __pyx_v_pos0_min = 0.0; __pyx_v_pos0_max = 0.0; __pyx_v_pos0_maxin = 0.0; __pyx_v_pos1_min = 0.0; __pyx_v_pos1_max = 0.0; __pyx_v_pos1_maxin = 0.0; __pyx_v_min0 = 0.0; __pyx_v_max0 = 0.0; __pyx_v_fbin0_min = 0.0; __pyx_v_fbin0_max = 0.0;
95: cdef bint check_pos1=False, check_mask=False, check_dummy=False, do_dark=False, do_flat=False, do_polarization=False, do_solidangle=False
/* "splitBBox.pyx":95 * cdef float data, deltaR, deltaL, deltaA,p1, epsilon = 1e-10, cdummy = 0, ddummy = 0 * cdef float pos0_min=0, pos0_max=0, pos0_maxin=0, pos1_min=0, pos1_max=0, pos1_maxin=0, min0=0, max0=0, fbin0_min=0, fbin0_max=0 * cdef bint check_pos1=False, check_mask=False, check_dummy=False, do_dark=False, do_flat=False, do_polarization=False, do_solidangle=False #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cdata = numpy.ascontiguousarray(weights.ravel(),dtype=numpy.float32) */ __pyx_v_check_pos1 = 0; __pyx_v_check_mask = 0; __pyx_v_check_dummy = 0; __pyx_v_do_dark = 0; __pyx_v_do_flat = 0; __pyx_v_do_polarization = 0; __pyx_v_do_solidangle = 0;
96:
97: cdef numpy.ndarray[numpy.float32_t, ndim = 1] cdata = numpy.ascontiguousarray(weights.ravel(),dtype=numpy.float32)
/* "splitBBox.pyx":97 * cdef bint check_pos1=False, check_mask=False, check_dummy=False, do_dark=False, do_flat=False, do_polarization=False, do_solidangle=False * * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cdata = numpy.ascontiguousarray(weights.ravel(),dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0, dpos0, cpos1, dpos1,cpos0_lower, cpos0_upper * cdef numpy.int8_t[:] cmask */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_weights), __pyx_n_s__ravel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__float32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cdata.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_cdata = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_cdata.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_cdata.diminfo[0].strides = __pyx_pybuffernd_cdata.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cdata.diminfo[0].shape = __pyx_pybuffernd_cdata.rcbuffer->pybuffer.shape[0]; } } __pyx_t_8 = 0; __pyx_v_cdata = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0;
98: cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0, dpos0, cpos1, dpos1,cpos0_lower, cpos0_upper
99: cdef numpy.int8_t[:] cmask
100: cdef float[:] cflat, cdark, cpolarization, csolidangle
101:
102: cpos0 = numpy.ascontiguousarray(pos0.ravel(), dtype=numpy.float32)
/* "splitBBox.pyx":102 * cdef float[:] cflat, cdark, cpolarization, csolidangle * * cpos0 = numpy.ascontiguousarray(pos0.ravel(), dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* dpos0 = numpy.ascontiguousarray(delta_pos0.ravel(), dtype=numpy.float32) * */ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_pos0), __pyx_n_s__ravel); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__float32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos0.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cpos0.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_10<
0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cpos0.rcbuffer->pybuffer, (PyObject*)__pyx_v_cpos0, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13); } } __pyx_pybuffernd_cpos0.diminfo[0].strides = __pyx_pybuffernd_cpos0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cpos0.diminfo[0].shape = __pyx_pybuffernd_cpos0.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_cpos0 = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0;
103: dpos0 = numpy.ascontiguousarray(delta_pos0.ravel(), dtype=numpy.float32)
/* "splitBBox.pyx":103 * * cpos0 = numpy.ascontiguousarray(pos0.ravel(), dtype=numpy.float32) * dpos0 = numpy.ascontiguousarray(delta_pos0.ravel(), dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef numpy.ndarray[numpy.float64_t, ndim = 1] outData = numpy.zeros(bins, dtype=numpy.float64) */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_delta_pos0), __pyx_n_s__ravel); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dpos0.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dpos0.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_10<
0)) { PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dpos0.rcbuffer->pybuffer, (PyObject*)__pyx_v_dpos0, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11); } } __pyx_pybuffernd_dpos0.diminfo[0].strides = __pyx_pybuffernd_dpos0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dpos0.diminfo[0].shape = __pyx_pybuffernd_dpos0.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_dpos0 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0;
104:
105: cdef numpy.ndarray[numpy.float64_t, ndim = 1] outData = numpy.zeros(bins, dtype=numpy.float64)
/* "splitBBox.pyx":105 * dpos0 = numpy.ascontiguousarray(delta_pos0.ravel(), dtype=numpy.float32) * * cdef numpy.ndarray[numpy.float64_t, ndim = 1] outData = numpy.zeros(bins, dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype=numpy.float64) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] outMerge = numpy.zeros(bins, dtype=numpy.float32) */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__zeros); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_bins); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outData.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_outData = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_outData.diminfo[0].strides = __pyx_pybuffernd_outData.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outData.diminfo[0].shape = __pyx_pybuffernd_outData.rcbuffer->pybuffer.shape[0]; } } __pyx_t_14 = 0; __pyx_v_outData = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0;
106: cdef numpy.ndarray[numpy.float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype=numpy.float64)
/* "splitBBox.pyx":106 * * cdef numpy.ndarray[numpy.float64_t, ndim = 1] outData = numpy.zeros(bins, dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float32_t, ndim = 1] outMerge = numpy.zeros(bins, dtype=numpy.float32) * */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_bins); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__float64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outCount.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_outCount = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_outCount.diminfo[0].strides = __pyx_pybuffernd_outCount.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outCount.diminfo[0].shape = __pyx_pybuffernd_outCount.rcbuffer->pybuffer.shape[0]; } } __pyx_t_15 = 0; __pyx_v_outCount = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0;
107: cdef numpy.ndarray[numpy.float32_t, ndim = 1] outMerge = numpy.zeros(bins, dtype=numpy.float32)
/* "splitBBox.pyx":107 * cdef numpy.ndarray[numpy.float64_t, ndim = 1] outData = numpy.zeros(bins, dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype=numpy.float64) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] outMerge = numpy.zeros(bins, dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if mask is not None: */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_bins); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__float32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outMerge.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_outMerge = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_outMerge.diminfo[0].strides = __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outMerge.diminfo[0].shape = __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.shape[0]; } } __pyx_t_16 = 0; __pyx_v_outMerge = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0;
108:
109: if mask is not None:
/* "splitBBox.pyx":109 * cdef numpy.ndarray[numpy.float32_t, ndim = 1] outMerge = numpy.zeros(bins, dtype=numpy.float32) * * if mask is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert mask.size == size * check_mask = True */ __pyx_t_5 = (__pyx_v_mask != Py_None); if (__pyx_t_5) {
110: assert mask.size == size
/* "splitBBox.pyx":110 * * if mask is not None: * assert mask.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* check_mask = True * cmask = numpy.ascontiguousarray(mask.ravel(),dtype=numpy.int8) */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_7 = PyObject_GetAttr(__pyx_v_mask, __pyx_n_s__size); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
111: check_mask = True
/* "splitBBox.pyx":111 * if mask is not None: * assert mask.size == size * check_mask = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cmask = numpy.ascontiguousarray(mask.ravel(),dtype=numpy.int8) * */ __pyx_v_check_mask = 1;
112: cmask = numpy.ascontiguousarray(mask.ravel(),dtype=numpy.int8)
/* "splitBBox.pyx":112 * assert mask.size == size * check_mask = True * cmask = numpy.ascontiguousarray(mask.ravel(),dtype=numpy.int8) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if (dummy is not None) and (delta_dummy is not None): */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_mask, __pyx_n_s__ravel); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__int8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int8_t(__pyx_t_3); if (unlikely(!__pyx_t_17.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_cmask = __pyx_t_17; __pyx_t_17.memview = NULL; __pyx_t_17.data = NULL; goto __pyx_L3; } __pyx_L3:;
113:
114: if (dummy is not None) and (delta_dummy is not None):
/* "splitBBox.pyx":114 * cmask = numpy.ascontiguousarray(mask.ravel(),dtype=numpy.int8) * * if (dummy is not None) and (delta_dummy is not None): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* check_dummy = True * cdummy = float(dummy) */ __pyx_t_5 = (__pyx_v_dummy != Py_None); if (__pyx_t_5) { __pyx_t_18 = (__pyx_v_delta_dummy != Py_None); __pyx_t_19 = __pyx_t_18; } else { __pyx_t_19 = __pyx_t_5; } if (__pyx_t_19) {
115: check_dummy = True
/* "splitBBox.pyx":115 * * if (dummy is not None) and (delta_dummy is not None): * check_dummy = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdummy = float(dummy) * ddummy = float(delta_dummy) */ __pyx_v_check_dummy = 1;
116: cdummy = float(dummy)
/* "splitBBox.pyx":116 * if (dummy is not None) and (delta_dummy is not None): * check_dummy = True * cdummy = float(dummy) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* ddummy = float(delta_dummy) * elif (dummy is not None): */ __pyx_t_20 = __Pyx_PyObject_AsDouble(__pyx_v_dummy); if (unlikely(__pyx_t_20 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cdummy = __pyx_t_20;
117: ddummy = float(delta_dummy)
/* "splitBBox.pyx":117 * check_dummy = True * cdummy = float(dummy) * ddummy = float(delta_dummy) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* elif (dummy is not None): * check_dummy = True */ __pyx_t_20 = __Pyx_PyObject_AsDouble(__pyx_v_delta_dummy); if (unlikely(__pyx_t_20 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ddummy = __pyx_t_20; goto __pyx_L4; }
118: elif (dummy is not None):
/* "splitBBox.pyx":118 * cdummy = float(dummy) * ddummy = float(delta_dummy) * elif (dummy is not None): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* check_dummy = True * cdummy = float(dummy) */ __pyx_t_19 = (__pyx_v_dummy != Py_None); if (__pyx_t_19) {
119: check_dummy = True
/* "splitBBox.pyx":119 * ddummy = float(delta_dummy) * elif (dummy is not None): * check_dummy = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdummy = float(dummy) * ddummy = 0.0 */ __pyx_v_check_dummy = 1;
120: cdummy = float(dummy)
/* "splitBBox.pyx":120 * elif (dummy is not None): * check_dummy = True * cdummy = float(dummy) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* ddummy = 0.0 * else: */ __pyx_t_20 = __Pyx_PyObject_AsDouble(__pyx_v_dummy); if (unlikely(__pyx_t_20 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cdummy = __pyx_t_20;
121: ddummy = 0.0
/* "splitBBox.pyx":121 * check_dummy = True * cdummy = float(dummy) * ddummy = 0.0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * check_dummy = False */ __pyx_v_ddummy = 0.0; goto __pyx_L4; } /*else*/ {
122: else:
123: check_dummy = False
/* "splitBBox.pyx":123 * ddummy = 0.0 * else: * check_dummy = False #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdummy = 0.0 * ddummy = 0.0 */ __pyx_v_check_dummy = 0;
124: cdummy = 0.0
/* "splitBBox.pyx":124 * else: * check_dummy = False * cdummy = 0.0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* ddummy = 0.0 * if dark is not None: */ __pyx_v_cdummy = 0.0;
125: ddummy = 0.0
/* "splitBBox.pyx":125 * check_dummy = False * cdummy = 0.0 * ddummy = 0.0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if dark is not None: * assert dark.size == size */ __pyx_v_ddummy = 0.0; } __pyx_L4:;
126: if dark is not None:
/* "splitBBox.pyx":126 * cdummy = 0.0 * ddummy = 0.0 * if dark is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert dark.size == size * do_dark = True */ __pyx_t_19 = (__pyx_v_dark != Py_None); if (__pyx_t_19) {
127: assert dark.size == size
/* "splitBBox.pyx":127 * ddummy = 0.0 * if dark is not None: * assert dark.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_dark = True * cdark = numpy.ascontiguousarray(dark.ravel(),dtype=numpy.float32) */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_3 = PyObject_GetAttr(__pyx_v_dark, __pyx_n_s__size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_19<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_19)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
128: do_dark = True
/* "splitBBox.pyx":128 * if dark is not None: * assert dark.size == size * do_dark = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdark = numpy.ascontiguousarray(dark.ravel(),dtype=numpy.float32) * if flat is not None: */ __pyx_v_do_dark = 1;
129: cdark = numpy.ascontiguousarray(dark.ravel(),dtype=numpy.float32)
/* "splitBBox.pyx":129 * assert dark.size == size * do_dark = True * cdark = numpy.ascontiguousarray(dark.ravel(),dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if flat is not None: * assert flat.size == size */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_dark, __pyx_n_s__ravel); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_4); if (unlikely(!__pyx_t_21.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_cdark = __pyx_t_21; __pyx_t_21.memview = NULL; __pyx_t_21.data = NULL; goto __pyx_L5; } __pyx_L5:;
130: if flat is not None:
/* "splitBBox.pyx":130 * do_dark = True * cdark = numpy.ascontiguousarray(dark.ravel(),dtype=numpy.float32) * if flat is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert flat.size == size * do_flat = True */ __pyx_t_19 = (__pyx_v_flat != Py_None); if (__pyx_t_19) {
131: assert flat.size == size
/* "splitBBox.pyx":131 * cdark = numpy.ascontiguousarray(dark.ravel(),dtype=numpy.float32) * if flat is not None: * assert flat.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_flat = True * cflat = numpy.ascontiguousarray(flat.ravel(),dtype=numpy.float32) */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyObject_GetAttr(__pyx_v_flat, __pyx_n_s__size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_19<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_19)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
132: do_flat = True
/* "splitBBox.pyx":132 * if flat is not None: * assert flat.size == size * do_flat = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cflat = numpy.ascontiguousarray(flat.ravel(),dtype=numpy.float32) * if polarization is not None: */ __pyx_v_do_flat = 1;
133: cflat = numpy.ascontiguousarray(flat.ravel(),dtype=numpy.float32)
/* "splitBBox.pyx":133 * assert flat.size == size * do_flat = True * cflat = numpy.ascontiguousarray(flat.ravel(),dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if polarization is not None: * do_polarization = True */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_flat, __pyx_n_s__ravel); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__float32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_1); if (unlikely(!__pyx_t_21.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_cflat = __pyx_t_21; __pyx_t_21.memview = NULL; __pyx_t_21.data = NULL; goto __pyx_L6; } __pyx_L6:;
134: if polarization is not None:
/* "splitBBox.pyx":134 * do_flat = True * cflat = numpy.ascontiguousarray(flat.ravel(),dtype=numpy.float32) * if polarization is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_polarization = True * assert polarization.size == size */ __pyx_t_19 = (__pyx_v_polarization != Py_None); if (__pyx_t_19) {
135: do_polarization = True
/* "splitBBox.pyx":135 * cflat = numpy.ascontiguousarray(flat.ravel(),dtype=numpy.float32) * if polarization is not None: * do_polarization = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert polarization.size == size * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float32) */ __pyx_v_do_polarization = 1;
136: assert polarization.size == size
/* "splitBBox.pyx":136 * if polarization is not None: * do_polarization = True * assert polarization.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float32) * if solidangle is not None: */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_1 = PyObject_GetAttr(__pyx_v_polarization, __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_19<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_19)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
137: cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float32)
/* "splitBBox.pyx":137 * do_polarization = True * assert polarization.size == size * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if solidangle is not None: * do_solidangle = True */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_polarization, __pyx_n_s__ravel); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__float32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_7); if (unlikely(!__pyx_t_21.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_cpolarization = __pyx_t_21; __pyx_t_21.memview = NULL; __pyx_t_21.data = NULL; goto __pyx_L7; } __pyx_L7:;
138: if solidangle is not None:
/* "splitBBox.pyx":138 * assert polarization.size == size * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float32) * if solidangle is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_solidangle = True * assert solidangle.size == size */ __pyx_t_19 = (__pyx_v_solidangle != Py_None); if (__pyx_t_19) {
139: do_solidangle = True
/* "splitBBox.pyx":139 * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float32) * if solidangle is not None: * do_solidangle = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert solidangle.size == size * csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float32) */ __pyx_v_do_solidangle = 1;
140: assert solidangle.size == size
/* "splitBBox.pyx":140 * if solidangle is not None: * do_solidangle = True * assert solidangle.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float32) * */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_7 = PyObject_GetAttr(__pyx_v_solidangle, __pyx_n_s__size); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_19<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_19)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
141: csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float32)
/* "splitBBox.pyx":141 * do_solidangle = True * assert solidangle.size == size * csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_solidangle, __pyx_n_s__ravel); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_3); if (unlikely(!__pyx_t_21.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_csolidangle = __pyx_t_21; __pyx_t_21.memview = NULL; __pyx_t_21.data = NULL; goto __pyx_L8; } __pyx_L8:;
142:
143:
144: cpos0_lower = numpy.zeros(size, dtype=numpy.float32)
/* "splitBBox.pyx":144 * * * cpos0_lower = numpy.zeros(size, dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cpos0_upper = numpy.zeros(size, dtype=numpy.float32) * pos0_min=cpos0[0] */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__zeros); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_10<
0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer, (PyObject*)__pyx_v_cpos0_lower, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13); } } __pyx_pybuffernd_cpos0_lower.diminfo[0].strides = __pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cpos0_lower.diminfo[0].shape = __pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_cpos0_lower = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0;
145: cpos0_upper = numpy.zeros(size, dtype=numpy.float32)
/* "splitBBox.pyx":145 * * cpos0_lower = numpy.zeros(size, dtype=numpy.float32) * cpos0_upper = numpy.zeros(size, dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_min=cpos0[0] * pos0_max=cpos0[0] */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__float32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_10<
0)) { PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer, (PyObject*)__pyx_v_cpos0_upper, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11); } } __pyx_pybuffernd_cpos0_upper.diminfo[0].strides = __pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cpos0_upper.diminfo[0].shape = __pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_cpos0_upper = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0;
146: pos0_min=cpos0[0]
/* "splitBBox.pyx":146 * cpos0_lower = numpy.zeros(size, dtype=numpy.float32) * cpos0_upper = numpy.zeros(size, dtype=numpy.float32) * pos0_min=cpos0[0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_max=cpos0[0] * with nogil: */ __pyx_t_22 = 0; __pyx_v_pos0_min = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_cpos0.diminfo[0].strides));
147: pos0_max=cpos0[0]
/* "splitBBox.pyx":147 * cpos0_upper = numpy.zeros(size, dtype=numpy.float32) * pos0_min=cpos0[0] * pos0_max=cpos0[0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* with nogil: * for idx in range(size): */ __pyx_t_23 = 0; __pyx_v_pos0_max = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_cpos0.diminfo[0].strides));
148: with nogil:
/* "splitBBox.pyx":148 * pos0_min=cpos0[0] * pos0_max=cpos0[0] * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for idx in range(size): * min0 = cpos0[idx] - dpos0[idx] */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "splitBBox.pyx":148 * pos0_min=cpos0[0] * pos0_max=cpos0[0] * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for idx in range(size): * min0 = cpos0[idx] - dpos0[idx] */ /*finally:*/ { Py_BLOCK_THREADS } }
149: for idx in range(size):
/* "splitBBox.pyx":149 * pos0_max=cpos0[0] * with nogil: * for idx in range(size): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min0 = cpos0[idx] - dpos0[idx] * max0 = cpos0[idx] + dpos0[idx] */ __pyx_t_2 = __pyx_v_size; for (__pyx_t_24 = 0; __pyx_t_24<
__pyx_t_2; __pyx_t_24+=1) { __pyx_v_idx = __pyx_t_24;
150: min0 = cpos0[idx] - dpos0[idx]
/* "splitBBox.pyx":150 * with nogil: * for idx in range(size): * min0 = cpos0[idx] - dpos0[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max0 = cpos0[idx] + dpos0[idx] * cpos0_upper[idx]=max0 */ __pyx_t_25 = __pyx_v_idx; __pyx_t_26 = __pyx_v_idx; __pyx_v_min0 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_cpos0.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_dpos0.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_dpos0.diminfo[0].strides)));
151: max0 = cpos0[idx] + dpos0[idx]
/* "splitBBox.pyx":151 * for idx in range(size): * min0 = cpos0[idx] - dpos0[idx] * max0 = cpos0[idx] + dpos0[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cpos0_upper[idx]=max0 * cpos0_lower[idx]=min0 */ __pyx_t_27 = __pyx_v_idx; __pyx_t_28 = __pyx_v_idx; __pyx_v_max0 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_cpos0.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_dpos0.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_dpos0.diminfo[0].strides)));
152: cpos0_upper[idx]=max0
/* "splitBBox.pyx":152 * min0 = cpos0[idx] - dpos0[idx] * max0 = cpos0[idx] + dpos0[idx] * cpos0_upper[idx]=max0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cpos0_lower[idx]=min0 * if max0>pos0_max: */ __pyx_t_29 = __pyx_v_idx; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_cpos0_upper.diminfo[0].strides) = __pyx_v_max0;
153: cpos0_lower[idx]=min0
/* "splitBBox.pyx":153 * max0 = cpos0[idx] + dpos0[idx] * cpos0_upper[idx]=max0 * cpos0_lower[idx]=min0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if max0>pos0_max: * pos0_max=max0 */ __pyx_t_30 = __pyx_v_idx; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_cpos0_lower.diminfo[0].strides) = __pyx_v_min0;
154: if max0>pos0_max:
/* "splitBBox.pyx":154 * cpos0_upper[idx]=max0 * cpos0_lower[idx]=min0 * if max0>pos0_max: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_max=max0 * if min0<
pos0_min: */ __pyx_t_19 = (__pyx_v_max0 > __pyx_v_pos0_max); if (__pyx_t_19) {
155: pos0_max=max0
/* "splitBBox.pyx":155 * cpos0_lower[idx]=min0 * if max0>pos0_max: * pos0_max=max0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if min0<
pos0_min: * pos0_min=min0 */ __pyx_v_pos0_max = __pyx_v_max0; goto __pyx_L14; } __pyx_L14:;
156: if min0<pos0_min:
/* "splitBBox.pyx":156 * if max0>pos0_max: * pos0_max=max0 * if min0<
pos0_min: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_min=min0 * */ __pyx_t_19 = (__pyx_v_min0<
__pyx_v_pos0_min); if (__pyx_t_19) {
157: pos0_min=min0
/* "splitBBox.pyx":157 * pos0_max=max0 * if min0<
pos0_min: * pos0_min=min0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if pos0Range is not None and len(pos0Range) > 1: */ __pyx_v_pos0_min = __pyx_v_min0; goto __pyx_L15; } __pyx_L15:; } }
158:
159: if pos0Range is not None and len(pos0Range) > 1:
/* "splitBBox.pyx":159 * pos0_min=min0 * * if pos0Range is not None and len(pos0Range) > 1: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_min = min(pos0Range) * pos0_maxin = max(pos0Range) */ __pyx_t_19 = (__pyx_v_pos0Range != Py_None); if (__pyx_t_19) { __pyx_t_31 = PyObject_Length(__pyx_v_pos0Range); if (unlikely(__pyx_t_31 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = (__pyx_t_31 > 1); __pyx_t_18 = __pyx_t_5; } else { __pyx_t_18 = __pyx_t_19; } if (__pyx_t_18) {
160: pos0_min = min(pos0Range)
/* "splitBBox.pyx":160 * * if pos0Range is not None and len(pos0Range) > 1: * pos0_min = min(pos0Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_maxin = max(pos0Range) * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_pos0Range); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_pos0Range); __Pyx_GIVEREF(__pyx_v_pos0Range); __pyx_t_4 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_32 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_32 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pos0_min = __pyx_t_32;
161: pos0_maxin = max(pos0Range)
/* "splitBBox.pyx":161 * if pos0Range is not None and len(pos0Range) > 1: * pos0_min = min(pos0Range) * pos0_maxin = max(pos0Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * pos0_maxin = pos0_max */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_pos0Range); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pos0Range); __Pyx_GIVEREF(__pyx_v_pos0Range); __pyx_t_1 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_32 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_32 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_pos0_maxin = __pyx_t_32; goto __pyx_L16; } /*else*/ {
162: else:
163: pos0_maxin = pos0_max
/* "splitBBox.pyx":163 * pos0_maxin = max(pos0Range) * else: * pos0_maxin = pos0_max #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if pos0_min<
0: pos0_min=0 * pos0_max = pos0_maxin * EPS32 */ __pyx_v_pos0_maxin = __pyx_v_pos0_max; } __pyx_L16:;
164: if pos0_min<0: pos0_min=0
/* "splitBBox.pyx":164 * else: * pos0_maxin = pos0_max * if pos0_min<
0: pos0_min=0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_max = pos0_maxin * EPS32 * */ __pyx_t_18 = (__pyx_v_pos0_min<
0.0); if (__pyx_t_18) { __pyx_v_pos0_min = 0.0; goto __pyx_L17; } __pyx_L17:;
165: pos0_max = pos0_maxin * EPS32
/* "splitBBox.pyx":165 * pos0_maxin = pos0_max * if pos0_min<
0: pos0_min=0 * pos0_max = pos0_maxin * EPS32 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if pos1Range is not None and len(pos1Range) > 1: */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_pos0_maxin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__EPS32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyNumber_Multiply(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_32 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_32 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_pos0_max = __pyx_t_32;
166:
167: if pos1Range is not None and len(pos1Range) > 1:
/* "splitBBox.pyx":167 * pos0_max = pos0_maxin * EPS32 * * if pos1Range is not None and len(pos1Range) > 1: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert pos1.size == size * assert delta_pos1.size == size */ __pyx_t_18 = (__pyx_v_pos1Range != Py_None); if (__pyx_t_18) { __pyx_t_31 = PyObject_Length(__pyx_v_pos1Range); if (unlikely(__pyx_t_31 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = (__pyx_t_31 > 1); __pyx_t_5 = __pyx_t_19; } else { __pyx_t_5 = __pyx_t_18; } if (__pyx_t_5) {
168: assert pos1.size == size
/* "splitBBox.pyx":168 * * if pos1Range is not None and len(pos1Range) > 1: * assert pos1.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert delta_pos1.size == size * check_pos1 = 1 */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_6 = PyObject_GetAttr(__pyx_v_pos1, __pyx_n_s__size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_5)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
169: assert delta_pos1.size == size
/* "splitBBox.pyx":169 * if pos1Range is not None and len(pos1Range) > 1: * assert pos1.size == size * assert delta_pos1.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* check_pos1 = 1 * cpos1 = numpy.ascontiguousarray(pos1.ravel(),dtype=numpy.float32) */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_1 = PyObject_GetAttr(__pyx_v_delta_pos1, __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
170: check_pos1 = 1
/* "splitBBox.pyx":170 * assert pos1.size == size * assert delta_pos1.size == size * check_pos1 = 1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cpos1 = numpy.ascontiguousarray(pos1.ravel(),dtype=numpy.float32) * dpos1 = numpy.ascontiguousarray(delta_pos1.ravel(),dtype=numpy.float32) */ __pyx_v_check_pos1 = 1;
171: cpos1 = numpy.ascontiguousarray(pos1.ravel(),dtype=numpy.float32)
/* "splitBBox.pyx":171 * assert delta_pos1.size == size * check_pos1 = 1 * cpos1 = numpy.ascontiguousarray(pos1.ravel(),dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* dpos1 = numpy.ascontiguousarray(delta_pos1.ravel(),dtype=numpy.float32) * pos1_min = min(pos1Range) */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_pos1, __pyx_n_s__ravel); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__float32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos1.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cpos1.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_10<
0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cpos1.rcbuffer->pybuffer, (PyObject*)__pyx_v_cpos1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13); } } __pyx_pybuffernd_cpos1.diminfo[0].strides = __pyx_pybuffernd_cpos1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cpos1.diminfo[0].shape = __pyx_pybuffernd_cpos1.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_cpos1 = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0;
172: dpos1 = numpy.ascontiguousarray(delta_pos1.ravel(),dtype=numpy.float32)
/* "splitBBox.pyx":172 * check_pos1 = 1 * cpos1 = numpy.ascontiguousarray(pos1.ravel(),dtype=numpy.float32) * dpos1 = numpy.ascontiguousarray(delta_pos1.ravel(),dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_min = min(pos1Range) * pos1_maxin = max(pos1Range) */ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_GetAttr(__pyx_v_delta_pos1, __pyx_n_s__ravel); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dpos1.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dpos1.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_10<
0)) { PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dpos1.rcbuffer->pybuffer, (PyObject*)__pyx_v_dpos1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11); } } __pyx_pybuffernd_dpos1.diminfo[0].strides = __pyx_pybuffernd_dpos1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dpos1.diminfo[0].shape = __pyx_pybuffernd_dpos1.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_dpos1 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0;
173: pos1_min = min(pos1Range)
/* "splitBBox.pyx":173 * cpos1 = numpy.ascontiguousarray(pos1.ravel(),dtype=numpy.float32) * dpos1 = numpy.ascontiguousarray(delta_pos1.ravel(),dtype=numpy.float32) * pos1_min = min(pos1Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_maxin = max(pos1Range) * pos1_max = pos1_maxin * EPS32 */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_pos1Range); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_pos1Range); __Pyx_GIVEREF(__pyx_v_pos1Range); __pyx_t_6 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_32 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_32 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_pos1_min = __pyx_t_32;
174: pos1_maxin = max(pos1Range)
/* "splitBBox.pyx":174 * dpos1 = numpy.ascontiguousarray(delta_pos1.ravel(),dtype=numpy.float32) * pos1_min = min(pos1Range) * pos1_maxin = max(pos1Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_max = pos1_maxin * EPS32 * */ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_pos1Range); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_pos1Range); __Pyx_GIVEREF(__pyx_v_pos1Range); __pyx_t_3 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_32 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_32 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_pos1_maxin = __pyx_t_32;
175: pos1_max = pos1_maxin * EPS32
/* "splitBBox.pyx":175 * pos1_min = min(pos1Range) * pos1_maxin = max(pos1Range) * pos1_max = pos1_maxin * EPS32 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef float delta = (pos0_max - pos0_min) / (<
float > (bins)) */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pos1_maxin); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__EPS32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyNumber_Multiply(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_32 = __pyx_PyFloat_AsFloat(__pyx_t_7); if (unlikely((__pyx_t_32 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_pos1_max = __pyx_t_32; goto __pyx_L18; } __pyx_L18:;
176:
177: cdef float delta = (pos0_max - pos0_min) / (< float > (bins))
/* "splitBBox.pyx":177 * pos1_max = pos1_maxin * EPS32 * * cdef float delta = (pos0_max - pos0_min) / (<
float > (bins)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outPos = numpy.linspace(pos0_min+0.5*delta, pos0_maxin-0.5*delta, bins) * with nogil: */ __pyx_v_delta = ((__pyx_v_pos0_max - __pyx_v_pos0_min) / ((float)__pyx_v_bins));
178: outPos = numpy.linspace(pos0_min+0.5*delta, pos0_maxin-0.5*delta, bins)
/* "splitBBox.pyx":178 * * cdef float delta = (pos0_max - pos0_min) / (<
float > (bins)) * outPos = numpy.linspace(pos0_min+0.5*delta, pos0_maxin-0.5*delta, bins) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* with nogil: * */ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__linspace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyFloat_FromDouble((__pyx_v_pos0_min + (0.5 * __pyx_v_delta))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = PyFloat_FromDouble((__pyx_v_pos0_maxin - (0.5 * __pyx_v_delta))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_bins); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_7 = 0; __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_outPos = __pyx_t_1; __pyx_t_1 = 0;
179: with nogil:
/* "splitBBox.pyx":179 * cdef float delta = (pos0_max - pos0_min) / (<
float > (bins)) * outPos = numpy.linspace(pos0_min+0.5*delta, pos0_maxin-0.5*delta, bins) * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * for idx in range(size): */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "splitBBox.pyx":179 * cdef float delta = (pos0_max - pos0_min) / (<
float > (bins)) * outPos = numpy.linspace(pos0_min+0.5*delta, pos0_maxin-0.5*delta, bins) * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * for idx in range(size): */ /*finally:*/ { int __pyx_why; __pyx_why = 0; goto __pyx_L21; __pyx_L20: __pyx_why = 4; goto __pyx_L21; __pyx_L21:; Py_BLOCK_THREADS switch (__pyx_why) { case 4: goto __pyx_L1_error; } } }
180:
181: for idx in range(size):
/* "splitBBox.pyx":181 * with nogil: * * for idx in range(size): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if (check_mask) and (cmask[idx]): * continue */ __pyx_t_2 = __pyx_v_size; for (__pyx_t_24 = 0; __pyx_t_24<
__pyx_t_2; __pyx_t_24+=1) { __pyx_v_idx = __pyx_t_24;
182: if (check_mask) and (cmask[idx]):
/* "splitBBox.pyx":182 * * for idx in range(size): * if (check_mask) and (cmask[idx]): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * */ __pyx_t_5 = __pyx_v_check_mask; if (__pyx_t_5) { if (unlikely(!__pyx_v_cmask.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cmask"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L20;} } __pyx_t_33 = __pyx_v_idx; __pyx_t_18 = (*((__pyx_t_5numpy_int8_t *) ( /* dim=0 */ (__pyx_v_cmask.data + __pyx_t_33 * __pyx_v_cmask.strides[0]) ))); } else { __pyx_t_18 = __pyx_t_5; } if (__pyx_t_18) {
183: continue
/* "splitBBox.pyx":183 * for idx in range(size): * if (check_mask) and (cmask[idx]): * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * data = cdata[idx] */ goto __pyx_L22_continue; goto __pyx_L24; } __pyx_L24:;
184:
185: data = cdata[idx]
/* "splitBBox.pyx":185 * continue * * data = cdata[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if check_dummy and (fabs(data-cdummy)<
=ddummy): * continue */ __pyx_t_34 = __pyx_v_idx; __pyx_v_data = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cdata.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_cdata.diminfo[0].strides));
186: if check_dummy and (fabs(data-cdummy)<=ddummy):
/* "splitBBox.pyx":186 * * data = cdata[idx] * if check_dummy and (fabs(data-cdummy)<
=ddummy): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * */ if (__pyx_v_check_dummy) { __pyx_t_18 = (fabs((__pyx_v_data - __pyx_v_cdummy))<
= __pyx_v_ddummy); __pyx_t_5 = __pyx_t_18; } else { __pyx_t_5 = __pyx_v_check_dummy; } if (__pyx_t_5) {
187: continue
/* "splitBBox.pyx":187 * data = cdata[idx] * if check_dummy and (fabs(data-cdummy)<
=ddummy): * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * min0 = cpos0_lower[idx] */ goto __pyx_L22_continue; goto __pyx_L25; } __pyx_L25:;
188:
189: min0 = cpos0_lower[idx]
/* "splitBBox.pyx":189 * continue * * min0 = cpos0_lower[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max0 = cpos0_upper[idx] * */ __pyx_t_35 = __pyx_v_idx; __pyx_v_min0 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_cpos0_lower.diminfo[0].strides));
190: max0 = cpos0_upper[idx]
/* "splitBBox.pyx":190 * * min0 = cpos0_lower[idx] * max0 = cpos0_upper[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if check_pos1 and (((cpos1[idx]+dpos1[idx])<
pos1_min) or ((cpos1[idx]-dpos1[idx]) > pos1_max)): */ __pyx_t_36 = __pyx_v_idx; __pyx_v_max0 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_cpos0_upper.diminfo[0].strides));
191:
192: if check_pos1 and (((cpos1[idx]+dpos1[idx]) < pos1_min) or ((cpos1[idx]-dpos1[idx]) > pos1_max)):
/* "splitBBox.pyx":192 * max0 = cpos0_upper[idx] * * if check_pos1 and (((cpos1[idx]+dpos1[idx])<
pos1_min) or ((cpos1[idx]-dpos1[idx]) > pos1_max)): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * */ if (__pyx_v_check_pos1) { __pyx_t_37 = __pyx_v_idx; __pyx_t_38 = __pyx_v_idx; __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos1.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_cpos1.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_dpos1.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_dpos1.diminfo[0].strides)))<
__pyx_v_pos1_min); if (!__pyx_t_5) { __pyx_t_39 = __pyx_v_idx; __pyx_t_40 = __pyx_v_idx; __pyx_t_18 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos1.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cpos1.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_dpos1.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_dpos1.diminfo[0].strides))) > __pyx_v_pos1_max); __pyx_t_19 = __pyx_t_18; } else { __pyx_t_19 = __pyx_t_5; } __pyx_t_5 = __pyx_t_19; } else { __pyx_t_5 = __pyx_v_check_pos1; } if (__pyx_t_5) {
193: continue
/* "splitBBox.pyx":193 * * if check_pos1 and (((cpos1[idx]+dpos1[idx])<
pos1_min) or ((cpos1[idx]-dpos1[idx]) > pos1_max)): * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * fbin0_min = getBinNr(min0, pos0_min, delta) */ goto __pyx_L22_continue; goto __pyx_L26; } __pyx_L26:;
194:
195: fbin0_min = getBinNr(min0, pos0_min, delta)
/* "splitBBox.pyx":195 * continue * * fbin0_min = getBinNr(min0, pos0_min, delta) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* fbin0_max = getBinNr(max0, pos0_min, delta) * if (fbin0_max<
0) or (fbin0_min>=bins): */ __pyx_v_fbin0_min = __pyx_f_9splitBBox_getBinNr(__pyx_v_min0, __pyx_v_pos0_min, __pyx_v_delta);
196: fbin0_max = getBinNr(max0, pos0_min, delta)
/* "splitBBox.pyx":196 * * fbin0_min = getBinNr(min0, pos0_min, delta) * fbin0_max = getBinNr(max0, pos0_min, delta) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if (fbin0_max<
0) or (fbin0_min>=bins): * continue */ __pyx_v_fbin0_max = __pyx_f_9splitBBox_getBinNr(__pyx_v_max0, __pyx_v_pos0_min, __pyx_v_delta);
197: if (fbin0_max<0) or (fbin0_min>=bins):
/* "splitBBox.pyx":197 * fbin0_min = getBinNr(min0, pos0_min, delta) * fbin0_max = getBinNr(max0, pos0_min, delta) * if (fbin0_max<
0) or (fbin0_min>=bins): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * if fbin0_max>=bins: */ __pyx_t_5 = (__pyx_v_fbin0_max<
0.0); if (!__pyx_t_5) { __pyx_t_19 = (__pyx_v_fbin0_min >= __pyx_v_bins); __pyx_t_18 = __pyx_t_19; } else { __pyx_t_18 = __pyx_t_5; } if (__pyx_t_18) {
198: continue
/* "splitBBox.pyx":198 * fbin0_max = getBinNr(max0, pos0_min, delta) * if (fbin0_max<
0) or (fbin0_min>=bins): * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if fbin0_max>=bins: * bin0_max=bins-1 */ goto __pyx_L22_continue; goto __pyx_L27; } __pyx_L27:;
199: if fbin0_max>=bins:
/* "splitBBox.pyx":199 * if (fbin0_max<
0) or (fbin0_min>=bins): * continue * if fbin0_max>=bins: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bin0_max=bins-1 * else: */ __pyx_t_18 = (__pyx_v_fbin0_max >= __pyx_v_bins); if (__pyx_t_18) {
200: bin0_max=bins-1
/* "splitBBox.pyx":200 * continue * if fbin0_max>=bins: * bin0_max=bins-1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * bin0_max =<
ssize_t > fbin0_max */ __pyx_v_bin0_max = (__pyx_v_bins - 1); goto __pyx_L28; } /*else*/ {
201: else:
202: bin0_max = < ssize_t > fbin0_max
/* "splitBBox.pyx":202 * bin0_max=bins-1 * else: * bin0_max =<
ssize_t > fbin0_max #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if fbin0_min<
0: * bin0_min=0 */ __pyx_v_bin0_max = ((Py_ssize_t)__pyx_v_fbin0_max); } __pyx_L28:;
203: if fbin0_min<0:
/* "splitBBox.pyx":203 * else: * bin0_max =<
ssize_t > fbin0_max * if fbin0_min<
0: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bin0_min=0 * else: */ __pyx_t_18 = (__pyx_v_fbin0_min<
0.0); if (__pyx_t_18) {
204: bin0_min=0
/* "splitBBox.pyx":204 * bin0_max =<
ssize_t > fbin0_max * if fbin0_min<
0: * bin0_min=0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * bin0_min =<
ssize_t > fbin0_min */ __pyx_v_bin0_min = 0; goto __pyx_L29; } /*else*/ {
205: else:
206: bin0_min = < ssize_t > fbin0_min
/* "splitBBox.pyx":206 * bin0_min=0 * else: * bin0_min =<
ssize_t > fbin0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if do_dark: */ __pyx_v_bin0_min = ((Py_ssize_t)__pyx_v_fbin0_min); } __pyx_L29:;
207:
208: if do_dark:
/* "splitBBox.pyx":208 * bin0_min =<
ssize_t > fbin0_min * * if do_dark: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data -= cdark[idx] * if do_flat: */ if (__pyx_v_do_dark) {
209: data -= cdark[idx]
/* "splitBBox.pyx":209 * * if do_dark: * data -= cdark[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if do_flat: * data /= cflat[idx] */ if (unlikely(!__pyx_v_cdark.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cdark"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L20;} } __pyx_t_41 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data - (*((float *) ( /* dim=0 */ (__pyx_v_cdark.data + __pyx_t_41 * __pyx_v_cdark.strides[0]) )))); goto __pyx_L30; } __pyx_L30:;
210: if do_flat:
/* "splitBBox.pyx":210 * if do_dark: * data -= cdark[idx] * if do_flat: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data /= cflat[idx] * if do_polarization: */ if (__pyx_v_do_flat) {
211: data /= cflat[idx]
/* "splitBBox.pyx":211 * data -= cdark[idx] * if do_flat: * data /= cflat[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if do_polarization: * data /= cpolarization[idx] */ if (unlikely(!__pyx_v_cflat.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cflat"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L20;} } __pyx_t_42 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data / (*((float *) ( /* dim=0 */ (__pyx_v_cflat.data + __pyx_t_42 * __pyx_v_cflat.strides[0]) )))); goto __pyx_L31; } __pyx_L31:;
212: if do_polarization:
/* "splitBBox.pyx":212 * if do_flat: * data /= cflat[idx] * if do_polarization: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data /= cpolarization[idx] * if do_solidangle: */ if (__pyx_v_do_polarization) {
213: data /= cpolarization[idx]
/* "splitBBox.pyx":213 * data /= cflat[idx] * if do_polarization: * data /= cpolarization[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if do_solidangle: * data /= csolidangle[idx] */ if (unlikely(!__pyx_v_cpolarization.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cpolarization"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L20;} } __pyx_t_43 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data / (*((float *) ( /* dim=0 */ (__pyx_v_cpolarization.data + __pyx_t_43 * __pyx_v_cpolarization.strides[0]) )))); goto __pyx_L32; } __pyx_L32:;
214: if do_solidangle:
/* "splitBBox.pyx":214 * if do_polarization: * data /= cpolarization[idx] * if do_solidangle: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data /= csolidangle[idx] * */ if (__pyx_v_do_solidangle) {
215: data /= csolidangle[idx]
/* "splitBBox.pyx":215 * data /= cpolarization[idx] * if do_solidangle: * data /= csolidangle[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if bin0_min == bin0_max: */ if (unlikely(!__pyx_v_csolidangle.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("csolidangle"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L20;} } __pyx_t_44 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data / (*((float *) ( /* dim=0 */ (__pyx_v_csolidangle.data + __pyx_t_44 * __pyx_v_csolidangle.strides[0]) )))); goto __pyx_L33; } __pyx_L33:;
216:
217: if bin0_min == bin0_max:
/* "splitBBox.pyx":217 * data /= csolidangle[idx] * * if bin0_min == bin0_max: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* #All pixel is within a single bin * outCount[bin0_min] += 1.0 */ __pyx_t_18 = (__pyx_v_bin0_min == __pyx_v_bin0_max); if (__pyx_t_18) {
218: #All pixel is within a single bin
219: outCount[bin0_min] += 1.0
/* "splitBBox.pyx":219 * if bin0_min == bin0_max: * #All pixel is within a single bin * outCount[bin0_min] += 1.0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min] += data * */ __pyx_t_45 = __pyx_v_bin0_min; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_outCount.diminfo[0].strides) += 1.0;
220: outData[bin0_min] += data
/* "splitBBox.pyx":220 * #All pixel is within a single bin * outCount[bin0_min] += 1.0 * outData[bin0_min] += data #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * else: #we have pixel spliting. */ __pyx_t_46 = __pyx_v_bin0_min; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_outData.diminfo[0].strides) += __pyx_v_data; goto __pyx_L34; } /*else*/ {
221:
222: else: #we have pixel spliting.
223: deltaA = 1.0 / (fbin0_max - fbin0_min)
/* "splitBBox.pyx":223 * * else: #we have pixel spliting. * deltaA = 1.0 / (fbin0_max - fbin0_min) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * deltaL =<
float > (bin0_min + 1) - fbin0_min */ __pyx_v_deltaA = (1.0 / (__pyx_v_fbin0_max - __pyx_v_fbin0_min));
224:
225: deltaL = < float > (bin0_min + 1) - fbin0_min
/* "splitBBox.pyx":225 * deltaA = 1.0 / (fbin0_max - fbin0_min) * * deltaL =<
float > (bin0_min + 1) - fbin0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaR = fbin0_max - (<
float > bin0_max) * */ __pyx_v_deltaL = (((float)(__pyx_v_bin0_min + 1)) - __pyx_v_fbin0_min);
226: deltaR = fbin0_max - (< float > bin0_max)
/* "splitBBox.pyx":226 * * deltaL =<
float > (bin0_min + 1) - fbin0_min * deltaR = fbin0_max - (<
float > bin0_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * outCount[bin0_min] += (deltaA * deltaL) */ __pyx_v_deltaR = (__pyx_v_fbin0_max - ((float)__pyx_v_bin0_max));
227:
228: outCount[bin0_min] += (deltaA * deltaL)
/* "splitBBox.pyx":228 * deltaR = fbin0_max - (<
float > bin0_max) * * outCount[bin0_min] += (deltaA * deltaL) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min] += (data * deltaA * deltaL) * */ __pyx_t_47 = __pyx_v_bin0_min; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_outCount.diminfo[0].strides) += (__pyx_v_deltaA * __pyx_v_deltaL);
229: outData[bin0_min] += (data * deltaA * deltaL)
/* "splitBBox.pyx":229 * * outCount[bin0_min] += (deltaA * deltaL) * outData[bin0_min] += (data * deltaA * deltaL) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * outCount[bin0_max] += (deltaA * deltaR) */ __pyx_t_48 = __pyx_v_bin0_min; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_outData.diminfo[0].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaL);
230:
231: outCount[bin0_max] += (deltaA * deltaR)
/* "splitBBox.pyx":231 * outData[bin0_min] += (data * deltaA * deltaL) * * outCount[bin0_max] += (deltaA * deltaR) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_max] += (data * deltaA * deltaR) * */ __pyx_t_49 = __pyx_v_bin0_max; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_outCount.diminfo[0].strides) += (__pyx_v_deltaA * __pyx_v_deltaR);
232: outData[bin0_max] += (data * deltaA * deltaR)
/* "splitBBox.pyx":232 * * outCount[bin0_max] += (deltaA * deltaR) * outData[bin0_max] += (data * deltaA * deltaR) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if bin0_min + 1<
bin0_max: */ __pyx_t_50 = __pyx_v_bin0_max; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_50, __pyx_pybuffernd_outData.diminfo[0].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaR);
233:
234: if bin0_min + 1 < bin0_max:
/* "splitBBox.pyx":234 * outData[bin0_max] += (data * deltaA * deltaR) * * if bin0_min + 1<
bin0_max: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for i in range(bin0_min + 1, bin0_max): * outCount[i] += deltaA */ __pyx_t_18 = ((__pyx_v_bin0_min + 1)<
__pyx_v_bin0_max); if (__pyx_t_18) {
235: for i in range(bin0_min + 1, bin0_max):
/* "splitBBox.pyx":235 * * if bin0_min + 1<
bin0_max: * for i in range(bin0_min + 1, bin0_max): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[i] += deltaA * outData[i] += (data * deltaA) */ __pyx_t_51 = __pyx_v_bin0_max; for (__pyx_t_52 = (__pyx_v_bin0_min + 1); __pyx_t_52<
__pyx_t_51; __pyx_t_52+=1) { __pyx_v_i = __pyx_t_52;
236: outCount[i] += deltaA
/* "splitBBox.pyx":236 * if bin0_min + 1<
bin0_max: * for i in range(bin0_min + 1, bin0_max): * outCount[i] += deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[i] += (data * deltaA) * */ __pyx_t_53 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_53, __pyx_pybuffernd_outCount.diminfo[0].strides) += __pyx_v_deltaA;
237: outData[i] += (data * deltaA)
/* "splitBBox.pyx":237 * for i in range(bin0_min + 1, bin0_max): * outCount[i] += deltaA * outData[i] += (data * deltaA) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * for i in range(bins): */ __pyx_t_54 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_54, __pyx_pybuffernd_outData.diminfo[0].strides) += (__pyx_v_data * __pyx_v_deltaA); } goto __pyx_L35; } __pyx_L35:; } __pyx_L34:; __pyx_L22_continue:; }
238:
239: for i in range(bins):
/* "splitBBox.pyx":239 * outData[i] += (data * deltaA) * * for i in range(bins): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if outCount[i] > epsilon: * outMerge[i] =<
float > (outData[i] / outCount[i]) */ __pyx_t_2 = __pyx_v_bins; for (__pyx_t_24 = 0; __pyx_t_24<
__pyx_t_2; __pyx_t_24+=1) { __pyx_v_i = __pyx_t_24;
240: if outCount[i] > epsilon:
/* "splitBBox.pyx":240 * * for i in range(bins): * if outCount[i] > epsilon: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outMerge[i] =<
float > (outData[i] / outCount[i]) * else: */ __pyx_t_52 = __pyx_v_i; __pyx_t_18 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_52, __pyx_pybuffernd_outCount.diminfo[0].strides)) > __pyx_v_epsilon); if (__pyx_t_18) {
241: outMerge[i] = < float > (outData[i] / outCount[i])
/* "splitBBox.pyx":241 * for i in range(bins): * if outCount[i] > epsilon: * outMerge[i] =<
float > (outData[i] / outCount[i]) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * outMerge[i] = cdummy */ __pyx_t_55 = __pyx_v_i; __pyx_t_56 = __pyx_v_i; __pyx_t_57 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.buf, __pyx_t_57, __pyx_pybuffernd_outMerge.diminfo[0].strides) = ((float)((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_55, __pyx_pybuffernd_outData.diminfo[0].strides)) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_56, __pyx_pybuffernd_outCount.diminfo[0].strides)))); goto __pyx_L40; } /*else*/ {
242: else:
243: outMerge[i] = cdummy
/* "splitBBox.pyx":243 * outMerge[i] =<
float > (outData[i] / outCount[i]) * else: * outMerge[i] = cdummy #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * return outPos, outMerge, outData, outCount */ __pyx_t_58 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.buf, __pyx_t_58, __pyx_pybuffernd_outMerge.diminfo[0].strides) = __pyx_v_cdummy; } __pyx_L40:; } }
244:
245: return outPos, outMerge, outData, outCount
/* "splitBBox.pyx":245 * outMerge[i] = cdummy * * return outPos, outMerge, outData, outCount #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_outPos); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_outPos); __Pyx_GIVEREF(__pyx_v_outPos); __Pyx_INCREF(((PyObject *)__pyx_v_outMerge)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_outMerge)); __Pyx_GIVEREF(((PyObject *)__pyx_v_outMerge)); __Pyx_INCREF(((PyObject *)__pyx_v_outData)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_outData)); __Pyx_GIVEREF(((PyObject *)__pyx_v_outData)); __Pyx_INCREF(((PyObject *)__pyx_v_outCount)); PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_outCount)); __Pyx_GIVEREF(((PyObject *)__pyx_v_outCount)); __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1); __PYX_XDEC_MEMVIEW(&__pyx_t_21, 1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cdata.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dpos0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dpos1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outCount.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outData.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outMerge.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("splitBBox.histoBBox1d", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cdata.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dpos0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dpos1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outCount.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outData.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outMerge.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_cdata); __Pyx_XDECREF((PyObject *)__pyx_v_cpos0); __Pyx_XDECREF((PyObject *)__pyx_v_dpos0); __Pyx_XDECREF((PyObject *)__pyx_v_cpos1); __Pyx_XDECREF((PyObject *)__pyx_v_dpos1); __Pyx_XDECREF((PyObject *)__pyx_v_cpos0_lower); __Pyx_XDECREF((PyObject *)__pyx_v_cpos0_upper); __PYX_XDEC_MEMVIEW(&__pyx_v_cmask, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_cflat, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_cdark, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_cpolarization, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_csolidangle, 1); __Pyx_XDECREF((PyObject *)__pyx_v_outData); __Pyx_XDECREF((PyObject *)__pyx_v_outCount); __Pyx_XDECREF((PyObject *)__pyx_v_outMerge); __Pyx_XDECREF(__pyx_v_outPos); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9splitBBox_3histoBBox2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9splitBBox_2histoBBox2d[] = "\n Calculate 2D histogram of pos0(tth),pos1(chi) weighted by weights\n\n Splitting is done on the pixel's bounding box like fit2D\n\n\n @param weights: array with intensities\n @param pos0: 1D array with pos0: tth or q_vect\n @param delta_pos0: 1D array with delta pos0: max center-corner distance\n @param pos1: 1D array with pos1: chi\n @param delta_pos1: 1D array with max pos1: max center-corner distance, unused !\n @param bins: number of output bins (tth=100, chi=36 by default)\n @param pos0Range: minimum and maximum of the 2th range\n @param pos1Range: minimum and maximum of the chi range\n @param dummy: value for bins without pixels & value of \"no good\" pixels\n @param delta_dummy: precision of dummy value\n @param mask: array (of int8) with masked pixels with 1 (0=not masked)\n @param dark: array (of float32) with dark noise to be subtracted (or None)\n @param flat: array (of float32) with flat-field image\n @param polarization: array (of float32) with polarization corrections\n @param solidangle: array (of float32) with solid angle corrections\n\n @return I, edges0, edges1, weighted histogram(2D), unweighted histogram (2D)\n "; static PyMethodDef __pyx_mdef_9splitBBox_3histoBBox2d = {__Pyx_NAMESTR("histoBBox2d"), (PyCFunction)__pyx_pw_9splitBBox_3histoBBox2d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9splitBBox_2histoBBox2d)}; static PyObject *__pyx_pw_9splitBBox_3histoBBox2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_weights = 0; PyArrayObject *__pyx_v_pos0 = 0; PyArrayObject *__pyx_v_delta_pos0 = 0; PyArrayObject *__pyx_v_pos1 = 0; PyArrayObject *__pyx_v_delta_pos1 = 0; PyObject *__pyx_v_bins = 0; PyObject *__pyx_v_pos0Range = 0; PyObject *__pyx_v_pos1Range = 0; PyObject *__pyx_v_dummy = 0; PyObject *__pyx_v_delta_dummy = 0; PyObject *__pyx_v_mask = 0; PyObject *__pyx_v_dark = 0; PyObject *__pyx_v_flat = 0; PyObject *__pyx_v_solidangle = 0; PyObject *__pyx_v_polarization = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("histoBBox2d (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__weights,&__pyx_n_s__pos0,&__pyx_n_s__delta_pos0,&__pyx_n_s__pos1,&__pyx_n_s__delta_pos1,&__pyx_n_s__bins,&__pyx_n_s__pos0Range,&__pyx_n_s__pos1Range,&__pyx_n_s__dummy,&__pyx_n_s__delta_dummy,&__pyx_n_s__mask,&__pyx_n_s__dark,&__pyx_n_s__flat,&__pyx_n_s__solidangle,&__pyx_n_s__polarization,0}; PyObject* values[15] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
246:
247:
248:
249:
250: @cython.cdivision(True)
251: @cython.boundscheck(False)
252: @cython.wraparound(False)
253: def histoBBox2d(numpy.ndarray weights not None,
/* "splitBBox.pyx":253 * @cython.boundscheck(False) * @cython.wraparound(False) * def histoBBox2d(numpy.ndarray weights not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray pos0 not None, * numpy.ndarray delta_pos0 not None, */ static PyObject *__pyx_pf_9splitBBox_2histoBBox2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_weights, PyArrayObject *__pyx_v_pos0, PyArrayObject *__pyx_v_delta_pos0, PyArrayObject *__pyx_v_pos1, PyArrayObject *__pyx_v_delta_pos1, PyObject *__pyx_v_bins, PyObject *__pyx_v_pos0Range, PyObject *__pyx_v_pos1Range, PyObject *__pyx_v_dummy, PyObject *__pyx_v_delta_dummy, PyObject *__pyx_v_mask, PyObject *__pyx_v_dark, PyObject *__pyx_v_flat, PyObject *__pyx_v_solidangle, PyObject *__pyx_v_polarization) { Py_ssize_t __pyx_v_bins0; Py_ssize_t __pyx_v_bins1; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_idx; size_t __pyx_v_size; PyArrayObject *__pyx_v_cdata = 0; PyArrayObject *__pyx_v_cpos0 = 0; PyArrayObject *__pyx_v_dpos0 = 0; PyArrayObject *__pyx_v_cpos1 = 0; PyArrayObject *__pyx_v_dpos1 = 0; PyArrayObject *__pyx_v_cpos0_upper = 0; PyArrayObject *__pyx_v_cpos0_lower = 0; PyArrayObject *__pyx_v_outData = 0; PyArrayObject *__pyx_v_outCount = 0; PyArrayObject *__pyx_v_outMerge = 0; float __pyx_v_min0; float __pyx_v_max0; float __pyx_v_min1; float __pyx_v_max1; float __pyx_v_deltaR; float __pyx_v_deltaL; float __pyx_v_deltaU; float __pyx_v_deltaD; float __pyx_v_deltaA; float __pyx_v_delta0; float __pyx_v_delta1; float __pyx_v_pos0_min; float __pyx_v_pos0_max; float __pyx_v_pos1_min; float __pyx_v_pos1_max; float __pyx_v_pos0_maxin; float __pyx_v_pos1_maxin; float __pyx_v_fbin0_min; float __pyx_v_fbin0_max; float __pyx_v_fbin1_min; float __pyx_v_fbin1_max; float __pyx_v_data; float __pyx_v_epsilon; float __pyx_v_cdummy; float __pyx_v_ddummy; Py_ssize_t __pyx_v_bin0_max; Py_ssize_t __pyx_v_bin0_min; Py_ssize_t __pyx_v_bin1_max; Py_ssize_t __pyx_v_bin1_min; int __pyx_v_check_mask; int __pyx_v_check_dummy; int __pyx_v_do_dark; int __pyx_v_do_flat; int __pyx_v_do_polarization; int __pyx_v_do_solidangle; __Pyx_memviewslice __pyx_v_cmask = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_cflat = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_cdark = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_cpolarization = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_csolidangle = { 0, 0, { 0 }, { 0 }, { 0 } }; PyObject *__pyx_v_edges0 = NULL; PyObject *__pyx_v_edges1 = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_cdata; __Pyx_Buffer __pyx_pybuffer_cdata; __Pyx_LocalBuf_ND __pyx_pybuffernd_cpos0; __Pyx_Buffer __pyx_pybuffer_cpos0; __Pyx_LocalBuf_ND __pyx_pybuffernd_cpos0_lower; __Pyx_Buffer __pyx_pybuffer_cpos0_lower; __Pyx_LocalBuf_ND __pyx_pybuffernd_cpos0_upper; __Pyx_Buffer __pyx_pybuffer_cpos0_upper; __Pyx_LocalBuf_ND __pyx_pybuffernd_cpos1; __Pyx_Buffer __pyx_pybuffer_cpos1; __Pyx_LocalBuf_ND __pyx_pybuffernd_dpos0; __Pyx_Buffer __pyx_pybuffer_dpos0; __Pyx_LocalBuf_ND __pyx_pybuffernd_dpos1; __Pyx_Buffer __pyx_pybuffer_dpos1; __Pyx_LocalBuf_ND __pyx_pybuffernd_outCount; __Pyx_Buffer __pyx_pybuffer_outCount; __Pyx_LocalBuf_ND __pyx_pybuffernd_outData; __Pyx_Buffer __pyx_pybuffer_outData; __Pyx_LocalBuf_ND __pyx_pybuffernd_outMerge; __Pyx_Buffer __pyx_pybuffer_outMerge; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("histoBBox2d", 0); __pyx_pybuffer_cdata.pybuffer.buf = NULL; __pyx_pybuffer_cdata.refcount = 0; __pyx_pybuffernd_cdata.data = NULL; __pyx_pybuffernd_cdata.rcbuffer = &__pyx_pybuffer_cdata; __pyx_pybuffer_cpos0.pybuffer.buf = NULL; __pyx_pybuffer_cpos0.refcount = 0; __pyx_pybuffernd_cpos0.data = NULL; __pyx_pybuffernd_cpos0.rcbuffer = &__pyx_pybuffer_cpos0; __pyx_pybuffer_dpos0.pybuffer.buf = NULL; __pyx_pybuffer_dpos0.refcount = 0; __pyx_pybuffernd_dpos0.data = NULL; __pyx_pybuffernd_dpos0.rcbuffer = &__pyx_pybuffer_dpos0; __pyx_pybuffer_cpos1.pybuffer.buf = NULL; __pyx_pybuffer_cpos1.refcount = 0; __pyx_pybuffernd_cpos1.data = NULL; __pyx_pybuffernd_cpos1.rcbuffer = &__pyx_pybuffer_cpos1; __pyx_pybuffer_dpos1.pybuffer.buf = NULL; __pyx_pybuffer_dpos1.refcount = 0; __pyx_pybuffernd_dpos1.data = NULL; __pyx_pybuffernd_dpos1.rcbuffer = &__pyx_pybuffer_dpos1; __pyx_pybuffer_cpos0_upper.pybuffer.buf = NULL; __pyx_pybuffer_cpos0_upper.refcount = 0; __pyx_pybuffernd_cpos0_upper.data = NULL; __pyx_pybuffernd_cpos0_upper.rcbuffer = &__pyx_pybuffer_cpos0_upper; __pyx_pybuffer_cpos0_lower.pybuffer.buf = NULL; __pyx_pybuffer_cpos0_lower.refcount = 0; __pyx_pybuffernd_cpos0_lower.data = NULL; __pyx_pybuffernd_cpos0_lower.rcbuffer = &__pyx_pybuffer_cpos0_lower; __pyx_pybuffer_outData.pybuffer.buf = NULL; __pyx_pybuffer_outData.refcount = 0; __pyx_pybuffernd_outData.data = NULL; __pyx_pybuffernd_outData.rcbuffer = &__pyx_pybuffer_outData; __pyx_pybuffer_outCount.pybuffer.buf = NULL; __pyx_pybuffer_outCount.refcount = 0; __pyx_pybuffernd_outCount.data = NULL; __pyx_pybuffernd_outCount.rcbuffer = &__pyx_pybuffer_outCount; __pyx_pybuffer_outMerge.pybuffer.buf = NULL; __pyx_pybuffer_outMerge.refcount = 0; __pyx_pybuffernd_outMerge.data = NULL; __pyx_pybuffernd_outMerge.rcbuffer = &__pyx_pybuffer_outMerge; /* "splitBBox.pyx":253 * @cython.boundscheck(False) * @cython.wraparound(False) * def histoBBox2d(numpy.ndarray weights not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray pos0 not None, * numpy.ndarray delta_pos0 not None, */ __pyx_k_tuple_50 = PyTuple_New(74); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_50); __Pyx_INCREF(((PyObject *)__pyx_n_s__weights)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 0, ((PyObject *)__pyx_n_s__weights)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__weights)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos0)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 1, ((PyObject *)__pyx_n_s__pos0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__delta_pos0)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 2, ((PyObject *)__pyx_n_s__delta_pos0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta_pos0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos1)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 3, ((PyObject *)__pyx_n_s__pos1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__delta_pos1)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 4, ((PyObject *)__pyx_n_s__delta_pos1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta_pos1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bins)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 5, ((PyObject *)__pyx_n_s__bins)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bins)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos0Range)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 6, ((PyObject *)__pyx_n_s__pos0Range)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos0Range)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos1Range)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 7, ((PyObject *)__pyx_n_s__pos1Range)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos1Range)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dummy)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 8, ((PyObject *)__pyx_n_s__dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__delta_dummy)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 9, ((PyObject *)__pyx_n_s__delta_dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta_dummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__mask)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 10, ((PyObject *)__pyx_n_s__mask)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dark)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 11, ((PyObject *)__pyx_n_s__dark)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dark)); __Pyx_INCREF(((PyObject *)__pyx_n_s__flat)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 12, ((PyObject *)__pyx_n_s__flat)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__flat)); __Pyx_INCREF(((PyObject *)__pyx_n_s__solidangle)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 13, ((PyObject *)__pyx_n_s__solidangle)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__solidangle)); __Pyx_INCREF(((PyObject *)__pyx_n_s__polarization)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 14, ((PyObject *)__pyx_n_s__polarization)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__polarization)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bins0)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 15, ((PyObject *)__pyx_n_s__bins0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bins0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bins1)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 16, ((PyObject *)__pyx_n_s__bins1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bins1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__i)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 17, ((PyObject *)__pyx_n_s__i)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i)); __Pyx_INCREF(((PyObject *)__pyx_n_s__j)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 18, ((PyObject *)__pyx_n_s__j)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j)); __Pyx_INCREF(((PyObject *)__pyx_n_s__idx)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 19, ((PyObject *)__pyx_n_s__idx)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx)); __Pyx_INCREF(((PyObject *)__pyx_n_s__size)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 20, ((PyObject *)__pyx_n_s__size)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__size)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cdata)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 21, ((PyObject *)__pyx_n_s__cdata)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cdata)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cpos0)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 22, ((PyObject *)__pyx_n_s__cpos0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cpos0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dpos0)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 23, ((PyObject *)__pyx_n_s__dpos0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dpos0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cpos1)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 24, ((PyObject *)__pyx_n_s__cpos1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cpos1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dpos1)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 25, ((PyObject *)__pyx_n_s__dpos1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dpos1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cpos0_upper)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 26, ((PyObject *)__pyx_n_s__cpos0_upper)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cpos0_upper)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cpos0_lower)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 27, ((PyObject *)__pyx_n_s__cpos0_lower)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cpos0_lower)); __Pyx_INCREF(((PyObject *)__pyx_n_s__outData)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 28, ((PyObject *)__pyx_n_s__outData)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outData)); __Pyx_INCREF(((PyObject *)__pyx_n_s__outCount)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 29, ((PyObject *)__pyx_n_s__outCount)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outCount)); __Pyx_INCREF(((PyObject *)__pyx_n_s__outMerge)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 30, ((PyObject *)__pyx_n_s__outMerge)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outMerge)); __Pyx_INCREF(((PyObject *)__pyx_n_s__min0)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 31, ((PyObject *)__pyx_n_s__min0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__min0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__max0)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 32, ((PyObject *)__pyx_n_s__max0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__max0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__min1)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 33, ((PyObject *)__pyx_n_s__min1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__min1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__max1)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 34, ((PyObject *)__pyx_n_s__max1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__max1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__deltaR)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 35, ((PyObject *)__pyx_n_s__deltaR)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__deltaR)); __Pyx_INCREF(((PyObject *)__pyx_n_s__deltaL)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 36, ((PyObject *)__pyx_n_s__deltaL)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__deltaL)); __Pyx_INCREF(((PyObject *)__pyx_n_s__deltaU)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 37, ((PyObject *)__pyx_n_s__deltaU)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__deltaU)); __Pyx_INCREF(((PyObject *)__pyx_n_s__deltaD)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 38, ((PyObject *)__pyx_n_s__deltaD)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__deltaD)); __Pyx_INCREF(((PyObject *)__pyx_n_s__deltaA)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 39, ((PyObject *)__pyx_n_s__deltaA)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__deltaA)); __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 40, ((PyObject *)__pyx_n_s__tmp)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp)); __Pyx_INCREF(((PyObject *)__pyx_n_s__delta0)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 41, ((PyObject *)__pyx_n_s__delta0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__delta1)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 42, ((PyObject *)__pyx_n_s__delta1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos0_min)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 43, ((PyObject *)__pyx_n_s__pos0_min)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos0_min)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos0_max)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 44, ((PyObject *)__pyx_n_s__pos0_max)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos0_max)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos1_min)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 45, ((PyObject *)__pyx_n_s__pos1_min)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos1_min)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos1_max)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 46, ((PyObject *)__pyx_n_s__pos1_max)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos1_max)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos0_maxin)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 47, ((PyObject *)__pyx_n_s__pos0_maxin)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos0_maxin)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos1_maxin)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 48, ((PyObject *)__pyx_n_s__pos1_maxin)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos1_maxin)); __Pyx_INCREF(((PyObject *)__pyx_n_s__fbin0_min)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 49, ((PyObject *)__pyx_n_s__fbin0_min)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fbin0_min)); __Pyx_INCREF(((PyObject *)__pyx_n_s__fbin0_max)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 50, ((PyObject *)__pyx_n_s__fbin0_max)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fbin0_max)); __Pyx_INCREF(((PyObject *)__pyx_n_s__fbin1_min)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 51, ((PyObject *)__pyx_n_s__fbin1_min)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fbin1_min)); __Pyx_INCREF(((PyObject *)__pyx_n_s__fbin1_max)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 52, ((PyObject *)__pyx_n_s__fbin1_max)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fbin1_max)); __Pyx_INCREF(((PyObject *)__pyx_n_s__data)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 53, ((PyObject *)__pyx_n_s__data)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data)); __Pyx_INCREF(((PyObject *)__pyx_n_s__epsilon)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 54, ((PyObject *)__pyx_n_s__epsilon)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__epsilon)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cdummy)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 55, ((PyObject *)__pyx_n_s__cdummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cdummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__ddummy)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 56, ((PyObject *)__pyx_n_s__ddummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ddummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bin0_max)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 57, ((PyObject *)__pyx_n_s__bin0_max)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bin0_max)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bin0_min)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 58, ((PyObject *)__pyx_n_s__bin0_min)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bin0_min)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bin1_max)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 59, ((PyObject *)__pyx_n_s__bin1_max)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bin1_max)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bin1_min)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 60, ((PyObject *)__pyx_n_s__bin1_min)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bin1_min)); __Pyx_INCREF(((PyObject *)__pyx_n_s__check_mask)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 61, ((PyObject *)__pyx_n_s__check_mask)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__check_mask)); __Pyx_INCREF(((PyObject *)__pyx_n_s__check_dummy)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 62, ((PyObject *)__pyx_n_s__check_dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__check_dummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_dark)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 63, ((PyObject *)__pyx_n_s__do_dark)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_dark)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_flat)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 64, ((PyObject *)__pyx_n_s__do_flat)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_flat)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_polarization)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 65, ((PyObject *)__pyx_n_s__do_polarization)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_polarization)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_solidangle)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 66, ((PyObject *)__pyx_n_s__do_solidangle)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_solidangle)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cmask)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 67, ((PyObject *)__pyx_n_s__cmask)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cmask)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cflat)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 68, ((PyObject *)__pyx_n_s__cflat)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cflat)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cdark)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 69, ((PyObject *)__pyx_n_s__cdark)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cdark)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cpolarization)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 70, ((PyObject *)__pyx_n_s__cpolarization)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cpolarization)); __Pyx_INCREF(((PyObject *)__pyx_n_s__csolidangle)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 71, ((PyObject *)__pyx_n_s__csolidangle)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__csolidangle)); __Pyx_INCREF(((PyObject *)__pyx_n_s__edges0)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 72, ((PyObject *)__pyx_n_s__edges0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__edges0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__edges1)); PyTuple_SET_ITEM(__pyx_k_tuple_50, 73, ((PyObject *)__pyx_n_s__edges1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__edges1)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_50)); /* "splitBBox.pyx":253 * @cython.boundscheck(False) * @cython.wraparound(False) * def histoBBox2d(numpy.ndarray weights not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray pos0 not None, * numpy.ndarray delta_pos0 not None, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_9splitBBox_3histoBBox2d, NULL, __pyx_n_s__splitBBox); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__histoBBox2d, __pyx_t_3)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_codeobj_51 = (PyObject*)__Pyx_PyCode_New(15, 0, 74, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_49, __pyx_n_s__histoBBox2d, 253, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
254: numpy.ndarray pos0 not None,
255: numpy.ndarray delta_pos0 not None,
256: numpy.ndarray pos1 not None,
257: numpy.ndarray delta_pos1 not None,
258: bins=(100, 36),
/* "splitBBox.pyx":258 * numpy.ndarray pos1 not None, * numpy.ndarray delta_pos1 not None, * bins=(100, 36), #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0Range=None, * pos1Range=None, */ values[5] = ((PyObject *)__pyx_k_tuple_1); /* "splitBBox.pyx":258 * numpy.ndarray pos1 not None, * numpy.ndarray delta_pos1 not None, * bins=(100, 36), #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0Range=None, * pos1Range=None, */ __pyx_k_tuple_1 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_1); __Pyx_INCREF(__pyx_int_100); PyTuple_SET_ITEM(__pyx_k_tuple_1, 0, __pyx_int_100); __Pyx_GIVEREF(__pyx_int_100); __Pyx_INCREF(__pyx_int_36); PyTuple_SET_ITEM(__pyx_k_tuple_1, 1, __pyx_int_36); __Pyx_GIVEREF(__pyx_int_36); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_1));
259: pos0Range=None,
/* "splitBBox.pyx":259 * numpy.ndarray delta_pos1 not None, * bins=(100, 36), * pos0Range=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1Range=None, * dummy=None, */ values[6] = ((PyObject *)Py_None);
260: pos1Range=None,
/* "splitBBox.pyx":260 * bins=(100, 36), * pos0Range=None, * pos1Range=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* dummy=None, * delta_dummy=None, */ values[7] = ((PyObject *)Py_None);
261: dummy=None,
/* "splitBBox.pyx":261 * pos0Range=None, * pos1Range=None, * dummy=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* delta_dummy=None, * mask=None, */ values[8] = ((PyObject *)Py_None);
262: delta_dummy=None,
/* "splitBBox.pyx":262 * pos1Range=None, * dummy=None, * delta_dummy=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* mask=None, * dark=None, */ values[9] = ((PyObject *)Py_None);
263: mask=None,
/* "splitBBox.pyx":263 * dummy=None, * delta_dummy=None, * mask=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* dark=None, * flat=None, */ values[10] = ((PyObject *)Py_None);
264: dark=None,
/* "splitBBox.pyx":264 * delta_dummy=None, * mask=None, * dark=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* flat=None, * solidangle=None, */ values[11] = ((PyObject *)Py_None);
265: flat=None,
/* "splitBBox.pyx":265 * mask=None, * dark=None, * flat=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* solidangle=None, * polarization=None): */ values[12] = ((PyObject *)Py_None);
266: solidangle=None,
/* "splitBBox.pyx":266 * dark=None, * flat=None, * solidangle=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* polarization=None): * """ */ values[13] = ((PyObject *)Py_None);
267: polarization=None):
/* "splitBBox.pyx":267 * flat=None, * solidangle=None, * polarization=None): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* """ * Calculate 2D histogram of pos0(tth),pos1(chi) weighted by weights */ values[14] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14); case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13); case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__weights)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos0)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("histoBBox2d", 0, 5, 15, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__delta_pos0)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("histoBBox2d", 0, 5, 15, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("histoBBox2d", 0, 5, 15, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__delta_pos1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("histoBBox2d", 0, 5, 15, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos0Range); if (value) { values[6] = value; kw_args--; } } case 7: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos1Range); if (value) { values[7] = value; kw_args--; } } case 8: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy); if (value) { values[8] = value; kw_args--; } } case 9: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__delta_dummy); if (value) { values[9] = value; kw_args--; } } case 10: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask); if (value) { values[10] = value; kw_args--; } } case 11: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dark); if (value) { values[11] = value; kw_args--; } } case 12: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__flat); if (value) { values[12] = value; kw_args--; } } case 13: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__solidangle); if (value) { values[13] = value; kw_args--; } } case 14: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__polarization); if (value) { values[14] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "histoBBox2d")<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14); case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13); case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_weights = ((PyArrayObject *)values[0]); __pyx_v_pos0 = ((PyArrayObject *)values[1]); __pyx_v_delta_pos0 = ((PyArrayObject *)values[2]); __pyx_v_pos1 = ((PyArrayObject *)values[3]); __pyx_v_delta_pos1 = ((PyArrayObject *)values[4]); __pyx_v_bins = values[5]; __pyx_v_pos0Range = values[6]; __pyx_v_pos1Range = values[7]; __pyx_v_dummy = values[8]; __pyx_v_delta_dummy = values[9]; __pyx_v_mask = values[10]; __pyx_v_dark = values[11]; __pyx_v_flat = values[12]; __pyx_v_solidangle = values[13]; __pyx_v_polarization = values[14]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("histoBBox2d", 0, 5, 15, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("splitBBox.histoBBox2d", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weights), __pyx_ptype_5numpy_ndarray, 0, "weights", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos0), __pyx_ptype_5numpy_ndarray, 0, "pos0", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_delta_pos0), __pyx_ptype_5numpy_ndarray, 0, "delta_pos0", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos1), __pyx_ptype_5numpy_ndarray, 0, "pos1", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_delta_pos1), __pyx_ptype_5numpy_ndarray, 0, "delta_pos1", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_9splitBBox_2histoBBox2d(__pyx_self, __pyx_v_weights, __pyx_v_pos0, __pyx_v_delta_pos0, __pyx_v_pos1, __pyx_v_delta_pos1, __pyx_v_bins, __pyx_v_pos0Range, __pyx_v_pos1Range, __pyx_v_dummy, __pyx_v_delta_dummy, __pyx_v_mask, __pyx_v_dark, __pyx_v_flat, __pyx_v_solidangle, __pyx_v_polarization); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
268: """
269: Calculate 2D histogram of pos0(tth),pos1(chi) weighted by weights
270:
271: Splitting is done on the pixel's bounding box like fit2D
272:
273:
274: @param weights: array with intensities
275: @param pos0: 1D array with pos0: tth or q_vect
276: @param delta_pos0: 1D array with delta pos0: max center-corner distance
277: @param pos1: 1D array with pos1: chi
278: @param delta_pos1: 1D array with max pos1: max center-corner distance, unused !
279: @param bins: number of output bins (tth=100, chi=36 by default)
280: @param pos0Range: minimum and maximum of the 2th range
281: @param pos1Range: minimum and maximum of the chi range
282: @param dummy: value for bins without pixels & value of "no good" pixels
283: @param delta_dummy: precision of dummy value
284: @param mask: array (of int8) with masked pixels with 1 (0=not masked)
285: @param dark: array (of float32) with dark noise to be subtracted (or None)
286: @param flat: array (of float32) with flat-field image
287: @param polarization: array (of float32) with polarization corrections
288: @param solidangle: array (of float32) with solid angle corrections
289:
290: @return I, edges0, edges1, weighted histogram(2D), unweighted histogram (2D)
291: """
292:
293: cdef ssize_t bins0, bins1, i, j, idx
294: cdef size_t size = weights.size
/* "splitBBox.pyx":294 * * cdef ssize_t bins0, bins1, i, j, idx * cdef size_t size = weights.size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert pos0.size == size * assert pos1.size == size */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_weights), __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AsSize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_size = __pyx_t_2;
295: assert pos0.size == size
/* "splitBBox.pyx":295 * cdef ssize_t bins0, bins1, i, j, idx * cdef size_t size = weights.size * assert pos0.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert pos1.size == size * assert delta_pos0.size == size */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_pos0), __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
296: assert pos1.size == size
/* "splitBBox.pyx":296 * cdef size_t size = weights.size * assert pos0.size == size * assert pos1.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert delta_pos0.size == size * assert delta_pos1.size == size */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_pos1), __pyx_n_s__size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_5)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
297: assert delta_pos0.size == size
/* "splitBBox.pyx":297 * assert pos0.size == size * assert pos1.size == size * assert delta_pos0.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert delta_pos1.size == size * try: */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_delta_pos0), __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
298: assert delta_pos1.size == size
/* "splitBBox.pyx":298 * assert pos1.size == size * assert delta_pos0.size == size * assert delta_pos1.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* try: * bins0, bins1 = tuple(bins) */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_delta_pos1), __pyx_n_s__size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_5)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
299: try:
/* "splitBBox.pyx":299 * assert delta_pos0.size == size * assert delta_pos1.size == size * try: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bins0, bins1 = tuple(bins) * except: */ { __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ {
300: bins0, bins1 = tuple(bins)
/* "splitBBox.pyx":300 * assert delta_pos1.size == size * try: * bins0, bins1 = tuple(bins) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* except: * bins0 = bins1 = bins */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_bins); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_bins); __Pyx_GIVEREF(__pyx_v_bins); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (1) { PyObject* sequence = __pyx_t_3; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L3_error;} #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else if (1) { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L12_unpacking_done; __pyx_L11_unpacking_failed:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L12_unpacking_done:; } __pyx_t_11 = PyInt_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = PyInt_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_bins0 = __pyx_t_11; __pyx_v_bins1 = __pyx_t_12; } __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; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
301: except:
/* "splitBBox.pyx":301 * try: * bins0, bins1 = tuple(bins) * except: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bins0 = bins1 = bins * if bins0<
= 0: */ /*except:*/ { __Pyx_AddTraceback("splitBBox.histoBBox2d", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_1);
302: bins0 = bins1 = bins
/* "splitBBox.pyx":302 * bins0, bins1 = tuple(bins) * except: * bins0 = bins1 = bins #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if bins0<
= 0: * bins0 = 1 */ __pyx_t_12 = PyInt_AsSsize_t(__pyx_v_bins); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_v_bins0 = __pyx_t_12; __pyx_t_12 = PyInt_AsSsize_t(__pyx_v_bins); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_v_bins1 = __pyx_t_12; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L10_try_end:; }
303: if bins0 <= 0:
/* "splitBBox.pyx":303 * except: * bins0 = bins1 = bins * if bins0<
= 0: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bins0 = 1 * if bins1<
= 0: */ __pyx_t_5 = (__pyx_v_bins0<
= 0); if (__pyx_t_5) {
304: bins0 = 1
/* "splitBBox.pyx":304 * bins0 = bins1 = bins * if bins0<
= 0: * bins0 = 1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if bins1<
= 0: * bins1 = 1 */ __pyx_v_bins0 = 1; goto __pyx_L15; } __pyx_L15:;
305: if bins1 <= 0:
/* "splitBBox.pyx":305 * if bins0<
= 0: * bins0 = 1 * if bins1<
= 0: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bins1 = 1 * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cdata = numpy.ascontiguousarray(weights.ravel(),dtype=numpy.float32) */ __pyx_t_5 = (__pyx_v_bins1<
= 0); if (__pyx_t_5) {
306: bins1 = 1
/* "splitBBox.pyx":306 * bins0 = 1 * if bins1<
= 0: * bins1 = 1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float32_t, ndim = 1] cdata = numpy.ascontiguousarray(weights.ravel(),dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0 = numpy.ascontiguousarray(pos0.ravel(),dtype=numpy.float32) */ __pyx_v_bins1 = 1; goto __pyx_L16; } __pyx_L16:;
307: cdef numpy.ndarray[numpy.float32_t, ndim = 1] cdata = numpy.ascontiguousarray(weights.ravel(),dtype=numpy.float32)
/* "splitBBox.pyx":307 * if bins1<
= 0: * bins1 = 1 * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cdata = numpy.ascontiguousarray(weights.ravel(),dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0 = numpy.ascontiguousarray(pos0.ravel(),dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] dpos0 = numpy.ascontiguousarray(delta_pos0.ravel(),dtype=numpy.float32) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_weights), __pyx_n_s__ravel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__float32); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cdata.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_cdata = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_cdata.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_cdata.diminfo[0].strides = __pyx_pybuffernd_cdata.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cdata.diminfo[0].shape = __pyx_pybuffernd_cdata.rcbuffer->pybuffer.shape[0]; } } __pyx_t_14 = 0; __pyx_v_cdata = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0;
308: cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0 = numpy.ascontiguousarray(pos0.ravel(),dtype=numpy.float32)
/* "splitBBox.pyx":308 * bins1 = 1 * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cdata = numpy.ascontiguousarray(weights.ravel(),dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0 = numpy.ascontiguousarray(pos0.ravel(),dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float32_t, ndim = 1] dpos0 = numpy.ascontiguousarray(delta_pos0.ravel(),dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos1 = numpy.ascontiguousarray(pos1.ravel(),dtype=numpy.float32) */ __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_3 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_GetAttr(((PyObject *)__pyx_v_pos0), __pyx_n_s__ravel); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_1 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float32); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_13), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cpos0.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_cpos0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_cpos0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_cpos0.diminfo[0].strides = __pyx_pybuffernd_cpos0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cpos0.diminfo[0].shape = __pyx_pybuffernd_cpos0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_15 = 0; __pyx_v_cpos0 = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0;
309: cdef numpy.ndarray[numpy.float32_t, ndim = 1] dpos0 = numpy.ascontiguousarray(delta_pos0.ravel(),dtype=numpy.float32)
/* "splitBBox.pyx":309 * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cdata = numpy.ascontiguousarray(weights.ravel(),dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0 = numpy.ascontiguousarray(pos0.ravel(),dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] dpos0 = numpy.ascontiguousarray(delta_pos0.ravel(),dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos1 = numpy.ascontiguousarray(pos1.ravel(),dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] dpos1 = numpy.ascontiguousarray(delta_pos1.ravel(),dtype=numpy.float32) */ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_delta_pos0), __pyx_n_s__ravel); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__float32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dpos0.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_dpos0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_dpos0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_dpos0.diminfo[0].strides = __pyx_pybuffernd_dpos0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dpos0.diminfo[0].shape = __pyx_pybuffernd_dpos0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_16 = 0; __pyx_v_dpos0 = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0;
310: cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos1 = numpy.ascontiguousarray(pos1.ravel(),dtype=numpy.float32)
/* "splitBBox.pyx":310 * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0 = numpy.ascontiguousarray(pos0.ravel(),dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] dpos0 = numpy.ascontiguousarray(delta_pos0.ravel(),dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos1 = numpy.ascontiguousarray(pos1.ravel(),dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float32_t, ndim = 1] dpos1 = numpy.ascontiguousarray(delta_pos1.ravel(),dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0_upper = numpy.empty(size,dtype=numpy.float32) */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_pos1), __pyx_n_s__ravel); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cpos1.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_cpos1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_cpos1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_cpos1.diminfo[0].strides = __pyx_pybuffernd_cpos1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cpos1.diminfo[0].shape = __pyx_pybuffernd_cpos1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_17 = 0; __pyx_v_cpos1 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0;
311: cdef numpy.ndarray[numpy.float32_t, ndim = 1] dpos1 = numpy.ascontiguousarray(delta_pos1.ravel(),dtype=numpy.float32)
/* "splitBBox.pyx":311 * cdef numpy.ndarray[numpy.float32_t, ndim = 1] dpos0 = numpy.ascontiguousarray(delta_pos0.ravel(),dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos1 = numpy.ascontiguousarray(pos1.ravel(),dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] dpos1 = numpy.ascontiguousarray(delta_pos1.ravel(),dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0_upper = numpy.empty(size,dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0_lower = numpy.empty(size,dtype=numpy.float32) */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_delta_pos1), __pyx_n_s__ravel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_1 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__float32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_18 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dpos1.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_dpos1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_dpos1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_dpos1.diminfo[0].strides = __pyx_pybuffernd_dpos1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dpos1.diminfo[0].shape = __pyx_pybuffernd_dpos1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_18 = 0; __pyx_v_dpos1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0;
312: cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0_upper = numpy.empty(size,dtype=numpy.float32)
/* "splitBBox.pyx":312 * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos1 = numpy.ascontiguousarray(pos1.ravel(),dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] dpos1 = numpy.ascontiguousarray(delta_pos1.ravel(),dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0_upper = numpy.empty(size,dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0_lower = numpy.empty(size,dtype=numpy.float32) * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype=numpy.float64) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__float32); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_cpos0_upper = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_cpos0_upper.diminfo[0].strides = __pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cpos0_upper.diminfo[0].shape = __pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer.shape[0]; } } __pyx_t_19 = 0; __pyx_v_cpos0_upper = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0;
313: cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0_lower = numpy.empty(size,dtype=numpy.float32)
/* "splitBBox.pyx":313 * cdef numpy.ndarray[numpy.float32_t, ndim = 1] dpos1 = numpy.ascontiguousarray(delta_pos1.ravel(),dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0_upper = numpy.empty(size,dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0_lower = numpy.empty(size,dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype=numpy.float64) */ __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_1 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float32); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_cpos0_lower = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_cpos0_lower.diminfo[0].strides = __pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cpos0_lower.diminfo[0].shape = __pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer.shape[0]; } } __pyx_t_20 = 0; __pyx_v_cpos0_lower = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0;
314: cdef numpy.ndarray[numpy.float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype=numpy.float64)
/* "splitBBox.pyx":314 * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0_upper = numpy.empty(size,dtype=numpy.float32) * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0_lower = numpy.empty(size,dtype=numpy.float32) * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float32_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype=numpy.float32) */ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__zeros); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_bins0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_bins1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_9 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__float64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outData.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { __pyx_v_outData = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_outData.diminfo[0].strides = __pyx_pybuffernd_outData.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outData.diminfo[0].shape = __pyx_pybuffernd_outData.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outData.diminfo[1].strides = __pyx_pybuffernd_outData.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outData.diminfo[1].shape = __pyx_pybuffernd_outData.rcbuffer->pybuffer.shape[1]; } } __pyx_t_21 = 0; __pyx_v_outData = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0;
315: cdef numpy.ndarray[numpy.float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype=numpy.float64)
/* "splitBBox.pyx":315 * cdef numpy.ndarray[numpy.float32_t, ndim = 1] cpos0_lower = numpy.empty(size,dtype=numpy.float32) * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float32_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype=numpy.float32) * */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_bins0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_bins1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_13)); __Pyx_GIVEREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float64); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outCount.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { __pyx_v_outCount = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_outCount.diminfo[0].strides = __pyx_pybuffernd_outCount.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outCount.diminfo[0].shape = __pyx_pybuffernd_outCount.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outCount.diminfo[1].strides = __pyx_pybuffernd_outCount.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outCount.diminfo[1].shape = __pyx_pybuffernd_outCount.rcbuffer->pybuffer.shape[1]; } } __pyx_t_22 = 0; __pyx_v_outCount = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0;
316: cdef numpy.ndarray[numpy.float32_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype=numpy.float32)
/* "splitBBox.pyx":316 * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float32_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef float min0, max0, min1, max1, deltaR, deltaL, deltaU, deltaD, deltaA, tmp, delta0, delta1 */ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__zeros); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_bins0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_bins1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_9 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__float32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_23 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outMerge.rcbuffer->pybuffer, (PyObject*)__pyx_t_23, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { __pyx_v_outMerge = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_outMerge.diminfo[0].strides = __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outMerge.diminfo[0].shape = __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outMerge.diminfo[1].strides = __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outMerge.diminfo[1].shape = __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.shape[1]; } } __pyx_t_23 = 0; __pyx_v_outMerge = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0;
317:
318: cdef float min0, max0, min1, max1, deltaR, deltaL, deltaU, deltaD, deltaA, tmp, delta0, delta1
319: cdef float pos0_min, pos0_max, pos1_min, pos1_max, pos0_maxin, pos1_maxin
320: cdef float fbin0_min, fbin0_max, fbin1_min, fbin1_max, data, epsilon = 1e-10, cdummy, ddummy
/* "splitBBox.pyx":320 * cdef float min0, max0, min1, max1, deltaR, deltaL, deltaU, deltaD, deltaA, tmp, delta0, delta1 * cdef float pos0_min, pos0_max, pos1_min, pos1_max, pos0_maxin, pos1_maxin * cdef float fbin0_min, fbin0_max, fbin1_min, fbin1_max, data, epsilon = 1e-10, cdummy, ddummy #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef ssize_t bin0_max, bin0_min, bin1_max, bin1_min * cdef bint check_mask=False, check_dummy=False, do_dark=False, do_flat=False, do_polarization=False, do_solidangle=False */ __pyx_v_epsilon = 1e-10;
321: cdef ssize_t bin0_max, bin0_min, bin1_max, bin1_min
322: cdef bint check_mask=False, check_dummy=False, do_dark=False, do_flat=False, do_polarization=False, do_solidangle=False
/* "splitBBox.pyx":322 * cdef float fbin0_min, fbin0_max, fbin1_min, fbin1_max, data, epsilon = 1e-10, cdummy, ddummy * cdef ssize_t bin0_max, bin0_min, bin1_max, bin1_min * cdef bint check_mask=False, check_dummy=False, do_dark=False, do_flat=False, do_polarization=False, do_solidangle=False #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.int8_t[:] cmask * cdef float[:] cflat, cdark, cpolarization, csolidangle */ __pyx_v_check_mask = 0; __pyx_v_check_dummy = 0; __pyx_v_do_dark = 0; __pyx_v_do_flat = 0; __pyx_v_do_polarization = 0; __pyx_v_do_solidangle = 0;
323: cdef numpy.int8_t[:] cmask
324: cdef float[:] cflat, cdark, cpolarization, csolidangle
325:
326: if mask is not None:
/* "splitBBox.pyx":326 * cdef float[:] cflat, cdark, cpolarization, csolidangle * * if mask is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert mask.size == size * check_mask = True */ __pyx_t_5 = (__pyx_v_mask != Py_None); if (__pyx_t_5) {
327: assert mask.size == size
/* "splitBBox.pyx":327 * * if mask is not None: * assert mask.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* check_mask = True * cmask = numpy.ascontiguousarray(mask.ravel(),dtype=numpy.int8) */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyObject_GetAttr(__pyx_v_mask, __pyx_n_s__size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
328: check_mask = True
/* "splitBBox.pyx":328 * if mask is not None: * assert mask.size == size * check_mask = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cmask = numpy.ascontiguousarray(mask.ravel(),dtype=numpy.int8) * */ __pyx_v_check_mask = 1;
329: cmask = numpy.ascontiguousarray(mask.ravel(),dtype=numpy.int8)
/* "splitBBox.pyx":329 * assert mask.size == size * check_mask = True * cmask = numpy.ascontiguousarray(mask.ravel(),dtype=numpy.int8) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if (dummy is not None) and delta_dummy is not None: */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_GetAttr(__pyx_v_mask, __pyx_n_s__ravel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__int8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int8_t(__pyx_t_9); if (unlikely(!__pyx_t_24.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_cmask = __pyx_t_24; __pyx_t_24.memview = NULL; __pyx_t_24.data = NULL; goto __pyx_L17; } __pyx_L17:;
330:
331: if (dummy is not None) and delta_dummy is not None:
/* "splitBBox.pyx":331 * cmask = numpy.ascontiguousarray(mask.ravel(),dtype=numpy.int8) * * if (dummy is not None) and delta_dummy is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* check_dummy = True * cdummy = float(dummy) */ __pyx_t_5 = (__pyx_v_dummy != Py_None); if (__pyx_t_5) { __pyx_t_25 = (__pyx_v_delta_dummy != Py_None); __pyx_t_26 = __pyx_t_25; } else { __pyx_t_26 = __pyx_t_5; } if (__pyx_t_26) {
332: check_dummy = True
/* "splitBBox.pyx":332 * * if (dummy is not None) and delta_dummy is not None: * check_dummy = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdummy = float(dummy) * ddummy = float(delta_dummy) */ __pyx_v_check_dummy = 1;
333: cdummy = float(dummy)
/* "splitBBox.pyx":333 * if (dummy is not None) and delta_dummy is not None: * check_dummy = True * cdummy = float(dummy) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* ddummy = float(delta_dummy) * elif (dummy is not None): */ __pyx_t_27 = __Pyx_PyObject_AsDouble(__pyx_v_dummy); if (unlikely(__pyx_t_27 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cdummy = __pyx_t_27;
334: ddummy = float(delta_dummy)
/* "splitBBox.pyx":334 * check_dummy = True * cdummy = float(dummy) * ddummy = float(delta_dummy) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* elif (dummy is not None): * cdummy = float(dummy) */ __pyx_t_27 = __Pyx_PyObject_AsDouble(__pyx_v_delta_dummy); if (unlikely(__pyx_t_27 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ddummy = __pyx_t_27; goto __pyx_L18; }
335: elif (dummy is not None):
/* "splitBBox.pyx":335 * cdummy = float(dummy) * ddummy = float(delta_dummy) * elif (dummy is not None): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdummy = float(dummy) * else: */ __pyx_t_26 = (__pyx_v_dummy != Py_None); if (__pyx_t_26) {
336: cdummy = float(dummy)
/* "splitBBox.pyx":336 * ddummy = float(delta_dummy) * elif (dummy is not None): * cdummy = float(dummy) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * cdummy=0.0 */ __pyx_t_27 = __Pyx_PyObject_AsDouble(__pyx_v_dummy); if (unlikely(__pyx_t_27 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cdummy = __pyx_t_27; goto __pyx_L18; } /*else*/ {
337: else:
338: cdummy=0.0
/* "splitBBox.pyx":338 * cdummy = float(dummy) * else: * cdummy=0.0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if dark is not None: */ __pyx_v_cdummy = 0.0; } __pyx_L18:;
339:
340: if dark is not None:
/* "splitBBox.pyx":340 * cdummy=0.0 * * if dark is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert dark.size == size * do_dark = True */ __pyx_t_26 = (__pyx_v_dark != Py_None); if (__pyx_t_26) {
341: assert dark.size == size
/* "splitBBox.pyx":341 * * if dark is not None: * assert dark.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_dark = True * cdark = numpy.ascontiguousarray(dark.ravel(),dtype=numpy.float32) */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_9 = PyObject_GetAttr(__pyx_v_dark, __pyx_n_s__size); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_t_9, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_26<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_26)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
342: do_dark = True
/* "splitBBox.pyx":342 * if dark is not None: * assert dark.size == size * do_dark = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdark = numpy.ascontiguousarray(dark.ravel(),dtype=numpy.float32) * if flat is not None: */ __pyx_v_do_dark = 1;
343: cdark = numpy.ascontiguousarray(dark.ravel(),dtype=numpy.float32)
/* "splitBBox.pyx":343 * assert dark.size == size * do_dark = True * cdark = numpy.ascontiguousarray(dark.ravel(),dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if flat is not None: * assert flat.size == size */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_GetAttr(__pyx_v_dark, __pyx_n_s__ravel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float32); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_28 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_13); if (unlikely(!__pyx_t_28.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_cdark = __pyx_t_28; __pyx_t_28.memview = NULL; __pyx_t_28.data = NULL; goto __pyx_L19; } __pyx_L19:;
344: if flat is not None:
/* "splitBBox.pyx":344 * do_dark = True * cdark = numpy.ascontiguousarray(dark.ravel(),dtype=numpy.float32) * if flat is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert flat.size == size * do_flat = True */ __pyx_t_26 = (__pyx_v_flat != Py_None); if (__pyx_t_26) {
345: assert flat.size == size
/* "splitBBox.pyx":345 * cdark = numpy.ascontiguousarray(dark.ravel(),dtype=numpy.float32) * if flat is not None: * assert flat.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_flat = True * cflat = numpy.ascontiguousarray(flat.ravel(),dtype=numpy.float32) */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_13 = PyObject_GetAttr(__pyx_v_flat, __pyx_n_s__size); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = PyObject_RichCompare(__pyx_t_13, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_26<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_26)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
346: do_flat = True
/* "splitBBox.pyx":346 * if flat is not None: * assert flat.size == size * do_flat = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cflat = numpy.ascontiguousarray(flat.ravel(),dtype=numpy.float32) * if polarization is not None: */ __pyx_v_do_flat = 1;
347: cflat = numpy.ascontiguousarray(flat.ravel(),dtype=numpy.float32)
/* "splitBBox.pyx":347 * assert flat.size == size * do_flat = True * cflat = numpy.ascontiguousarray(flat.ravel(),dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if polarization is not None: * do_polarization = True */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_GetAttr(__pyx_v_flat, __pyx_n_s__ravel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __pyx_t_28 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_1); if (unlikely(!__pyx_t_28.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_cflat = __pyx_t_28; __pyx_t_28.memview = NULL; __pyx_t_28.data = NULL; goto __pyx_L20; } __pyx_L20:;
348: if polarization is not None:
/* "splitBBox.pyx":348 * do_flat = True * cflat = numpy.ascontiguousarray(flat.ravel(),dtype=numpy.float32) * if polarization is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_polarization = True * assert polarization.size == size */ __pyx_t_26 = (__pyx_v_polarization != Py_None); if (__pyx_t_26) {
349: do_polarization = True
/* "splitBBox.pyx":349 * cflat = numpy.ascontiguousarray(flat.ravel(),dtype=numpy.float32) * if polarization is not None: * do_polarization = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert polarization.size == size * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float32) */ __pyx_v_do_polarization = 1;
350: assert polarization.size == size
/* "splitBBox.pyx":350 * if polarization is not None: * do_polarization = True * assert polarization.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float32) * if solidangle is not None: */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_1 = PyObject_GetAttr(__pyx_v_polarization, __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_26<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_26)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
351: cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float32)
/* "splitBBox.pyx":351 * do_polarization = True * assert polarization.size == size * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if solidangle is not None: * do_solidangle = True */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_GetAttr(__pyx_v_polarization, __pyx_n_s__ravel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__float32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_28 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_4); if (unlikely(!__pyx_t_28.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_cpolarization = __pyx_t_28; __pyx_t_28.memview = NULL; __pyx_t_28.data = NULL; goto __pyx_L21; } __pyx_L21:;
352: if solidangle is not None:
/* "splitBBox.pyx":352 * assert polarization.size == size * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float32) * if solidangle is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_solidangle = True * assert solidangle.size == size */ __pyx_t_26 = (__pyx_v_solidangle != Py_None); if (__pyx_t_26) {
353: do_solidangle = True
/* "splitBBox.pyx":353 * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float32) * if solidangle is not None: * do_solidangle = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert solidangle.size == size * csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float32) */ __pyx_v_do_solidangle = 1;
354: assert solidangle.size == size
/* "splitBBox.pyx":354 * if solidangle is not None: * do_solidangle = True * assert solidangle.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float32) * */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyObject_GetAttr(__pyx_v_solidangle, __pyx_n_s__size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_26<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_26)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
355: csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float32)
/* "splitBBox.pyx":355 * do_solidangle = True * assert solidangle.size == size * csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float32) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_GetAttr(__pyx_v_solidangle, __pyx_n_s__ravel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__float32); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_28 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_9); if (unlikely(!__pyx_t_28.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_csolidangle = __pyx_t_28; __pyx_t_28.memview = NULL; __pyx_t_28.data = NULL; goto __pyx_L22; } __pyx_L22:;
356:
357:
358: pos0_min=cpos0[0]
/* "splitBBox.pyx":358 * * * pos0_min=cpos0[0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_max=cpos0[0] * */ __pyx_t_29 = 0; __pyx_v_pos0_min = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_cpos0.diminfo[0].strides));
359: pos0_max=cpos0[0]
/* "splitBBox.pyx":359 * * pos0_min=cpos0[0] * pos0_max=cpos0[0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * with nogil: */ __pyx_t_30 = 0; __pyx_v_pos0_max = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_cpos0.diminfo[0].strides));
360:
361: with nogil:
/* "splitBBox.pyx":361 * pos0_max=cpos0[0] * * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for idx in range(size): * min0 = cpos0[idx] - dpos0[idx] */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "splitBBox.pyx":361 * pos0_max=cpos0[0] * * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for idx in range(size): * min0 = cpos0[idx] - dpos0[idx] */ /*finally:*/ { Py_BLOCK_THREADS } }
362: for idx in range(size):
/* "splitBBox.pyx":362 * * with nogil: * for idx in range(size): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min0 = cpos0[idx] - dpos0[idx] * max0 = cpos0[idx] + dpos0[idx] */ __pyx_t_2 = __pyx_v_size; for (__pyx_t_12 = 0; __pyx_t_12<
__pyx_t_2; __pyx_t_12+=1) { __pyx_v_idx = __pyx_t_12;
363: min0 = cpos0[idx] - dpos0[idx]
/* "splitBBox.pyx":363 * with nogil: * for idx in range(size): * min0 = cpos0[idx] - dpos0[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max0 = cpos0[idx] + dpos0[idx] * cpos0_upper[idx]=max0 */ __pyx_t_11 = __pyx_v_idx; __pyx_t_31 = __pyx_v_idx; __pyx_v_min0 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_cpos0.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_dpos0.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_dpos0.diminfo[0].strides)));
364: max0 = cpos0[idx] + dpos0[idx]
/* "splitBBox.pyx":364 * for idx in range(size): * min0 = cpos0[idx] - dpos0[idx] * max0 = cpos0[idx] + dpos0[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cpos0_upper[idx]=max0 * cpos0_lower[idx]=min0 */ __pyx_t_32 = __pyx_v_idx; __pyx_t_33 = __pyx_v_idx; __pyx_v_max0 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_cpos0.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_dpos0.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_dpos0.diminfo[0].strides)));
365: cpos0_upper[idx]=max0
/* "splitBBox.pyx":365 * min0 = cpos0[idx] - dpos0[idx] * max0 = cpos0[idx] + dpos0[idx] * cpos0_upper[idx]=max0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cpos0_lower[idx]=min0 * if max0>pos0_max: */ __pyx_t_34 = __pyx_v_idx; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_cpos0_upper.diminfo[0].strides) = __pyx_v_max0;
366: cpos0_lower[idx]=min0
/* "splitBBox.pyx":366 * max0 = cpos0[idx] + dpos0[idx] * cpos0_upper[idx]=max0 * cpos0_lower[idx]=min0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if max0>pos0_max: * pos0_max=max0 */ __pyx_t_35 = __pyx_v_idx; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_cpos0_lower.diminfo[0].strides) = __pyx_v_min0;
367: if max0>pos0_max:
/* "splitBBox.pyx":367 * cpos0_upper[idx]=max0 * cpos0_lower[idx]=min0 * if max0>pos0_max: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_max=max0 * if min0<
pos0_min: */ __pyx_t_26 = (__pyx_v_max0 > __pyx_v_pos0_max); if (__pyx_t_26) {
368: pos0_max=max0
/* "splitBBox.pyx":368 * cpos0_lower[idx]=min0 * if max0>pos0_max: * pos0_max=max0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if min0<
pos0_min: * pos0_min=min0 */ __pyx_v_pos0_max = __pyx_v_max0; goto __pyx_L28; } __pyx_L28:;
369: if min0<pos0_min:
/* "splitBBox.pyx":369 * if max0>pos0_max: * pos0_max=max0 * if min0<
pos0_min: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_min=min0 * */ __pyx_t_26 = (__pyx_v_min0<
__pyx_v_pos0_min); if (__pyx_t_26) {
370: pos0_min=min0
/* "splitBBox.pyx":370 * pos0_max=max0 * if min0<
pos0_min: * pos0_min=min0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if (pos0Range is not None) and (len(pos0Range) == 2): */ __pyx_v_pos0_min = __pyx_v_min0; goto __pyx_L29; } __pyx_L29:; } }
371:
372: if (pos0Range is not None) and (len(pos0Range) == 2):
/* "splitBBox.pyx":372 * pos0_min=min0 * * if (pos0Range is not None) and (len(pos0Range) == 2): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_min = min(pos0Range) * pos0_maxin = max(pos0Range) */ __pyx_t_26 = (__pyx_v_pos0Range != Py_None); if (__pyx_t_26) { __pyx_t_36 = PyObject_Length(__pyx_v_pos0Range); if (unlikely(__pyx_t_36 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = (__pyx_t_36 == 2); __pyx_t_25 = __pyx_t_5; } else { __pyx_t_25 = __pyx_t_26; } if (__pyx_t_25) {
373: pos0_min = min(pos0Range)
/* "splitBBox.pyx":373 * * if (pos0Range is not None) and (len(pos0Range) == 2): * pos0_min = min(pos0Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_maxin = max(pos0Range) * else: */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_pos0Range); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_pos0Range); __Pyx_GIVEREF(__pyx_v_pos0Range); __pyx_t_4 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_37 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_37 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pos0_min = __pyx_t_37;
374: pos0_maxin = max(pos0Range)
/* "splitBBox.pyx":374 * if (pos0Range is not None) and (len(pos0Range) == 2): * pos0_min = min(pos0Range) * pos0_maxin = max(pos0Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * # pos0_min = pos0_min */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_pos0Range); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pos0Range); __Pyx_GIVEREF(__pyx_v_pos0Range); __pyx_t_9 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_37 = __pyx_PyFloat_AsFloat(__pyx_t_9); if (unlikely((__pyx_t_37 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_pos0_maxin = __pyx_t_37; goto __pyx_L30; } /*else*/ {
375: else:
376: # pos0_min = pos0_min
377: pos0_maxin = pos0_max
/* "splitBBox.pyx":377 * else: * # pos0_min = pos0_min * pos0_maxin = pos0_max #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if pos0_min<
0: * pos0_min=0 */ __pyx_v_pos0_maxin = __pyx_v_pos0_max; } __pyx_L30:;
378: if pos0_min<0:
/* "splitBBox.pyx":378 * # pos0_min = pos0_min * pos0_maxin = pos0_max * if pos0_min<
0: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_min=0 * pos0_max = pos0_maxin * EPS32 */ __pyx_t_25 = (__pyx_v_pos0_min<
0.0); if (__pyx_t_25) {
379: pos0_min=0
/* "splitBBox.pyx":379 * pos0_maxin = pos0_max * if pos0_min<
0: * pos0_min=0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_max = pos0_maxin * EPS32 * */ __pyx_v_pos0_min = 0.0; goto __pyx_L31; } __pyx_L31:;
380: pos0_max = pos0_maxin * EPS32
/* "splitBBox.pyx":380 * if pos0_min<
0: * pos0_min=0 * pos0_max = pos0_maxin * EPS32 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if (pos1Range is not None) and (len(pos1Range) == 2): */ __pyx_t_9 = PyFloat_FromDouble(__pyx_v_pos0_maxin); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__EPS32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyNumber_Multiply(__pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_37 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_37 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_pos0_max = __pyx_t_37;
381:
382: if (pos1Range is not None) and (len(pos1Range) == 2):
/* "splitBBox.pyx":382 * pos0_max = pos0_maxin * EPS32 * * if (pos1Range is not None) and (len(pos1Range) == 2): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_min = min(pos1Range) * pos1_maxin = max(pos1Range) */ __pyx_t_25 = (__pyx_v_pos1Range != Py_None); if (__pyx_t_25) { __pyx_t_36 = PyObject_Length(__pyx_v_pos1Range); if (unlikely(__pyx_t_36 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_26 = (__pyx_t_36 == 2); __pyx_t_5 = __pyx_t_26; } else { __pyx_t_5 = __pyx_t_25; } if (__pyx_t_5) {
383: pos1_min = min(pos1Range)
/* "splitBBox.pyx":383 * * if (pos1Range is not None) and (len(pos1Range) == 2): * pos1_min = min(pos1Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_maxin = max(pos1Range) * else: */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_pos1Range); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_pos1Range); __Pyx_GIVEREF(__pyx_v_pos1Range); __pyx_t_4 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_37 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_37 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pos1_min = __pyx_t_37;
384: pos1_maxin = max(pos1Range)
/* "splitBBox.pyx":384 * if (pos1Range is not None) and (len(pos1Range) == 2): * pos1_min = min(pos1Range) * pos1_maxin = max(pos1Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * pos1_min = cpos1.min() */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_pos1Range); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pos1Range); __Pyx_GIVEREF(__pyx_v_pos1Range); __pyx_t_3 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_37 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_37 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_pos1_maxin = __pyx_t_37; goto __pyx_L32; } /*else*/ {
385: else:
386: pos1_min = cpos1.min()
/* "splitBBox.pyx":386 * pos1_maxin = max(pos1Range) * else: * pos1_min = cpos1.min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_maxin = cpos1.max() * pos1_max = pos1_maxin * EPS32 */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_cpos1), __pyx_n_s__min); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_37 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_37 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pos1_min = __pyx_t_37;
387: pos1_maxin = cpos1.max()
/* "splitBBox.pyx":387 * else: * pos1_min = cpos1.min() * pos1_maxin = cpos1.max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_max = pos1_maxin * EPS32 * */ __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_cpos1), __pyx_n_s__max); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_37 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_37 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_pos1_maxin = __pyx_t_37; } __pyx_L32:;
388: pos1_max = pos1_maxin * EPS32
/* "splitBBox.pyx":388 * pos1_min = cpos1.min() * pos1_maxin = cpos1.max() * pos1_max = pos1_maxin * EPS32 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * delta0 = (pos0_max - pos0_min) / (<
float > (bins0)) */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pos1_maxin); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__EPS32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_37 = __pyx_PyFloat_AsFloat(__pyx_t_9); if (unlikely((__pyx_t_37 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_pos1_max = __pyx_t_37;
389:
390: delta0 = (pos0_max - pos0_min) / (< float > (bins0))
/* "splitBBox.pyx":390 * pos1_max = pos1_maxin * EPS32 * * delta0 = (pos0_max - pos0_min) / (<
float > (bins0)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* delta1 = (pos1_max - pos1_min) / (<
float > (bins1)) * edges0 = numpy.linspace(pos0_min+0.5*delta0, pos0_maxin-0.5*delta0, bins0) */ __pyx_v_delta0 = ((__pyx_v_pos0_max - __pyx_v_pos0_min) / ((float)__pyx_v_bins0));
391: delta1 = (pos1_max - pos1_min) / (< float > (bins1))
/* "splitBBox.pyx":391 * * delta0 = (pos0_max - pos0_min) / (<
float > (bins0)) * delta1 = (pos1_max - pos1_min) / (<
float > (bins1)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* edges0 = numpy.linspace(pos0_min+0.5*delta0, pos0_maxin-0.5*delta0, bins0) * edges1 = numpy.linspace(pos1_min+0.5*delta1, pos1_maxin-0.5*delta1, bins1) */ __pyx_v_delta1 = ((__pyx_v_pos1_max - __pyx_v_pos1_min) / ((float)__pyx_v_bins1));
392: edges0 = numpy.linspace(pos0_min+0.5*delta0, pos0_maxin-0.5*delta0, bins0)
/* "splitBBox.pyx":392 * delta0 = (pos0_max - pos0_min) / (<
float > (bins0)) * delta1 = (pos1_max - pos1_min) / (<
float > (bins1)) * edges0 = numpy.linspace(pos0_min+0.5*delta0, pos0_maxin-0.5*delta0, bins0) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* edges1 = numpy.linspace(pos1_min+0.5*delta1, pos1_maxin-0.5*delta1, bins1) * with nogil: */ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__linspace); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyFloat_FromDouble((__pyx_v_pos0_min + (0.5 * __pyx_v_delta0))); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = PyFloat_FromDouble((__pyx_v_pos0_maxin - (0.5 * __pyx_v_delta0))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_bins0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_9 = 0; __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __pyx_v_edges0 = __pyx_t_1; __pyx_t_1 = 0;
393: edges1 = numpy.linspace(pos1_min+0.5*delta1, pos1_maxin-0.5*delta1, bins1)
/* "splitBBox.pyx":393 * delta1 = (pos1_max - pos1_min) / (<
float > (bins1)) * edges0 = numpy.linspace(pos0_min+0.5*delta0, pos0_maxin-0.5*delta0, bins0) * edges1 = numpy.linspace(pos1_min+0.5*delta1, pos1_maxin-0.5*delta1, bins1) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* with nogil: * for idx in range(size): */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__linspace); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyFloat_FromDouble((__pyx_v_pos1_min + (0.5 * __pyx_v_delta1))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyFloat_FromDouble((__pyx_v_pos1_maxin - (0.5 * __pyx_v_delta1))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_bins1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_v_edges1 = __pyx_t_3; __pyx_t_3 = 0;
394: with nogil:
/* "splitBBox.pyx":394 * edges0 = numpy.linspace(pos0_min+0.5*delta0, pos0_maxin-0.5*delta0, bins0) * edges1 = numpy.linspace(pos1_min+0.5*delta1, pos1_maxin-0.5*delta1, bins1) * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for idx in range(size): * if (check_mask) and cmask[idx]: */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "splitBBox.pyx":394 * edges0 = numpy.linspace(pos0_min+0.5*delta0, pos0_maxin-0.5*delta0, bins0) * edges1 = numpy.linspace(pos1_min+0.5*delta1, pos1_maxin-0.5*delta1, bins1) * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for idx in range(size): * if (check_mask) and cmask[idx]: */ /*finally:*/ { int __pyx_why; __pyx_why = 0; goto __pyx_L35; __pyx_L34: __pyx_why = 4; goto __pyx_L35; __pyx_L35:; Py_BLOCK_THREADS switch (__pyx_why) { case 4: goto __pyx_L1_error; } } }
395: for idx in range(size):
/* "splitBBox.pyx":395 * edges1 = numpy.linspace(pos1_min+0.5*delta1, pos1_maxin-0.5*delta1, bins1) * with nogil: * for idx in range(size): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if (check_mask) and cmask[idx]: * continue */ __pyx_t_2 = __pyx_v_size; for (__pyx_t_12 = 0; __pyx_t_12<
__pyx_t_2; __pyx_t_12+=1) { __pyx_v_idx = __pyx_t_12;
396: if (check_mask) and cmask[idx]:
/* "splitBBox.pyx":396 * with nogil: * for idx in range(size): * if (check_mask) and cmask[idx]: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * */ __pyx_t_5 = __pyx_v_check_mask; if (__pyx_t_5) { if (unlikely(!__pyx_v_cmask.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cmask"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L34;} } __pyx_t_38 = __pyx_v_idx; __pyx_t_25 = (*((__pyx_t_5numpy_int8_t *) ( /* dim=0 */ (__pyx_v_cmask.data + __pyx_t_38 * __pyx_v_cmask.strides[0]) ))); } else { __pyx_t_25 = __pyx_t_5; } if (__pyx_t_25) {
397: continue
/* "splitBBox.pyx":397 * for idx in range(size): * if (check_mask) and cmask[idx]: * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * data = cdata[idx] */ goto __pyx_L36_continue; goto __pyx_L38; } __pyx_L38:;
398:
399: data = cdata[idx]
/* "splitBBox.pyx":399 * continue * * data = cdata[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if (check_dummy) and (fabs(data-cdummy)<
=ddummy): * continue */ __pyx_t_39 = __pyx_v_idx; __pyx_v_data = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cdata.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cdata.diminfo[0].strides));
400: if (check_dummy) and (fabs(data-cdummy)<=ddummy):
/* "splitBBox.pyx":400 * * data = cdata[idx] * if (check_dummy) and (fabs(data-cdummy)<
=ddummy): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * */ if (__pyx_v_check_dummy) { __pyx_t_25 = (fabs((__pyx_v_data - __pyx_v_cdummy))<
= __pyx_v_ddummy); __pyx_t_5 = __pyx_t_25; } else { __pyx_t_5 = __pyx_v_check_dummy; } if (__pyx_t_5) {
401: continue
/* "splitBBox.pyx":401 * data = cdata[idx] * if (check_dummy) and (fabs(data-cdummy)<
=ddummy): * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if do_dark: */ goto __pyx_L36_continue; goto __pyx_L39; } __pyx_L39:;
402:
403: if do_dark:
/* "splitBBox.pyx":403 * continue * * if do_dark: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data -= cdark[idx] * if do_flat: */ if (__pyx_v_do_dark) {
404: data -= cdark[idx]
/* "splitBBox.pyx":404 * * if do_dark: * data -= cdark[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if do_flat: * data /= cflat[idx] */ if (unlikely(!__pyx_v_cdark.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cdark"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L34;} } __pyx_t_40 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data - (*((float *) ( /* dim=0 */ (__pyx_v_cdark.data + __pyx_t_40 * __pyx_v_cdark.strides[0]) )))); goto __pyx_L40; } __pyx_L40:;
405: if do_flat:
/* "splitBBox.pyx":405 * if do_dark: * data -= cdark[idx] * if do_flat: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data /= cflat[idx] * if do_polarization: */ if (__pyx_v_do_flat) {
406: data /= cflat[idx]
/* "splitBBox.pyx":406 * data -= cdark[idx] * if do_flat: * data /= cflat[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if do_polarization: * data /= cpolarization[idx] */ if (unlikely(!__pyx_v_cflat.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cflat"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L34;} } __pyx_t_41 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data / (*((float *) ( /* dim=0 */ (__pyx_v_cflat.data + __pyx_t_41 * __pyx_v_cflat.strides[0]) )))); goto __pyx_L41; } __pyx_L41:;
407: if do_polarization:
/* "splitBBox.pyx":407 * if do_flat: * data /= cflat[idx] * if do_polarization: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data /= cpolarization[idx] * if do_solidangle: */ if (__pyx_v_do_polarization) {
408: data /= cpolarization[idx]
/* "splitBBox.pyx":408 * data /= cflat[idx] * if do_polarization: * data /= cpolarization[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if do_solidangle: * data /= csolidangle[idx] */ if (unlikely(!__pyx_v_cpolarization.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cpolarization"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L34;} } __pyx_t_42 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data / (*((float *) ( /* dim=0 */ (__pyx_v_cpolarization.data + __pyx_t_42 * __pyx_v_cpolarization.strides[0]) )))); goto __pyx_L42; } __pyx_L42:;
409: if do_solidangle:
/* "splitBBox.pyx":409 * if do_polarization: * data /= cpolarization[idx] * if do_solidangle: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data /= csolidangle[idx] * */ if (__pyx_v_do_solidangle) {
410: data /= csolidangle[idx]
/* "splitBBox.pyx":410 * data /= cpolarization[idx] * if do_solidangle: * data /= csolidangle[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * min0 = cpos0_lower[idx] */ if (unlikely(!__pyx_v_csolidangle.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("csolidangle"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L34;} } __pyx_t_43 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data / (*((float *) ( /* dim=0 */ (__pyx_v_csolidangle.data + __pyx_t_43 * __pyx_v_csolidangle.strides[0]) )))); goto __pyx_L43; } __pyx_L43:;
411:
412: min0 = cpos0_lower[idx]
/* "splitBBox.pyx":412 * data /= csolidangle[idx] * * min0 = cpos0_lower[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max0 = cpos0_upper[idx] * min1 = cpos1[idx] - dpos1[idx] */ __pyx_t_44 = __pyx_v_idx; __pyx_v_min0 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_cpos0_lower.diminfo[0].strides));
413: max0 = cpos0_upper[idx]
/* "splitBBox.pyx":413 * * min0 = cpos0_lower[idx] * max0 = cpos0_upper[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min1 = cpos1[idx] - dpos1[idx] * max1 = cpos1[idx] + dpos1[idx] */ __pyx_t_45 = __pyx_v_idx; __pyx_v_max0 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_cpos0_upper.diminfo[0].strides));
414: min1 = cpos1[idx] - dpos1[idx]
/* "splitBBox.pyx":414 * min0 = cpos0_lower[idx] * max0 = cpos0_upper[idx] * min1 = cpos1[idx] - dpos1[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max1 = cpos1[idx] + dpos1[idx] * */ __pyx_t_46 = __pyx_v_idx; __pyx_t_47 = __pyx_v_idx; __pyx_v_min1 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos1.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_cpos1.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_dpos1.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_dpos1.diminfo[0].strides)));
415: max1 = cpos1[idx] + dpos1[idx]
/* "splitBBox.pyx":415 * max0 = cpos0_upper[idx] * min1 = cpos1[idx] - dpos1[idx] * max1 = cpos1[idx] + dpos1[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if (max0<
pos0_min) or (max1<
pos1_min) or (min0 > pos0_maxin) or (min1 > pos1_maxin) : */ __pyx_t_48 = __pyx_v_idx; __pyx_t_49 = __pyx_v_idx; __pyx_v_max1 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cpos1.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_cpos1.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_dpos1.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_dpos1.diminfo[0].strides)));
416:
417: if (max0 < pos0_min) or (max1 < pos1_min) or (min0 > pos0_maxin) or (min1 > pos1_maxin) :
/* "splitBBox.pyx":417 * max1 = cpos1[idx] + dpos1[idx] * * if (max0<
pos0_min) or (max1<
pos1_min) or (min0 > pos0_maxin) or (min1 > pos1_maxin) : #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * */ __pyx_t_5 = (__pyx_v_max0<
__pyx_v_pos0_min); if (!__pyx_t_5) { __pyx_t_25 = (__pyx_v_max1<
__pyx_v_pos1_min); if (!__pyx_t_25) { __pyx_t_26 = (__pyx_v_min0 > __pyx_v_pos0_maxin); if (!__pyx_t_26) { __pyx_t_50 = (__pyx_v_min1 > __pyx_v_pos1_maxin); __pyx_t_51 = __pyx_t_50; } else { __pyx_t_51 = __pyx_t_26; } __pyx_t_26 = __pyx_t_51; } else { __pyx_t_26 = __pyx_t_25; } __pyx_t_25 = __pyx_t_26; } else { __pyx_t_25 = __pyx_t_5; } if (__pyx_t_25) {
418: continue
/* "splitBBox.pyx":418 * * if (max0<
pos0_min) or (max1<
pos1_min) or (min0 > pos0_maxin) or (min1 > pos1_maxin) : * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if min0<
pos0_min: */ goto __pyx_L36_continue; goto __pyx_L44; } __pyx_L44:;
419:
420: if min0 < pos0_min:
/* "splitBBox.pyx":420 * continue * * if min0<
pos0_min: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min0 = pos0_min * if min1<
pos1_min: */ __pyx_t_25 = (__pyx_v_min0<
__pyx_v_pos0_min); if (__pyx_t_25) {
421: min0 = pos0_min
/* "splitBBox.pyx":421 * * if min0<
pos0_min: * min0 = pos0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if min1<
pos1_min: * min1 = pos1_min */ __pyx_v_min0 = __pyx_v_pos0_min; goto __pyx_L45; } __pyx_L45:;
422: if min1 < pos1_min:
/* "splitBBox.pyx":422 * if min0<
pos0_min: * min0 = pos0_min * if min1<
pos1_min: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min1 = pos1_min * if max0 > pos0_maxin: */ __pyx_t_25 = (__pyx_v_min1<
__pyx_v_pos1_min); if (__pyx_t_25) {
423: min1 = pos1_min
/* "splitBBox.pyx":423 * min0 = pos0_min * if min1<
pos1_min: * min1 = pos1_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if max0 > pos0_maxin: * max0 = pos0_maxin */ __pyx_v_min1 = __pyx_v_pos1_min; goto __pyx_L46; } __pyx_L46:;
424: if max0 > pos0_maxin:
/* "splitBBox.pyx":424 * if min1<
pos1_min: * min1 = pos1_min * if max0 > pos0_maxin: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max0 = pos0_maxin * if max1 > pos1_maxin: */ __pyx_t_25 = (__pyx_v_max0 > __pyx_v_pos0_maxin); if (__pyx_t_25) {
425: max0 = pos0_maxin
/* "splitBBox.pyx":425 * min1 = pos1_min * if max0 > pos0_maxin: * max0 = pos0_maxin #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if max1 > pos1_maxin: * max1 = pos1_maxin */ __pyx_v_max0 = __pyx_v_pos0_maxin; goto __pyx_L47; } __pyx_L47:;
426: if max1 > pos1_maxin:
/* "splitBBox.pyx":426 * if max0 > pos0_maxin: * max0 = pos0_maxin * if max1 > pos1_maxin: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max1 = pos1_maxin * */ __pyx_t_25 = (__pyx_v_max1 > __pyx_v_pos1_maxin); if (__pyx_t_25) {
427: max1 = pos1_maxin
/* "splitBBox.pyx":427 * max0 = pos0_maxin * if max1 > pos1_maxin: * max1 = pos1_maxin #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * */ __pyx_v_max1 = __pyx_v_pos1_maxin; goto __pyx_L48; } __pyx_L48:;
428:
429:
430: fbin0_min = getBinNr(min0, pos0_min, delta0)
/* "splitBBox.pyx":430 * * * fbin0_min = getBinNr(min0, pos0_min, delta0) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* fbin0_max = getBinNr(max0, pos0_min, delta0) * fbin1_min = getBinNr(min1, pos1_min, delta1) */ __pyx_v_fbin0_min = __pyx_f_9splitBBox_getBinNr(__pyx_v_min0, __pyx_v_pos0_min, __pyx_v_delta0);
431: fbin0_max = getBinNr(max0, pos0_min, delta0)
/* "splitBBox.pyx":431 * * fbin0_min = getBinNr(min0, pos0_min, delta0) * fbin0_max = getBinNr(max0, pos0_min, delta0) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* fbin1_min = getBinNr(min1, pos1_min, delta1) * fbin1_max = getBinNr(max1, pos1_min, delta1) */ __pyx_v_fbin0_max = __pyx_f_9splitBBox_getBinNr(__pyx_v_max0, __pyx_v_pos0_min, __pyx_v_delta0);
432: fbin1_min = getBinNr(min1, pos1_min, delta1)
/* "splitBBox.pyx":432 * fbin0_min = getBinNr(min0, pos0_min, delta0) * fbin0_max = getBinNr(max0, pos0_min, delta0) * fbin1_min = getBinNr(min1, pos1_min, delta1) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* fbin1_max = getBinNr(max1, pos1_min, delta1) * */ __pyx_v_fbin1_min = __pyx_f_9splitBBox_getBinNr(__pyx_v_min1, __pyx_v_pos1_min, __pyx_v_delta1);
433: fbin1_max = getBinNr(max1, pos1_min, delta1)
/* "splitBBox.pyx":433 * fbin0_max = getBinNr(max0, pos0_min, delta0) * fbin1_min = getBinNr(min1, pos1_min, delta1) * fbin1_max = getBinNr(max1, pos1_min, delta1) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * bin0_min =<
ssize_t> fbin0_min */ __pyx_v_fbin1_max = __pyx_f_9splitBBox_getBinNr(__pyx_v_max1, __pyx_v_pos1_min, __pyx_v_delta1);
434:
435: bin0_min = <ssize_t> fbin0_min
/* "splitBBox.pyx":435 * fbin1_max = getBinNr(max1, pos1_min, delta1) * * bin0_min =<
ssize_t> fbin0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bin0_max =<
ssize_t> fbin0_max * bin1_min =<
ssize_t> fbin1_min */ __pyx_v_bin0_min = ((Py_ssize_t)__pyx_v_fbin0_min);
436: bin0_max = <ssize_t> fbin0_max
/* "splitBBox.pyx":436 * * bin0_min =<
ssize_t> fbin0_min * bin0_max =<
ssize_t> fbin0_max #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bin1_min =<
ssize_t> fbin1_min * bin1_max =<
ssize_t> fbin1_max */ __pyx_v_bin0_max = ((Py_ssize_t)__pyx_v_fbin0_max);
437: bin1_min = <ssize_t> fbin1_min
/* "splitBBox.pyx":437 * bin0_min =<
ssize_t> fbin0_min * bin0_max =<
ssize_t> fbin0_max * bin1_min =<
ssize_t> fbin1_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bin1_max =<
ssize_t> fbin1_max * */ __pyx_v_bin1_min = ((Py_ssize_t)__pyx_v_fbin1_min);
438: bin1_max = <ssize_t> fbin1_max
/* "splitBBox.pyx":438 * bin0_max =<
ssize_t> fbin0_max * bin1_min =<
ssize_t> fbin1_min * bin1_max =<
ssize_t> fbin1_max #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * */ __pyx_v_bin1_max = ((Py_ssize_t)__pyx_v_fbin1_max);
439:
440:
441: if bin0_min == bin0_max:
/* "splitBBox.pyx":441 * * * if bin0_min == bin0_max: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if bin1_min == bin1_max: * #All pixel is within a single bin */ __pyx_t_25 = (__pyx_v_bin0_min == __pyx_v_bin0_max); if (__pyx_t_25) {
442: if bin1_min == bin1_max:
/* "splitBBox.pyx":442 * * if bin0_min == bin0_max: * if bin1_min == bin1_max: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* #All pixel is within a single bin * outCount[bin0_min, bin1_min] += 1.0 */ __pyx_t_25 = (__pyx_v_bin1_min == __pyx_v_bin1_max); if (__pyx_t_25) {
443: #All pixel is within a single bin
444: outCount[bin0_min, bin1_min] += 1.0
/* "splitBBox.pyx":444 * if bin1_min == bin1_max: * #All pixel is within a single bin * outCount[bin0_min, bin1_min] += 1.0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min, bin1_min] += data * else: */ __pyx_t_52 = __pyx_v_bin0_min; __pyx_t_53 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_52, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_53, __pyx_pybuffernd_outCount.diminfo[1].strides) += 1.0;
445: outData[bin0_min, bin1_min] += data
/* "splitBBox.pyx":445 * #All pixel is within a single bin * outCount[bin0_min, bin1_min] += 1.0 * outData[bin0_min, bin1_min] += data #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * #spread on more than 2 bins */ __pyx_t_54 = __pyx_v_bin0_min; __pyx_t_55 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_54, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_55, __pyx_pybuffernd_outData.diminfo[1].strides) += __pyx_v_data; goto __pyx_L50; } /*else*/ {
446: else:
447: #spread on more than 2 bins
448: deltaD = (< float > (bin1_min + 1)) - fbin1_min
/* "splitBBox.pyx":448 * else: * #spread on more than 2 bins * deltaD = (<
float > (bin1_min + 1)) - fbin1_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaU = fbin1_max - ( bin1_max) * deltaA = 1.0 / (fbin1_max - fbin1_min) */ __pyx_v_deltaD = (((float)(__pyx_v_bin1_min + 1)) - __pyx_v_fbin1_min);
449: deltaU = fbin1_max - ( bin1_max)
/* "splitBBox.pyx":449 * #spread on more than 2 bins * deltaD = (<
float > (bin1_min + 1)) - fbin1_min * deltaU = fbin1_max - ( bin1_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaA = 1.0 / (fbin1_max - fbin1_min) * */ __pyx_v_deltaU = (__pyx_v_fbin1_max - __pyx_v_bin1_max);
450: deltaA = 1.0 / (fbin1_max - fbin1_min)
/* "splitBBox.pyx":450 * deltaD = (<
float > (bin1_min + 1)) - fbin1_min * deltaU = fbin1_max - ( bin1_max) * deltaA = 1.0 / (fbin1_max - fbin1_min) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * outCount[bin0_min, bin1_min] += deltaA * deltaD */ __pyx_v_deltaA = (1.0 / (__pyx_v_fbin1_max - __pyx_v_fbin1_min));
451:
452: outCount[bin0_min, bin1_min] += deltaA * deltaD
/* "splitBBox.pyx":452 * deltaA = 1.0 / (fbin1_max - fbin1_min) * * outCount[bin0_min, bin1_min] += deltaA * deltaD #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min, bin1_min] += data * deltaA * deltaD * */ __pyx_t_56 = __pyx_v_bin0_min; __pyx_t_57 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_56, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_57, __pyx_pybuffernd_outCount.diminfo[1].strides) += (__pyx_v_deltaA * __pyx_v_deltaD);
453: outData[bin0_min, bin1_min] += data * deltaA * deltaD
/* "splitBBox.pyx":453 * * outCount[bin0_min, bin1_min] += deltaA * deltaD * outData[bin0_min, bin1_min] += data * deltaA * deltaD #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * outCount[bin0_min, bin1_max] += deltaA * deltaU */ __pyx_t_58 = __pyx_v_bin0_min; __pyx_t_59 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_58, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_59, __pyx_pybuffernd_outData.diminfo[1].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaD);
454:
455: outCount[bin0_min, bin1_max] += deltaA * deltaU
/* "splitBBox.pyx":455 * outData[bin0_min, bin1_min] += data * deltaA * deltaD * * outCount[bin0_min, bin1_max] += deltaA * deltaU #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min, bin1_max] += data * deltaA * deltaU * for j in range(bin1_min + 1, bin1_max): */ __pyx_t_60 = __pyx_v_bin0_min; __pyx_t_61 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_60, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_61, __pyx_pybuffernd_outCount.diminfo[1].strides) += (__pyx_v_deltaA * __pyx_v_deltaU);
456: outData[bin0_min, bin1_max] += data * deltaA * deltaU
/* "splitBBox.pyx":456 * * outCount[bin0_min, bin1_max] += deltaA * deltaU * outData[bin0_min, bin1_max] += data * deltaA * deltaU #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for j in range(bin1_min + 1, bin1_max): * outCount[bin0_min, j] += deltaA */ __pyx_t_62 = __pyx_v_bin0_min; __pyx_t_63 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_62, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_63, __pyx_pybuffernd_outData.diminfo[1].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaU);
457: for j in range(bin1_min + 1, bin1_max):
/* "splitBBox.pyx":457 * outCount[bin0_min, bin1_max] += deltaA * deltaU * outData[bin0_min, bin1_max] += data * deltaA * deltaU * for j in range(bin1_min + 1, bin1_max): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[bin0_min, j] += deltaA * outData[bin0_min, j] += data * deltaA */ __pyx_t_64 = __pyx_v_bin1_max; for (__pyx_t_65 = (__pyx_v_bin1_min + 1); __pyx_t_65<
__pyx_t_64; __pyx_t_65+=1) { __pyx_v_j = __pyx_t_65;
458: outCount[bin0_min, j] += deltaA
/* "splitBBox.pyx":458 * outData[bin0_min, bin1_max] += data * deltaA * deltaU * for j in range(bin1_min + 1, bin1_max): * outCount[bin0_min, j] += deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min, j] += data * deltaA * */ __pyx_t_66 = __pyx_v_bin0_min; __pyx_t_67 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_66, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_67, __pyx_pybuffernd_outCount.diminfo[1].strides) += __pyx_v_deltaA;
459: outData[bin0_min, j] += data * deltaA
/* "splitBBox.pyx":459 * for j in range(bin1_min + 1, bin1_max): * outCount[bin0_min, j] += deltaA * outData[bin0_min, j] += data * deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * else: #spread on more than 2 bins in dim 0 */ __pyx_t_68 = __pyx_v_bin0_min; __pyx_t_69 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_68, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_69, __pyx_pybuffernd_outData.diminfo[1].strides) += (__pyx_v_data * __pyx_v_deltaA); } } __pyx_L50:; goto __pyx_L49; } /*else*/ {
460:
461: else: #spread on more than 2 bins in dim 0
462: if bin1_min == bin1_max:
/* "splitBBox.pyx":462 * * else: #spread on more than 2 bins in dim 0 * if bin1_min == bin1_max: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* #All pixel fall on 1 bins in dim 1 * deltaA = 1.0 / (fbin0_max - fbin0_min) */ __pyx_t_25 = (__pyx_v_bin1_min == __pyx_v_bin1_max); if (__pyx_t_25) {
463: #All pixel fall on 1 bins in dim 1
464: deltaA = 1.0 / (fbin0_max - fbin0_min)
/* "splitBBox.pyx":464 * if bin1_min == bin1_max: * #All pixel fall on 1 bins in dim 1 * deltaA = 1.0 / (fbin0_max - fbin0_min) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaL = (<
float > (bin0_min + 1)) - fbin0_min * outCount[bin0_min, bin1_min] += deltaA * deltaL */ __pyx_v_deltaA = (1.0 / (__pyx_v_fbin0_max - __pyx_v_fbin0_min));
465: deltaL = (< float > (bin0_min + 1)) - fbin0_min
/* "splitBBox.pyx":465 * #All pixel fall on 1 bins in dim 1 * deltaA = 1.0 / (fbin0_max - fbin0_min) * deltaL = (<
float > (bin0_min + 1)) - fbin0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[bin0_min, bin1_min] += deltaA * deltaL * outData[bin0_min, bin1_min] += data * deltaA * deltaL */ __pyx_v_deltaL = (((float)(__pyx_v_bin0_min + 1)) - __pyx_v_fbin0_min);
466: outCount[bin0_min, bin1_min] += deltaA * deltaL
/* "splitBBox.pyx":466 * deltaA = 1.0 / (fbin0_max - fbin0_min) * deltaL = (<
float > (bin0_min + 1)) - fbin0_min * outCount[bin0_min, bin1_min] += deltaA * deltaL #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min, bin1_min] += data * deltaA * deltaL * deltaR = fbin0_max - (<
float > bin0_max) */ __pyx_t_64 = __pyx_v_bin0_min; __pyx_t_65 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_64, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_65, __pyx_pybuffernd_outCount.diminfo[1].strides) += (__pyx_v_deltaA * __pyx_v_deltaL);
467: outData[bin0_min, bin1_min] += data * deltaA * deltaL
/* "splitBBox.pyx":467 * deltaL = (<
float > (bin0_min + 1)) - fbin0_min * outCount[bin0_min, bin1_min] += deltaA * deltaL * outData[bin0_min, bin1_min] += data * deltaA * deltaL #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaR = fbin0_max - (<
float > bin0_max) * outCount[bin0_max, bin1_min] += deltaA * deltaR */ __pyx_t_70 = __pyx_v_bin0_min; __pyx_t_71 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_70, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_71, __pyx_pybuffernd_outData.diminfo[1].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaL);
468: deltaR = fbin0_max - (< float > bin0_max)
/* "splitBBox.pyx":468 * outCount[bin0_min, bin1_min] += deltaA * deltaL * outData[bin0_min, bin1_min] += data * deltaA * deltaL * deltaR = fbin0_max - (<
float > bin0_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[bin0_max, bin1_min] += deltaA * deltaR * outData[bin0_max, bin1_min] += data * deltaA * deltaR */ __pyx_v_deltaR = (__pyx_v_fbin0_max - ((float)__pyx_v_bin0_max));
469: outCount[bin0_max, bin1_min] += deltaA * deltaR
/* "splitBBox.pyx":469 * outData[bin0_min, bin1_min] += data * deltaA * deltaL * deltaR = fbin0_max - (<
float > bin0_max) * outCount[bin0_max, bin1_min] += deltaA * deltaR #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_max, bin1_min] += data * deltaA * deltaR * for i in range(bin0_min + 1, bin0_max): */ __pyx_t_72 = __pyx_v_bin0_max; __pyx_t_73 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_72, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_73, __pyx_pybuffernd_outCount.diminfo[1].strides) += (__pyx_v_deltaA * __pyx_v_deltaR);
470: outData[bin0_max, bin1_min] += data * deltaA * deltaR
/* "splitBBox.pyx":470 * deltaR = fbin0_max - (<
float > bin0_max) * outCount[bin0_max, bin1_min] += deltaA * deltaR * outData[bin0_max, bin1_min] += data * deltaA * deltaR #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for i in range(bin0_min + 1, bin0_max): * outCount[i, bin1_min] += deltaA */ __pyx_t_74 = __pyx_v_bin0_max; __pyx_t_75 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_74, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_75, __pyx_pybuffernd_outData.diminfo[1].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaR);
471: for i in range(bin0_min + 1, bin0_max):
/* "splitBBox.pyx":471 * outCount[bin0_max, bin1_min] += deltaA * deltaR * outData[bin0_max, bin1_min] += data * deltaA * deltaR * for i in range(bin0_min + 1, bin0_max): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[i, bin1_min] += deltaA * outData[i, bin1_min] += data * deltaA */ __pyx_t_76 = __pyx_v_bin0_max; for (__pyx_t_77 = (__pyx_v_bin0_min + 1); __pyx_t_77<
__pyx_t_76; __pyx_t_77+=1) { __pyx_v_i = __pyx_t_77;
472: outCount[i, bin1_min] += deltaA
/* "splitBBox.pyx":472 * outData[bin0_max, bin1_min] += data * deltaA * deltaR * for i in range(bin0_min + 1, bin0_max): * outCount[i, bin1_min] += deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[i, bin1_min] += data * deltaA * else: */ __pyx_t_78 = __pyx_v_i; __pyx_t_79 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_78, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_79, __pyx_pybuffernd_outCount.diminfo[1].strides) += __pyx_v_deltaA;
473: outData[i, bin1_min] += data * deltaA
/* "splitBBox.pyx":473 * for i in range(bin0_min + 1, bin0_max): * outCount[i, bin1_min] += deltaA * outData[i, bin1_min] += data * deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * #spread on n pix in dim0 and m pixel in dim1: */ __pyx_t_80 = __pyx_v_i; __pyx_t_81 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_80, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_81, __pyx_pybuffernd_outData.diminfo[1].strides) += (__pyx_v_data * __pyx_v_deltaA); } goto __pyx_L53; } /*else*/ {
474: else:
475: #spread on n pix in dim0 and m pixel in dim1:
476: deltaL = (< float > (bin0_min + 1)) - fbin0_min
/* "splitBBox.pyx":476 * else: * #spread on n pix in dim0 and m pixel in dim1: * deltaL = (<
float > (bin0_min + 1)) - fbin0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaR = fbin0_max - (<
float > bin0_max) * deltaD = (<
float > (bin1_min + 1)) - fbin1_min */ __pyx_v_deltaL = (((float)(__pyx_v_bin0_min + 1)) - __pyx_v_fbin0_min);
477: deltaR = fbin0_max - (< float > bin0_max)
/* "splitBBox.pyx":477 * #spread on n pix in dim0 and m pixel in dim1: * deltaL = (<
float > (bin0_min + 1)) - fbin0_min * deltaR = fbin0_max - (<
float > bin0_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaD = (<
float > (bin1_min + 1)) - fbin1_min * deltaU = fbin1_max - (<
float > bin1_max) */ __pyx_v_deltaR = (__pyx_v_fbin0_max - ((float)__pyx_v_bin0_max));
478: deltaD = (< float > (bin1_min + 1)) - fbin1_min
/* "splitBBox.pyx":478 * deltaL = (<
float > (bin0_min + 1)) - fbin0_min * deltaR = fbin0_max - (<
float > bin0_max) * deltaD = (<
float > (bin1_min + 1)) - fbin1_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaU = fbin1_max - (<
float > bin1_max) * deltaA = 1.0 / ((fbin0_max - fbin0_min) * (fbin1_max - fbin1_min)) */ __pyx_v_deltaD = (((float)(__pyx_v_bin1_min + 1)) - __pyx_v_fbin1_min);
479: deltaU = fbin1_max - (< float > bin1_max)
/* "splitBBox.pyx":479 * deltaR = fbin0_max - (<
float > bin0_max) * deltaD = (<
float > (bin1_min + 1)) - fbin1_min * deltaU = fbin1_max - (<
float > bin1_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaA = 1.0 / ((fbin0_max - fbin0_min) * (fbin1_max - fbin1_min)) * */ __pyx_v_deltaU = (__pyx_v_fbin1_max - ((float)__pyx_v_bin1_max));
480: deltaA = 1.0 / ((fbin0_max - fbin0_min) * (fbin1_max - fbin1_min))
/* "splitBBox.pyx":480 * deltaD = (<
float > (bin1_min + 1)) - fbin1_min * deltaU = fbin1_max - (<
float > bin1_max) * deltaA = 1.0 / ((fbin0_max - fbin0_min) * (fbin1_max - fbin1_min)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * outCount[bin0_min, bin1_min] += deltaA * deltaL * deltaD */ __pyx_v_deltaA = (1.0 / ((__pyx_v_fbin0_max - __pyx_v_fbin0_min) * (__pyx_v_fbin1_max - __pyx_v_fbin1_min)));
481:
482: outCount[bin0_min, bin1_min] += deltaA * deltaL * deltaD
/* "splitBBox.pyx":482 * deltaA = 1.0 / ((fbin0_max - fbin0_min) * (fbin1_max - fbin1_min)) * * outCount[bin0_min, bin1_min] += deltaA * deltaL * deltaD #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min, bin1_min] += data * deltaA * deltaL * deltaD * */ __pyx_t_76 = __pyx_v_bin0_min; __pyx_t_77 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_76, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_77, __pyx_pybuffernd_outCount.diminfo[1].strides) += ((__pyx_v_deltaA * __pyx_v_deltaL) * __pyx_v_deltaD);
483: outData[bin0_min, bin1_min] += data * deltaA * deltaL * deltaD
/* "splitBBox.pyx":483 * * outCount[bin0_min, bin1_min] += deltaA * deltaL * deltaD * outData[bin0_min, bin1_min] += data * deltaA * deltaL * deltaD #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * outCount[bin0_min, bin1_max] += deltaA * deltaL * deltaU */ __pyx_t_82 = __pyx_v_bin0_min; __pyx_t_83 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_82, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_83, __pyx_pybuffernd_outData.diminfo[1].strides) += (((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaL) * __pyx_v_deltaD);
484:
485: outCount[bin0_min, bin1_max] += deltaA * deltaL * deltaU
/* "splitBBox.pyx":485 * outData[bin0_min, bin1_min] += data * deltaA * deltaL * deltaD * * outCount[bin0_min, bin1_max] += deltaA * deltaL * deltaU #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min, bin1_max] += data * deltaA * deltaL * deltaU * */ __pyx_t_84 = __pyx_v_bin0_min; __pyx_t_85 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_84, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_85, __pyx_pybuffernd_outCount.diminfo[1].strides) += ((__pyx_v_deltaA * __pyx_v_deltaL) * __pyx_v_deltaU);
486: outData[bin0_min, bin1_max] += data * deltaA * deltaL * deltaU
/* "splitBBox.pyx":486 * * outCount[bin0_min, bin1_max] += deltaA * deltaL * deltaU * outData[bin0_min, bin1_max] += data * deltaA * deltaL * deltaU #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * outCount[bin0_max, bin1_min] += deltaA * deltaR * deltaD */ __pyx_t_86 = __pyx_v_bin0_min; __pyx_t_87 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_86, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_87, __pyx_pybuffernd_outData.diminfo[1].strides) += (((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaL) * __pyx_v_deltaU);
487:
488: outCount[bin0_max, bin1_min] += deltaA * deltaR * deltaD
/* "splitBBox.pyx":488 * outData[bin0_min, bin1_max] += data * deltaA * deltaL * deltaU * * outCount[bin0_max, bin1_min] += deltaA * deltaR * deltaD #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_max, bin1_min] += data * deltaA * deltaR * deltaD * */ __pyx_t_88 = __pyx_v_bin0_max; __pyx_t_89 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_88, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_89, __pyx_pybuffernd_outCount.diminfo[1].strides) += ((__pyx_v_deltaA * __pyx_v_deltaR) * __pyx_v_deltaD);
489: outData[bin0_max, bin1_min] += data * deltaA * deltaR * deltaD
/* "splitBBox.pyx":489 * * outCount[bin0_max, bin1_min] += deltaA * deltaR * deltaD * outData[bin0_max, bin1_min] += data * deltaA * deltaR * deltaD #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * outCount[bin0_max, bin1_max] += deltaA * deltaR * deltaU */ __pyx_t_90 = __pyx_v_bin0_max; __pyx_t_91 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_90, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_91, __pyx_pybuffernd_outData.diminfo[1].strides) += (((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaR) * __pyx_v_deltaD);
490:
491: outCount[bin0_max, bin1_max] += deltaA * deltaR * deltaU
/* "splitBBox.pyx":491 * outData[bin0_max, bin1_min] += data * deltaA * deltaR * deltaD * * outCount[bin0_max, bin1_max] += deltaA * deltaR * deltaU #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_max, bin1_max] += data * deltaA * deltaR * deltaU * for i in range(bin0_min + 1, bin0_max): */ __pyx_t_92 = __pyx_v_bin0_max; __pyx_t_93 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_92, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_93, __pyx_pybuffernd_outCount.diminfo[1].strides) += ((__pyx_v_deltaA * __pyx_v_deltaR) * __pyx_v_deltaU);
492: outData[bin0_max, bin1_max] += data * deltaA * deltaR * deltaU
/* "splitBBox.pyx":492 * * outCount[bin0_max, bin1_max] += deltaA * deltaR * deltaU * outData[bin0_max, bin1_max] += data * deltaA * deltaR * deltaU #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for i in range(bin0_min + 1, bin0_max): * outCount[i, bin1_min] += deltaA * deltaD */ __pyx_t_94 = __pyx_v_bin0_max; __pyx_t_95 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_94, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_95, __pyx_pybuffernd_outData.diminfo[1].strides) += (((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaR) * __pyx_v_deltaU);
493: for i in range(bin0_min + 1, bin0_max):
/* "splitBBox.pyx":493 * outCount[bin0_max, bin1_max] += deltaA * deltaR * deltaU * outData[bin0_max, bin1_max] += data * deltaA * deltaR * deltaU * for i in range(bin0_min + 1, bin0_max): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[i, bin1_min] += deltaA * deltaD * outData[i, bin1_min] += data * deltaA * deltaD */ __pyx_t_96 = __pyx_v_bin0_max; for (__pyx_t_97 = (__pyx_v_bin0_min + 1); __pyx_t_97<
__pyx_t_96; __pyx_t_97+=1) { __pyx_v_i = __pyx_t_97;
494: outCount[i, bin1_min] += deltaA * deltaD
/* "splitBBox.pyx":494 * outData[bin0_max, bin1_max] += data * deltaA * deltaR * deltaU * for i in range(bin0_min + 1, bin0_max): * outCount[i, bin1_min] += deltaA * deltaD #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[i, bin1_min] += data * deltaA * deltaD * for j in range(bin1_min + 1, bin1_max): */ __pyx_t_98 = __pyx_v_i; __pyx_t_99 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_98, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_99, __pyx_pybuffernd_outCount.diminfo[1].strides) += (__pyx_v_deltaA * __pyx_v_deltaD);
495: outData[i, bin1_min] += data * deltaA * deltaD
/* "splitBBox.pyx":495 * for i in range(bin0_min + 1, bin0_max): * outCount[i, bin1_min] += deltaA * deltaD * outData[i, bin1_min] += data * deltaA * deltaD #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for j in range(bin1_min + 1, bin1_max): * outCount[i, j] += deltaA */ __pyx_t_100 = __pyx_v_i; __pyx_t_101 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_101, __pyx_pybuffernd_outData.diminfo[1].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaD);
496: for j in range(bin1_min + 1, bin1_max):
/* "splitBBox.pyx":496 * outCount[i, bin1_min] += deltaA * deltaD * outData[i, bin1_min] += data * deltaA * deltaD * for j in range(bin1_min + 1, bin1_max): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[i, j] += deltaA * outData[i, j] += data * deltaA */ __pyx_t_102 = __pyx_v_bin1_max; for (__pyx_t_103 = (__pyx_v_bin1_min + 1); __pyx_t_103<
__pyx_t_102; __pyx_t_103+=1) { __pyx_v_j = __pyx_t_103;
497: outCount[i, j] += deltaA
/* "splitBBox.pyx":497 * outData[i, bin1_min] += data * deltaA * deltaD * for j in range(bin1_min + 1, bin1_max): * outCount[i, j] += deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[i, j] += data * deltaA * outCount[i, bin1_max] += deltaA * deltaU */ __pyx_t_104 = __pyx_v_i; __pyx_t_105 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_104, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_105, __pyx_pybuffernd_outCount.diminfo[1].strides) += __pyx_v_deltaA;
498: outData[i, j] += data * deltaA
/* "splitBBox.pyx":498 * for j in range(bin1_min + 1, bin1_max): * outCount[i, j] += deltaA * outData[i, j] += data * deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[i, bin1_max] += deltaA * deltaU * outData[i, bin1_max] += data * deltaA * deltaU */ __pyx_t_106 = __pyx_v_i; __pyx_t_107 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_106, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_107, __pyx_pybuffernd_outData.diminfo[1].strides) += (__pyx_v_data * __pyx_v_deltaA); }
499: outCount[i, bin1_max] += deltaA * deltaU
/* "splitBBox.pyx":499 * outCount[i, j] += deltaA * outData[i, j] += data * deltaA * outCount[i, bin1_max] += deltaA * deltaU #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[i, bin1_max] += data * deltaA * deltaU * for j in range(bin1_min + 1, bin1_max): */ __pyx_t_102 = __pyx_v_i; __pyx_t_103 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_102, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_103, __pyx_pybuffernd_outCount.diminfo[1].strides) += (__pyx_v_deltaA * __pyx_v_deltaU);
500: outData[i, bin1_max] += data * deltaA * deltaU
/* "splitBBox.pyx":500 * outData[i, j] += data * deltaA * outCount[i, bin1_max] += deltaA * deltaU * outData[i, bin1_max] += data * deltaA * deltaU #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for j in range(bin1_min + 1, bin1_max): * outCount[bin0_min, j] += deltaA * deltaL */ __pyx_t_108 = __pyx_v_i; __pyx_t_109 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_108, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_109, __pyx_pybuffernd_outData.diminfo[1].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaU); }
501: for j in range(bin1_min + 1, bin1_max):
/* "splitBBox.pyx":501 * outCount[i, bin1_max] += deltaA * deltaU * outData[i, bin1_max] += data * deltaA * deltaU * for j in range(bin1_min + 1, bin1_max): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[bin0_min, j] += deltaA * deltaL * outData[bin0_min, j] += data * deltaA * deltaL */ __pyx_t_96 = __pyx_v_bin1_max; for (__pyx_t_97 = (__pyx_v_bin1_min + 1); __pyx_t_97<
__pyx_t_96; __pyx_t_97+=1) { __pyx_v_j = __pyx_t_97;
502: outCount[bin0_min, j] += deltaA * deltaL
/* "splitBBox.pyx":502 * outData[i, bin1_max] += data * deltaA * deltaU * for j in range(bin1_min + 1, bin1_max): * outCount[bin0_min, j] += deltaA * deltaL #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min, j] += data * deltaA * deltaL * */ __pyx_t_110 = __pyx_v_bin0_min; __pyx_t_111 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_110, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_111, __pyx_pybuffernd_outCount.diminfo[1].strides) += (__pyx_v_deltaA * __pyx_v_deltaL);
503: outData[bin0_min, j] += data * deltaA * deltaL
/* "splitBBox.pyx":503 * for j in range(bin1_min + 1, bin1_max): * outCount[bin0_min, j] += deltaA * deltaL * outData[bin0_min, j] += data * deltaA * deltaL #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * outCount[bin0_max, j] += deltaA * deltaR */ __pyx_t_112 = __pyx_v_bin0_min; __pyx_t_113 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_112, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_113, __pyx_pybuffernd_outData.diminfo[1].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaL);
504:
505: outCount[bin0_max, j] += deltaA * deltaR
/* "splitBBox.pyx":505 * outData[bin0_min, j] += data * deltaA * deltaL * * outCount[bin0_max, j] += deltaA * deltaR #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_max, j] += data * deltaA * deltaR * */ __pyx_t_114 = __pyx_v_bin0_max; __pyx_t_115 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_114, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_115, __pyx_pybuffernd_outCount.diminfo[1].strides) += (__pyx_v_deltaA * __pyx_v_deltaR);
506: outData[bin0_max, j] += data * deltaA * deltaR
/* "splitBBox.pyx":506 * * outCount[bin0_max, j] += deltaA * deltaR * outData[bin0_max, j] += data * deltaA * deltaR #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * for i in range(bins0): */ __pyx_t_116 = __pyx_v_bin0_max; __pyx_t_117 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_116, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_117, __pyx_pybuffernd_outData.diminfo[1].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaR); } } __pyx_L53:; } __pyx_L49:; __pyx_L36_continue:; }
507:
508: for i in range(bins0):
/* "splitBBox.pyx":508 * outData[bin0_max, j] += data * deltaA * deltaR * * for i in range(bins0): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for j in range(bins1): * if outCount[i, j] > epsilon: */ __pyx_t_12 = __pyx_v_bins0; for (__pyx_t_96 = 0; __pyx_t_96<
__pyx_t_12; __pyx_t_96+=1) { __pyx_v_i = __pyx_t_96;
509: for j in range(bins1):
/* "splitBBox.pyx":509 * * for i in range(bins0): * for j in range(bins1): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if outCount[i, j] > epsilon: * outMerge[i, j] =<
float> (outData[i, j] / outCount[i, j]) */ __pyx_t_97 = __pyx_v_bins1; for (__pyx_t_118 = 0; __pyx_t_118<
__pyx_t_97; __pyx_t_118+=1) { __pyx_v_j = __pyx_t_118;
510: if outCount[i, j] > epsilon:
/* "splitBBox.pyx":510 * for i in range(bins0): * for j in range(bins1): * if outCount[i, j] > epsilon: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outMerge[i, j] =<
float> (outData[i, j] / outCount[i, j]) * else: */ __pyx_t_119 = __pyx_v_i; __pyx_t_120 = __pyx_v_j; __pyx_t_25 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_119, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_120, __pyx_pybuffernd_outCount.diminfo[1].strides)) > __pyx_v_epsilon); if (__pyx_t_25) {
511: outMerge[i, j] = <float> (outData[i, j] / outCount[i, j])
/* "splitBBox.pyx":511 * for j in range(bins1): * if outCount[i, j] > epsilon: * outMerge[i, j] =<
float> (outData[i, j] / outCount[i, j]) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * outMerge[i, j] = cdummy */ __pyx_t_121 = __pyx_v_i; __pyx_t_122 = __pyx_v_j; __pyx_t_123 = __pyx_v_i; __pyx_t_124 = __pyx_v_j; __pyx_t_125 = __pyx_v_i; __pyx_t_126 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.buf, __pyx_t_125, __pyx_pybuffernd_outMerge.diminfo[0].strides, __pyx_t_126, __pyx_pybuffernd_outMerge.diminfo[1].strides) = ((float)((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_121, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_122, __pyx_pybuffernd_outData.diminfo[1].strides)) / (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_123, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_124, __pyx_pybuffernd_outCount.diminfo[1].strides)))); goto __pyx_L66; } /*else*/ {
512: else:
513: outMerge[i, j] = cdummy
/* "splitBBox.pyx":513 * outMerge[i, j] =<
float> (outData[i, j] / outCount[i, j]) * else: * outMerge[i, j] = cdummy #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* return outMerge.T, edges0, edges1, outData.T, outCount.T * */ __pyx_t_127 = __pyx_v_i; __pyx_t_128 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.buf, __pyx_t_127, __pyx_pybuffernd_outMerge.diminfo[0].strides, __pyx_t_128, __pyx_pybuffernd_outMerge.diminfo[1].strides) = __pyx_v_cdummy; } __pyx_L66:; } } }
514: return outMerge.T, edges0, edges1, outData.T, outCount.T
/* "splitBBox.pyx":514 * else: * outMerge[i, j] = cdummy * return outMerge.T, edges0, edges1, outData.T, outCount.T #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_outMerge), __pyx_n_s__T); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_outData), __pyx_n_s__T); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = PyObject_GetAttr(((PyObject *)__pyx_v_outCount), __pyx_n_s__T); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_edges0); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_edges0); __Pyx_GIVEREF(__pyx_v_edges0); __Pyx_INCREF(__pyx_v_edges1); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_edges1); __Pyx_GIVEREF(__pyx_v_edges1); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_3 = 0; __pyx_t_9 = 0; __pyx_t_13 = 0; __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_13); __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1); __PYX_XDEC_MEMVIEW(&__pyx_t_28, 1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cdata.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dpos0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dpos1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outCount.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outData.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outMerge.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("splitBBox.histoBBox2d", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cdata.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos0_lower.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos0_upper.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dpos0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dpos1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outCount.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outData.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outMerge.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_cdata); __Pyx_XDECREF((PyObject *)__pyx_v_cpos0); __Pyx_XDECREF((PyObject *)__pyx_v_dpos0); __Pyx_XDECREF((PyObject *)__pyx_v_cpos1); __Pyx_XDECREF((PyObject *)__pyx_v_dpos1); __Pyx_XDECREF((PyObject *)__pyx_v_cpos0_upper); __Pyx_XDECREF((PyObject *)__pyx_v_cpos0_lower); __Pyx_XDECREF((PyObject *)__pyx_v_outData); __Pyx_XDECREF((PyObject *)__pyx_v_outCount); __Pyx_XDECREF((PyObject *)__pyx_v_outMerge); __PYX_XDEC_MEMVIEW(&__pyx_v_cmask, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_cflat, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_cdark, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_cpolarization, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_csolidangle, 1); __Pyx_XDECREF(__pyx_v_edges0); __Pyx_XDECREF(__pyx_v_edges1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ static int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); __Pyx_RefNannyFinishContext(); return __pyx_r; }
515: