Generated by Cython 0.15.1+ on Mon Nov 7 23:13:01 2011
Raw output: splitPixel.c
1: #!/usr/bin/env python
/* "splitPixel.pyx":1 * #!/usr/bin/env python #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* # -*- coding: utf8 -*- * # */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
2: # -*- coding: utf8 -*-
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
/* "splitPixel.pyx":30 * import cython * cimport numpy * import numpy #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef extern from "math.h": */ __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:
32: cdef extern from "math.h":
33: double floor(double)nogil
34: double fabs(double)nogil
35:
36:
37: cdef extern from "stdlib.h":
38: void free(void * ptr)nogil
39: void * calloc(size_t nmemb, size_t size)nogil
40: void * malloc(size_t size)nogil
41:
42: ctypedef numpy.int64_t DTYPE_int64_t
/* "splitPixel.pyx":42 * void * malloc(size_t size)nogil * * ctypedef numpy.int64_t DTYPE_int64_t #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* ctypedef numpy.float64_t DTYPE_float64_t * */ typedef __pyx_t_5numpy_int64_t __pyx_t_10splitPixel_DTYPE_int64_t;
43: ctypedef numpy.float64_t DTYPE_float64_t
44:
45: cdef double areaTriangle(double a0,
/* "splitPixel.pyx":45 * ctypedef numpy.float64_t DTYPE_float64_t * * cdef double areaTriangle(double a0, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* double a1, * double b0, */ static double __pyx_f_10splitPixel_areaTriangle(double __pyx_v_a0, double __pyx_v_a1, double __pyx_v_b0, double __pyx_v_b1, double __pyx_v_c0, double __pyx_v_c1) { double __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("areaTriangle");
46: double a1,
47: double b0,
48: double b1,
49: double c0,
50: double c1):
51: """
52: Calculate the area of the ABC triangle with corners:
53: A(a0,a1)
54: B(b0,b1)
55: C(c0,c1)
56: @return: area, i.e. 1/2 * (B-A)^(C-A)
57: """
58: return 0.5 * abs(((b0 - a0) * (c1 - a1)) - ((b1 - a1) * (c0 - a0)))
/* "splitPixel.pyx":58 * @return: area, i.e. 1/2 * (B-A)^(C-A) * """ * return 0.5 * abs(((b0 - a0) * (c1 - a1)) - ((b1 - a1) * (c0 - a0))) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef double areaQuad(double a0, */ __pyx_r = (0.5 * fabs((((__pyx_v_b0 - __pyx_v_a0) * (__pyx_v_c1 - __pyx_v_a1)) - ((__pyx_v_b1 - __pyx_v_a1) * (__pyx_v_c0 - __pyx_v_a0))))); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
59:
60: cdef double areaQuad(double a0,
/* "splitPixel.pyx":60 * return 0.5 * abs(((b0 - a0) * (c1 - a1)) - ((b1 - a1) * (c0 - a0))) * * cdef double areaQuad(double a0, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* double a1, * double b0, */ static double __pyx_f_10splitPixel_areaQuad(double __pyx_v_a0, double __pyx_v_a1, double __pyx_v_b0, double __pyx_v_b1, double __pyx_v_c0, double __pyx_v_c1, double __pyx_v_d0, double __pyx_v_d1) { double __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("areaQuad");
61: double a1,
62: double b0,
63: double b1,
64: double c0,
65: double c1,
66: double d0,
67: double d1
68: ):
69: """
70: Calculate the area of the ABCD quadrilataire with corners:
71: A(a0,a1)
72: B(b0,b1)
73: C(c0,c1)
74: D(d0,d1)
75: @return: area, i.e. 1/2 * (AC ^ BD)
76: """
77: return 0.5 * abs(((c0 - a0) * (d1 - b1)) - ((c1 - a1) * (d0 - b0)))
/* "splitPixel.pyx":77 * @return: area, i.e. 1/2 * (AC ^ BD) * """ * return 0.5 * abs(((c0 - a0) * (d1 - b1)) - ((c1 - a1) * (d0 - b0))) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * @cython.cdivision(True) */ __pyx_r = (0.5 * fabs((((__pyx_v_c0 - __pyx_v_a0) * (__pyx_v_d1 - __pyx_v_b1)) - ((__pyx_v_c1 - __pyx_v_a1) * (__pyx_v_d0 - __pyx_v_b0))))); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
78:
79: @cython.cdivision(True)
80: cdef double getBinNr(double x0, double pos0_min, double dpos) nogil:
/* "splitPixel.pyx":80 * * @cython.cdivision(True) * cdef double getBinNr(double x0, double pos0_min, double dpos) nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* """ * calculate the bin number for any point */ static double __pyx_f_10splitPixel_getBinNr(double __pyx_v_x0, double __pyx_v_pos0_min, double __pyx_v_dpos) { double __pyx_r;
81: """
82: calculate the bin number for any point
83: param x0: current position
84: param pos0_min: position minimum
85: param dpos: bin width
86: """
87: return (x0 - pos0_min) / dpos
/* "splitPixel.pyx":87 * param dpos: bin width * """ * return (x0 - pos0_min) / dpos #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef double min4f(double a, double b, double c, double d) nogil: */ __pyx_r = ((__pyx_v_x0 - __pyx_v_pos0_min) / __pyx_v_dpos); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; return __pyx_r; }
88:
89: cdef double min4f(double a, double b, double c, double d) nogil:
/* "splitPixel.pyx":89 * return (x0 - pos0_min) / dpos * * cdef double min4f(double a, double b, double c, double d) nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if (a<
= b) and (a<
= c) and (a<
= d): * return a */ static double __pyx_f_10splitPixel_min4f(double __pyx_v_a, double __pyx_v_b, double __pyx_v_c, double __pyx_v_d) { double __pyx_r;
90: if (a <= b) and (a <= c) and (a <= d):
/* "splitPixel.pyx":90 * * cdef double min4f(double a, double b, double c, double d) nogil: * if (a<
= b) and (a<
= c) and (a<
= d): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* return a * if (b<
= a) and (b<
= c) and (b<
= d): */ __pyx_t_1 = (__pyx_v_a<
= __pyx_v_b); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_a<
= __pyx_v_c); if (__pyx_t_2) { __pyx_t_3 = (__pyx_v_a<
= __pyx_v_d); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_1; } if (__pyx_t_2) {
91: return a
/* "splitPixel.pyx":91 * cdef double min4f(double a, double b, double c, double d) nogil: * if (a<
= b) and (a<
= c) and (a<
= d): * return a #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if (b<
= a) and (b<
= c) and (b<
= d): * return b */ __pyx_r = __pyx_v_a; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:;
92: if (b <= a) and (b <= c) and (b <= d):
/* "splitPixel.pyx":92 * if (a<
= b) and (a<
= c) and (a<
= d): * return a * if (b<
= a) and (b<
= c) and (b<
= d): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* return b * if (c<
= a) and (c<
= b) and (c<
= d): */ __pyx_t_2 = (__pyx_v_b<
= __pyx_v_a); if (__pyx_t_2) { __pyx_t_1 = (__pyx_v_b<
= __pyx_v_c); if (__pyx_t_1) { __pyx_t_4 = (__pyx_v_b<
= __pyx_v_d); __pyx_t_3 = __pyx_t_4; } else { __pyx_t_3 = __pyx_t_1; } __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) {
93: return b
/* "splitPixel.pyx":93 * return a * if (b<
= a) and (b<
= c) and (b<
= d): * return b #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if (c<
= a) and (c<
= b) and (c<
= d): * return c */ __pyx_r = __pyx_v_b; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:;
94: if (c <= a) and (c <= b) and (c <= d):
/* "splitPixel.pyx":94 * if (b<
= a) and (b<
= c) and (b<
= d): * return b * if (c<
= a) and (c<
= b) and (c<
= d): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* return c * else: */ __pyx_t_1 = (__pyx_v_c<
= __pyx_v_a); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_c<
= __pyx_v_b); if (__pyx_t_2) { __pyx_t_3 = (__pyx_v_c<
= __pyx_v_d); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_1; } if (__pyx_t_2) {
95: return c
/* "splitPixel.pyx":95 * return b * if (c<
= a) and (c<
= b) and (c<
= d): * return c #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * return d */ __pyx_r = __pyx_v_c; goto __pyx_L0; goto __pyx_L5; } /*else*/ {
96: else:
97: return d
/* "splitPixel.pyx":97 * return c * else: * return d #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef double max4f(double a, double b, double c, double d) nogil: */ __pyx_r = __pyx_v_d; goto __pyx_L0; } __pyx_L5:; __pyx_r = 0; __pyx_L0:; return __pyx_r; }
98:
99: cdef double max4f(double a, double b, double c, double d) nogil:
/* "splitPixel.pyx":99 * return d * * cdef double max4f(double a, double b, double c, double d) nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* """Calculates the max of 4 double numbers""" * if (a >= b) and (a >= c) and (a >= d): */ static double __pyx_f_10splitPixel_max4f(double __pyx_v_a, double __pyx_v_b, double __pyx_v_c, double __pyx_v_d) { double __pyx_r;
100: """Calculates the max of 4 double numbers"""
101: if (a >= b) and (a >= c) and (a >= d):
/* "splitPixel.pyx":101 * cdef double max4f(double a, double b, double c, double d) nogil: * """Calculates the max of 4 double numbers""" * if (a >= b) and (a >= c) and (a >= d): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* return a * if (b >= a) and (b >= c) and (b >= d): */ __pyx_t_1 = (__pyx_v_a >= __pyx_v_b); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_a >= __pyx_v_c); if (__pyx_t_2) { __pyx_t_3 = (__pyx_v_a >= __pyx_v_d); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_1; } if (__pyx_t_2) {
102: return a
/* "splitPixel.pyx":102 * """Calculates the max of 4 double numbers""" * if (a >= b) and (a >= c) and (a >= d): * return a #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if (b >= a) and (b >= c) and (b >= d): * return b */ __pyx_r = __pyx_v_a; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:;
103: if (b >= a) and (b >= c) and (b >= d):
/* "splitPixel.pyx":103 * if (a >= b) and (a >= c) and (a >= d): * return a * if (b >= a) and (b >= c) and (b >= d): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* return b * if (c >= a) and (c >= b) and (c >= d): */ __pyx_t_2 = (__pyx_v_b >= __pyx_v_a); if (__pyx_t_2) { __pyx_t_1 = (__pyx_v_b >= __pyx_v_c); if (__pyx_t_1) { __pyx_t_4 = (__pyx_v_b >= __pyx_v_d); __pyx_t_3 = __pyx_t_4; } else { __pyx_t_3 = __pyx_t_1; } __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) {
104: return b
/* "splitPixel.pyx":104 * return a * if (b >= a) and (b >= c) and (b >= d): * return b #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if (c >= a) and (c >= b) and (c >= d): * return c */ __pyx_r = __pyx_v_b; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:;
105: if (c >= a) and (c >= b) and (c >= d):
/* "splitPixel.pyx":105 * if (b >= a) and (b >= c) and (b >= d): * return b * if (c >= a) and (c >= b) and (c >= d): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* return c * else: */ __pyx_t_1 = (__pyx_v_c >= __pyx_v_a); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_c >= __pyx_v_b); if (__pyx_t_2) { __pyx_t_3 = (__pyx_v_c >= __pyx_v_d); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_1; } if (__pyx_t_2) {
106: return c
/* "splitPixel.pyx":106 * return b * if (c >= a) and (c >= b) and (c >= d): * return c #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * return d */ __pyx_r = __pyx_v_c; goto __pyx_L0; goto __pyx_L5; } /*else*/ {
107: else:
108: return d
/* "splitPixel.pyx":108 * return c * else: * return d #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * @cython.cdivision(True) */ __pyx_r = __pyx_v_d; goto __pyx_L0; } __pyx_L5:; __pyx_r = 0; __pyx_L0:; return __pyx_r; }
109:
110: @cython.cdivision(True)
111: @cython.boundscheck(False)
112: @cython.wraparound(False)
113: def fullSplit1D(numpy.ndarray pos not None,
/* "splitPixel.pyx":113 * @cython.boundscheck(False) * @cython.wraparound(False) * def fullSplit1D(numpy.ndarray pos not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray weights not None, * long bins=100, */ static PyObject *__pyx_pf_10splitPixel_fullSplit1D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_10splitPixel_fullSplit1D[] = "\n Calculates histogram of pos weighted by weights\n \n Splitting is done on the pixel's bounding box like fit2D\n \n \n @param pos: 3D array with pos0; Corner A,B,C,D; tth or chi\n @param weights: array with intensities\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 \n @return 2theta, I, weighted histogram, unweighted histogram\n "; static PyMethodDef __pyx_mdef_10splitPixel_fullSplit1D = {__Pyx_NAMESTR("fullSplit1D"), (PyCFunction)__pyx_pf_10splitPixel_fullSplit1D, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_10splitPixel_fullSplit1D)}; static PyObject *__pyx_pf_10splitPixel_fullSplit1D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_pos = 0; PyArrayObject *__pyx_v_weights = 0; long __pyx_v_bins; PyObject *__pyx_v_pos0Range = 0; PyObject *__pyx_v_pos1Range = 0; double __pyx_v_dummy; long __pyx_v_size; PyArrayObject *__pyx_v_cpos = 0; PyArrayObject *__pyx_v_cdata = 0; PyArrayObject *__pyx_v_outData = 0; PyArrayObject *__pyx_v_outCount = 0; PyArrayObject *__pyx_v_outMerge = 0; PyArrayObject *__pyx_v_outPos = 0; double __pyx_v_min0; double __pyx_v_max0; double __pyx_v_deltaR; double __pyx_v_deltaL; double __pyx_v_deltaA; double __pyx_v_pos0_min; double __pyx_v_pos0_max; double __pyx_v_pos0_maxin; CYTHON_UNUSED double __pyx_v_pos1_min; CYTHON_UNUSED double __pyx_v_pos1_max; double __pyx_v_pos1_maxin; double __pyx_v_dpos; CYTHON_UNUSED long __pyx_v_bin; long __pyx_v_i; long __pyx_v_idx; double __pyx_v_fbin0_min; double __pyx_v_fbin0_max; long __pyx_v_bin0_max; long __pyx_v_bin0_min; double __pyx_v_aeraPixel; double __pyx_v_a0; double __pyx_v_b0; double __pyx_v_c0; double __pyx_v_d0; double __pyx_v_epsilon; double __pyx_v_data; Py_buffer __pyx_bstruct_outPos; Py_ssize_t __pyx_bstride_0_outPos = 0; Py_ssize_t __pyx_bshape_0_outPos = 0; Py_buffer __pyx_bstruct_outMerge; Py_ssize_t __pyx_bstride_0_outMerge = 0; Py_ssize_t __pyx_bshape_0_outMerge = 0; Py_buffer __pyx_bstruct_outCount; Py_ssize_t __pyx_bstride_0_outCount = 0; Py_ssize_t __pyx_bshape_0_outCount = 0; Py_buffer __pyx_bstruct_cdata; Py_ssize_t __pyx_bstride_0_cdata = 0; Py_ssize_t __pyx_bshape_0_cdata = 0; Py_buffer __pyx_bstruct_cpos; Py_ssize_t __pyx_bstride_0_cpos = 0; Py_ssize_t __pyx_bstride_1_cpos = 0; Py_ssize_t __pyx_bstride_2_cpos = 0; Py_ssize_t __pyx_bshape_0_cpos = 0; Py_ssize_t __pyx_bshape_1_cpos = 0; Py_ssize_t __pyx_bshape_2_cpos = 0; Py_buffer __pyx_bstruct_outData; Py_ssize_t __pyx_bstride_0_outData = 0; Py_ssize_t __pyx_bshape_0_outData = 0; PyObject *__pyx_r = NULL; static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__pos,&__pyx_n_s__weights,&__pyx_n_s__bins,&__pyx_n_s__pos0Range,&__pyx_n_s__pos1Range,&__pyx_n_s__dummy,0}; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fullSplit1D"); __pyx_self = __pyx_self; { PyObject* values[6] = {0,0,0,0,0,0}; /* "splitPixel.pyx":113 * @cython.boundscheck(False) * @cython.wraparound(False) * def fullSplit1D(numpy.ndarray pos not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray weights not None, * long bins=100, */ __pyx_k_tuple_45 = PyTuple_New(39); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_45)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 0, ((PyObject *)__pyx_n_s__pos)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos)); __Pyx_INCREF(((PyObject *)__pyx_n_s__weights)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 1, ((PyObject *)__pyx_n_s__weights)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__weights)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bins)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 2, ((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_45, 3, ((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_45, 4, ((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_45, 5, ((PyObject *)__pyx_n_s__dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__size)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 6, ((PyObject *)__pyx_n_s__size)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__size)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cpos)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 7, ((PyObject *)__pyx_n_s__cpos)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cpos)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cdata)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 8, ((PyObject *)__pyx_n_s__cdata)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cdata)); __Pyx_INCREF(((PyObject *)__pyx_n_s__outData)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 9, ((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_45, 10, ((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_45, 11, ((PyObject *)__pyx_n_s__outMerge)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outMerge)); __Pyx_INCREF(((PyObject *)__pyx_n_s__outPos)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 12, ((PyObject *)__pyx_n_s__outPos)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outPos)); __Pyx_INCREF(((PyObject *)__pyx_n_s__min0)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 13, ((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_45, 14, ((PyObject *)__pyx_n_s__max0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__max0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__deltaR)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 15, ((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_45, 16, ((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_45, 17, ((PyObject *)__pyx_n_s__deltaA)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__deltaA)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos0_min)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 18, ((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_45, 19, ((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_45, 20, ((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_45, 21, ((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_45, 22, ((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_45, 23, ((PyObject *)__pyx_n_s__pos1_maxin)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos1_maxin)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dpos)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 24, ((PyObject *)__pyx_n_s__dpos)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dpos)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bin)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 25, ((PyObject *)__pyx_n_s__bin)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bin)); __Pyx_INCREF(((PyObject *)__pyx_n_s__i)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 26, ((PyObject *)__pyx_n_s__i)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i)); __Pyx_INCREF(((PyObject *)__pyx_n_s__idx)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 27, ((PyObject *)__pyx_n_s__idx)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx)); __Pyx_INCREF(((PyObject *)__pyx_n_s__fbin0_min)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 28, ((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_45, 29, ((PyObject *)__pyx_n_s__fbin0_max)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fbin0_max)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bin0_max)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 30, ((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_45, 31, ((PyObject *)__pyx_n_s__bin0_min)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bin0_min)); __Pyx_INCREF(((PyObject *)__pyx_n_s__aeraPixel)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 32, ((PyObject *)__pyx_n_s__aeraPixel)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__aeraPixel)); __Pyx_INCREF(((PyObject *)__pyx_n_s__a0)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 33, ((PyObject *)__pyx_n_s__a0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__a0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__b0)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 34, ((PyObject *)__pyx_n_s__b0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__b0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__c0)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 35, ((PyObject *)__pyx_n_s__c0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__d0)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 36, ((PyObject *)__pyx_n_s__d0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__d0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__epsilon)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 37, ((PyObject *)__pyx_n_s__epsilon)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__epsilon)); __Pyx_INCREF(((PyObject *)__pyx_n_s__data)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 38, ((PyObject *)__pyx_n_s__data)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45)); /* "splitPixel.pyx":113 * @cython.boundscheck(False) * @cython.wraparound(False) * def fullSplit1D(numpy.ndarray pos not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray weights not None, * long bins=100, */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10splitPixel_fullSplit1D, NULL, __pyx_n_s__splitPixel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__fullSplit1D, __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k_codeobj_46 = (PyObject*)__Pyx_PyCode_New(6, 0, 39, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__fullSplit1D, 113, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
114: numpy.ndarray weights not None,
115: long bins=100,
116: pos0Range=None,
/* "splitPixel.pyx":116 * numpy.ndarray weights not None, * long bins=100, * pos0Range=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1Range=None, * double dummy=0.0 */ values[3] = ((PyObject *)Py_None);
117: pos1Range=None,
/* "splitPixel.pyx":117 * long bins=100, * pos0Range=None, * pos1Range=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* double dummy=0.0 * ): */ values[4] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; switch (PyTuple_GET_SIZE(__pyx_args)) { 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 (PyTuple_GET_SIZE(__pyx_args)) { case 0: values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos); if (likely(values[0])) kw_args--; else goto __pyx_L5_argtuple_error; case 1: values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__weights); if (likely(values[1])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("fullSplit1D", 0, 2, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos0Range); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos1Range); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "fullSplit1D")<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { 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); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_pos = ((PyArrayObject *)values[0]); __pyx_v_weights = ((PyArrayObject *)values[1]); if (values[2]) { __pyx_v_bins = __Pyx_PyInt_AsLong(values[2]); if (unlikely((__pyx_v_bins == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_bins = ((long)100); } __pyx_v_pos0Range = values[3]; __pyx_v_pos1Range = values[4]; if (values[5]) { __pyx_v_dummy = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_dummy == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else {
118: double dummy=0.0
/* "splitPixel.pyx":118 * pos0Range=None, * pos1Range=None, * double dummy=0.0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* ): * """ */ __pyx_v_dummy = ((double)0.0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("fullSplit1D", 0, 2, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("splitPixel.fullSplit1D", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_bstruct_cpos.buf = NULL; __pyx_bstruct_cdata.buf = NULL; __pyx_bstruct_outData.buf = NULL; __pyx_bstruct_outCount.buf = NULL; __pyx_bstruct_outMerge.buf = NULL; __pyx_bstruct_outPos.buf = NULL; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 0, "pos", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weights), __pyx_ptype_5numpy_ndarray, 0, "weights", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
119: ):
120: """
121: Calculates histogram of pos weighted by weights
122:
123: Splitting is done on the pixel's bounding box like fit2D
124:
125:
126: @param pos: 3D array with pos0; Corner A,B,C,D; tth or chi
127: @param weights: array with intensities
128: @param bins: number of output bins
129: @param pos0Range: minimum and maximum of the 2th range
130: @param pos1Range: minimum and maximum of the chi range
131: @param dummy: value for bins without pixels
132: @return 2theta, I, weighted histogram, unweighted histogram
133: """
134:
135: assert pos.shape[0] == weights.size
/* "splitPixel.pyx":135 * """ * * assert pos.shape[0] == weights.size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert pos.shape[1] == 4 * assert pos.shape[2] == 2 */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_1 = __Pyx_PyInt_to_py_Py_intptr_t((__pyx_v_pos->dimensions[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_weights), __pyx_n_s__size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
136: assert pos.shape[1] == 4
/* "splitPixel.pyx":136 * * assert pos.shape[0] == weights.size * assert pos.shape[1] == 4 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert pos.shape[2] == 2 * assert pos.ndim == 3 */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!((__pyx_v_pos->dimensions[1]) == 4))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
137: assert pos.shape[2] == 2
/* "splitPixel.pyx":137 * assert pos.shape[0] == weights.size * assert pos.shape[1] == 4 * assert pos.shape[2] == 2 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert pos.ndim == 3 * assert bins > 1 */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!((__pyx_v_pos->dimensions[2]) == 2))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
138: assert pos.ndim == 3
/* "splitPixel.pyx":138 * assert pos.shape[1] == 4 * assert pos.shape[2] == 2 * assert pos.ndim == 3 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert bins > 1 * cdef long size = weights.size */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!(__pyx_v_pos->nd == 3))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
139: assert bins > 1
/* "splitPixel.pyx":139 * assert pos.shape[2] == 2 * assert pos.ndim == 3 * assert bins > 1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef long size = weights.size * cdef numpy.ndarray[DTYPE_float64_t, ndim = 3] cpos = pos.astype("float64") */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!(__pyx_v_bins > 1))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
140: cdef long size = weights.size
/* "splitPixel.pyx":140 * assert pos.ndim == 3 * assert bins > 1 * cdef long size = weights.size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 3] cpos = pos.astype("float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = weights.astype("float64").ravel() */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_weights), __pyx_n_s__size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_AsLong(__pyx_t_3); if (unlikely((__pyx_t_5 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_size = __pyx_t_5;
141: cdef numpy.ndarray[DTYPE_float64_t, ndim = 3] cpos = pos.astype("float64")
/* "splitPixel.pyx":141 * assert bins > 1 * cdef long size = weights.size * cdef numpy.ndarray[DTYPE_float64_t, ndim = 3] cpos = pos.astype("float64") #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = weights.astype("float64").ravel() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outData = numpy.zeros(bins, dtype="float64") */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_pos), __pyx_n_s__astype); 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_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_cpos, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_10splitPixel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) { __pyx_v_cpos = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_cpos.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_cpos = __pyx_bstruct_cpos.strides[0]; __pyx_bstride_1_cpos = __pyx_bstruct_cpos.strides[1]; __pyx_bstride_2_cpos = __pyx_bstruct_cpos.strides[2]; __pyx_bshape_0_cpos = __pyx_bstruct_cpos.shape[0]; __pyx_bshape_1_cpos = __pyx_bstruct_cpos.shape[1]; __pyx_bshape_2_cpos = __pyx_bstruct_cpos.shape[2]; } } __pyx_t_6 = 0; __pyx_v_cpos = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "splitPixel.pyx":141 * assert bins > 1 * cdef long size = weights.size * cdef numpy.ndarray[DTYPE_float64_t, ndim = 3] cpos = pos.astype("float64") #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = weights.astype("float64").ravel() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outData = numpy.zeros(bins, dtype="float64") */ __pyx_k_tuple_1 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__float64)); PyTuple_SET_ITEM(__pyx_k_tuple_1, 0, ((PyObject *)__pyx_n_s__float64)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__float64)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_1));
142: cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = weights.astype("float64").ravel()
/* "splitPixel.pyx":142 * cdef long size = weights.size * cdef numpy.ndarray[DTYPE_float64_t, ndim = 3] cpos = pos.astype("float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = weights.astype("float64").ravel() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outData = numpy.zeros(bins, dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype="float64") */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_weights), __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__ravel); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_cdata, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_10splitPixel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_cdata = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_cdata.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_cdata = __pyx_bstruct_cdata.strides[0]; __pyx_bshape_0_cdata = __pyx_bstruct_cdata.shape[0]; } } __pyx_t_7 = 0; __pyx_v_cdata = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "splitPixel.pyx":142 * cdef long size = weights.size * cdef numpy.ndarray[DTYPE_float64_t, ndim = 3] cpos = pos.astype("float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = weights.astype("float64").ravel() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outData = numpy.zeros(bins, dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype="float64") */ __pyx_k_tuple_2 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_2)); __Pyx_INCREF(((PyObject *)__pyx_n_s__float64)); PyTuple_SET_ITEM(__pyx_k_tuple_2, 0, ((PyObject *)__pyx_n_s__float64)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__float64)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2));
143: cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outData = numpy.zeros(bins, dtype="float64")
/* "splitPixel.pyx":143 * cdef numpy.ndarray[DTYPE_float64_t, ndim = 3] cpos = pos.astype("float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = weights.astype("float64").ravel() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outData = numpy.zeros(bins, dtype="float64") #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outMerge = numpy.zeros(bins, dtype="float64") */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromLong(__pyx_v_bins); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__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 = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_outData, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_10splitPixel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_outData = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_outData.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_outData = __pyx_bstruct_outData.strides[0]; __pyx_bshape_0_outData = __pyx_bstruct_outData.shape[0]; } } __pyx_t_9 = 0; __pyx_v_outData = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0;
144: cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype="float64")
/* "splitPixel.pyx":144 * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = weights.astype("float64").ravel() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outData = numpy.zeros(bins, dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype="float64") #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outMerge = numpy.zeros(bins, dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outPos = numpy.zeros(bins, dtype="float64") */ __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__zeros); 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_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyInt_FromLong(__pyx_v_bins); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_outCount, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_10splitPixel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_outCount = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_outCount.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_outCount = __pyx_bstruct_outCount.strides[0]; __pyx_bshape_0_outCount = __pyx_bstruct_outCount.shape[0]; } } __pyx_t_10 = 0; __pyx_v_outCount = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0;
145: cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outMerge = numpy.zeros(bins, dtype="float64")
/* "splitPixel.pyx":145 * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outData = numpy.zeros(bins, dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outMerge = numpy.zeros(bins, dtype="float64") #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outPos = numpy.zeros(bins, dtype="float64") * cdef double min0, max0, deltaR, deltaL, deltaA */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromLong(__pyx_v_bins); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_8, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); 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_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 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 = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_outMerge, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_10splitPixel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_outMerge = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_outMerge.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_outMerge = __pyx_bstruct_outMerge.strides[0]; __pyx_bshape_0_outMerge = __pyx_bstruct_outMerge.shape[0]; } } __pyx_t_11 = 0; __pyx_v_outMerge = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0;
146: cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outPos = numpy.zeros(bins, dtype="float64")
/* "splitPixel.pyx":146 * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outMerge = numpy.zeros(bins, dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] outPos = numpy.zeros(bins, dtype="float64") #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef double min0, max0, deltaR, deltaL, deltaA * cdef double pos0_min, pos0_max, pos0_maxin, pos1_min, pos1_max, pos1_maxin */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromLong(__pyx_v_bins); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__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 = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_outPos, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_10splitPixel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_outPos = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_outPos.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_outPos = __pyx_bstruct_outPos.strides[0]; __pyx_bshape_0_outPos = __pyx_bstruct_outPos.shape[0]; } } __pyx_t_12 = 0; __pyx_v_outPos = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0;
147: cdef double min0, max0, deltaR, deltaL, deltaA
148: cdef double pos0_min, pos0_max, pos0_maxin, pos1_min, pos1_max, pos1_maxin
149: if pos0Range is not None and len(pos0Range) > 1:
/* "splitPixel.pyx":149 * cdef double min0, max0, deltaR, deltaL, deltaA * cdef double pos0_min, pos0_max, pos0_maxin, pos1_min, pos1_max, pos1_maxin * if pos0Range is not None and len(pos0Range) > 1: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_min = min(pos0Range) * pos0_maxin = max(pos0Range) */ __pyx_t_4 = (__pyx_v_pos0Range != Py_None); if (__pyx_t_4) { __pyx_t_13 = PyObject_Length(__pyx_v_pos0Range); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (__pyx_t_13 > 1); __pyx_t_15 = __pyx_t_14; } else { __pyx_t_15 = __pyx_t_4; } if (__pyx_t_15) {
150: pos0_min = min(pos0Range)
/* "splitPixel.pyx":150 * cdef double pos0_min, pos0_max, pos0_maxin, pos1_min, pos1_max, pos1_maxin * if pos0Range is not None and len(pos0Range) > 1: * pos0_min = min(pos0Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_maxin = max(pos0Range) * else: */ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_INCREF(__pyx_v_pos0Range); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_pos0Range); __Pyx_GIVEREF(__pyx_v_pos0Range); __pyx_t_3 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_pos0_min = __pyx_t_16;
151: pos0_maxin = max(pos0Range)
/* "splitPixel.pyx":151 * if pos0Range is not None and len(pos0Range) > 1: * pos0_min = min(pos0Range) * pos0_maxin = max(pos0Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * pos0_min = pos[:, :, 0].min() */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_INCREF(__pyx_v_pos0Range); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_pos0Range); __Pyx_GIVEREF(__pyx_v_pos0Range); __pyx_t_8 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_pos0_maxin = __pyx_t_16; goto __pyx_L6; } /*else*/ {
152: else:
153: pos0_min = pos[:, :, 0].min()
/* "splitPixel.pyx":153 * pos0_maxin = max(pos0Range) * else: * pos0_min = pos[:, :, 0].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_maxin = pos[:, :, 0].max() * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.double).eps) */ __pyx_k_slice_3 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_3); __Pyx_GIVEREF(__pyx_k_slice_3); __pyx_k_slice_4 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_4); __Pyx_GIVEREF(__pyx_k_slice_4); /* "splitPixel.pyx":153 * pos0_maxin = max(pos0Range) * else: * pos0_min = pos[:, :, 0].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_maxin = pos[:, :, 0].max() * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.double).eps) */ __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_5)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__min); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_pos0_min = __pyx_t_16; __pyx_k_tuple_5 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_5)); __Pyx_INCREF(__pyx_k_slice_3); PyTuple_SET_ITEM(__pyx_k_tuple_5, 0, __pyx_k_slice_3); __Pyx_GIVEREF(__pyx_k_slice_3); __Pyx_INCREF(__pyx_k_slice_4); PyTuple_SET_ITEM(__pyx_k_tuple_5, 1, __pyx_k_slice_4); __Pyx_GIVEREF(__pyx_k_slice_4); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_5, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5));
154: pos0_maxin = pos[:, :, 0].max()
/* "splitPixel.pyx":154 * else: * pos0_min = pos[:, :, 0].min() * pos0_maxin = pos[:, :, 0].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.double).eps) * if pos1Range is not None and len(pos1Range) > 1: */ __pyx_k_slice_6 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_6); __Pyx_GIVEREF(__pyx_k_slice_6); __pyx_k_slice_7 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_7); __Pyx_GIVEREF(__pyx_k_slice_7); /* "splitPixel.pyx":154 * else: * pos0_min = pos[:, :, 0].min() * pos0_maxin = pos[:, :, 0].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.double).eps) * if pos1Range is not None and len(pos1Range) > 1: */ __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_8)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__max); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_pos0_maxin = __pyx_t_16; } __pyx_L6:; __pyx_k_tuple_8 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_8)); __Pyx_INCREF(__pyx_k_slice_6); PyTuple_SET_ITEM(__pyx_k_tuple_8, 0, __pyx_k_slice_6); __Pyx_GIVEREF(__pyx_k_slice_6); __Pyx_INCREF(__pyx_k_slice_7); PyTuple_SET_ITEM(__pyx_k_tuple_8, 1, __pyx_k_slice_7); __Pyx_GIVEREF(__pyx_k_slice_7); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_8, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8));
155: pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.double).eps)
/* "splitPixel.pyx":155 * pos0_min = pos[:, :, 0].min() * pos0_maxin = pos[:, :, 0].max() * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.double).eps) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if pos1Range is not None and len(pos1Range) > 1: * pos1_min = min(pos1Range) */ __pyx_t_8 = PyFloat_FromDouble(__pyx_v_pos0_maxin); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__finfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__double); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __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 = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__eps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Add(__pyx_int_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Multiply(__pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_pos0_max = __pyx_t_16;
156: if pos1Range is not None and len(pos1Range) > 1:
/* "splitPixel.pyx":156 * pos0_maxin = pos[:, :, 0].max() * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.double).eps) * if pos1Range is not None and len(pos1Range) > 1: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_min = min(pos1Range) * pos1_maxin = max(pos1Range) */ __pyx_t_15 = (__pyx_v_pos1Range != Py_None); if (__pyx_t_15) { __pyx_t_13 = PyObject_Length(__pyx_v_pos1Range); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = (__pyx_t_13 > 1); __pyx_t_14 = __pyx_t_4; } else { __pyx_t_14 = __pyx_t_15; } if (__pyx_t_14) {
157: pos1_min = min(pos1Range)
/* "splitPixel.pyx":157 * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.double).eps) * if pos1Range is not None and len(pos1Range) > 1: * 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 = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__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_2 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_pos1_min = __pyx_t_16;
158: pos1_maxin = max(pos1Range)
/* "splitPixel.pyx":158 * if pos1Range is not None and len(pos1Range) > 1: * pos1_min = min(pos1Range) * pos1_maxin = max(pos1Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * pos1_min = pos[:, :, 1].min() */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_INCREF(__pyx_v_pos1Range); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_pos1Range); __Pyx_GIVEREF(__pyx_v_pos1Range); __pyx_t_3 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_pos1_maxin = __pyx_t_16; goto __pyx_L7; } /*else*/ {
159: else:
160: pos1_min = pos[:, :, 1].min()
/* "splitPixel.pyx":160 * pos1_maxin = max(pos1Range) * else: * pos1_min = pos[:, :, 1].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_max = pos[:, :, 1].max() * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.double).eps) */ __pyx_k_slice_9 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_9); __Pyx_GIVEREF(__pyx_k_slice_9); __pyx_k_slice_10 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_10); __Pyx_GIVEREF(__pyx_k_slice_10); /* "splitPixel.pyx":160 * pos1_maxin = max(pos1Range) * else: * pos1_min = pos[:, :, 1].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_max = pos[:, :, 1].max() * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.double).eps) */ __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_11)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__min); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_pos1_min = __pyx_t_16; __pyx_k_tuple_11 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_11)); __Pyx_INCREF(__pyx_k_slice_9); PyTuple_SET_ITEM(__pyx_k_tuple_11, 0, __pyx_k_slice_9); __Pyx_GIVEREF(__pyx_k_slice_9); __Pyx_INCREF(__pyx_k_slice_10); PyTuple_SET_ITEM(__pyx_k_tuple_11, 1, __pyx_k_slice_10); __Pyx_GIVEREF(__pyx_k_slice_10); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_11, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11));
161: pos1_max = pos[:, :, 1].max()
/* "splitPixel.pyx":161 * else: * pos1_min = pos[:, :, 1].min() * pos1_max = pos[:, :, 1].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.double).eps) * cdef double dpos = (pos0_max - pos0_min) / (<
double > (bins)) */ __pyx_k_slice_12 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_12); __Pyx_GIVEREF(__pyx_k_slice_12); __pyx_k_slice_13 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_13); __Pyx_GIVEREF(__pyx_k_slice_13); /* "splitPixel.pyx":161 * else: * pos1_min = pos[:, :, 1].min() * pos1_max = pos[:, :, 1].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.double).eps) * cdef double dpos = (pos0_max - pos0_min) / (<
double > (bins)) */ __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_14)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__max); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_pos1_max = __pyx_t_16; } __pyx_L7:; __pyx_k_tuple_14 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_14)); __Pyx_INCREF(__pyx_k_slice_12); PyTuple_SET_ITEM(__pyx_k_tuple_14, 0, __pyx_k_slice_12); __Pyx_GIVEREF(__pyx_k_slice_12); __Pyx_INCREF(__pyx_k_slice_13); PyTuple_SET_ITEM(__pyx_k_tuple_14, 1, __pyx_k_slice_13); __Pyx_GIVEREF(__pyx_k_slice_13); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_14, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));
162: pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.double).eps)
/* "splitPixel.pyx":162 * pos1_min = pos[:, :, 1].min() * pos1_max = pos[:, :, 1].max() * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.double).eps) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef double dpos = (pos0_max - pos0_min) / (<
double > (bins)) * cdef long bin = 0 */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pos1_maxin); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__finfo); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__double); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__eps); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_int_1, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_pos1_max = __pyx_t_16;
163: cdef double dpos = (pos0_max - pos0_min) / (< double > (bins))
/* "splitPixel.pyx":163 * pos1_max = pos[:, :, 1].max() * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.double).eps) * cdef double dpos = (pos0_max - pos0_min) / (<
double > (bins)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef long bin = 0 * cdef long i, idx */ __pyx_v_dpos = ((__pyx_v_pos0_max - __pyx_v_pos0_min) / ((double)__pyx_v_bins));
164: cdef long bin = 0
/* "splitPixel.pyx":164 * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.double).eps) * cdef double dpos = (pos0_max - pos0_min) / (<
double > (bins)) * cdef long bin = 0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef long i, idx * cdef double fbin0_min, fbin0_max#, fbin1_min, fbin1_max */ __pyx_v_bin = 0;
165: cdef long i, idx
166: cdef double fbin0_min, fbin0_max#, fbin1_min, fbin1_max
167: cdef long bin0_max, bin0_min
168: cdef double aeraPixel, a0, b0, c0, d0
169: cdef double epsilon = 1e-10
/* "splitPixel.pyx":169 * cdef long bin0_max, bin0_min * cdef double aeraPixel, a0, b0, c0, d0 * cdef double epsilon = 1e-10 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * with nogil: */ __pyx_v_epsilon = 1e-10;
170:
171: with nogil:
/* "splitPixel.pyx":171 * cdef double epsilon = 1e-10 * * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for i in range(bins): * outPos[i] = pos0_min + (0.5 +<
double > i) * dpos */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "splitPixel.pyx":171 * cdef double epsilon = 1e-10 * * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for i in range(bins): * outPos[i] = pos0_min + (0.5 +<
double > i) * dpos */ /*finally:*/ { Py_BLOCK_THREADS } }
172: for i in range(bins):
/* "splitPixel.pyx":172 * * with nogil: * for i in range(bins): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outPos[i] = pos0_min + (0.5 +<
double > i) * dpos * */ __pyx_t_5 = __pyx_v_bins; for (__pyx_t_17 = 0; __pyx_t_17<
__pyx_t_5; __pyx_t_17+=1) { __pyx_v_i = __pyx_t_17;
173: outPos[i] = pos0_min + (0.5 +< double > i) * dpos
/* "splitPixel.pyx":173 * with nogil: * for i in range(bins): * outPos[i] = pos0_min + (0.5 +<
double > i) * dpos #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * for idx in range(size): */ __pyx_t_18 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outPos.buf, __pyx_t_18, __pyx_bstride_0_outPos) = (__pyx_v_pos0_min + ((0.5 + ((double)__pyx_v_i)) * __pyx_v_dpos)); }
174:
175: for idx in range(size):
/* "splitPixel.pyx":175 * outPos[i] = pos0_min + (0.5 +<
double > i) * dpos * * for idx in range(size): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data =<
double > cdata[idx] * a0 =<
double > cpos[idx, 0, 0] */ __pyx_t_5 = __pyx_v_size; for (__pyx_t_17 = 0; __pyx_t_17<
__pyx_t_5; __pyx_t_17+=1) { __pyx_v_idx = __pyx_t_17;
176: data = < double > cdata[idx]
/* "splitPixel.pyx":176 * * for idx in range(size): * data =<
double > cdata[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* a0 =<
double > cpos[idx, 0, 0] * b0 =<
double > cpos[idx, 1, 0] */ __pyx_t_19 = __pyx_v_idx; __pyx_v_data = ((double)(*__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_cdata.buf, __pyx_t_19, __pyx_bstride_0_cdata)));
177: a0 = < double > cpos[idx, 0, 0]
/* "splitPixel.pyx":177 * for idx in range(size): * data =<
double > cdata[idx] * a0 =<
double > cpos[idx, 0, 0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* b0 =<
double > cpos[idx, 1, 0] * c0 =<
double > cpos[idx, 2, 0] */ __pyx_t_20 = __pyx_v_idx; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_v_a0 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_cpos.buf, __pyx_t_20, __pyx_bstride_0_cpos, __pyx_t_21, __pyx_bstride_1_cpos, __pyx_t_22, __pyx_bstride_2_cpos)));
178: b0 = < double > cpos[idx, 1, 0]
/* "splitPixel.pyx":178 * data =<
double > cdata[idx] * a0 =<
double > cpos[idx, 0, 0] * b0 =<
double > cpos[idx, 1, 0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* c0 =<
double > cpos[idx, 2, 0] * d0 =<
double > cpos[idx, 3, 0] */ __pyx_t_23 = __pyx_v_idx; __pyx_t_24 = 1; __pyx_t_25 = 0; __pyx_v_b0 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_cpos.buf, __pyx_t_23, __pyx_bstride_0_cpos, __pyx_t_24, __pyx_bstride_1_cpos, __pyx_t_25, __pyx_bstride_2_cpos)));
179: c0 = < double > cpos[idx, 2, 0]
/* "splitPixel.pyx":179 * a0 =<
double > cpos[idx, 0, 0] * b0 =<
double > cpos[idx, 1, 0] * c0 =<
double > cpos[idx, 2, 0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* d0 =<
double > cpos[idx, 3, 0] * min0 = min4f(a0, b0, c0, d0) */ __pyx_t_26 = __pyx_v_idx; __pyx_t_27 = 2; __pyx_t_28 = 0; __pyx_v_c0 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_cpos.buf, __pyx_t_26, __pyx_bstride_0_cpos, __pyx_t_27, __pyx_bstride_1_cpos, __pyx_t_28, __pyx_bstride_2_cpos)));
180: d0 = < double > cpos[idx, 3, 0]
/* "splitPixel.pyx":180 * b0 =<
double > cpos[idx, 1, 0] * c0 =<
double > cpos[idx, 2, 0] * d0 =<
double > cpos[idx, 3, 0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min0 = min4f(a0, b0, c0, d0) * max0 = max4f(a0, b0, c0, d0) */ __pyx_t_29 = __pyx_v_idx; __pyx_t_30 = 3; __pyx_t_31 = 0; __pyx_v_d0 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_cpos.buf, __pyx_t_29, __pyx_bstride_0_cpos, __pyx_t_30, __pyx_bstride_1_cpos, __pyx_t_31, __pyx_bstride_2_cpos)));
181: min0 = min4f(a0, b0, c0, d0)
/* "splitPixel.pyx":181 * c0 =<
double > cpos[idx, 2, 0] * d0 =<
double > cpos[idx, 3, 0] * min0 = min4f(a0, b0, c0, d0) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max0 = max4f(a0, b0, c0, d0) * */ __pyx_v_min0 = __pyx_f_10splitPixel_min4f(__pyx_v_a0, __pyx_v_b0, __pyx_v_c0, __pyx_v_d0);
182: max0 = max4f(a0, b0, c0, d0)
/* "splitPixel.pyx":182 * d0 =<
double > cpos[idx, 3, 0] * min0 = min4f(a0, b0, c0, d0) * max0 = max4f(a0, b0, c0, d0) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * fbin0_min = getBinNr(min0, pos0_min, dpos) */ __pyx_v_max0 = __pyx_f_10splitPixel_max4f(__pyx_v_a0, __pyx_v_b0, __pyx_v_c0, __pyx_v_d0);
183:
184: fbin0_min = getBinNr(min0, pos0_min, dpos)
/* "splitPixel.pyx":184 * max0 = max4f(a0, b0, c0, d0) * * fbin0_min = getBinNr(min0, pos0_min, dpos) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* fbin0_max = getBinNr(max0, pos0_min, dpos) * bin0_min =<
long > floor(fbin0_min) */ __pyx_v_fbin0_min = __pyx_f_10splitPixel_getBinNr(__pyx_v_min0, __pyx_v_pos0_min, __pyx_v_dpos);
185: fbin0_max = getBinNr(max0, pos0_min, dpos)
/* "splitPixel.pyx":185 * * fbin0_min = getBinNr(min0, pos0_min, dpos) * fbin0_max = getBinNr(max0, pos0_min, dpos) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bin0_min =<
long > floor(fbin0_min) * bin0_max =<
long > floor(fbin0_max) */ __pyx_v_fbin0_max = __pyx_f_10splitPixel_getBinNr(__pyx_v_max0, __pyx_v_pos0_min, __pyx_v_dpos);
186: bin0_min = < long > floor(fbin0_min)
/* "splitPixel.pyx":186 * fbin0_min = getBinNr(min0, pos0_min, dpos) * fbin0_max = getBinNr(max0, pos0_min, dpos) * bin0_min =<
long > floor(fbin0_min) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bin0_max =<
long > floor(fbin0_max) * */ __pyx_v_bin0_min = ((long)floor(__pyx_v_fbin0_min));
187: bin0_max = < long > floor(fbin0_max)
/* "splitPixel.pyx":187 * fbin0_max = getBinNr(max0, pos0_min, dpos) * bin0_min =<
long > floor(fbin0_min) * bin0_max =<
long > floor(fbin0_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if bin0_min == bin0_max: */ __pyx_v_bin0_max = ((long)floor(__pyx_v_fbin0_max));
188:
189: if bin0_min == bin0_max:
/* "splitPixel.pyx":189 * bin0_max =<
long > floor(fbin0_max) * * if bin0_min == bin0_max: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* #All pixel is within a single bin * outCount[bin0_min] += 1.0 */ __pyx_t_14 = (__pyx_v_bin0_min == __pyx_v_bin0_max); if (__pyx_t_14) {
190: #All pixel is within a single bin
191: outCount[bin0_min] += 1.0
/* "splitPixel.pyx":191 * if bin0_min == bin0_max: * #All pixel is within a single bin * outCount[bin0_min] += 1.0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min] += data * */ __pyx_t_32 = __pyx_v_bin0_min; *__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_32, __pyx_bstride_0_outCount) += 1.0;
192: outData[bin0_min] += data
/* "splitPixel.pyx":192 * #All pixel is within a single bin * outCount[bin0_min] += 1.0 * outData[bin0_min] += data #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * # else we have pixel spliting. */ __pyx_t_33 = __pyx_v_bin0_min; *__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_33, __pyx_bstride_0_outData) += __pyx_v_data; goto __pyx_L15; } /*else*/ {
193:
194: # else we have pixel spliting.
195: else:
196: aeraPixel = fbin0_max - fbin0_min
/* "splitPixel.pyx":196 * # else we have pixel spliting. * else: * aeraPixel = fbin0_max - fbin0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaA = 1.0 / aeraPixel * */ __pyx_v_aeraPixel = (__pyx_v_fbin0_max - __pyx_v_fbin0_min);
197: deltaA = 1.0 / aeraPixel
/* "splitPixel.pyx":197 * else: * aeraPixel = fbin0_max - fbin0_min * deltaA = 1.0 / aeraPixel #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * deltaL =<
double > (bin0_min + 1) - fbin0_min */ __pyx_v_deltaA = (1.0 / __pyx_v_aeraPixel);
198:
199: deltaL = < double > (bin0_min + 1) - fbin0_min
/* "splitPixel.pyx":199 * deltaA = 1.0 / aeraPixel * * deltaL =<
double > (bin0_min + 1) - fbin0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaR = fbin0_max - (<
double > bin0_max) * */ __pyx_v_deltaL = (((double)(__pyx_v_bin0_min + 1)) - __pyx_v_fbin0_min);
200: deltaR = fbin0_max - (< double > bin0_max)
/* "splitPixel.pyx":200 * * deltaL =<
double > (bin0_min + 1) - fbin0_min * deltaR = fbin0_max - (<
double > bin0_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * outCount[bin0_min] += deltaA * deltaL */ __pyx_v_deltaR = (__pyx_v_fbin0_max - ((double)__pyx_v_bin0_max));
201:
202: outCount[bin0_min] += deltaA * deltaL
/* "splitPixel.pyx":202 * deltaR = fbin0_max - (<
double > bin0_max) * * outCount[bin0_min] += deltaA * deltaL #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min] += data * deltaA * deltaL * */ __pyx_t_34 = __pyx_v_bin0_min; *__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_34, __pyx_bstride_0_outCount) += (__pyx_v_deltaA * __pyx_v_deltaL);
203: outData[bin0_min] += data * deltaA * deltaL
/* "splitPixel.pyx":203 * * outCount[bin0_min] += deltaA * deltaL * outData[bin0_min] += data * deltaA * deltaL #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * outCount[bin0_max] += deltaA * deltaR */ __pyx_t_35 = __pyx_v_bin0_min; *__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_35, __pyx_bstride_0_outData) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaL);
204:
205: outCount[bin0_max] += deltaA * deltaR
/* "splitPixel.pyx":205 * outData[bin0_min] += data * deltaA * deltaL * * outCount[bin0_max] += deltaA * deltaR #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_max] += data * deltaA * deltaR * */ __pyx_t_36 = __pyx_v_bin0_max; *__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_36, __pyx_bstride_0_outCount) += (__pyx_v_deltaA * __pyx_v_deltaR);
206: outData[bin0_max] += data * deltaA * deltaR
/* "splitPixel.pyx":206 * * outCount[bin0_max] += deltaA * deltaR * outData[bin0_max] += data * deltaA * deltaR #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if bin0_min + 1 != bin0_max: */ __pyx_t_37 = __pyx_v_bin0_max; *__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_37, __pyx_bstride_0_outData) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaR);
207:
208: if bin0_min + 1 != bin0_max:
/* "splitPixel.pyx":208 * 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_14 = ((__pyx_v_bin0_min + 1) != __pyx_v_bin0_max); if (__pyx_t_14) {
209: for i in range(bin0_min + 1, bin0_max):
/* "splitPixel.pyx":209 * * if bin0_min + 1 != bin0_max: * for i in range(bin0_min + 1, bin0_max): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[i] += deltaA * outData[i] += data * deltaA */ __pyx_t_38 = __pyx_v_bin0_max; for (__pyx_t_39 = (__pyx_v_bin0_min + 1); __pyx_t_39<
__pyx_t_38; __pyx_t_39+=1) { __pyx_v_i = __pyx_t_39;
210: outCount[i] += deltaA
/* "splitPixel.pyx":210 * if bin0_min + 1 != bin0_max: * for i in range(bin0_min + 1, bin0_max): * outCount[i] += deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[i] += data * deltaA * */ __pyx_t_40 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_40, __pyx_bstride_0_outCount) += __pyx_v_deltaA;
211: outData[i] += data * deltaA
/* "splitPixel.pyx":211 * for i in range(bin0_min + 1, bin0_max): * outCount[i] += deltaA * outData[i] += data * deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * for i in range(bins): */ __pyx_t_41 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_41, __pyx_bstride_0_outData) += (__pyx_v_data * __pyx_v_deltaA); } goto __pyx_L16; } __pyx_L16:; } __pyx_L15:; }
212:
213: for i in range(bins):
/* "splitPixel.pyx":213 * outData[i] += data * deltaA * * for i in range(bins): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if outCount[i] > epsilon: * outMerge[i] = outData[i] / outCount[i] */ __pyx_t_5 = __pyx_v_bins; for (__pyx_t_17 = 0; __pyx_t_17<
__pyx_t_5; __pyx_t_17+=1) { __pyx_v_i = __pyx_t_17;
214: if outCount[i] > epsilon:
/* "splitPixel.pyx":214 * * for i in range(bins): * if outCount[i] > epsilon: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outMerge[i] = outData[i] / outCount[i] * else: */ __pyx_t_38 = __pyx_v_i; __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_38, __pyx_bstride_0_outCount)) > __pyx_v_epsilon); if (__pyx_t_14) {
215: outMerge[i] = outData[i] / outCount[i]
/* "splitPixel.pyx":215 * for i in range(bins): * if outCount[i] > epsilon: * outMerge[i] = outData[i] / outCount[i] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * outMerge[i] = dummy */ __pyx_t_39 = __pyx_v_i; __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outMerge.buf, __pyx_t_43, __pyx_bstride_0_outMerge) = ((*__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_39, __pyx_bstride_0_outData)) / (*__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_42, __pyx_bstride_0_outCount))); goto __pyx_L21; } /*else*/ {
216: else:
217: outMerge[i] = dummy
/* "splitPixel.pyx":217 * outMerge[i] = outData[i] / outCount[i] * else: * outMerge[i] = dummy #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * return outPos, outMerge, outData, outCount */ __pyx_t_44 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outMerge.buf, __pyx_t_44, __pyx_bstride_0_outMerge) = __pyx_v_dummy; } __pyx_L21:; } }
218:
219: return outPos, outMerge, outData, outCount
/* "splitPixel.pyx":219 * outMerge[i] = dummy * * return outPos, outMerge, outData, outCount #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_INCREF(((PyObject *)__pyx_v_outPos)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_outPos)); __Pyx_GIVEREF(((PyObject *)__pyx_v_outPos)); __Pyx_INCREF(((PyObject *)__pyx_v_outMerge)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_outMerge)); __Pyx_GIVEREF(((PyObject *)__pyx_v_outMerge)); __Pyx_INCREF(((PyObject *)__pyx_v_outData)); PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_outData)); __Pyx_GIVEREF(((PyObject *)__pyx_v_outData)); __Pyx_INCREF(((PyObject *)__pyx_v_outCount)); PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_v_outCount)); __Pyx_GIVEREF(((PyObject *)__pyx_v_outCount)); __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 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_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outPos); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outMerge); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outCount); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cdata); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cpos); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outData); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("splitPixel.fullSplit1D", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outPos); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outMerge); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outCount); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cdata); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cpos); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outData); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_cpos); __Pyx_XDECREF((PyObject *)__pyx_v_cdata); __Pyx_XDECREF((PyObject *)__pyx_v_outData); __Pyx_XDECREF((PyObject *)__pyx_v_outCount); __Pyx_XDECREF((PyObject *)__pyx_v_outMerge); __Pyx_XDECREF((PyObject *)__pyx_v_outPos); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
220:
221:
222:
223:
224:
225:
226: @cython.cdivision(True)
227: @cython.boundscheck(False)
228: @cython.wraparound(False)
229: def fullSplit2D(numpy.ndarray pos not None,
/* "splitPixel.pyx":229 * @cython.boundscheck(False) * @cython.wraparound(False) * def fullSplit2D(numpy.ndarray pos not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray weights not None, * bins not None, */ static PyObject *__pyx_pf_10splitPixel_1fullSplit2D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_10splitPixel_1fullSplit2D[] = "\n Calculate 2D histogram of pos weighted by weights\n \n Splitting is done on the pixel's bounding box like fit2D\n \n \n @param pos: 3D array with pos0; Corner A,B,C,D; tth or chi\n @param weights: array with intensities\n @param bins: number of output bins int or 2-tuple of int\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 \n @return I, edges0, edges1, weighted histogram(2D), unweighted histogram (2D)\n "; static PyMethodDef __pyx_mdef_10splitPixel_1fullSplit2D = {__Pyx_NAMESTR("fullSplit2D"), (PyCFunction)__pyx_pf_10splitPixel_1fullSplit2D, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_10splitPixel_1fullSplit2D)}; static PyObject *__pyx_pf_10splitPixel_1fullSplit2D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_pos = 0; PyArrayObject *__pyx_v_weights = 0; PyObject *__pyx_v_bins = 0; PyObject *__pyx_v_pos0Range = 0; PyObject *__pyx_v_pos1Range = 0; double __pyx_v_dummy; long __pyx_v_bins0; long __pyx_v_bins1; long __pyx_v_i; long __pyx_v_j; long __pyx_v_idx; long __pyx_v_size; PyArrayObject *__pyx_v_cpos = 0; PyArrayObject *__pyx_v_cdata = 0; PyArrayObject *__pyx_v_outData = 0; PyArrayObject *__pyx_v_outCount = 0; PyArrayObject *__pyx_v_outMerge = 0; PyArrayObject *__pyx_v_edges0 = 0; PyArrayObject *__pyx_v_edges1 = 0; double __pyx_v_min0; double __pyx_v_max0; double __pyx_v_min1; double __pyx_v_max1; double __pyx_v_deltaR; double __pyx_v_deltaL; double __pyx_v_deltaU; double __pyx_v_deltaD; double __pyx_v_deltaA; double __pyx_v_pos0_min; double __pyx_v_pos0_max; double __pyx_v_pos1_min; double __pyx_v_pos1_max; double __pyx_v_pos0_maxin; double __pyx_v_pos1_maxin; double __pyx_v_fbin0_min; double __pyx_v_fbin0_max; double __pyx_v_fbin1_min; double __pyx_v_fbin1_max; long __pyx_v_bin0_max; long __pyx_v_bin0_min; long __pyx_v_bin1_max; long __pyx_v_bin1_min; double __pyx_v_aeraPixel; double __pyx_v_a0; double __pyx_v_a1; double __pyx_v_b0; double __pyx_v_b1; double __pyx_v_c0; double __pyx_v_c1; double __pyx_v_d0; double __pyx_v_d1; double __pyx_v_epsilon; double __pyx_v_dpos0; double __pyx_v_dpos1; double __pyx_v_data; Py_buffer __pyx_bstruct_edges0; Py_ssize_t __pyx_bstride_0_edges0 = 0; Py_ssize_t __pyx_bshape_0_edges0 = 0; Py_buffer __pyx_bstruct_edges1; Py_ssize_t __pyx_bstride_0_edges1 = 0; Py_ssize_t __pyx_bshape_0_edges1 = 0; Py_buffer __pyx_bstruct_outMerge; Py_ssize_t __pyx_bstride_0_outMerge = 0; Py_ssize_t __pyx_bstride_1_outMerge = 0; Py_ssize_t __pyx_bshape_0_outMerge = 0; Py_ssize_t __pyx_bshape_1_outMerge = 0; Py_buffer __pyx_bstruct_outCount; Py_ssize_t __pyx_bstride_0_outCount = 0; Py_ssize_t __pyx_bstride_1_outCount = 0; Py_ssize_t __pyx_bshape_0_outCount = 0; Py_ssize_t __pyx_bshape_1_outCount = 0; Py_buffer __pyx_bstruct_cdata; Py_ssize_t __pyx_bstride_0_cdata = 0; Py_ssize_t __pyx_bshape_0_cdata = 0; Py_buffer __pyx_bstruct_cpos; Py_ssize_t __pyx_bstride_0_cpos = 0; Py_ssize_t __pyx_bstride_1_cpos = 0; Py_ssize_t __pyx_bstride_2_cpos = 0; Py_ssize_t __pyx_bshape_0_cpos = 0; Py_ssize_t __pyx_bshape_1_cpos = 0; Py_ssize_t __pyx_bshape_2_cpos = 0; Py_buffer __pyx_bstruct_outData; Py_ssize_t __pyx_bstride_0_outData = 0; Py_ssize_t __pyx_bstride_1_outData = 0; Py_ssize_t __pyx_bshape_0_outData = 0; Py_ssize_t __pyx_bshape_1_outData = 0; PyObject *__pyx_r = NULL; static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__pos,&__pyx_n_s__weights,&__pyx_n_s__bins,&__pyx_n_s__pos0Range,&__pyx_n_s__pos1Range,&__pyx_n_s__dummy,0}; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fullSplit2D"); __pyx_self = __pyx_self; { PyObject* values[6] = {0,0,0,0,0,0}; /* "splitPixel.pyx":229 * @cython.boundscheck(False) * @cython.wraparound(False) * def fullSplit2D(numpy.ndarray pos not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray weights not None, * bins not None, */ __pyx_k_tuple_48 = PyTuple_New(55); if (unlikely(!__pyx_k_tuple_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_48)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 0, ((PyObject *)__pyx_n_s__pos)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos)); __Pyx_INCREF(((PyObject *)__pyx_n_s__weights)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 1, ((PyObject *)__pyx_n_s__weights)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__weights)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bins)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 2, ((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_48, 3, ((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_48, 4, ((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_48, 5, ((PyObject *)__pyx_n_s__dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bins0)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 6, ((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_48, 7, ((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_48, 8, ((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_48, 9, ((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_48, 10, ((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_48, 11, ((PyObject *)__pyx_n_s__size)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__size)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cpos)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 12, ((PyObject *)__pyx_n_s__cpos)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cpos)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cdata)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 13, ((PyObject *)__pyx_n_s__cdata)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cdata)); __Pyx_INCREF(((PyObject *)__pyx_n_s__outData)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 14, ((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_48, 15, ((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_48, 16, ((PyObject *)__pyx_n_s__outMerge)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outMerge)); __Pyx_INCREF(((PyObject *)__pyx_n_s__edges0)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 17, ((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_48, 18, ((PyObject *)__pyx_n_s__edges1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__edges1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__min0)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 19, ((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_48, 20, ((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_48, 21, ((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_48, 22, ((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_48, 23, ((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_48, 24, ((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_48, 25, ((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_48, 26, ((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_48, 27, ((PyObject *)__pyx_n_s__deltaA)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__deltaA)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos0_min)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 28, ((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_48, 29, ((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_48, 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_48, 31, ((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_48, 32, ((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_48, 33, ((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_48, 34, ((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_48, 35, ((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_48, 36, ((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_48, 37, ((PyObject *)__pyx_n_s__fbin1_max)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fbin1_max)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bin0_max)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 38, ((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_48, 39, ((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_48, 40, ((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_48, 41, ((PyObject *)__pyx_n_s__bin1_min)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bin1_min)); __Pyx_INCREF(((PyObject *)__pyx_n_s__aeraPixel)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 42, ((PyObject *)__pyx_n_s__aeraPixel)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__aeraPixel)); __Pyx_INCREF(((PyObject *)__pyx_n_s__a0)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 43, ((PyObject *)__pyx_n_s__a0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__a0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__a1)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 44, ((PyObject *)__pyx_n_s__a1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__a1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__b0)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 45, ((PyObject *)__pyx_n_s__b0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__b0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__b1)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 46, ((PyObject *)__pyx_n_s__b1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__b1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__c0)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 47, ((PyObject *)__pyx_n_s__c0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__c1)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 48, ((PyObject *)__pyx_n_s__c1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__d0)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 49, ((PyObject *)__pyx_n_s__d0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__d0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__d1)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 50, ((PyObject *)__pyx_n_s__d1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__d1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__epsilon)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 51, ((PyObject *)__pyx_n_s__epsilon)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__epsilon)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dpos0)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 52, ((PyObject *)__pyx_n_s__dpos0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dpos0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dpos1)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 53, ((PyObject *)__pyx_n_s__dpos1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dpos1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__data)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 54, ((PyObject *)__pyx_n_s__data)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_48)); /* "splitPixel.pyx":229 * @cython.boundscheck(False) * @cython.wraparound(False) * def fullSplit2D(numpy.ndarray pos not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray weights not None, * bins not None, */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10splitPixel_1fullSplit2D, NULL, __pyx_n_s__splitPixel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__fullSplit2D, __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
230: numpy.ndarray weights not None,
231: bins not None,
232: pos0Range=None,
/* "splitPixel.pyx":232 * numpy.ndarray weights not None, * bins not None, * pos0Range=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1Range=None, * double dummy=0.0): */ values[3] = ((PyObject *)Py_None);
233: pos1Range=None,
/* "splitPixel.pyx":233 * bins not None, * pos0Range=None, * pos1Range=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* double dummy=0.0): * """ */ values[4] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; switch (PyTuple_GET_SIZE(__pyx_args)) { 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 (PyTuple_GET_SIZE(__pyx_args)) { case 0: values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos); if (likely(values[0])) kw_args--; else goto __pyx_L5_argtuple_error; case 1: values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__weights); if (likely(values[1])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("fullSplit2D", 0, 3, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins); if (likely(values[2])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("fullSplit2D", 0, 3, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos0Range); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos1Range); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "fullSplit2D")<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { 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_pos = ((PyArrayObject *)values[0]); __pyx_v_weights = ((PyArrayObject *)values[1]); __pyx_v_bins = values[2]; __pyx_v_pos0Range = values[3]; __pyx_v_pos1Range = values[4]; if (values[5]) { __pyx_v_dummy = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_dummy == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else {
234: double dummy=0.0):
/* "splitPixel.pyx":234 * pos0Range=None, * pos1Range=None, * double dummy=0.0): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* """ * Calculate 2D histogram of pos weighted by weights */ __pyx_v_dummy = ((double)0.0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("fullSplit2D", 0, 3, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("splitPixel.fullSplit2D", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_bstruct_cpos.buf = NULL; __pyx_bstruct_cdata.buf = NULL; __pyx_bstruct_outData.buf = NULL; __pyx_bstruct_outCount.buf = NULL; __pyx_bstruct_outMerge.buf = NULL; __pyx_bstruct_edges0.buf = NULL; __pyx_bstruct_edges1.buf = NULL; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 0, "pos", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weights), __pyx_ptype_5numpy_ndarray, 0, "weights", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(((PyObject *)__pyx_v_bins) == Py_None)) { PyErr_Format(PyExc_TypeError, "Argument 'bins' must not be None"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
235: """
236: Calculate 2D histogram of pos weighted by weights
237:
238: Splitting is done on the pixel's bounding box like fit2D
239:
240:
241: @param pos: 3D array with pos0; Corner A,B,C,D; tth or chi
242: @param weights: array with intensities
243: @param bins: number of output bins int or 2-tuple of int
244: @param pos0Range: minimum and maximum of the 2th range
245: @param pos1Range: minimum and maximum of the chi range
246: @param dummy: value for bins without pixels
247: @return I, edges0, edges1, weighted histogram(2D), unweighted histogram (2D)
248: """
249: cdef long bins0, bins1, i, j, idx
250: cdef long size = weights.size
/* "splitPixel.pyx":250 * """ * cdef long bins0, bins1, i, j, idx * cdef long size = weights.size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert pos.shape[0] == weights.size * assert pos.shape[1] == 4 # 4 corners */ __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 = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_t_1); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_size = __pyx_t_2;
251: assert pos.shape[0] == weights.size
/* "splitPixel.pyx":251 * cdef long bins0, bins1, i, j, idx * cdef long size = weights.size * assert pos.shape[0] == weights.size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert pos.shape[1] == 4 # 4 corners * assert pos.shape[2] == 2 # tth and chi */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_1 = __Pyx_PyInt_to_py_Py_intptr_t((__pyx_v_pos->dimensions[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_weights), __pyx_n_s__size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __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); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __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 = 251; __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 = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
252: assert pos.shape[1] == 4 # 4 corners
/* "splitPixel.pyx":252 * cdef long size = weights.size * assert pos.shape[0] == weights.size * assert pos.shape[1] == 4 # 4 corners #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert pos.shape[2] == 2 # tth and chi * assert pos.ndim == 3 */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!((__pyx_v_pos->dimensions[1]) == 4))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
253: assert pos.shape[2] == 2 # tth and chi
/* "splitPixel.pyx":253 * assert pos.shape[0] == weights.size * assert pos.shape[1] == 4 # 4 corners * assert pos.shape[2] == 2 # tth and chi #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert pos.ndim == 3 * try: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!((__pyx_v_pos->dimensions[2]) == 2))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
254: assert pos.ndim == 3
/* "splitPixel.pyx":254 * assert pos.shape[1] == 4 # 4 corners * assert pos.shape[2] == 2 # tth and chi * assert pos.ndim == 3 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* try: * bins0, bins1 = tuple(bins) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!(__pyx_v_pos->nd == 3))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
255: try:
/* "splitPixel.pyx":255 * assert pos.shape[2] == 2 # tth and chi * assert pos.ndim == 3 * 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:*/ {
256: bins0, bins1 = tuple(bins)
/* "splitPixel.pyx":256 * assert pos.ndim == 3 * try: * bins0, bins1 = tuple(bins) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* except: * bins0 = bins1 =<
long > bins */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_INCREF(__pyx_v_bins); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_bins); __Pyx_GIVEREF(__pyx_v_bins); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (likely(PyTuple_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) { if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2); else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __Pyx_UnpackTupleError(__pyx_t_3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_t_4); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __Pyx_PyInt_AsLong(__pyx_t_1); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_bins0 = __pyx_t_2; __pyx_v_bins1 = __pyx_t_9; } __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_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
257: except:
/* "splitPixel.pyx":257 * try: * bins0, bins1 = tuple(bins) * except: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bins0 = bins1 =<
long > bins * if bins0<
= 0: */ /*except:*/ { __Pyx_AddTraceback("splitPixel.fullSplit2D", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_4)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_4);
258: bins0 = bins1 = < long > bins
/* "splitPixel.pyx":258 * bins0, bins1 = tuple(bins) * except: * bins0 = bins1 =<
long > bins #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if bins0<
= 0: * bins0 = 1 */ __pyx_t_9 = __Pyx_PyInt_AsLong(__pyx_v_bins); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __pyx_v_bins0 = ((long)__pyx_t_9); __pyx_v_bins1 = ((long)__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_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_L7_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_L13_try_end:; }
259: if bins0 <= 0:
/* "splitPixel.pyx":259 * except: * bins0 = bins1 =<
long > bins * if bins0<
= 0: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bins0 = 1 * if bins1<
= 0: */ __pyx_t_5 = (__pyx_v_bins0<
= 0); if (__pyx_t_5) {
260: bins0 = 1
/* "splitPixel.pyx":260 * bins0 = bins1 =<
long > bins * if bins0<
= 0: * bins0 = 1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if bins1<
= 0: * bins1 = 1 */ __pyx_v_bins0 = 1; goto __pyx_L16; } __pyx_L16:;
261: if bins1 <= 0:
/* "splitPixel.pyx":261 * if bins0<
= 0: * bins0 = 1 * if bins1<
= 0: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bins1 = 1 * */ __pyx_t_5 = (__pyx_v_bins1<
= 0); if (__pyx_t_5) {
262: bins1 = 1
/* "splitPixel.pyx":262 * bins0 = 1 * if bins1<
= 0: * bins1 = 1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * */ __pyx_v_bins1 = 1; goto __pyx_L17; } __pyx_L17:;
263:
264:
265: cdef numpy.ndarray[DTYPE_float64_t, ndim = 3] cpos = pos.astype("float64")
/* "splitPixel.pyx":265 * * * cdef numpy.ndarray[DTYPE_float64_t, ndim = 3] cpos = pos.astype("float64") #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = weights.astype("float64").ravel() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype="float64") */ __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_pos), __pyx_n_s__astype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__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 = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_cpos, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_10splitPixel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) { __pyx_v_cpos = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_cpos.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_cpos = __pyx_bstruct_cpos.strides[0]; __pyx_bstride_1_cpos = __pyx_bstruct_cpos.strides[1]; __pyx_bstride_2_cpos = __pyx_bstruct_cpos.strides[2]; __pyx_bshape_0_cpos = __pyx_bstruct_cpos.shape[0]; __pyx_bshape_1_cpos = __pyx_bstruct_cpos.shape[1]; __pyx_bshape_2_cpos = __pyx_bstruct_cpos.shape[2]; } } __pyx_t_10 = 0; __pyx_v_cpos = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "splitPixel.pyx":265 * * * cdef numpy.ndarray[DTYPE_float64_t, ndim = 3] cpos = pos.astype("float64") #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = weights.astype("float64").ravel() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype="float64") */ __pyx_k_tuple_15 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_15)); __Pyx_INCREF(((PyObject *)__pyx_n_s__float64)); PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, ((PyObject *)__pyx_n_s__float64)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__float64)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));
266: cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = weights.astype("float64").ravel()
/* "splitPixel.pyx":266 * * cdef numpy.ndarray[DTYPE_float64_t, ndim = 3] cpos = pos.astype("float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = weights.astype("float64").ravel() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype="float64") */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_weights), __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __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(__pyx_t_4, __pyx_n_s__ravel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __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 = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__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 = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_cdata, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_10splitPixel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_cdata = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_cdata.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_cdata = __pyx_bstruct_cdata.strides[0]; __pyx_bshape_0_cdata = __pyx_bstruct_cdata.shape[0]; } } __pyx_t_11 = 0; __pyx_v_cdata = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "splitPixel.pyx":266 * * cdef numpy.ndarray[DTYPE_float64_t, ndim = 3] cpos = pos.astype("float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = weights.astype("float64").ravel() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype="float64") */ __pyx_k_tuple_16 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_16)); __Pyx_INCREF(((PyObject *)__pyx_n_s__float64)); PyTuple_SET_ITEM(__pyx_k_tuple_16, 0, ((PyObject *)__pyx_n_s__float64)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__float64)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));
267: cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype="float64")
/* "splitPixel.pyx":267 * cdef numpy.ndarray[DTYPE_float64_t, ndim = 3] cpos = pos.astype("float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = weights.astype("float64").ravel() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype="float64") #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype="float64") */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __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 = 267; __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_FromLong(__pyx_v_bins0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromLong(__pyx_v_bins1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 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 = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_12)); __Pyx_GIVEREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __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_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 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 = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_outData, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_10splitPixel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { __pyx_v_outData = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_outData.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_outData = __pyx_bstruct_outData.strides[0]; __pyx_bstride_1_outData = __pyx_bstruct_outData.strides[1]; __pyx_bshape_0_outData = __pyx_bstruct_outData.shape[0]; __pyx_bshape_1_outData = __pyx_bstruct_outData.shape[1]; } } __pyx_t_13 = 0; __pyx_v_outData = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0;
268: cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype="float64")
/* "splitPixel.pyx":268 * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = weights.astype("float64").ravel() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype="float64") #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] edges0 = numpy.zeros(bins0, dtype="float64") */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__zeros); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromLong(__pyx_v_bins0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromLong(__pyx_v_bins1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __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 = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 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 = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__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 = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_12, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 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 = 268; __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_bstruct_outCount, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_10splitPixel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { __pyx_v_outCount = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_outCount.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_outCount = __pyx_bstruct_outCount.strides[0]; __pyx_bstride_1_outCount = __pyx_bstruct_outCount.strides[1]; __pyx_bshape_0_outCount = __pyx_bstruct_outCount.shape[0]; __pyx_bshape_1_outCount = __pyx_bstruct_outCount.shape[1]; } } __pyx_t_14 = 0; __pyx_v_outCount = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0;
269: cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype="float64")
/* "splitPixel.pyx":269 * cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype="float64") #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] edges0 = numpy.zeros(bins0, dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] edges1 = numpy.zeros(bins1, dtype="float64") */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __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 = 269; __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_FromLong(__pyx_v_bins0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromLong(__pyx_v_bins1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 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 = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_12)); __Pyx_GIVEREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __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_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 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 = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_outMerge, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_10splitPixel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { __pyx_v_outMerge = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_outMerge.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_outMerge = __pyx_bstruct_outMerge.strides[0]; __pyx_bstride_1_outMerge = __pyx_bstruct_outMerge.strides[1]; __pyx_bshape_0_outMerge = __pyx_bstruct_outMerge.shape[0]; __pyx_bshape_1_outMerge = __pyx_bstruct_outMerge.shape[1]; } } __pyx_t_15 = 0; __pyx_v_outMerge = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0;
270: cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] edges0 = numpy.zeros(bins0, dtype="float64")
/* "splitPixel.pyx":270 * cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] edges0 = numpy.zeros(bins0, dtype="float64") #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] edges1 = numpy.zeros(bins1, dtype="float64") * */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__zeros); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromLong(__pyx_v_bins0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__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 = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_12, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 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 = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_edges0, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_10splitPixel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_edges0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_edges0.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_edges0 = __pyx_bstruct_edges0.strides[0]; __pyx_bshape_0_edges0 = __pyx_bstruct_edges0.shape[0]; } } __pyx_t_16 = 0; __pyx_v_edges0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0;
271: cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] edges1 = numpy.zeros(bins1, dtype="float64")
/* "splitPixel.pyx":271 * cdef numpy.ndarray[DTYPE_float64_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] edges0 = numpy.zeros(bins0, dtype="float64") * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] edges1 = numpy.zeros(bins1, dtype="float64") #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef double min0, max0, min1, max1, deltaR, deltaL, deltaU, deltaD, deltaA */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __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 = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromLong(__pyx_v_bins1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __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 = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__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 = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __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_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_edges1, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_10splitPixel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_edges1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_edges1.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_edges1 = __pyx_bstruct_edges1.strides[0]; __pyx_bshape_0_edges1 = __pyx_bstruct_edges1.shape[0]; } } __pyx_t_17 = 0; __pyx_v_edges1 = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0;
272:
273: cdef double min0, max0, min1, max1, deltaR, deltaL, deltaU, deltaD, deltaA
274: cdef double pos0_min, pos0_max, pos1_min, pos1_max, pos0_maxin, pos1_maxin
275:
276: cdef double fbin0_min, fbin0_max, fbin1_min, fbin1_max
277: cdef long bin0_max, bin0_min, bin1_max, bin1_min
278: cdef double aeraPixel, a0, a1, b0, b1, c0, c1, d0, d1
279: cdef double epsilon = 1e-10
/* "splitPixel.pyx":279 * cdef long bin0_max, bin0_min, bin1_max, bin1_min * cdef double aeraPixel, a0, a1, b0, b1, c0, c1, d0, d1 * cdef double epsilon = 1e-10 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if pos0Range is not None and len(pos0Range) == 2: */ __pyx_v_epsilon = 1e-10;
280:
281: if pos0Range is not None and len(pos0Range) == 2:
/* "splitPixel.pyx":281 * cdef double epsilon = 1e-10 * * if pos0Range is not None and len(pos0Range) == 2: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_min = min(pos0Range) * pos0_maxin = max(pos0Range) */ __pyx_t_5 = (__pyx_v_pos0Range != Py_None); if (__pyx_t_5) { __pyx_t_18 = PyObject_Length(__pyx_v_pos0Range); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = (__pyx_t_18 == 2); __pyx_t_20 = __pyx_t_19; } else { __pyx_t_20 = __pyx_t_5; } if (__pyx_t_20) {
282: pos0_min = min(pos0Range)
/* "splitPixel.pyx":282 * * if pos0Range is not None and len(pos0Range) == 2: * pos0_min = min(pos0Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_maxin = max(pos0Range) * else: */ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); __Pyx_INCREF(__pyx_v_pos0Range); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_pos0Range); __Pyx_GIVEREF(__pyx_v_pos0Range); __pyx_t_1 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_t_21 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_21 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_pos0_min = __pyx_t_21;
283: pos0_maxin = max(pos0Range)
/* "splitPixel.pyx":283 * if pos0Range is not None and len(pos0Range) == 2: * pos0_min = min(pos0Range) * pos0_maxin = max(pos0Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * pos0_min = pos[:, :, 0].min() */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__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_12 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_21 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_21 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_pos0_maxin = __pyx_t_21; goto __pyx_L18; } /*else*/ {
284: else:
285: pos0_min = pos[:, :, 0].min()
/* "splitPixel.pyx":285 * pos0_maxin = max(pos0Range) * else: * pos0_min = pos[:, :, 0].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_maxin = pos[:, :, 0].max() * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.double).eps) */ __pyx_k_slice_17 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_17); __Pyx_GIVEREF(__pyx_k_slice_17); __pyx_k_slice_18 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_18); __Pyx_GIVEREF(__pyx_k_slice_18); /* "splitPixel.pyx":285 * pos0_maxin = max(pos0Range) * else: * pos0_min = pos[:, :, 0].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_maxin = pos[:, :, 0].max() * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.double).eps) */ __pyx_t_12 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_19)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__min); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_21 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_21 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_pos0_min = __pyx_t_21; __pyx_k_tuple_19 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_19)); __Pyx_INCREF(__pyx_k_slice_17); PyTuple_SET_ITEM(__pyx_k_tuple_19, 0, __pyx_k_slice_17); __Pyx_GIVEREF(__pyx_k_slice_17); __Pyx_INCREF(__pyx_k_slice_18); PyTuple_SET_ITEM(__pyx_k_tuple_19, 1, __pyx_k_slice_18); __Pyx_GIVEREF(__pyx_k_slice_18); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_19, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));
286: pos0_maxin = pos[:, :, 0].max()
/* "splitPixel.pyx":286 * else: * pos0_min = pos[:, :, 0].min() * pos0_maxin = pos[:, :, 0].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.double).eps) * */ __pyx_k_slice_20 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_20); __Pyx_GIVEREF(__pyx_k_slice_20); __pyx_k_slice_21 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_21); __Pyx_GIVEREF(__pyx_k_slice_21); /* "splitPixel.pyx":286 * else: * pos0_min = pos[:, :, 0].min() * pos0_maxin = pos[:, :, 0].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.double).eps) * */ __pyx_t_12 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_22)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_21 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_21 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_pos0_maxin = __pyx_t_21; } __pyx_L18:; __pyx_k_tuple_22 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_22)); __Pyx_INCREF(__pyx_k_slice_20); PyTuple_SET_ITEM(__pyx_k_tuple_22, 0, __pyx_k_slice_20); __Pyx_GIVEREF(__pyx_k_slice_20); __Pyx_INCREF(__pyx_k_slice_21); PyTuple_SET_ITEM(__pyx_k_tuple_22, 1, __pyx_k_slice_21); __Pyx_GIVEREF(__pyx_k_slice_21); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_22, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22));
287: pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.double).eps)
/* "splitPixel.pyx":287 * pos0_min = pos[:, :, 0].min() * pos0_maxin = pos[:, :, 0].max() * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.double).eps) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if pos1Range is not None and len(pos1Range) > 1: */ __pyx_t_12 = PyFloat_FromDouble(__pyx_v_pos0_maxin); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__finfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __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 = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__double); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __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 = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__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 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__eps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_int_1, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Multiply(__pyx_t_12, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_21 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_21 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_pos0_max = __pyx_t_21;
288:
289: if pos1Range is not None and len(pos1Range) > 1:
/* "splitPixel.pyx":289 * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.double).eps) * * if pos1Range is not None and len(pos1Range) > 1: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_min = min(pos1Range) * pos1_maxin = max(pos1Range) */ __pyx_t_20 = (__pyx_v_pos1Range != Py_None); if (__pyx_t_20) { __pyx_t_18 = PyObject_Length(__pyx_v_pos1Range); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = (__pyx_t_18 > 1); __pyx_t_19 = __pyx_t_5; } else { __pyx_t_19 = __pyx_t_20; } if (__pyx_t_19) {
290: pos1_min = min(pos1Range)
/* "splitPixel.pyx":290 * * if pos1Range is not None and len(pos1Range) > 1: * pos1_min = min(pos1Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_maxin = max(pos1Range) * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_INCREF(__pyx_v_pos1Range); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_pos1Range); __Pyx_GIVEREF(__pyx_v_pos1Range); __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 = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_21 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_21 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pos1_min = __pyx_t_21;
291: pos1_maxin = max(pos1Range)
/* "splitPixel.pyx":291 * if pos1Range is not None and len(pos1Range) > 1: * pos1_min = min(pos1Range) * pos1_maxin = max(pos1Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * pos1_min = pos[:, :, 1].min() */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__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_1 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_21 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_21 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_pos1_maxin = __pyx_t_21; goto __pyx_L19; } /*else*/ {
292: else:
293: pos1_min = pos[:, :, 1].min()
/* "splitPixel.pyx":293 * pos1_maxin = max(pos1Range) * else: * pos1_min = pos[:, :, 1].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_maxin = pos[:, :, 1].max() * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.double).eps) */ __pyx_k_slice_23 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_23); __Pyx_GIVEREF(__pyx_k_slice_23); __pyx_k_slice_24 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_24); __Pyx_GIVEREF(__pyx_k_slice_24); /* "splitPixel.pyx":293 * pos1_maxin = max(pos1Range) * else: * pos1_min = pos[:, :, 1].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_maxin = pos[:, :, 1].max() * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.double).eps) */ __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_25)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__min); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __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_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_21 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_21 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_pos1_min = __pyx_t_21; __pyx_k_tuple_25 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_25)); __Pyx_INCREF(__pyx_k_slice_23); PyTuple_SET_ITEM(__pyx_k_tuple_25, 0, __pyx_k_slice_23); __Pyx_GIVEREF(__pyx_k_slice_23); __Pyx_INCREF(__pyx_k_slice_24); PyTuple_SET_ITEM(__pyx_k_tuple_25, 1, __pyx_k_slice_24); __Pyx_GIVEREF(__pyx_k_slice_24); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_25, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25));
294: pos1_maxin = pos[:, :, 1].max()
/* "splitPixel.pyx":294 * else: * pos1_min = pos[:, :, 1].min() * pos1_maxin = pos[:, :, 1].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.double).eps) * */ __pyx_k_slice_26 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_26); __Pyx_GIVEREF(__pyx_k_slice_26); __pyx_k_slice_27 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_27); __Pyx_GIVEREF(__pyx_k_slice_27); /* "splitPixel.pyx":294 * else: * pos1_min = pos[:, :, 1].min() * pos1_maxin = pos[:, :, 1].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.double).eps) * */ __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_28)); if (!__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_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__max); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __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_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); 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_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_21 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_21 == (double)-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_pos1_maxin = __pyx_t_21; } __pyx_L19:; __pyx_k_tuple_28 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_28)); __Pyx_INCREF(__pyx_k_slice_26); PyTuple_SET_ITEM(__pyx_k_tuple_28, 0, __pyx_k_slice_26); __Pyx_GIVEREF(__pyx_k_slice_26); __Pyx_INCREF(__pyx_k_slice_27); PyTuple_SET_ITEM(__pyx_k_tuple_28, 1, __pyx_k_slice_27); __Pyx_GIVEREF(__pyx_k_slice_27); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_28, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28));
295: pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.double).eps)
/* "splitPixel.pyx":295 * pos1_min = pos[:, :, 1].min() * pos1_maxin = pos[:, :, 1].max() * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.double).eps) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef double dpos0 = (pos0_max - pos0_min) / (<
double > (bins0)) */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_pos1_maxin); 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_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__finfo); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__double); 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_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 = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_4), NULL); 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_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__eps); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_int_1, __pyx_t_4); 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_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_21 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_21 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pos1_max = __pyx_t_21;
296:
297: cdef double dpos0 = (pos0_max - pos0_min) / (< double > (bins0))
/* "splitPixel.pyx":297 * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.double).eps) * * cdef double dpos0 = (pos0_max - pos0_min) / (<
double > (bins0)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef double dpos1 = (pos1_max - pos1_min) / (<
double > (bins1)) * */ __pyx_v_dpos0 = ((__pyx_v_pos0_max - __pyx_v_pos0_min) / ((double)__pyx_v_bins0));
298: cdef double dpos1 = (pos1_max - pos1_min) / (< double > (bins1))
/* "splitPixel.pyx":298 * * cdef double dpos0 = (pos0_max - pos0_min) / (<
double > (bins0)) * cdef double dpos1 = (pos1_max - pos1_min) / (<
double > (bins1)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * with nogil: */ __pyx_v_dpos1 = ((__pyx_v_pos1_max - __pyx_v_pos1_min) / ((double)__pyx_v_bins1));
299:
300: with nogil:
/* "splitPixel.pyx":300 * cdef double dpos1 = (pos1_max - pos1_min) / (<
double > (bins1)) * * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for i in range(bins0): * edges0[i] = pos0_min + (0.5 +<
double > i) * dpos0 */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "splitPixel.pyx":300 * cdef double dpos1 = (pos1_max - pos1_min) / (<
double > (bins1)) * * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for i in range(bins0): * edges0[i] = pos0_min + (0.5 +<
double > i) * dpos0 */ /*finally:*/ { int __pyx_why; __pyx_why = 0; goto __pyx_L22; __pyx_L21: __pyx_why = 4; goto __pyx_L22; __pyx_L22:; Py_BLOCK_THREADS switch (__pyx_why) { case 4: goto __pyx_L1_error; } } }
301: for i in range(bins0):
/* "splitPixel.pyx":301 * * with nogil: * for i in range(bins0): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* edges0[i] = pos0_min + (0.5 +<
double > i) * dpos0 * for i in range(bins1): */ __pyx_t_9 = __pyx_v_bins0; for (__pyx_t_2 = 0; __pyx_t_2<
__pyx_t_9; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2;
302: edges0[i] = pos0_min + (0.5 +< double > i) * dpos0
/* "splitPixel.pyx":302 * with nogil: * for i in range(bins0): * edges0[i] = pos0_min + (0.5 +<
double > i) * dpos0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for i in range(bins1): * edges1[i] = pos1_min + (0.5 +<
double > i) * dpos1 */ __pyx_t_22 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_edges0.buf, __pyx_t_22, __pyx_bstride_0_edges0) = (__pyx_v_pos0_min + ((0.5 + ((double)__pyx_v_i)) * __pyx_v_dpos0)); }
303: for i in range(bins1):
/* "splitPixel.pyx":303 * for i in range(bins0): * edges0[i] = pos0_min + (0.5 +<
double > i) * dpos0 * for i in range(bins1): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* edges1[i] = pos1_min + (0.5 +<
double > i) * dpos1 * */ __pyx_t_9 = __pyx_v_bins1; for (__pyx_t_2 = 0; __pyx_t_2<
__pyx_t_9; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2;
304: edges1[i] = pos1_min + (0.5 +< double > i) * dpos1
/* "splitPixel.pyx":304 * edges0[i] = pos0_min + (0.5 +<
double > i) * dpos0 * for i in range(bins1): * edges1[i] = pos1_min + (0.5 +<
double > i) * dpos1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * for idx in range(size): */ __pyx_t_23 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_edges1.buf, __pyx_t_23, __pyx_bstride_0_edges1) = (__pyx_v_pos1_min + ((0.5 + ((double)__pyx_v_i)) * __pyx_v_dpos1)); }
305:
306: for idx in range(size):
/* "splitPixel.pyx":306 * edges1[i] = pos1_min + (0.5 +<
double > i) * dpos1 * * for idx in range(size): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data =<
double > cdata[idx] * a0 =<
double > cpos[idx, 0, 0] */ __pyx_t_9 = __pyx_v_size; for (__pyx_t_2 = 0; __pyx_t_2<
__pyx_t_9; __pyx_t_2+=1) { __pyx_v_idx = __pyx_t_2;
307: data = < double > cdata[idx]
/* "splitPixel.pyx":307 * * for idx in range(size): * data =<
double > cdata[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* a0 =<
double > cpos[idx, 0, 0] * a1 =<
double > cpos[idx, 0, 1] */ __pyx_t_24 = __pyx_v_idx; __pyx_v_data = ((double)(*__Pyx_BufPtrStrided1d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_cdata.buf, __pyx_t_24, __pyx_bstride_0_cdata)));
308: a0 = < double > cpos[idx, 0, 0]
/* "splitPixel.pyx":308 * for idx in range(size): * data =<
double > cdata[idx] * a0 =<
double > cpos[idx, 0, 0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* a1 =<
double > cpos[idx, 0, 1] * b0 =<
double > cpos[idx, 1, 0] */ __pyx_t_25 = __pyx_v_idx; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_v_a0 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_cpos.buf, __pyx_t_25, __pyx_bstride_0_cpos, __pyx_t_26, __pyx_bstride_1_cpos, __pyx_t_27, __pyx_bstride_2_cpos)));
309: a1 = < double > cpos[idx, 0, 1]
/* "splitPixel.pyx":309 * data =<
double > cdata[idx] * a0 =<
double > cpos[idx, 0, 0] * a1 =<
double > cpos[idx, 0, 1] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* b0 =<
double > cpos[idx, 1, 0] * b1 =<
double > cpos[idx, 1, 1] */ __pyx_t_28 = __pyx_v_idx; __pyx_t_29 = 0; __pyx_t_30 = 1; __pyx_v_a1 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_cpos.buf, __pyx_t_28, __pyx_bstride_0_cpos, __pyx_t_29, __pyx_bstride_1_cpos, __pyx_t_30, __pyx_bstride_2_cpos)));
310: b0 = < double > cpos[idx, 1, 0]
/* "splitPixel.pyx":310 * a0 =<
double > cpos[idx, 0, 0] * a1 =<
double > cpos[idx, 0, 1] * b0 =<
double > cpos[idx, 1, 0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* b1 =<
double > cpos[idx, 1, 1] * c0 =<
double > cpos[idx, 2, 0] */ __pyx_t_31 = __pyx_v_idx; __pyx_t_32 = 1; __pyx_t_33 = 0; __pyx_v_b0 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_cpos.buf, __pyx_t_31, __pyx_bstride_0_cpos, __pyx_t_32, __pyx_bstride_1_cpos, __pyx_t_33, __pyx_bstride_2_cpos)));
311: b1 = < double > cpos[idx, 1, 1]
/* "splitPixel.pyx":311 * a1 =<
double > cpos[idx, 0, 1] * b0 =<
double > cpos[idx, 1, 0] * b1 =<
double > cpos[idx, 1, 1] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* c0 =<
double > cpos[idx, 2, 0] * c1 =<
double > cpos[idx, 2, 1] */ __pyx_t_34 = __pyx_v_idx; __pyx_t_35 = 1; __pyx_t_36 = 1; __pyx_v_b1 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_cpos.buf, __pyx_t_34, __pyx_bstride_0_cpos, __pyx_t_35, __pyx_bstride_1_cpos, __pyx_t_36, __pyx_bstride_2_cpos)));
312: c0 = < double > cpos[idx, 2, 0]
/* "splitPixel.pyx":312 * b0 =<
double > cpos[idx, 1, 0] * b1 =<
double > cpos[idx, 1, 1] * c0 =<
double > cpos[idx, 2, 0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* c1 =<
double > cpos[idx, 2, 1] * d0 =<
double > cpos[idx, 3, 0] */ __pyx_t_37 = __pyx_v_idx; __pyx_t_38 = 2; __pyx_t_39 = 0; __pyx_v_c0 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_cpos.buf, __pyx_t_37, __pyx_bstride_0_cpos, __pyx_t_38, __pyx_bstride_1_cpos, __pyx_t_39, __pyx_bstride_2_cpos)));
313: c1 = < double > cpos[idx, 2, 1]
/* "splitPixel.pyx":313 * b1 =<
double > cpos[idx, 1, 1] * c0 =<
double > cpos[idx, 2, 0] * c1 =<
double > cpos[idx, 2, 1] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* d0 =<
double > cpos[idx, 3, 0] * d1 =<
double > cpos[idx, 3, 1] */ __pyx_t_40 = __pyx_v_idx; __pyx_t_41 = 2; __pyx_t_42 = 1; __pyx_v_c1 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_cpos.buf, __pyx_t_40, __pyx_bstride_0_cpos, __pyx_t_41, __pyx_bstride_1_cpos, __pyx_t_42, __pyx_bstride_2_cpos)));
314: d0 = < double > cpos[idx, 3, 0]
/* "splitPixel.pyx":314 * c0 =<
double > cpos[idx, 2, 0] * c1 =<
double > cpos[idx, 2, 1] * d0 =<
double > cpos[idx, 3, 0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* d1 =<
double > cpos[idx, 3, 1] * */ __pyx_t_43 = __pyx_v_idx; __pyx_t_44 = 3; __pyx_t_45 = 0; __pyx_v_d0 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_cpos.buf, __pyx_t_43, __pyx_bstride_0_cpos, __pyx_t_44, __pyx_bstride_1_cpos, __pyx_t_45, __pyx_bstride_2_cpos)));
315: d1 = < double > cpos[idx, 3, 1]
/* "splitPixel.pyx":315 * c1 =<
double > cpos[idx, 2, 1] * d0 =<
double > cpos[idx, 3, 0] * d1 =<
double > cpos[idx, 3, 1] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * min0 = min4f(a0, b0, c0, d0) */ __pyx_t_46 = __pyx_v_idx; __pyx_t_47 = 3; __pyx_t_48 = 1; __pyx_v_d1 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_cpos.buf, __pyx_t_46, __pyx_bstride_0_cpos, __pyx_t_47, __pyx_bstride_1_cpos, __pyx_t_48, __pyx_bstride_2_cpos)));
316:
317: min0 = min4f(a0, b0, c0, d0)
/* "splitPixel.pyx":317 * d1 =<
double > cpos[idx, 3, 1] * * min0 = min4f(a0, b0, c0, d0) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max0 = max4f(a0, b0, c0, d0) * min1 = min4f(a1, b1, c1, d1) */ __pyx_v_min0 = __pyx_f_10splitPixel_min4f(__pyx_v_a0, __pyx_v_b0, __pyx_v_c0, __pyx_v_d0);
318: max0 = max4f(a0, b0, c0, d0)
/* "splitPixel.pyx":318 * * min0 = min4f(a0, b0, c0, d0) * max0 = max4f(a0, b0, c0, d0) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min1 = min4f(a1, b1, c1, d1) * max1 = max4f(a1, b1, c1, d1) */ __pyx_v_max0 = __pyx_f_10splitPixel_max4f(__pyx_v_a0, __pyx_v_b0, __pyx_v_c0, __pyx_v_d0);
319: min1 = min4f(a1, b1, c1, d1)
/* "splitPixel.pyx":319 * min0 = min4f(a0, b0, c0, d0) * max0 = max4f(a0, b0, c0, d0) * min1 = min4f(a1, b1, c1, d1) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max1 = max4f(a1, b1, c1, d1) * # splitOnePixel2D(min0, max0, min1, max1, */ __pyx_v_min1 = __pyx_f_10splitPixel_min4f(__pyx_v_a1, __pyx_v_b1, __pyx_v_c1, __pyx_v_d1);
320: max1 = max4f(a1, b1, c1, d1)
/* "splitPixel.pyx":320 * max0 = max4f(a0, b0, c0, d0) * min1 = min4f(a1, b1, c1, d1) * max1 = max4f(a1, b1, c1, d1) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* # splitOnePixel2D(min0, max0, min1, max1, * # data, */ __pyx_v_max1 = __pyx_f_10splitPixel_max4f(__pyx_v_a1, __pyx_v_b1, __pyx_v_c1, __pyx_v_d1);
321: # splitOnePixel2D(min0, max0, min1, max1,
322: # data,
323: # pos0_min, pos1_min,
324: # dpos0, dpos1,
325: # outCount,
326: # outData)
327:
328: if max0 < pos0_min:
/* "splitPixel.pyx":328 * # outData) * * if max0<
pos0_min: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* with gil: * print("max0 (%s)<
self.pos0_min %s" % (max0 , pos0_min)) */ __pyx_t_19 = (__pyx_v_max0<
__pyx_v_pos0_min); if (__pyx_t_19) {
329: with gil:
/* "splitPixel.pyx":329 * * if max0<
pos0_min: * with gil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* print("max0 (%s)<
self.pos0_min %s" % (max0 , pos0_min)) * continue */ { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif /*try:*/ { /* "splitPixel.pyx":329 * * if max0<
pos0_min: * with gil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* print("max0 (%s)<
self.pos0_min %s" % (max0 , pos0_min)) * continue */ /*finally:*/ { int __pyx_why; __pyx_why = 0; goto __pyx_L34; __pyx_L33: __pyx_why = 4; goto __pyx_L34; __pyx_L34:; #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif switch (__pyx_why) { case 4: goto __pyx_L21; } } }
330: print("max0 (%s) < self.pos0_min %s" % (max0 , pos0_min))
/* "splitPixel.pyx":330 * if max0<
pos0_min: * with gil: * print("max0 (%s)<
self.pos0_min %s" % (max0 , pos0_min)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * if max1<
pos1_min: */ __pyx_t_4 = PyFloat_FromDouble(__pyx_v_max0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L33;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pos0_min); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L33;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L33;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_29), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L33;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (__Pyx_PrintOne(0, ((PyObject *)__pyx_t_3))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L33;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; }
331: continue
/* "splitPixel.pyx":331 * with gil: * print("max0 (%s)<
self.pos0_min %s" % (max0 , pos0_min)) * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if max1<
pos1_min: * with gil: */ goto __pyx_L27_continue; goto __pyx_L29; } __pyx_L29:;
332: if max1 < pos1_min:
/* "splitPixel.pyx":332 * print("max0 (%s)<
self.pos0_min %s" % (max0 , pos0_min)) * continue * if max1<
pos1_min: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* with gil: * print("max1 (%s)<
pos1_min %s" % (max0 , pos0_min)) */ __pyx_t_19 = (__pyx_v_max1<
__pyx_v_pos1_min); if (__pyx_t_19) {
333: with gil:
/* "splitPixel.pyx":333 * continue * if max1<
pos1_min: * with gil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* print("max1 (%s)<
pos1_min %s" % (max0 , pos0_min)) * continue */ { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif /*try:*/ { /* "splitPixel.pyx":333 * continue * if max1<
pos1_min: * with gil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* print("max1 (%s)<
pos1_min %s" % (max0 , pos0_min)) * continue */ /*finally:*/ { int __pyx_why; __pyx_why = 0; goto __pyx_L41; __pyx_L40: __pyx_why = 4; goto __pyx_L41; __pyx_L41:; #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif switch (__pyx_why) { case 4: goto __pyx_L21; } } }
334: print("max1 (%s) < pos1_min %s" % (max0 , pos0_min))
/* "splitPixel.pyx":334 * if max1<
pos1_min: * with gil: * print("max1 (%s)<
pos1_min %s" % (max0 , pos0_min)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * if min0 > pos0_maxin: */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_max0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L40;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_pos0_min); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L40;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L40;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_30), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L40;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (__Pyx_PrintOne(0, ((PyObject *)__pyx_t_1))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L40;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; }
335: continue
/* "splitPixel.pyx":335 * with gil: * print("max1 (%s)<
pos1_min %s" % (max0 , pos0_min)) * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if min0 > pos0_maxin: * with gil: */ goto __pyx_L27_continue; goto __pyx_L36; } __pyx_L36:;
336: if min0 > pos0_maxin:
/* "splitPixel.pyx":336 * print("max1 (%s)<
pos1_min %s" % (max0 , pos0_min)) * continue * if min0 > pos0_maxin: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* with gil: * print("min0 (%s) > pos0_maxin %s" % (max0 , pos0_maxin)) */ __pyx_t_19 = (__pyx_v_min0 > __pyx_v_pos0_maxin); if (__pyx_t_19) {
337: with gil:
/* "splitPixel.pyx":337 * continue * if min0 > pos0_maxin: * with gil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* print("min0 (%s) > pos0_maxin %s" % (max0 , pos0_maxin)) * continue */ { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif /*try:*/ { /* "splitPixel.pyx":337 * continue * if min0 > pos0_maxin: * with gil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* print("min0 (%s) > pos0_maxin %s" % (max0 , pos0_maxin)) * continue */ /*finally:*/ { int __pyx_why; __pyx_why = 0; goto __pyx_L48; __pyx_L47: __pyx_why = 4; goto __pyx_L48; __pyx_L48:; #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif switch (__pyx_why) { case 4: goto __pyx_L21; } } }
338: print("min0 (%s) > pos0_maxin %s" % (max0 , pos0_maxin))
/* "splitPixel.pyx":338 * if min0 > pos0_maxin: * with gil: * print("min0 (%s) > pos0_maxin %s" % (max0 , pos0_maxin)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * if min1 > pos1_maxin: */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_max0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L47;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_pos0_maxin); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L47;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L47;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_31), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L47;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (__Pyx_PrintOne(0, ((PyObject *)__pyx_t_4))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L47;} __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; }
339: continue
/* "splitPixel.pyx":339 * with gil: * print("min0 (%s) > pos0_maxin %s" % (max0 , pos0_maxin)) * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if min1 > pos1_maxin: * with gil: */ goto __pyx_L27_continue; goto __pyx_L43; } __pyx_L43:;
340: if min1 > pos1_maxin:
/* "splitPixel.pyx":340 * print("min0 (%s) > pos0_maxin %s" % (max0 , pos0_maxin)) * continue * if min1 > pos1_maxin: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* with gil: * print("min1 (%s) > pos1_maxin %s" % (max0 , pos1_maxin)) */ __pyx_t_19 = (__pyx_v_min1 > __pyx_v_pos1_maxin); if (__pyx_t_19) {
341: with gil:
/* "splitPixel.pyx":341 * continue * if min1 > pos1_maxin: * with gil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* print("min1 (%s) > pos1_maxin %s" % (max0 , pos1_maxin)) * continue */ { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif /*try:*/ { /* "splitPixel.pyx":341 * continue * if min1 > pos1_maxin: * with gil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* print("min1 (%s) > pos1_maxin %s" % (max0 , pos1_maxin)) * continue */ /*finally:*/ { int __pyx_why; __pyx_why = 0; goto __pyx_L55; __pyx_L54: __pyx_why = 4; goto __pyx_L55; __pyx_L55:; #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif switch (__pyx_why) { case 4: goto __pyx_L21; } } }
342: print("min1 (%s) > pos1_maxin %s" % (max0 , pos1_maxin))
/* "splitPixel.pyx":342 * if min1 > pos1_maxin: * with gil: * print("min1 (%s) > pos1_maxin %s" % (max0 , pos1_maxin)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * */ __pyx_t_4 = PyFloat_FromDouble(__pyx_v_max0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L54;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pos1_maxin); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L54;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L54;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_32), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L54;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (__Pyx_PrintOne(0, ((PyObject *)__pyx_t_3))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L54;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; }
343: continue
/* "splitPixel.pyx":343 * with gil: * print("min1 (%s) > pos1_maxin %s" % (max0 , pos1_maxin)) * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if min0<
pos0_min: */ goto __pyx_L27_continue; goto __pyx_L50; } __pyx_L50:;
344:
345: if min0 < pos0_min:
/* "splitPixel.pyx":345 * continue * * if min0<
pos0_min: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data = data * (pos0_min - min0) / (max0 - min0) * min0 = pos0_min */ __pyx_t_19 = (__pyx_v_min0<
__pyx_v_pos0_min); if (__pyx_t_19) {
346: data = data * (pos0_min - min0) / (max0 - min0)
/* "splitPixel.pyx":346 * * if min0<
pos0_min: * data = data * (pos0_min - min0) / (max0 - min0) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min0 = pos0_min * if min1<
pos1_min: */ __pyx_v_data = ((__pyx_v_data * (__pyx_v_pos0_min - __pyx_v_min0)) / (__pyx_v_max0 - __pyx_v_min0));
347: min0 = pos0_min
/* "splitPixel.pyx":347 * if min0<
pos0_min: * data = data * (pos0_min - min0) / (max0 - min0) * min0 = pos0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if min1<
pos1_min: * data = data * (pos1_min - min1) / (max1 - min1) */ __pyx_v_min0 = __pyx_v_pos0_min; goto __pyx_L57; } __pyx_L57:;
348: if min1 < pos1_min:
/* "splitPixel.pyx":348 * data = data * (pos0_min - min0) / (max0 - min0) * min0 = pos0_min * if min1<
pos1_min: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data = data * (pos1_min - min1) / (max1 - min1) * min1 = pos1_min */ __pyx_t_19 = (__pyx_v_min1<
__pyx_v_pos1_min); if (__pyx_t_19) {
349: data = data * (pos1_min - min1) / (max1 - min1)
/* "splitPixel.pyx":349 * min0 = pos0_min * if min1<
pos1_min: * data = data * (pos1_min - min1) / (max1 - min1) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min1 = pos1_min * if max0 > pos0_maxin: */ __pyx_v_data = ((__pyx_v_data * (__pyx_v_pos1_min - __pyx_v_min1)) / (__pyx_v_max1 - __pyx_v_min1));
350: min1 = pos1_min
/* "splitPixel.pyx":350 * if min1<
pos1_min: * data = data * (pos1_min - min1) / (max1 - min1) * min1 = pos1_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if max0 > pos0_maxin: * data = data * (max0 - pos0_maxin) / (max0 - min0) */ __pyx_v_min1 = __pyx_v_pos1_min; goto __pyx_L58; } __pyx_L58:;
351: if max0 > pos0_maxin:
/* "splitPixel.pyx":351 * data = data * (pos1_min - min1) / (max1 - min1) * min1 = pos1_min * if max0 > pos0_maxin: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data = data * (max0 - pos0_maxin) / (max0 - min0) * max0 = pos0_maxin */ __pyx_t_19 = (__pyx_v_max0 > __pyx_v_pos0_maxin); if (__pyx_t_19) {
352: data = data * (max0 - pos0_maxin) / (max0 - min0)
/* "splitPixel.pyx":352 * min1 = pos1_min * if max0 > pos0_maxin: * data = data * (max0 - pos0_maxin) / (max0 - min0) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max0 = pos0_maxin * if max1 > pos1_maxin: */ __pyx_v_data = ((__pyx_v_data * (__pyx_v_max0 - __pyx_v_pos0_maxin)) / (__pyx_v_max0 - __pyx_v_min0));
353: max0 = pos0_maxin
/* "splitPixel.pyx":353 * if max0 > pos0_maxin: * data = data * (max0 - pos0_maxin) / (max0 - min0) * max0 = pos0_maxin #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if max1 > pos1_maxin: * data = data * (max1 - pos1_maxin) / (max1 - min1) */ __pyx_v_max0 = __pyx_v_pos0_maxin; goto __pyx_L59; } __pyx_L59:;
354: if max1 > pos1_maxin:
/* "splitPixel.pyx":354 * data = data * (max0 - pos0_maxin) / (max0 - min0) * max0 = pos0_maxin * if max1 > pos1_maxin: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data = data * (max1 - pos1_maxin) / (max1 - min1) * max1 = pos1_maxin */ __pyx_t_19 = (__pyx_v_max1 > __pyx_v_pos1_maxin); if (__pyx_t_19) {
355: data = data * (max1 - pos1_maxin) / (max1 - min1)
/* "splitPixel.pyx":355 * max0 = pos0_maxin * if max1 > pos1_maxin: * data = data * (max1 - pos1_maxin) / (max1 - min1) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max1 = pos1_maxin * */ __pyx_v_data = ((__pyx_v_data * (__pyx_v_max1 - __pyx_v_pos1_maxin)) / (__pyx_v_max1 - __pyx_v_min1));
356: max1 = pos1_maxin
/* "splitPixel.pyx":356 * if max1 > pos1_maxin: * data = data * (max1 - pos1_maxin) / (max1 - min1) * max1 = pos1_maxin #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * ## treat data for pixel on chi discontinuity */ __pyx_v_max1 = __pyx_v_pos1_maxin; goto __pyx_L60; } __pyx_L60:;
357:
358: ## treat data for pixel on chi discontinuity
359: if ((max1 - min1) / dpos1) > (bins1 / 2.0):
/* "splitPixel.pyx":359 * * ## treat data for pixel on chi discontinuity * if ((max1 - min1) / dpos1) > (bins1 / 2.0): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* # with gil: * # print("max1: %s; min1: %s; dpos1: %s" % (max1 , min1, dpos1)) */ __pyx_t_19 = (((__pyx_v_max1 - __pyx_v_min1) / __pyx_v_dpos1) > (__pyx_v_bins1 / 2.0)); if (__pyx_t_19) {
360: # with gil:
361: # print("max1: %s; min1: %s; dpos1: %s" % (max1 , min1, dpos1))
362: if pos1_maxin - max1 > min1 - pos1_min:
/* "splitPixel.pyx":362 * # with gil: * # print("max1: %s; min1: %s; dpos1: %s" % (max1 , min1, dpos1)) * if pos1_maxin - max1 > min1 - pos1_min: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min1 = max1 * max1 = pos1_maxin */ __pyx_t_19 = ((__pyx_v_pos1_maxin - __pyx_v_max1) > (__pyx_v_min1 - __pyx_v_pos1_min)); if (__pyx_t_19) {
363: min1 = max1
/* "splitPixel.pyx":363 * # print("max1: %s; min1: %s; dpos1: %s" % (max1 , min1, dpos1)) * if pos1_maxin - max1 > min1 - pos1_min: * min1 = max1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max1 = pos1_maxin * else: */ __pyx_v_min1 = __pyx_v_max1;
364: max1 = pos1_maxin
/* "splitPixel.pyx":364 * if pos1_maxin - max1 > min1 - pos1_min: * min1 = max1 * max1 = pos1_maxin #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * max1 = min1 */ __pyx_v_max1 = __pyx_v_pos1_maxin; goto __pyx_L62; } /*else*/ {
365: else:
366: max1 = min1
/* "splitPixel.pyx":366 * max1 = pos1_maxin * else: * max1 = min1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min1 = pos1_min * */ __pyx_v_max1 = __pyx_v_min1;
367: min1 = pos1_min
/* "splitPixel.pyx":367 * else: * max1 = min1 * min1 = pos1_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * fbin0_min = getBinNr(min0, pos0_min, dpos0) */ __pyx_v_min1 = __pyx_v_pos1_min; } __pyx_L62:; goto __pyx_L61; } __pyx_L61:;
368:
369: fbin0_min = getBinNr(min0, pos0_min, dpos0)
/* "splitPixel.pyx":369 * min1 = pos1_min * * fbin0_min = getBinNr(min0, pos0_min, dpos0) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* fbin0_max = getBinNr(max0, pos0_min, dpos0) * fbin1_min = getBinNr(min1, pos1_min, dpos1) */ __pyx_v_fbin0_min = __pyx_f_10splitPixel_getBinNr(__pyx_v_min0, __pyx_v_pos0_min, __pyx_v_dpos0);
370: fbin0_max = getBinNr(max0, pos0_min, dpos0)
/* "splitPixel.pyx":370 * * fbin0_min = getBinNr(min0, pos0_min, dpos0) * fbin0_max = getBinNr(max0, pos0_min, dpos0) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* fbin1_min = getBinNr(min1, pos1_min, dpos1) * fbin1_max = getBinNr(max1, pos1_min, dpos1) */ __pyx_v_fbin0_max = __pyx_f_10splitPixel_getBinNr(__pyx_v_max0, __pyx_v_pos0_min, __pyx_v_dpos0);
371: fbin1_min = getBinNr(min1, pos1_min, dpos1)
/* "splitPixel.pyx":371 * fbin0_min = getBinNr(min0, pos0_min, dpos0) * fbin0_max = getBinNr(max0, pos0_min, dpos0) * fbin1_min = getBinNr(min1, pos1_min, dpos1) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* fbin1_max = getBinNr(max1, pos1_min, dpos1) * */ __pyx_v_fbin1_min = __pyx_f_10splitPixel_getBinNr(__pyx_v_min1, __pyx_v_pos1_min, __pyx_v_dpos1);
372: fbin1_max = getBinNr(max1, pos1_min, dpos1)
/* "splitPixel.pyx":372 * fbin0_max = getBinNr(max0, pos0_min, dpos0) * fbin1_min = getBinNr(min1, pos1_min, dpos1) * fbin1_max = getBinNr(max1, pos1_min, dpos1) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * bin0_min =<
long > floor(fbin0_min) */ __pyx_v_fbin1_max = __pyx_f_10splitPixel_getBinNr(__pyx_v_max1, __pyx_v_pos1_min, __pyx_v_dpos1);
373:
374: bin0_min = < long > floor(fbin0_min)
/* "splitPixel.pyx":374 * fbin1_max = getBinNr(max1, pos1_min, dpos1) * * bin0_min =<
long > floor(fbin0_min) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bin0_max =<
long > floor(fbin0_max) * bin1_min =<
long > floor(fbin1_min) */ __pyx_v_bin0_min = ((long)floor(__pyx_v_fbin0_min));
375: bin0_max = < long > floor(fbin0_max)
/* "splitPixel.pyx":375 * * bin0_min =<
long > floor(fbin0_min) * bin0_max =<
long > floor(fbin0_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bin1_min =<
long > floor(fbin1_min) * bin1_max =<
long > floor(fbin1_max) */ __pyx_v_bin0_max = ((long)floor(__pyx_v_fbin0_max));
376: bin1_min = < long > floor(fbin1_min)
/* "splitPixel.pyx":376 * bin0_min =<
long > floor(fbin0_min) * bin0_max =<
long > floor(fbin0_max) * bin1_min =<
long > floor(fbin1_min) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bin1_max =<
long > floor(fbin1_max) * */ __pyx_v_bin1_min = ((long)floor(__pyx_v_fbin1_min));
377: bin1_max = < long > floor(fbin1_max)
/* "splitPixel.pyx":377 * bin0_max =<
long > floor(fbin0_max) * bin1_min =<
long > floor(fbin1_min) * bin1_max =<
long > floor(fbin1_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * */ __pyx_v_bin1_max = ((long)floor(__pyx_v_fbin1_max));
378:
379:
380: if bin0_min == bin0_max:
/* "splitPixel.pyx":380 * * * if bin0_min == bin0_max: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if bin1_min == bin1_max: * #All pixel is within a single bin */ __pyx_t_19 = (__pyx_v_bin0_min == __pyx_v_bin0_max); if (__pyx_t_19) {
381: if bin1_min == bin1_max:
/* "splitPixel.pyx":381 * * 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_19 = (__pyx_v_bin1_min == __pyx_v_bin1_max); if (__pyx_t_19) {
382: #All pixel is within a single bin
383: outCount[bin0_min, bin1_min] += 1.0
/* "splitPixel.pyx":383 * 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_49 = __pyx_v_bin0_min; __pyx_t_50 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_49, __pyx_bstride_0_outCount, __pyx_t_50, __pyx_bstride_1_outCount) += 1.0;
384: outData[bin0_min, bin1_min] += data
/* "splitPixel.pyx":384 * #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_51 = __pyx_v_bin0_min; __pyx_t_52 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_51, __pyx_bstride_0_outData, __pyx_t_52, __pyx_bstride_1_outData) += __pyx_v_data; goto __pyx_L64; } /*else*/ {
385: else:
386: #spread on more than 2 bins
387: aeraPixel = fbin1_max - fbin1_min
/* "splitPixel.pyx":387 * else: * #spread on more than 2 bins * aeraPixel = fbin1_max - fbin1_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaD = (<
double > (bin1_min + 1)) - fbin1_min * deltaU = fbin1_max - (<
double > bin1_max) */ __pyx_v_aeraPixel = (__pyx_v_fbin1_max - __pyx_v_fbin1_min);
388: deltaD = (< double > (bin1_min + 1)) - fbin1_min
/* "splitPixel.pyx":388 * #spread on more than 2 bins * aeraPixel = fbin1_max - fbin1_min * deltaD = (<
double > (bin1_min + 1)) - fbin1_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaU = fbin1_max - (<
double > bin1_max) * deltaA = 1.0 / aeraPixel */ __pyx_v_deltaD = (((double)(__pyx_v_bin1_min + 1)) - __pyx_v_fbin1_min);
389: deltaU = fbin1_max - (< double > bin1_max)
/* "splitPixel.pyx":389 * aeraPixel = fbin1_max - fbin1_min * deltaD = (<
double > (bin1_min + 1)) - fbin1_min * deltaU = fbin1_max - (<
double > bin1_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaA = 1.0 / aeraPixel * */ __pyx_v_deltaU = (__pyx_v_fbin1_max - ((double)__pyx_v_bin1_max));
390: deltaA = 1.0 / aeraPixel
/* "splitPixel.pyx":390 * deltaD = (<
double > (bin1_min + 1)) - fbin1_min * deltaU = fbin1_max - (<
double > bin1_max) * deltaA = 1.0 / aeraPixel #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * outCount[bin0_min, bin1_min] += deltaA * deltaD */ __pyx_v_deltaA = (1.0 / __pyx_v_aeraPixel);
391:
392: outCount[bin0_min, bin1_min] += deltaA * deltaD
/* "splitPixel.pyx":392 * deltaA = 1.0 / aeraPixel * * outCount[bin0_min, bin1_min] += deltaA * deltaD #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min, bin1_min] += data * deltaA * deltaD * */ __pyx_t_53 = __pyx_v_bin0_min; __pyx_t_54 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_53, __pyx_bstride_0_outCount, __pyx_t_54, __pyx_bstride_1_outCount) += (__pyx_v_deltaA * __pyx_v_deltaD);
393: outData[bin0_min, bin1_min] += data * deltaA * deltaD
/* "splitPixel.pyx":393 * * outCount[bin0_min, bin1_min] += deltaA * deltaD * outData[bin0_min, bin1_min] += data * deltaA * deltaD #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * outCount[bin0_min, bin1_max] += deltaA * deltaU */ __pyx_t_55 = __pyx_v_bin0_min; __pyx_t_56 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_55, __pyx_bstride_0_outData, __pyx_t_56, __pyx_bstride_1_outData) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaD);
394:
395: outCount[bin0_min, bin1_max] += deltaA * deltaU
/* "splitPixel.pyx":395 * outData[bin0_min, bin1_min] += data * deltaA * deltaD * * outCount[bin0_min, bin1_max] += deltaA * deltaU #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min, bin1_max] += data * deltaA * deltaU * # if bin1_min +1<
bin1_max: */ __pyx_t_57 = __pyx_v_bin0_min; __pyx_t_58 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_57, __pyx_bstride_0_outCount, __pyx_t_58, __pyx_bstride_1_outCount) += (__pyx_v_deltaA * __pyx_v_deltaU);
396: outData[bin0_min, bin1_max] += data * deltaA * deltaU
/* "splitPixel.pyx":396 * * outCount[bin0_min, bin1_max] += deltaA * deltaU * outData[bin0_min, bin1_max] += data * deltaA * deltaU #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* # if bin1_min +1<
bin1_max: * for j in range(bin1_min + 1, bin1_max): */ __pyx_t_59 = __pyx_v_bin0_min; __pyx_t_60 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_59, __pyx_bstride_0_outData, __pyx_t_60, __pyx_bstride_1_outData) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaU);
397: # if bin1_min +1< bin1_max:
398: for j in range(bin1_min + 1, bin1_max):
/* "splitPixel.pyx":398 * outData[bin0_min, bin1_max] += data * deltaA * deltaU * # if bin1_min +1<
bin1_max: * for j in range(bin1_min + 1, bin1_max): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[bin0_min, j] += deltaA * outData[bin0_min, j] += data * deltaA */ __pyx_t_61 = __pyx_v_bin1_max; for (__pyx_t_62 = (__pyx_v_bin1_min + 1); __pyx_t_62<
__pyx_t_61; __pyx_t_62+=1) { __pyx_v_j = __pyx_t_62;
399: outCount[bin0_min, j] += deltaA
/* "splitPixel.pyx":399 * # if bin1_min +1<
bin1_max: * for j in range(bin1_min + 1, bin1_max): * outCount[bin0_min, j] += deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min, j] += data * deltaA * */ __pyx_t_63 = __pyx_v_bin0_min; __pyx_t_64 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_63, __pyx_bstride_0_outCount, __pyx_t_64, __pyx_bstride_1_outCount) += __pyx_v_deltaA;
400: outData[bin0_min, j] += data * deltaA
/* "splitPixel.pyx":400 * 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_65 = __pyx_v_bin0_min; __pyx_t_66 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_65, __pyx_bstride_0_outData, __pyx_t_66, __pyx_bstride_1_outData) += (__pyx_v_data * __pyx_v_deltaA); } } __pyx_L64:; goto __pyx_L63; } /*else*/ {
401:
402: else: #spread on more than 2 bins in dim 0
403: if bin1_min == bin1_max:
/* "splitPixel.pyx":403 * * else: #spread on more than 2 bins in dim 0 * if bin1_min == bin1_max: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* #All pixel fall on 1 bins in dim 1 * aeraPixel = fbin0_max - fbin0_min */ __pyx_t_19 = (__pyx_v_bin1_min == __pyx_v_bin1_max); if (__pyx_t_19) {
404: #All pixel fall on 1 bins in dim 1
405: aeraPixel = fbin0_max - fbin0_min
/* "splitPixel.pyx":405 * if bin1_min == bin1_max: * #All pixel fall on 1 bins in dim 1 * aeraPixel = fbin0_max - fbin0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaL = (<
double > (bin0_min + 1)) - fbin0_min * deltaA = deltaL / aeraPixel */ __pyx_v_aeraPixel = (__pyx_v_fbin0_max - __pyx_v_fbin0_min);
406: deltaL = (< double > (bin0_min + 1)) - fbin0_min
/* "splitPixel.pyx":406 * #All pixel fall on 1 bins in dim 1 * aeraPixel = fbin0_max - fbin0_min * deltaL = (<
double > (bin0_min + 1)) - fbin0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaA = deltaL / aeraPixel * outCount[bin0_min, bin1_min] += deltaA */ __pyx_v_deltaL = (((double)(__pyx_v_bin0_min + 1)) - __pyx_v_fbin0_min);
407: deltaA = deltaL / aeraPixel
/* "splitPixel.pyx":407 * aeraPixel = fbin0_max - fbin0_min * deltaL = (<
double > (bin0_min + 1)) - fbin0_min * deltaA = deltaL / aeraPixel #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[bin0_min, bin1_min] += deltaA * outData[bin0_min, bin1_min] += data * deltaA */ __pyx_v_deltaA = (__pyx_v_deltaL / __pyx_v_aeraPixel);
408: outCount[bin0_min, bin1_min] += deltaA
/* "splitPixel.pyx":408 * deltaL = (<
double > (bin0_min + 1)) - fbin0_min * deltaA = deltaL / aeraPixel * outCount[bin0_min, bin1_min] += deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min, bin1_min] += data * deltaA * deltaR = fbin0_max - (<
double > bin0_max) */ __pyx_t_61 = __pyx_v_bin0_min; __pyx_t_62 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_61, __pyx_bstride_0_outCount, __pyx_t_62, __pyx_bstride_1_outCount) += __pyx_v_deltaA;
409: outData[bin0_min, bin1_min] += data * deltaA
/* "splitPixel.pyx":409 * deltaA = deltaL / aeraPixel * outCount[bin0_min, bin1_min] += deltaA * outData[bin0_min, bin1_min] += data * deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaR = fbin0_max - (<
double > bin0_max) * deltaA = deltaR / aeraPixel */ __pyx_t_67 = __pyx_v_bin0_min; __pyx_t_68 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_67, __pyx_bstride_0_outData, __pyx_t_68, __pyx_bstride_1_outData) += (__pyx_v_data * __pyx_v_deltaA);
410: deltaR = fbin0_max - (< double > bin0_max)
/* "splitPixel.pyx":410 * outCount[bin0_min, bin1_min] += deltaA * outData[bin0_min, bin1_min] += data * deltaA * deltaR = fbin0_max - (<
double > bin0_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaA = deltaR / aeraPixel * outCount[bin0_max, bin1_min] += deltaA */ __pyx_v_deltaR = (__pyx_v_fbin0_max - ((double)__pyx_v_bin0_max));
411: deltaA = deltaR / aeraPixel
/* "splitPixel.pyx":411 * outData[bin0_min, bin1_min] += data * deltaA * deltaR = fbin0_max - (<
double > bin0_max) * deltaA = deltaR / aeraPixel #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[bin0_max, bin1_min] += deltaA * outData[bin0_max, bin1_min] += data * deltaA */ __pyx_v_deltaA = (__pyx_v_deltaR / __pyx_v_aeraPixel);
412: outCount[bin0_max, bin1_min] += deltaA
/* "splitPixel.pyx":412 * deltaR = fbin0_max - (<
double > bin0_max) * deltaA = deltaR / aeraPixel * outCount[bin0_max, bin1_min] += deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_max, bin1_min] += data * deltaA * deltaA = 1.0 / aeraPixel */ __pyx_t_69 = __pyx_v_bin0_max; __pyx_t_70 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_69, __pyx_bstride_0_outCount, __pyx_t_70, __pyx_bstride_1_outCount) += __pyx_v_deltaA;
413: outData[bin0_max, bin1_min] += data * deltaA
/* "splitPixel.pyx":413 * deltaA = deltaR / aeraPixel * outCount[bin0_max, bin1_min] += deltaA * outData[bin0_max, bin1_min] += data * deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaA = 1.0 / aeraPixel * for i in range(bin0_min + 1, bin0_max): */ __pyx_t_71 = __pyx_v_bin0_max; __pyx_t_72 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_71, __pyx_bstride_0_outData, __pyx_t_72, __pyx_bstride_1_outData) += (__pyx_v_data * __pyx_v_deltaA);
414: deltaA = 1.0 / aeraPixel
/* "splitPixel.pyx":414 * outCount[bin0_max, bin1_min] += deltaA * outData[bin0_max, bin1_min] += data * deltaA * deltaA = 1.0 / aeraPixel #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for i in range(bin0_min + 1, bin0_max): * outCount[i, bin1_min] += deltaA */ __pyx_v_deltaA = (1.0 / __pyx_v_aeraPixel);
415: for i in range(bin0_min + 1, bin0_max):
/* "splitPixel.pyx":415 * outData[bin0_max, bin1_min] += data * deltaA * deltaA = 1.0 / aeraPixel * for i in range(bin0_min + 1, bin0_max): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[i, bin1_min] += deltaA * outData[i, bin1_min] += data * deltaA */ __pyx_t_73 = __pyx_v_bin0_max; for (__pyx_t_74 = (__pyx_v_bin0_min + 1); __pyx_t_74<
__pyx_t_73; __pyx_t_74+=1) { __pyx_v_i = __pyx_t_74;
416: outCount[i, bin1_min] += deltaA
/* "splitPixel.pyx":416 * deltaA = 1.0 / aeraPixel * for i in range(bin0_min + 1, bin0_max): * outCount[i, bin1_min] += deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[i, bin1_min] += data * deltaA * else: */ __pyx_t_75 = __pyx_v_i; __pyx_t_76 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_75, __pyx_bstride_0_outCount, __pyx_t_76, __pyx_bstride_1_outCount) += __pyx_v_deltaA;
417: outData[i, bin1_min] += data * deltaA
/* "splitPixel.pyx":417 * 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_77 = __pyx_v_i; __pyx_t_78 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_77, __pyx_bstride_0_outData, __pyx_t_78, __pyx_bstride_1_outData) += (__pyx_v_data * __pyx_v_deltaA); } goto __pyx_L67; } /*else*/ {
418: else:
419: #spread on n pix in dim0 and m pixel in dim1:
420: aeraPixel = (fbin0_max - fbin0_min) * (fbin1_max - fbin1_min)
/* "splitPixel.pyx":420 * else: * #spread on n pix in dim0 and m pixel in dim1: * aeraPixel = (fbin0_max - fbin0_min) * (fbin1_max - fbin1_min) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaL = (<
double > (bin0_min + 1)) - fbin0_min * deltaR = fbin0_max - (<
double > bin0_max) */ __pyx_v_aeraPixel = ((__pyx_v_fbin0_max - __pyx_v_fbin0_min) * (__pyx_v_fbin1_max - __pyx_v_fbin1_min));
421: deltaL = (< double > (bin0_min + 1)) - fbin0_min
/* "splitPixel.pyx":421 * #spread on n pix in dim0 and m pixel in dim1: * aeraPixel = (fbin0_max - fbin0_min) * (fbin1_max - fbin1_min) * deltaL = (<
double > (bin0_min + 1)) - fbin0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaR = fbin0_max - (<
double > bin0_max) * deltaD = (<
double > (bin1_min + 1)) - fbin1_min */ __pyx_v_deltaL = (((double)(__pyx_v_bin0_min + 1)) - __pyx_v_fbin0_min);
422: deltaR = fbin0_max - (< double > bin0_max)
/* "splitPixel.pyx":422 * aeraPixel = (fbin0_max - fbin0_min) * (fbin1_max - fbin1_min) * deltaL = (<
double > (bin0_min + 1)) - fbin0_min * deltaR = fbin0_max - (<
double > bin0_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaD = (<
double > (bin1_min + 1)) - fbin1_min * deltaU = fbin1_max - (<
double > bin1_max) */ __pyx_v_deltaR = (__pyx_v_fbin0_max - ((double)__pyx_v_bin0_max));
423: deltaD = (< double > (bin1_min + 1)) - fbin1_min
/* "splitPixel.pyx":423 * deltaL = (<
double > (bin0_min + 1)) - fbin0_min * deltaR = fbin0_max - (<
double > bin0_max) * deltaD = (<
double > (bin1_min + 1)) - fbin1_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaU = fbin1_max - (<
double > bin1_max) * deltaA = 1.0 / aeraPixel */ __pyx_v_deltaD = (((double)(__pyx_v_bin1_min + 1)) - __pyx_v_fbin1_min);
424: deltaU = fbin1_max - (< double > bin1_max)
/* "splitPixel.pyx":424 * deltaR = fbin0_max - (<
double > bin0_max) * deltaD = (<
double > (bin1_min + 1)) - fbin1_min * deltaU = fbin1_max - (<
double > bin1_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaA = 1.0 / aeraPixel * */ __pyx_v_deltaU = (__pyx_v_fbin1_max - ((double)__pyx_v_bin1_max));
425: deltaA = 1.0 / aeraPixel
/* "splitPixel.pyx":425 * deltaD = (<
double > (bin1_min + 1)) - fbin1_min * deltaU = fbin1_max - (<
double > bin1_max) * deltaA = 1.0 / aeraPixel #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * outCount[bin0_min, bin1_min] += deltaA * deltaL * deltaD */ __pyx_v_deltaA = (1.0 / __pyx_v_aeraPixel);
426:
427: outCount[bin0_min, bin1_min] += deltaA * deltaL * deltaD
/* "splitPixel.pyx":427 * deltaA = 1.0 / aeraPixel * * outCount[bin0_min, bin1_min] += deltaA * deltaL * deltaD #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min, bin1_min] += data * deltaA * deltaL * deltaD * */ __pyx_t_73 = __pyx_v_bin0_min; __pyx_t_74 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_73, __pyx_bstride_0_outCount, __pyx_t_74, __pyx_bstride_1_outCount) += ((__pyx_v_deltaA * __pyx_v_deltaL) * __pyx_v_deltaD);
428: outData[bin0_min, bin1_min] += data * deltaA * deltaL * deltaD
/* "splitPixel.pyx":428 * * 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_79 = __pyx_v_bin0_min; __pyx_t_80 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_79, __pyx_bstride_0_outData, __pyx_t_80, __pyx_bstride_1_outData) += (((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaL) * __pyx_v_deltaD);
429:
430: outCount[bin0_min, bin1_max] += deltaA * deltaL * deltaU
/* "splitPixel.pyx":430 * 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_81 = __pyx_v_bin0_min; __pyx_t_82 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_81, __pyx_bstride_0_outCount, __pyx_t_82, __pyx_bstride_1_outCount) += ((__pyx_v_deltaA * __pyx_v_deltaL) * __pyx_v_deltaU);
431: outData[bin0_min, bin1_max] += data * deltaA * deltaL * deltaU
/* "splitPixel.pyx":431 * * 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_83 = __pyx_v_bin0_min; __pyx_t_84 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_83, __pyx_bstride_0_outData, __pyx_t_84, __pyx_bstride_1_outData) += (((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaL) * __pyx_v_deltaU);
432:
433: outCount[bin0_max, bin1_min] += deltaA * deltaR * deltaD
/* "splitPixel.pyx":433 * 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_85 = __pyx_v_bin0_max; __pyx_t_86 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_85, __pyx_bstride_0_outCount, __pyx_t_86, __pyx_bstride_1_outCount) += ((__pyx_v_deltaA * __pyx_v_deltaR) * __pyx_v_deltaD);
434: outData[bin0_max, bin1_min] += data * deltaA * deltaR * deltaD
/* "splitPixel.pyx":434 * * 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_87 = __pyx_v_bin0_max; __pyx_t_88 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_87, __pyx_bstride_0_outData, __pyx_t_88, __pyx_bstride_1_outData) += (((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaR) * __pyx_v_deltaD);
435:
436: outCount[bin0_max, bin1_max] += deltaA * deltaR * deltaU
/* "splitPixel.pyx":436 * 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_89 = __pyx_v_bin0_max; __pyx_t_90 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_89, __pyx_bstride_0_outCount, __pyx_t_90, __pyx_bstride_1_outCount) += ((__pyx_v_deltaA * __pyx_v_deltaR) * __pyx_v_deltaU);
437: outData[bin0_max, bin1_max] += data * deltaA * deltaR * deltaU
/* "splitPixel.pyx":437 * * 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_91 = __pyx_v_bin0_max; __pyx_t_92 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_91, __pyx_bstride_0_outData, __pyx_t_92, __pyx_bstride_1_outData) += (((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaR) * __pyx_v_deltaU);
438: for i in range(bin0_min + 1, bin0_max):
/* "splitPixel.pyx":438 * 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_93 = __pyx_v_bin0_max; for (__pyx_t_94 = (__pyx_v_bin0_min + 1); __pyx_t_94<
__pyx_t_93; __pyx_t_94+=1) { __pyx_v_i = __pyx_t_94;
439: outCount[i, bin1_min] += deltaA * deltaD
/* "splitPixel.pyx":439 * 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_95 = __pyx_v_i; __pyx_t_96 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_95, __pyx_bstride_0_outCount, __pyx_t_96, __pyx_bstride_1_outCount) += (__pyx_v_deltaA * __pyx_v_deltaD);
440: outData[i, bin1_min] += data * deltaA * deltaD
/* "splitPixel.pyx":440 * 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_97 = __pyx_v_i; __pyx_t_98 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_97, __pyx_bstride_0_outData, __pyx_t_98, __pyx_bstride_1_outData) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaD);
441: for j in range(bin1_min + 1, bin1_max):
/* "splitPixel.pyx":441 * 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_99 = __pyx_v_bin1_max; for (__pyx_t_100 = (__pyx_v_bin1_min + 1); __pyx_t_100<
__pyx_t_99; __pyx_t_100+=1) { __pyx_v_j = __pyx_t_100;
442: outCount[i, j] += deltaA
/* "splitPixel.pyx":442 * 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_101 = __pyx_v_i; __pyx_t_102 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_101, __pyx_bstride_0_outCount, __pyx_t_102, __pyx_bstride_1_outCount) += __pyx_v_deltaA;
443: outData[i, j] += data * deltaA
/* "splitPixel.pyx":443 * 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_103 = __pyx_v_i; __pyx_t_104 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_103, __pyx_bstride_0_outData, __pyx_t_104, __pyx_bstride_1_outData) += (__pyx_v_data * __pyx_v_deltaA); }
444: outCount[i, bin1_max] += deltaA * deltaU
/* "splitPixel.pyx":444 * 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_99 = __pyx_v_i; __pyx_t_100 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_99, __pyx_bstride_0_outCount, __pyx_t_100, __pyx_bstride_1_outCount) += (__pyx_v_deltaA * __pyx_v_deltaU);
445: outData[i, bin1_max] += data * deltaA * deltaU
/* "splitPixel.pyx":445 * 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_105 = __pyx_v_i; __pyx_t_106 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_105, __pyx_bstride_0_outData, __pyx_t_106, __pyx_bstride_1_outData) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaU); }
446: for j in range(bin1_min + 1, bin1_max):
/* "splitPixel.pyx":446 * 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_93 = __pyx_v_bin1_max; for (__pyx_t_94 = (__pyx_v_bin1_min + 1); __pyx_t_94<
__pyx_t_93; __pyx_t_94+=1) { __pyx_v_j = __pyx_t_94;
447: outCount[bin0_min, j] += deltaA * deltaL
/* "splitPixel.pyx":447 * 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_107 = __pyx_v_bin0_min; __pyx_t_108 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_107, __pyx_bstride_0_outCount, __pyx_t_108, __pyx_bstride_1_outCount) += (__pyx_v_deltaA * __pyx_v_deltaL);
448: outData[bin0_min, j] += data * deltaA * deltaL
/* "splitPixel.pyx":448 * 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_109 = __pyx_v_bin0_min; __pyx_t_110 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_109, __pyx_bstride_0_outData, __pyx_t_110, __pyx_bstride_1_outData) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaL);
449:
450: outCount[bin0_max, j] += deltaA * deltaR
/* "splitPixel.pyx":450 * outData[bin0_min, j] += data * deltaA * deltaL * * outCount[bin0_max, j] += deltaA * deltaR #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_max, j] += data * deltaA * deltaR * */ __pyx_t_111 = __pyx_v_bin0_max; __pyx_t_112 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_111, __pyx_bstride_0_outCount, __pyx_t_112, __pyx_bstride_1_outCount) += (__pyx_v_deltaA * __pyx_v_deltaR);
451: outData[bin0_max, j] += data * deltaA * deltaR
/* "splitPixel.pyx":451 * * outCount[bin0_max, j] += deltaA * deltaR * outData[bin0_max, j] += data * deltaA * deltaR #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * #with nogil: */ __pyx_t_113 = __pyx_v_bin0_max; __pyx_t_114 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_113, __pyx_bstride_0_outData, __pyx_t_114, __pyx_bstride_1_outData) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaR); } } __pyx_L67:; } __pyx_L63:; __pyx_L27_continue:; }
452:
453: #with nogil:
454: for i in range(bins0):
/* "splitPixel.pyx":454 * * #with nogil: * for i in range(bins0): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for j in range(bins1): * if outCount[i, j] > epsilon: */ __pyx_t_9 = __pyx_v_bins0; for (__pyx_t_2 = 0; __pyx_t_2<
__pyx_t_9; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2;
455: for j in range(bins1):
/* "splitPixel.pyx":455 * #with nogil: * for i in range(bins0): * for j in range(bins1): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if outCount[i, j] > epsilon: * outMerge[i, j] = outData[i, j] / outCount[i, j] */ __pyx_t_93 = __pyx_v_bins1; for (__pyx_t_94 = 0; __pyx_t_94<
__pyx_t_93; __pyx_t_94+=1) { __pyx_v_j = __pyx_t_94;
456: if outCount[i, j] > epsilon:
/* "splitPixel.pyx":456 * for i in range(bins0): * for j in range(bins1): * if outCount[i, j] > epsilon: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outMerge[i, j] = outData[i, j] / outCount[i, j] * else: */ __pyx_t_115 = __pyx_v_i; __pyx_t_116 = __pyx_v_j; __pyx_t_19 = ((*__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_115, __pyx_bstride_0_outCount, __pyx_t_116, __pyx_bstride_1_outCount)) > __pyx_v_epsilon); if (__pyx_t_19) {
457: outMerge[i, j] = outData[i, j] / outCount[i, j]
/* "splitPixel.pyx":457 * for j in range(bins1): * if outCount[i, j] > epsilon: * outMerge[i, j] = outData[i, j] / outCount[i, j] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * outMerge[i, j] = dummy */ __pyx_t_117 = __pyx_v_i; __pyx_t_118 = __pyx_v_j; __pyx_t_119 = __pyx_v_i; __pyx_t_120 = __pyx_v_j; __pyx_t_121 = __pyx_v_i; __pyx_t_122 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outMerge.buf, __pyx_t_121, __pyx_bstride_0_outMerge, __pyx_t_122, __pyx_bstride_1_outMerge) = ((*__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outData.buf, __pyx_t_117, __pyx_bstride_0_outData, __pyx_t_118, __pyx_bstride_1_outData)) / (*__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outCount.buf, __pyx_t_119, __pyx_bstride_0_outCount, __pyx_t_120, __pyx_bstride_1_outCount))); goto __pyx_L80; } /*else*/ {
458: else:
459: outMerge[i, j] = dummy
/* "splitPixel.pyx":459 * outMerge[i, j] = outData[i, j] / outCount[i, j] * else: * outMerge[i, j] = dummy #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* return outMerge.T, edges0, edges1, outData.T, outCount.T * */ __pyx_t_123 = __pyx_v_i; __pyx_t_124 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_10splitPixel_DTYPE_float64_t *, __pyx_bstruct_outMerge.buf, __pyx_t_123, __pyx_bstride_0_outMerge, __pyx_t_124, __pyx_bstride_1_outMerge) = __pyx_v_dummy; } __pyx_L80:; } } }
460: return outMerge.T, edges0, edges1, outData.T, outCount.T
/* "splitPixel.pyx":460 * else: * outMerge[i, j] = dummy * 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 = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_outData), __pyx_n_s__T); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_outCount), __pyx_n_s__T); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = PyTuple_New(5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_edges0)); PyTuple_SET_ITEM(__pyx_t_12, 1, ((PyObject *)__pyx_v_edges0)); __Pyx_GIVEREF(((PyObject *)__pyx_v_edges0)); __Pyx_INCREF(((PyObject *)__pyx_v_edges1)); PyTuple_SET_ITEM(__pyx_t_12, 2, ((PyObject *)__pyx_v_edges1)); __Pyx_GIVEREF(((PyObject *)__pyx_v_edges1)); PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_r = ((PyObject *)__pyx_t_12); __pyx_t_12 = 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_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_edges0); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_edges1); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outMerge); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outCount); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cdata); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cpos); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outData); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("splitPixel.fullSplit2D", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_bstruct_edges0); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_edges1); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outMerge); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outCount); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cdata); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cpos); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outData); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_cpos); __Pyx_XDECREF((PyObject *)__pyx_v_cdata); __Pyx_XDECREF((PyObject *)__pyx_v_outData); __Pyx_XDECREF((PyObject *)__pyx_v_outCount); __Pyx_XDECREF((PyObject *)__pyx_v_outMerge); __Pyx_XDECREF((PyObject *)__pyx_v_edges0); __Pyx_XDECREF((PyObject *)__pyx_v_edges1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
461: