Generated by Cython 0.17.1 on Tue Dec 11 13:42:42 2012
Raw output: splitPixel.c
1: #!/usr/bin/env python
/* "splitPixel.pyx":1 * #!/usr/bin/env python #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* # -*- coding: utf-8 -*- * # */ __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: utf-8 -*-
3: #
4: # Project: Azimuthal integration
5: # https://forge.epn-campus.eu/projects/azimuthal
6: #
7: # File: "$Id$"
8: #
9: # Copyright (C) European Synchrotron Radiation Facility, Grenoble, France
10: #
11: # Principal author: Jérôme Kieffer (Jerome.Kieffer@ESRF.eu)
12: #
13: # This program is free software: you can redistribute it and/or modify
14: # it under the terms of the GNU General Public License as published by
15: # the Free Software Foundation, either version 3 of the License, or
16: # (at your option) any later version.
17: #
18: # This program is distributed in the hope that it will be useful,
19: # but WITHOUT ANY WARRANTY; without even the implied warranty of
20: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21: # GNU General Public License for more details.
22: #
23: # You should have received a copy of the GNU General Public License
24: # along with this program. If not, see <http://www.gnu.org/licenses/>.
25: #
26:
27:
28: import cython
29: cimport numpy
30: import numpy
/* "splitPixel.pyx":30 * import cython * cimport numpy * import numpy #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* from libc.math cimport fabs * */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__numpy, __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31: from libc.math cimport fabs
32:
33: #cdef double areaTriangle(double a0,
34: # double a1,
35: # double b0,
36: # double b1,
37: # double c0,
38: # double c1):
39: # """
40: # Calculate the area of the ABC triangle with corners:
41: # A(a0,a1)
42: # B(b0,b1)
43: # C(c0,c1)
44: # @return: area, i.e. 1/2 * (B-A)^(C-A)
45: # """
46: # return 0.5 * abs(((b0 - a0) * (c1 - a1)) - ((b1 - a1) * (c0 - a0)))
47: #
48: #cdef double areaQuad(double a0,
49: # double a1,
50: # double b0,
51: # double b1,
52: # double c0,
53: # double c1,
54: # double d0,
55: # double d1
56: # ):
57: # """
58: # Calculate the area of the ABCD quadrilataire with corners:
59: # A(a0,a1)
60: # B(b0,b1)
61: # C(c0,c1)
62: # D(d0,d1)
63: # @return: area, i.e. 1/2 * (AC ^ BD)
64: # """
65: # return 0.5 * abs(((c0 - a0) * (d1 - b1)) - ((c1 - a1) * (d0 - b0)))
66:
67: @cython.cdivision(True)
68: cdef double getBinNr(double x0, double pos0_min, double dpos) nogil:
/* "splitPixel.pyx":68 * * @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;
69: """
70: calculate the bin number for any point
71: param x0: current position
72: param pos0_min: position minimum
73: param dpos: bin width
74: """
75: return (x0 - pos0_min) / dpos
/* "splitPixel.pyx":75 * 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; }
76:
77: cdef double min4f(double a, double b, double c, double d) nogil:
/* "splitPixel.pyx":77 * 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;
78: if (a <= b) and (a <= c) and (a <= d):
/* "splitPixel.pyx":78 * * 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) {
79: return a
/* "splitPixel.pyx":79 * 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:;
80: if (b <= a) and (b <= c) and (b <= d):
/* "splitPixel.pyx":80 * 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) {
81: return b
/* "splitPixel.pyx":81 * 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:;
82: if (c <= a) and (c <= b) and (c <= d):
/* "splitPixel.pyx":82 * 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) {
83: return c
/* "splitPixel.pyx":83 * 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*/ {
84: else:
85: return d
/* "splitPixel.pyx":85 * 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; }
86:
87: cdef double max4f(double a, double b, double c, double d) nogil:
/* "splitPixel.pyx":87 * 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;
88: """Calculates the max of 4 double numbers"""
89: if (a >= b) and (a >= c) and (a >= d):
/* "splitPixel.pyx":89 * 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) {
90: return a
/* "splitPixel.pyx":90 * """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:;
91: if (b >= a) and (b >= c) and (b >= d):
/* "splitPixel.pyx":91 * 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) {
92: return b
/* "splitPixel.pyx":92 * 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:;
93: if (c >= a) and (c >= b) and (c >= d):
/* "splitPixel.pyx":93 * 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) {
94: return c
/* "splitPixel.pyx":94 * 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*/ {
95: else:
96: return d
/* "splitPixel.pyx":96 * 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; } /* Python wrapper */ static PyObject *__pyx_pw_10splitPixel_1fullSplit1D(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 No compromise for speed has been made here.\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 @param delta_dummy: precision of dummy value\n @param mask: array (of int8) with masked pixels with 1 (0=not masked)\n @param dark: array (of float64) with dark noise to be subtracted (or None)\n @param flat: array (of float64) with flat image\n @param polarization: array (of float64) with polarization correction\n @param solidangle: array (of float64) with flat image\n @return 2theta, I, weighted histogram, unweighted histogram\n "; static PyMethodDef __pyx_mdef_10splitPixel_1fullSplit1D = {__Pyx_NAMESTR("fullSplit1D"), (PyCFunction)__pyx_pw_10splitPixel_1fullSplit1D, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_10splitPixel_fullSplit1D)}; static PyObject *__pyx_pw_10splitPixel_1fullSplit1D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_pos = 0; PyArrayObject *__pyx_v_weights = 0; size_t __pyx_v_bins; PyObject *__pyx_v_pos0Range = 0; PyObject *__pyx_v_pos1Range = 0; PyObject *__pyx_v_dummy = 0; PyObject *__pyx_v_delta_dummy = 0; PyObject *__pyx_v_mask = 0; PyObject *__pyx_v_dark = 0; PyObject *__pyx_v_flat = 0; PyObject *__pyx_v_solidangle = 0; PyObject *__pyx_v_polarization = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fullSplit1D (wrapper)", 0); { 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,&__pyx_n_s__delta_dummy,&__pyx_n_s__mask,&__pyx_n_s__dark,&__pyx_n_s__flat,&__pyx_n_s__solidangle,&__pyx_n_s__polarization,0}; PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
97:
98: @cython.cdivision(True)
99: @cython.boundscheck(False)
100: @cython.wraparound(False)
101: def fullSplit1D(numpy.ndarray pos not None,
/* "splitPixel.pyx":101 * @cython.boundscheck(False) * @cython.wraparound(False) * def fullSplit1D(numpy.ndarray pos not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray weights not None, * size_t bins=100, */ static PyObject *__pyx_pf_10splitPixel_fullSplit1D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_weights, size_t __pyx_v_bins, PyObject *__pyx_v_pos0Range, PyObject *__pyx_v_pos1Range, PyObject *__pyx_v_dummy, PyObject *__pyx_v_delta_dummy, PyObject *__pyx_v_mask, PyObject *__pyx_v_dark, PyObject *__pyx_v_flat, PyObject *__pyx_v_solidangle, PyObject *__pyx_v_polarization) { size_t __pyx_v_size; 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; __Pyx_memviewslice __pyx_v_cmask = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_cflat = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_cdark = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_cpolarization = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_csolidangle = { 0, 0, { 0 }, { 0 }, { 0 } }; double __pyx_v_cdummy; double __pyx_v_cddummy; double __pyx_v_data; 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; double __pyx_v_pos1_min; CYTHON_UNUSED double __pyx_v_pos1_max; double __pyx_v_pos1_maxin; double __pyx_v_aeraPixel; double __pyx_v_dpos; double __pyx_v_fbin0_min; double __pyx_v_fbin0_max; double __pyx_v_a0; double __pyx_v_b0; double __pyx_v_c0; double __pyx_v_d0; double __pyx_v_max0; double __pyx_v_min0; double __pyx_v_a1; double __pyx_v_b1; double __pyx_v_c1; double __pyx_v_d1; double __pyx_v_max1; double __pyx_v_min1; double __pyx_v_epsilon; int __pyx_v_check_pos1; int __pyx_v_check_mask; CYTHON_UNUSED int __pyx_v_do_dummy; int __pyx_v_do_dark; int __pyx_v_do_flat; int __pyx_v_do_polarization; int __pyx_v_do_solidangle; size_t __pyx_v_i; size_t __pyx_v_idx; CYTHON_UNUSED size_t __pyx_v_bin; size_t __pyx_v_bin0_max; size_t __pyx_v_bin0_min; CYTHON_UNUSED int __pyx_v_do_pos1; PyObject *__pyx_v_outPos = NULL; int __pyx_v_check_dummy; double __pyx_v_tmp; __Pyx_LocalBuf_ND __pyx_pybuffernd_cdata; __Pyx_Buffer __pyx_pybuffer_cdata; __Pyx_LocalBuf_ND __pyx_pybuffernd_cpos; __Pyx_Buffer __pyx_pybuffer_cpos; __Pyx_LocalBuf_ND __pyx_pybuffernd_outCount; __Pyx_Buffer __pyx_pybuffer_outCount; __Pyx_LocalBuf_ND __pyx_pybuffernd_outData; __Pyx_Buffer __pyx_pybuffer_outData; __Pyx_LocalBuf_ND __pyx_pybuffernd_outMerge; __Pyx_Buffer __pyx_pybuffer_outMerge; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fullSplit1D", 0); __Pyx_INCREF((PyObject *)__pyx_v_pos); __pyx_pybuffer_cpos.pybuffer.buf = NULL; __pyx_pybuffer_cpos.refcount = 0; __pyx_pybuffernd_cpos.data = NULL; __pyx_pybuffernd_cpos.rcbuffer = &__pyx_pybuffer_cpos; __pyx_pybuffer_cdata.pybuffer.buf = NULL; __pyx_pybuffer_cdata.refcount = 0; __pyx_pybuffernd_cdata.data = NULL; __pyx_pybuffernd_cdata.rcbuffer = &__pyx_pybuffer_cdata; __pyx_pybuffer_outData.pybuffer.buf = NULL; __pyx_pybuffer_outData.refcount = 0; __pyx_pybuffernd_outData.data = NULL; __pyx_pybuffernd_outData.rcbuffer = &__pyx_pybuffer_outData; __pyx_pybuffer_outCount.pybuffer.buf = NULL; __pyx_pybuffer_outCount.refcount = 0; __pyx_pybuffernd_outCount.data = NULL; __pyx_pybuffernd_outCount.rcbuffer = &__pyx_pybuffer_outCount; __pyx_pybuffer_outMerge.pybuffer.buf = NULL; __pyx_pybuffer_outMerge.refcount = 0; __pyx_pybuffernd_outMerge.data = NULL; __pyx_pybuffernd_outMerge.rcbuffer = &__pyx_pybuffer_outMerge; /* "splitPixel.pyx":101 * @cython.boundscheck(False) * @cython.wraparound(False) * def fullSplit1D(numpy.ndarray pos not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray weights not None, * size_t bins=100, */ __pyx_k_tuple_74 = PyTuple_New(68); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_74); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 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_74, 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_74, 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_74, 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_74, 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_74, 5, ((PyObject *)__pyx_n_s__dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__delta_dummy)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 6, ((PyObject *)__pyx_n_s__delta_dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta_dummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__mask)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 7, ((PyObject *)__pyx_n_s__mask)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dark)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 8, ((PyObject *)__pyx_n_s__dark)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dark)); __Pyx_INCREF(((PyObject *)__pyx_n_s__flat)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 9, ((PyObject *)__pyx_n_s__flat)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__flat)); __Pyx_INCREF(((PyObject *)__pyx_n_s__solidangle)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 10, ((PyObject *)__pyx_n_s__solidangle)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__solidangle)); __Pyx_INCREF(((PyObject *)__pyx_n_s__polarization)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 11, ((PyObject *)__pyx_n_s__polarization)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__polarization)); __Pyx_INCREF(((PyObject *)__pyx_n_s__size)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 12, ((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_74, 13, ((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_74, 14, ((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_74, 15, ((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_74, 16, ((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_74, 17, ((PyObject *)__pyx_n_s__outMerge)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outMerge)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cmask)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 18, ((PyObject *)__pyx_n_s__cmask)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cmask)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cflat)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 19, ((PyObject *)__pyx_n_s__cflat)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cflat)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cdark)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 20, ((PyObject *)__pyx_n_s__cdark)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cdark)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cpolarization)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 21, ((PyObject *)__pyx_n_s__cpolarization)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cpolarization)); __Pyx_INCREF(((PyObject *)__pyx_n_s__csolidangle)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 22, ((PyObject *)__pyx_n_s__csolidangle)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__csolidangle)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cdummy)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 23, ((PyObject *)__pyx_n_s__cdummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cdummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cddummy)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 24, ((PyObject *)__pyx_n_s__cddummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cddummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__data)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 25, ((PyObject *)__pyx_n_s__data)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data)); __Pyx_INCREF(((PyObject *)__pyx_n_s__deltaR)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 26, ((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_74, 27, ((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_74, 28, ((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_74, 29, ((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_74, 30, ((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_74, 31, ((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_74, 32, ((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_74, 33, ((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_74, 34, ((PyObject *)__pyx_n_s__pos1_maxin)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos1_maxin)); __Pyx_INCREF(((PyObject *)__pyx_n_s__aeraPixel)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 35, ((PyObject *)__pyx_n_s__aeraPixel)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__aeraPixel)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dpos)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 36, ((PyObject *)__pyx_n_s__dpos)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dpos)); __Pyx_INCREF(((PyObject *)__pyx_n_s__fbin0_min)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 37, ((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_74, 38, ((PyObject *)__pyx_n_s__fbin0_max)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fbin0_max)); __Pyx_INCREF(((PyObject *)__pyx_n_s__a0)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 39, ((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_74, 40, ((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_74, 41, ((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_74, 42, ((PyObject *)__pyx_n_s__d0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__d0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__max0)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 43, ((PyObject *)__pyx_n_s__max0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__max0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__min0)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 44, ((PyObject *)__pyx_n_s__min0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__min0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__a1)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 45, ((PyObject *)__pyx_n_s__a1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__a1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__b1)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 46, ((PyObject *)__pyx_n_s__b1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__b1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__c1)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 47, ((PyObject *)__pyx_n_s__c1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__d1)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 48, ((PyObject *)__pyx_n_s__d1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__d1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__max1)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 49, ((PyObject *)__pyx_n_s__max1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__max1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__min1)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 50, ((PyObject *)__pyx_n_s__min1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__min1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__epsilon)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 51, ((PyObject *)__pyx_n_s__epsilon)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__epsilon)); __Pyx_INCREF(((PyObject *)__pyx_n_s__check_pos1)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 52, ((PyObject *)__pyx_n_s__check_pos1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__check_pos1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__check_mask)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 53, ((PyObject *)__pyx_n_s__check_mask)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__check_mask)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_dummy)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 54, ((PyObject *)__pyx_n_s__do_dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_dummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_dark)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 55, ((PyObject *)__pyx_n_s__do_dark)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_dark)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_flat)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 56, ((PyObject *)__pyx_n_s__do_flat)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_flat)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_polarization)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 57, ((PyObject *)__pyx_n_s__do_polarization)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_polarization)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_solidangle)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 58, ((PyObject *)__pyx_n_s__do_solidangle)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_solidangle)); __Pyx_INCREF(((PyObject *)__pyx_n_s__i)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 59, ((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_74, 60, ((PyObject *)__pyx_n_s__idx)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bin)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 61, ((PyObject *)__pyx_n_s__bin)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bin)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bin0_max)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 62, ((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_74, 63, ((PyObject *)__pyx_n_s__bin0_min)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bin0_min)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_pos1)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 64, ((PyObject *)__pyx_n_s__do_pos1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_pos1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__outPos)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 65, ((PyObject *)__pyx_n_s__outPos)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outPos)); __Pyx_INCREF(((PyObject *)__pyx_n_s__check_dummy)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 66, ((PyObject *)__pyx_n_s__check_dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__check_dummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 67, ((PyObject *)__pyx_n_s__tmp)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74)); /* "splitPixel.pyx":101 * @cython.boundscheck(False) * @cython.wraparound(False) * def fullSplit1D(numpy.ndarray pos not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray weights not None, * size_t bins=100, */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10splitPixel_1fullSplit1D, NULL, __pyx_n_s__splitPixel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __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 = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k_codeobj_75 = (PyObject*)__Pyx_PyCode_New(12, 0, 68, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_76, __pyx_n_s__fullSplit1D, 101, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
102: numpy.ndarray weights not None,
103: size_t bins=100,
104: pos0Range=None,
/* "splitPixel.pyx":104 * numpy.ndarray weights not None, * size_t bins=100, * pos0Range=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1Range=None, * dummy=None, */ values[3] = ((PyObject *)Py_None);
105: pos1Range=None,
/* "splitPixel.pyx":105 * size_t bins=100, * pos0Range=None, * pos1Range=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* dummy=None, * delta_dummy=None, */ values[4] = ((PyObject *)Py_None);
106: dummy=None,
/* "splitPixel.pyx":106 * pos0Range=None, * pos1Range=None, * dummy=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* delta_dummy=None, * mask=None, */ values[5] = ((PyObject *)Py_None);
107: delta_dummy=None,
/* "splitPixel.pyx":107 * pos1Range=None, * dummy=None, * delta_dummy=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* mask=None, * dark=None, */ values[6] = ((PyObject *)Py_None);
108: mask=None,
/* "splitPixel.pyx":108 * dummy=None, * delta_dummy=None, * mask=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* dark=None, * flat=None, */ values[7] = ((PyObject *)Py_None);
109: dark=None,
/* "splitPixel.pyx":109 * delta_dummy=None, * mask=None, * dark=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* flat=None, * solidangle=None, */ values[8] = ((PyObject *)Py_None);
110: flat=None,
/* "splitPixel.pyx":110 * mask=None, * dark=None, * flat=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* solidangle=None, * polarization=None */ values[9] = ((PyObject *)Py_None);
111: solidangle=None,
/* "splitPixel.pyx":111 * dark=None, * flat=None, * solidangle=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* polarization=None * ): */ values[10] = ((PyObject *)Py_None);
112: polarization=None
/* "splitPixel.pyx":112 * flat=None, * solidangle=None, * polarization=None #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* ): * """ */ values[11] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__weights)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("fullSplit1D", 0, 2, 12, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __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--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__delta_dummy); if (value) { values[6] = value; kw_args--; } } case 7: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask); if (value) { values[7] = value; kw_args--; } } case 8: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dark); if (value) { values[8] = value; kw_args--; } } case 9: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__flat); if (value) { values[9] = value; kw_args--; } } case 10: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__solidangle); if (value) { values[10] = value; kw_args--; } } case 11: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__polarization); if (value) { values[11] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fullSplit1D")<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); 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_AsSize_t(values[2]); if (unlikely((__pyx_v_bins == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_bins = ((size_t)100); } __pyx_v_pos0Range = values[3]; __pyx_v_pos1Range = values[4]; __pyx_v_dummy = values[5]; __pyx_v_delta_dummy = values[6]; __pyx_v_mask = values[7]; __pyx_v_dark = values[8]; __pyx_v_flat = values[9]; __pyx_v_solidangle = values[10]; __pyx_v_polarization = values[11]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("fullSplit1D", 0, 2, 12, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __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:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 0, "pos", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __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 = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_10splitPixel_fullSplit1D(__pyx_self, __pyx_v_pos, __pyx_v_weights, __pyx_v_bins, __pyx_v_pos0Range, __pyx_v_pos1Range, __pyx_v_dummy, __pyx_v_delta_dummy, __pyx_v_mask, __pyx_v_dark, __pyx_v_flat, __pyx_v_solidangle, __pyx_v_polarization); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
113: ):
114: """
115: Calculates histogram of pos weighted by weights
116:
117: Splitting is done on the pixel's bounding box like fit2D.
118: No compromise for speed has been made here.
119:
120:
121: @param pos: 3D array with pos0; Corner A,B,C,D; tth or chi
122: @param weights: array with intensities
123: @param bins: number of output bins
124: @param pos0Range: minimum and maximum of the 2th range
125: @param pos1Range: minimum and maximum of the chi range
126: @param dummy: value for bins without pixels
127: @param delta_dummy: precision of dummy value
128: @param mask: array (of int8) with masked pixels with 1 (0=not masked)
129: @param dark: array (of float64) with dark noise to be subtracted (or None)
130: @param flat: array (of float64) with flat image
131: @param polarization: array (of float64) with polarization correction
132: @param solidangle: array (of float64) with flat image
133: @return 2theta, I, weighted histogram, unweighted histogram
134: """
135: cdef size_t size = weights.size
/* "splitPixel.pyx":135 * @return 2theta, I, weighted histogram, unweighted histogram * """ * cdef size_t size = weights.size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if pos.ndim>3: #create a view * pos = pos.reshape((-1,4,2)) */ __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 = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AsSize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_size = __pyx_t_2;
136: if pos.ndim>3: #create a view
/* "splitPixel.pyx":136 * """ * cdef size_t size = weights.size * if pos.ndim>3: #create a view #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos = pos.reshape((-1,4,2)) * assert pos.shape[0] == size */ __pyx_t_3 = (__pyx_v_pos->nd > 3); if (__pyx_t_3) {
137: pos = pos.reshape((-1,4,2))
/* "splitPixel.pyx":137 * cdef size_t size = weights.size * if pos.ndim>3: #create a view * pos = pos.reshape((-1,4,2)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert pos.shape[0] == size * assert pos.shape[1] == 4 */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_pos), __pyx_n_s__reshape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "splitPixel.pyx":137 * cdef size_t size = weights.size * if pos.ndim>3: #create a view * pos = pos.reshape((-1,4,2)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert pos.shape[0] == size * assert pos.shape[1] == 4 */ __pyx_k_tuple_1 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_1); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_1, 0, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_INCREF(__pyx_int_4); PyTuple_SET_ITEM(__pyx_k_tuple_1, 1, __pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); __Pyx_INCREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_k_tuple_1, 2, __pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_1)); __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_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 = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_v_pos)); __pyx_v_pos = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } __pyx_L3:; __pyx_k_tuple_2 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_2); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_1)); PyTuple_SET_ITEM(__pyx_k_tuple_2, 0, ((PyObject *)__pyx_k_tuple_1)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_1)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2));
138: assert pos.shape[0] == size
/* "splitPixel.pyx":138 * if pos.ndim>3: #create a view * pos = pos.reshape((-1,4,2)) * assert pos.shape[0] == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert pos.shape[1] == 4 * assert pos.shape[2] == 2 */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!((__pyx_v_pos->dimensions[0]) == __pyx_v_size))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
139: assert pos.shape[1] == 4
/* "splitPixel.pyx":139 * pos = pos.reshape((-1,4,2)) * assert pos.shape[0] == 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 = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
140: assert pos.shape[2] == 2
/* "splitPixel.pyx":140 * assert pos.shape[0] == 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 = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
141: assert pos.ndim == 3
/* "splitPixel.pyx":141 * 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->nd == 3))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
142: assert bins > 1
/* "splitPixel.pyx":142 * assert pos.shape[2] == 2 * assert pos.ndim == 3 * assert bins > 1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef numpy.ndarray[numpy.float64_t, ndim = 3] cpos = numpy.ascontiguousarray(pos,dtype=numpy.float64) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!(__pyx_v_bins > 1))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
143:
144: cdef numpy.ndarray[numpy.float64_t, ndim = 3] cpos = numpy.ascontiguousarray(pos,dtype=numpy.float64)
/* "splitPixel.pyx":144 * assert bins > 1 * * cdef numpy.ndarray[numpy.float64_t, ndim = 3] cpos = numpy.ascontiguousarray(pos,dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float64_t, ndim = 1] cdata = numpy.ascontiguousarray(weights.ravel(), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] outData = numpy.zeros(bins, dtype=numpy.float64) */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_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 = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_pos)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_pos)); __Pyx_GIVEREF(((PyObject *)__pyx_v_pos)); __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__float64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cpos.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) { __pyx_v_cpos = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_cpos.diminfo[0].strides = __pyx_pybuffernd_cpos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cpos.diminfo[0].shape = __pyx_pybuffernd_cpos.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_cpos.diminfo[1].strides = __pyx_pybuffernd_cpos.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_cpos.diminfo[1].shape = __pyx_pybuffernd_cpos.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_cpos.diminfo[2].strides = __pyx_pybuffernd_cpos.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_cpos.diminfo[2].shape = __pyx_pybuffernd_cpos.rcbuffer->pybuffer.shape[2]; } } __pyx_t_8 = 0; __pyx_v_cpos = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0;
145: cdef numpy.ndarray[numpy.float64_t, ndim = 1] cdata = numpy.ascontiguousarray(weights.ravel(), dtype=numpy.float64)
/* "splitPixel.pyx":145 * * cdef numpy.ndarray[numpy.float64_t, ndim = 3] cpos = numpy.ascontiguousarray(pos,dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] cdata = numpy.ascontiguousarray(weights.ravel(), dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float64_t, ndim = 1] outData = numpy.zeros(bins, dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype=numpy.float64) */ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_weights), __pyx_n_s__ravel); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cdata.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_cdata = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_cdata.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_cdata.diminfo[0].strides = __pyx_pybuffernd_cdata.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cdata.diminfo[0].shape = __pyx_pybuffernd_cdata.rcbuffer->pybuffer.shape[0]; } } __pyx_t_9 = 0; __pyx_v_cdata = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0;
146: cdef numpy.ndarray[numpy.float64_t, ndim = 1] outData = numpy.zeros(bins, dtype=numpy.float64)
/* "splitPixel.pyx":146 * cdef numpy.ndarray[numpy.float64_t, ndim = 3] cpos = numpy.ascontiguousarray(pos,dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] cdata = numpy.ascontiguousarray(weights.ravel(), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] outData = numpy.zeros(bins, dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] outMerge = numpy.zeros(bins, dtype=numpy.float64) */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_bins); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__float64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 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 = 146; __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_pybuffernd_outData.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_outData = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_outData.diminfo[0].strides = __pyx_pybuffernd_outData.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outData.diminfo[0].shape = __pyx_pybuffernd_outData.rcbuffer->pybuffer.shape[0]; } } __pyx_t_10 = 0; __pyx_v_outData = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0;
147: cdef numpy.ndarray[numpy.float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype=numpy.float64)
/* "splitPixel.pyx":147 * cdef numpy.ndarray[numpy.float64_t, ndim = 1] cdata = numpy.ascontiguousarray(weights.ravel(), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] outData = numpy.zeros(bins, dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float64_t, ndim = 1] outMerge = numpy.zeros(bins, dtype=numpy.float64) * cdef numpy.int8_t[:] cmask */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_bins); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outCount.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_outCount = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_outCount.diminfo[0].strides = __pyx_pybuffernd_outCount.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outCount.diminfo[0].shape = __pyx_pybuffernd_outCount.rcbuffer->pybuffer.shape[0]; } } __pyx_t_11 = 0; __pyx_v_outCount = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0;
148: cdef numpy.ndarray[numpy.float64_t, ndim = 1] outMerge = numpy.zeros(bins, dtype=numpy.float64)
/* "splitPixel.pyx":148 * cdef numpy.ndarray[numpy.float64_t, ndim = 1] outData = numpy.zeros(bins, dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] outCount = numpy.zeros(bins, dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] outMerge = numpy.zeros(bins, dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.int8_t[:] cmask * cdef double[:] cflat, cdark, cpolarization, csolidangle */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_bins); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__float64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __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_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 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 = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outMerge.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_outMerge = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_outMerge.diminfo[0].strides = __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outMerge.diminfo[0].shape = __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.shape[0]; } } __pyx_t_12 = 0; __pyx_v_outMerge = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0;
149: cdef numpy.int8_t[:] cmask
150: cdef double[:] cflat, cdark, cpolarization, csolidangle
151:
152: cdef double cdummy=0, cddummy=0, data=0
/* "splitPixel.pyx":152 * cdef double[:] cflat, cdark, cpolarization, csolidangle * * cdef double cdummy=0, cddummy=0, data=0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef double deltaR=0, deltaL=0, deltaA=0 * cdef double pos0_min=0, pos0_max=0, pos0_maxin=0, pos1_min=0, pos1_max=0, pos1_maxin=0 */ __pyx_v_cdummy = 0.0; __pyx_v_cddummy = 0.0; __pyx_v_data = 0.0;
153: cdef double deltaR=0, deltaL=0, deltaA=0
/* "splitPixel.pyx":153 * * cdef double cdummy=0, cddummy=0, data=0 * cdef double deltaR=0, deltaL=0, deltaA=0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef double pos0_min=0, pos0_max=0, pos0_maxin=0, pos1_min=0, pos1_max=0, pos1_maxin=0 * cdef double aeraPixel=0, dpos=0, fbin0_min=0, fbin0_max=0#, fbin1_min, fbin1_max */ __pyx_v_deltaR = 0.0; __pyx_v_deltaL = 0.0; __pyx_v_deltaA = 0.0;
154: cdef double pos0_min=0, pos0_max=0, pos0_maxin=0, pos1_min=0, pos1_max=0, pos1_maxin=0
/* "splitPixel.pyx":154 * cdef double cdummy=0, cddummy=0, data=0 * cdef double deltaR=0, deltaL=0, deltaA=0 * cdef double pos0_min=0, pos0_max=0, pos0_maxin=0, pos1_min=0, pos1_max=0, pos1_maxin=0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef double aeraPixel=0, dpos=0, fbin0_min=0, fbin0_max=0#, fbin1_min, fbin1_max * cdef double a0=0, b0=0, c0=0, d0=0, max0=0, min0=0, a1=0, b1=0, c1=0, d1=0, max1=0, min1=0 */ __pyx_v_pos0_min = 0.0; __pyx_v_pos0_max = 0.0; __pyx_v_pos0_maxin = 0.0; __pyx_v_pos1_min = 0.0; __pyx_v_pos1_max = 0.0; __pyx_v_pos1_maxin = 0.0;
155: cdef double aeraPixel=0, dpos=0, fbin0_min=0, fbin0_max=0#, fbin1_min, fbin1_max
/* "splitPixel.pyx":155 * cdef double deltaR=0, deltaL=0, deltaA=0 * cdef double pos0_min=0, pos0_max=0, pos0_maxin=0, pos1_min=0, pos1_max=0, pos1_maxin=0 * cdef double aeraPixel=0, dpos=0, fbin0_min=0, fbin0_max=0#, fbin1_min, fbin1_max #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef double a0=0, b0=0, c0=0, d0=0, max0=0, min0=0, a1=0, b1=0, c1=0, d1=0, max1=0, min1=0 * cdef double epsilon=1e-10 */ __pyx_v_aeraPixel = 0.0; __pyx_v_dpos = 0.0; __pyx_v_fbin0_min = 0.0; __pyx_v_fbin0_max = 0.0;
156: cdef double a0=0, b0=0, c0=0, d0=0, max0=0, min0=0, a1=0, b1=0, c1=0, d1=0, max1=0, min1=0
/* "splitPixel.pyx":156 * cdef double pos0_min=0, pos0_max=0, pos0_maxin=0, pos1_min=0, pos1_max=0, pos1_maxin=0 * cdef double aeraPixel=0, dpos=0, fbin0_min=0, fbin0_max=0#, fbin1_min, fbin1_max * cdef double a0=0, b0=0, c0=0, d0=0, max0=0, min0=0, a1=0, b1=0, c1=0, d1=0, max1=0, min1=0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef double epsilon=1e-10 * */ __pyx_v_a0 = 0.0; __pyx_v_b0 = 0.0; __pyx_v_c0 = 0.0; __pyx_v_d0 = 0.0; __pyx_v_max0 = 0.0; __pyx_v_min0 = 0.0; __pyx_v_a1 = 0.0; __pyx_v_b1 = 0.0; __pyx_v_c1 = 0.0; __pyx_v_d1 = 0.0; __pyx_v_max1 = 0.0; __pyx_v_min1 = 0.0;
157: cdef double epsilon=1e-10
/* "splitPixel.pyx":157 * cdef double aeraPixel=0, dpos=0, fbin0_min=0, fbin0_max=0#, fbin1_min, fbin1_max * cdef double a0=0, b0=0, c0=0, d0=0, max0=0, min0=0, a1=0, b1=0, c1=0, d1=0, max1=0, min1=0 * cdef double epsilon=1e-10 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef bint check_pos1=False, check_mask=False, do_dummy=False, do_dark=False, do_flat=False, do_polarization=False, do_solidangle=False */ __pyx_v_epsilon = 1e-10;
158:
159: cdef bint check_pos1=False, check_mask=False, do_dummy=False, do_dark=False, do_flat=False, do_polarization=False, do_solidangle=False
/* "splitPixel.pyx":159 * cdef double epsilon=1e-10 * * cdef bint check_pos1=False, check_mask=False, do_dummy=False, do_dark=False, do_flat=False, do_polarization=False, do_solidangle=False #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef size_t i=0, idx=0, bin=0, bin0_max=0, bin0_min=0 * */ __pyx_v_check_pos1 = 0; __pyx_v_check_mask = 0; __pyx_v_do_dummy = 0; __pyx_v_do_dark = 0; __pyx_v_do_flat = 0; __pyx_v_do_polarization = 0; __pyx_v_do_solidangle = 0;
160: cdef size_t i=0, idx=0, bin=0, bin0_max=0, bin0_min=0
/* "splitPixel.pyx":160 * * cdef bint check_pos1=False, check_mask=False, do_dummy=False, do_dark=False, do_flat=False, do_polarization=False, do_solidangle=False * cdef size_t i=0, idx=0, bin=0, bin0_max=0, bin0_min=0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if pos0Range is not None and len(pos0Range) > 1: */ __pyx_v_i = 0; __pyx_v_idx = 0; __pyx_v_bin = 0; __pyx_v_bin0_max = 0; __pyx_v_bin0_min = 0;
161:
162: if pos0Range is not None and len(pos0Range) > 1:
/* "splitPixel.pyx":162 * cdef size_t i=0, idx=0, bin=0, bin0_max=0, bin0_min=0 * * if pos0Range is not None and len(pos0Range) > 1: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_min = min(pos0Range) * pos0_maxin = max(pos0Range) */ __pyx_t_3 = (__pyx_v_pos0Range != Py_None); if (__pyx_t_3) { __pyx_t_13 = PyObject_Length(__pyx_v_pos0Range); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __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_3; } if (__pyx_t_15) {
163: pos0_min = min(pos0Range)
/* "splitPixel.pyx":163 * * if pos0Range is not None and len(pos0Range) > 1: * pos0_min = min(pos0Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_maxin = max(pos0Range) * else: */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_pos0Range); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pos0Range); __Pyx_GIVEREF(__pyx_v_pos0Range); __pyx_t_5 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_pos0_min = __pyx_t_16;
164: pos0_maxin = max(pos0Range)
/* "splitPixel.pyx":164 * 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_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_pos0Range); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_pos0Range); __Pyx_GIVEREF(__pyx_v_pos0Range); __pyx_t_4 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pos0_maxin = __pyx_t_16; goto __pyx_L4; } /*else*/ {
165: else:
166: pos0_min = pos[:, :, 0].min()
/* "splitPixel.pyx":166 * pos0_maxin = max(pos0Range) * else: * pos0_min = pos[:, :, 0].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_maxin = pos[:, :, 0].max() * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.float32).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 = 166; __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 = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_4); __Pyx_GIVEREF(__pyx_k_slice_4); /* "splitPixel.pyx":166 * pos0_maxin = max(pos0Range) * else: * pos0_min = pos[:, :, 0].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_maxin = pos[:, :, 0].max() * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.float32).eps) */ __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_5)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__min); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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 = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__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));
167: pos0_maxin = pos[:, :, 0].max()
/* "splitPixel.pyx":167 * else: * pos0_min = pos[:, :, 0].min() * pos0_maxin = pos[:, :, 0].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.float32).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 = 167; __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 = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_7); __Pyx_GIVEREF(__pyx_k_slice_7); /* "splitPixel.pyx":167 * else: * pos0_min = pos[:, :, 0].min() * pos0_maxin = pos[:, :, 0].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.float32).eps) * if pos1Range is not None and len(pos1Range) > 1: */ __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_8)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__max); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pos0_maxin = __pyx_t_16; } __pyx_L4:; __pyx_k_tuple_8 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__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));
168: pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.float32).eps)
/* "splitPixel.pyx":168 * pos0_min = pos[:, :, 0].min() * pos0_maxin = pos[:, :, 0].max() * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.float32).eps) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if pos1Range is not None and len(pos1Range) > 1: * pos1_min = min(pos1Range) */ __pyx_t_4 = PyFloat_FromDouble(__pyx_v_pos0_maxin); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__finfo); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__float32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__eps); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_int_1, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Multiply(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_pos0_max = __pyx_t_16;
169: if pos1Range is not None and len(pos1Range) > 1:
/* "splitPixel.pyx":169 * pos0_maxin = pos[:, :, 0].max() * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.float32).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 = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = (__pyx_t_13 > 1); __pyx_t_14 = __pyx_t_3; } else { __pyx_t_14 = __pyx_t_15; } if (__pyx_t_14) {
170: pos1_min = min(pos1Range)
/* "splitPixel.pyx":170 * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.float32).eps) * if pos1Range is not None and len(pos1Range) > 1: * pos1_min = min(pos1Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_maxin = max(pos1Range) * do_pos1 = True */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_pos1Range); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_pos1Range); __Pyx_GIVEREF(__pyx_v_pos1Range); __pyx_t_1 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_pos1_min = __pyx_t_16;
171: pos1_maxin = max(pos1Range)
/* "splitPixel.pyx":171 * if pos1Range is not None and len(pos1Range) > 1: * pos1_min = min(pos1Range) * pos1_maxin = max(pos1Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_pos1 = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_pos1Range); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_pos1Range); __Pyx_GIVEREF(__pyx_v_pos1Range); __pyx_t_5 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_pos1_maxin = __pyx_t_16;
172: do_pos1 = True
/* "splitPixel.pyx":172 * pos1_min = min(pos1Range) * pos1_maxin = max(pos1Range) * do_pos1 = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * pos1_min = pos[:, :, 1].min() */ __pyx_v_do_pos1 = 1; goto __pyx_L5; } /*else*/ {
173: else:
174: pos1_min = pos[:, :, 1].min()
/* "splitPixel.pyx":174 * do_pos1 = True * else: * pos1_min = pos[:, :, 1].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_maxin = pos[:, :, 1].max() * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.float32).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 = 174; __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 = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_10); __Pyx_GIVEREF(__pyx_k_slice_10); /* "splitPixel.pyx":174 * do_pos1 = True * else: * pos1_min = pos[:, :, 1].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_maxin = pos[:, :, 1].max() * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.float32).eps) */ __pyx_t_5 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_11)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__min); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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 = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__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));
175: pos1_maxin = pos[:, :, 1].max()
/* "splitPixel.pyx":175 * else: * pos1_min = pos[:, :, 1].min() * pos1_maxin = pos[:, :, 1].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.float32).eps) * 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 = 175; __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 = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_13); __Pyx_GIVEREF(__pyx_k_slice_13); /* "splitPixel.pyx":175 * else: * pos1_min = pos[:, :, 1].min() * pos1_maxin = pos[:, :, 1].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.float32).eps) * dpos = (pos0_max - pos0_min) / (<
double > (bins)) */ __pyx_t_5 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_14)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_pos1_maxin = __pyx_t_16; } __pyx_L5:; __pyx_k_tuple_14 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__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));
176: pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.float32).eps)
/* "splitPixel.pyx":176 * pos1_min = pos[:, :, 1].min() * pos1_maxin = pos[:, :, 1].max() * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.float32).eps) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* dpos = (pos0_max - pos0_min) / (<
double > (bins)) * */ __pyx_t_5 = PyFloat_FromDouble(__pyx_v_pos1_maxin); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__finfo); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __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 = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__eps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyNumber_Add(__pyx_int_1, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Multiply(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_pos1_max = __pyx_t_16;
177: dpos = (pos0_max - pos0_min) / (< double > (bins))
/* "splitPixel.pyx":177 * pos1_maxin = pos[:, :, 1].max() * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.float32).eps) * dpos = (pos0_max - pos0_min) / (<
double > (bins)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * */ __pyx_v_dpos = ((__pyx_v_pos0_max - __pyx_v_pos0_min) / ((double)__pyx_v_bins));
178:
179:
180: outPos = numpy.linspace(pos0_min+0.5*dpos, pos0_maxin-0.5*dpos, bins)
/* "splitPixel.pyx":180 * * * outPos = numpy.linspace(pos0_min+0.5*dpos, pos0_maxin-0.5*dpos, bins) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if (dummy is not None) and (delta_dummy is not None): */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__linspace); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyFloat_FromDouble((__pyx_v_pos0_min + (0.5 * __pyx_v_dpos))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pos0_maxin - (0.5 * __pyx_v_dpos))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_bins); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_v_outPos = __pyx_t_4; __pyx_t_4 = 0;
181:
182: if (dummy is not None) and (delta_dummy is not None):
/* "splitPixel.pyx":182 * outPos = numpy.linspace(pos0_min+0.5*dpos, pos0_maxin-0.5*dpos, bins) * * if (dummy is not None) and (delta_dummy is not None): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* check_dummy = True * cdummy = float(dummy) */ __pyx_t_14 = (__pyx_v_dummy != Py_None); if (__pyx_t_14) { __pyx_t_15 = (__pyx_v_delta_dummy != Py_None); __pyx_t_3 = __pyx_t_15; } else { __pyx_t_3 = __pyx_t_14; } if (__pyx_t_3) {
183: check_dummy = True
/* "splitPixel.pyx":183 * * if (dummy is not None) and (delta_dummy is not None): * check_dummy = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdummy = float(dummy) * cddummy = float(delta_dummy) */ __pyx_v_check_dummy = 1;
184: cdummy = float(dummy)
/* "splitPixel.pyx":184 * if (dummy is not None) and (delta_dummy is not None): * check_dummy = True * cdummy = float(dummy) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cddummy = float(delta_dummy) * elif (dummy is not None): */ __pyx_t_16 = __Pyx_PyObject_AsDouble(__pyx_v_dummy); if (unlikely(__pyx_t_16 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cdummy = __pyx_t_16;
185: cddummy = float(delta_dummy)
/* "splitPixel.pyx":185 * check_dummy = True * cdummy = float(dummy) * cddummy = float(delta_dummy) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* elif (dummy is not None): * check_dummy = True */ __pyx_t_16 = __Pyx_PyObject_AsDouble(__pyx_v_delta_dummy); if (unlikely(__pyx_t_16 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cddummy = __pyx_t_16; goto __pyx_L6; }
186: elif (dummy is not None):
/* "splitPixel.pyx":186 * cdummy = float(dummy) * cddummy = float(delta_dummy) * elif (dummy is not None): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* check_dummy = True * cdummy = float(dummy) */ __pyx_t_3 = (__pyx_v_dummy != Py_None); if (__pyx_t_3) {
187: check_dummy = True
/* "splitPixel.pyx":187 * cddummy = float(delta_dummy) * elif (dummy is not None): * check_dummy = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdummy = float(dummy) * cddummy = 0.0 */ __pyx_v_check_dummy = 1;
188: cdummy = float(dummy)
/* "splitPixel.pyx":188 * elif (dummy is not None): * check_dummy = True * cdummy = float(dummy) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cddummy = 0.0 * else: */ __pyx_t_16 = __Pyx_PyObject_AsDouble(__pyx_v_dummy); if (unlikely(__pyx_t_16 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cdummy = __pyx_t_16;
189: cddummy = 0.0
/* "splitPixel.pyx":189 * check_dummy = True * cdummy = float(dummy) * cddummy = 0.0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * check_dummy = False */ __pyx_v_cddummy = 0.0; goto __pyx_L6; } /*else*/ {
190: else:
191: check_dummy = False
/* "splitPixel.pyx":191 * cddummy = 0.0 * else: * check_dummy = False #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdummy = 0.0 * cddummy = 0.0 */ __pyx_v_check_dummy = 0;
192: cdummy = 0.0
/* "splitPixel.pyx":192 * else: * check_dummy = False * cdummy = 0.0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cddummy = 0.0 * */ __pyx_v_cdummy = 0.0;
193: cddummy = 0.0
/* "splitPixel.pyx":193 * check_dummy = False * cdummy = 0.0 * cddummy = 0.0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if mask is not None: */ __pyx_v_cddummy = 0.0; } __pyx_L6:;
194:
195: if mask is not None:
/* "splitPixel.pyx":195 * cddummy = 0.0 * * if mask is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* check_mask = True * assert mask.size == size */ __pyx_t_3 = (__pyx_v_mask != Py_None); if (__pyx_t_3) {
196: check_mask = True
/* "splitPixel.pyx":196 * * if mask is not None: * check_mask = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert mask.size == size * cmask = numpy.ascontiguousarray(mask.ravel(), dtype=numpy.int8) */ __pyx_v_check_mask = 1;
197: assert mask.size == size
/* "splitPixel.pyx":197 * if mask is not None: * check_mask = True * assert mask.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cmask = numpy.ascontiguousarray(mask.ravel(), dtype=numpy.int8) * if dark is not None: */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyObject_GetAttr(__pyx_v_mask, __pyx_n_s__size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
198: cmask = numpy.ascontiguousarray(mask.ravel(), dtype=numpy.int8)
/* "splitPixel.pyx":198 * check_mask = True * assert mask.size == size * cmask = numpy.ascontiguousarray(mask.ravel(), dtype=numpy.int8) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if dark is not None: * do_dark = True */ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_GetAttr(__pyx_v_mask, __pyx_n_s__ravel); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 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 = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int8_t(__pyx_t_1); if (unlikely(!__pyx_t_17.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_cmask = __pyx_t_17; __pyx_t_17.memview = NULL; __pyx_t_17.data = NULL; goto __pyx_L7; } __pyx_L7:;
199: if dark is not None:
/* "splitPixel.pyx":199 * assert mask.size == size * cmask = numpy.ascontiguousarray(mask.ravel(), dtype=numpy.int8) * if dark is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_dark = True * assert dark.size == size */ __pyx_t_3 = (__pyx_v_dark != Py_None); if (__pyx_t_3) {
200: do_dark = True
/* "splitPixel.pyx":200 * cmask = numpy.ascontiguousarray(mask.ravel(), dtype=numpy.int8) * if dark is not None: * do_dark = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert dark.size == size * cdark = numpy.ascontiguousarray(dark.ravel(), dtype=numpy.float64) */ __pyx_v_do_dark = 1;
201: assert dark.size == size
/* "splitPixel.pyx":201 * if dark is not None: * do_dark = True * assert dark.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdark = numpy.ascontiguousarray(dark.ravel(), dtype=numpy.float64) * if flat is not None: */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_1 = PyObject_GetAttr(__pyx_v_dark, __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
202: cdark = numpy.ascontiguousarray(dark.ravel(), dtype=numpy.float64)
/* "splitPixel.pyx":202 * do_dark = True * assert dark.size == size * cdark = numpy.ascontiguousarray(dark.ravel(), dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if flat is not None: * do_flat = True */ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_GetAttr(__pyx_v_dark, __pyx_n_s__ravel); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__float64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_5); if (unlikely(!__pyx_t_18.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_cdark = __pyx_t_18; __pyx_t_18.memview = NULL; __pyx_t_18.data = NULL; goto __pyx_L8; } __pyx_L8:;
203: if flat is not None:
/* "splitPixel.pyx":203 * assert dark.size == size * cdark = numpy.ascontiguousarray(dark.ravel(), dtype=numpy.float64) * if flat is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_flat = True * assert flat.size == size */ __pyx_t_3 = (__pyx_v_flat != Py_None); if (__pyx_t_3) {
204: do_flat = True
/* "splitPixel.pyx":204 * cdark = numpy.ascontiguousarray(dark.ravel(), dtype=numpy.float64) * if flat is not None: * do_flat = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert flat.size == size * cflat = numpy.ascontiguousarray(flat.ravel(), dtype=numpy.float64) */ __pyx_v_do_flat = 1;
205: assert flat.size == size
/* "splitPixel.pyx":205 * if flat is not None: * do_flat = True * assert flat.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cflat = numpy.ascontiguousarray(flat.ravel(), dtype=numpy.float64) * if polarization is not None: */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_5 = PyObject_GetAttr(__pyx_v_flat, __pyx_n_s__size); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
206: cflat = numpy.ascontiguousarray(flat.ravel(), dtype=numpy.float64)
/* "splitPixel.pyx":206 * do_flat = True * assert flat.size == size * cflat = numpy.ascontiguousarray(flat.ravel(), dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if polarization is not None: * do_polarization = True */ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_GetAttr(__pyx_v_flat, __pyx_n_s__ravel); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_6); if (unlikely(!__pyx_t_18.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_cflat = __pyx_t_18; __pyx_t_18.memview = NULL; __pyx_t_18.data = NULL; goto __pyx_L9; } __pyx_L9:;
207: if polarization is not None:
/* "splitPixel.pyx":207 * assert flat.size == size * cflat = numpy.ascontiguousarray(flat.ravel(), dtype=numpy.float64) * if polarization is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_polarization = True * assert polarization.size == size */ __pyx_t_3 = (__pyx_v_polarization != Py_None); if (__pyx_t_3) {
208: do_polarization = True
/* "splitPixel.pyx":208 * cflat = numpy.ascontiguousarray(flat.ravel(), dtype=numpy.float64) * if polarization is not None: * do_polarization = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert polarization.size == size * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float64) */ __pyx_v_do_polarization = 1;
209: assert polarization.size == size
/* "splitPixel.pyx":209 * if polarization is not None: * do_polarization = True * assert polarization.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float64) * if solidangle is not None: */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_6 = PyObject_GetAttr(__pyx_v_polarization, __pyx_n_s__size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
210: cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float64)
/* "splitPixel.pyx":210 * do_polarization = True * assert polarization.size == size * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if solidangle is not None: * do_solidangle = True */ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_GetAttr(__pyx_v_polarization, __pyx_n_s__ravel); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4); if (unlikely(!__pyx_t_18.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_cpolarization = __pyx_t_18; __pyx_t_18.memview = NULL; __pyx_t_18.data = NULL; goto __pyx_L10; } __pyx_L10:;
211: if solidangle is not None:
/* "splitPixel.pyx":211 * assert polarization.size == size * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float64) * if solidangle is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_solidangle = True * assert solidangle.size == size */ __pyx_t_3 = (__pyx_v_solidangle != Py_None); if (__pyx_t_3) {
212: do_solidangle = True
/* "splitPixel.pyx":212 * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float64) * if solidangle is not None: * do_solidangle = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert solidangle.size == size * csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float64) */ __pyx_v_do_solidangle = 1;
213: assert solidangle.size == size
/* "splitPixel.pyx":213 * if solidangle is not None: * do_solidangle = True * assert solidangle.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float64) * */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyObject_GetAttr(__pyx_v_solidangle, __pyx_n_s__size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
214: csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float64)
/* "splitPixel.pyx":214 * do_solidangle = True * assert solidangle.size == size * csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * with nogil: */ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_GetAttr(__pyx_v_solidangle, __pyx_n_s__ravel); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 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 = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__float64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1); if (unlikely(!__pyx_t_18.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_csolidangle = __pyx_t_18; __pyx_t_18.memview = NULL; __pyx_t_18.data = NULL; goto __pyx_L11; } __pyx_L11:;
215:
216: with nogil:
/* "splitPixel.pyx":216 * csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float64) * * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for idx in range(size): * */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "splitPixel.pyx":216 * csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float64) * * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for idx in range(size): * */ /*finally:*/ { int __pyx_why; __pyx_why = 0; goto __pyx_L14; __pyx_L13: __pyx_why = 4; goto __pyx_L14; __pyx_L14:; Py_BLOCK_THREADS switch (__pyx_why) { case 4: goto __pyx_L1_error; } } }
217: for idx in range(size):
/* "splitPixel.pyx":217 * * with nogil: * for idx in range(size): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if (check_mask) and (cmask[idx]): */ __pyx_t_2 = __pyx_v_size; for (__pyx_t_19 = 0; __pyx_t_19<
__pyx_t_2; __pyx_t_19+=1) { __pyx_v_idx = __pyx_t_19;
218:
219: if (check_mask) and (cmask[idx]):
/* "splitPixel.pyx":219 * for idx in range(size): * * if (check_mask) and (cmask[idx]): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * */ __pyx_t_3 = __pyx_v_check_mask; if (__pyx_t_3) { if (unlikely(!__pyx_v_cmask.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cmask"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L13;} } __pyx_t_20 = __pyx_v_idx; __pyx_t_14 = (*((__pyx_t_5numpy_int8_t *) ( /* dim=0 */ (__pyx_v_cmask.data + __pyx_t_20 * __pyx_v_cmask.strides[0]) ))); } else { __pyx_t_14 = __pyx_t_3; } if (__pyx_t_14) {
220: continue
/* "splitPixel.pyx":220 * * if (check_mask) and (cmask[idx]): * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * data = cdata[idx] */ goto __pyx_L15_continue; goto __pyx_L17; } __pyx_L17:;
221:
222: data = cdata[idx]
/* "splitPixel.pyx":222 * continue * * data = cdata[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if check_dummy and ( (cddummy==0.0 and data==cdummy) or (cddummy!=0.0 and fabs(data-cdummy)<
=cddummy)): * continue */ __pyx_t_21 = __pyx_v_idx; __pyx_v_data = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cdata.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_cdata.diminfo[0].strides));
223: if check_dummy and ( (cddummy==0.0 and data==cdummy) or (cddummy!=0.0 and fabs(data-cdummy)<=cddummy)):
/* "splitPixel.pyx":223 * * data = cdata[idx] * if check_dummy and ( (cddummy==0.0 and data==cdummy) or (cddummy!=0.0 and fabs(data-cdummy)<
=cddummy)): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * */ if (__pyx_v_check_dummy) { __pyx_t_14 = (__pyx_v_cddummy == 0.0); if (__pyx_t_14) { __pyx_t_3 = (__pyx_v_data == __pyx_v_cdummy); __pyx_t_15 = __pyx_t_3; } else { __pyx_t_15 = __pyx_t_14; } if (!__pyx_t_15) { __pyx_t_14 = (__pyx_v_cddummy != 0.0); if (__pyx_t_14) { __pyx_t_3 = (fabs((__pyx_v_data - __pyx_v_cdummy))<
= __pyx_v_cddummy); __pyx_t_22 = __pyx_t_3; } else { __pyx_t_22 = __pyx_t_14; } __pyx_t_14 = __pyx_t_22; } else { __pyx_t_14 = __pyx_t_15; } __pyx_t_15 = __pyx_t_14; } else { __pyx_t_15 = __pyx_v_check_dummy; } if (__pyx_t_15) {
224: continue
/* "splitPixel.pyx":224 * data = cdata[idx] * if check_dummy and ( (cddummy==0.0 and data==cdummy) or (cddummy!=0.0 and fabs(data-cdummy)<
=cddummy)): * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * a0 =<
double > cpos[idx, 0, 0] */ goto __pyx_L15_continue; goto __pyx_L18; } __pyx_L18:;
225:
226: a0 = < double > cpos[idx, 0, 0]
/* "splitPixel.pyx":226 * continue * * a0 =<
double > cpos[idx, 0, 0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* a1 =<
double > cpos[idx, 0, 1] * b0 =<
double > cpos[idx, 1, 0] */ __pyx_t_23 = __pyx_v_idx; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_v_a0 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_25, __pyx_pybuffernd_cpos.diminfo[2].strides)));
227: a1 = < double > cpos[idx, 0, 1]
/* "splitPixel.pyx":227 * * 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_26 = __pyx_v_idx; __pyx_t_27 = 0; __pyx_t_28 = 1; __pyx_v_a1 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_28, __pyx_pybuffernd_cpos.diminfo[2].strides)));
228: b0 = < double > cpos[idx, 1, 0]
/* "splitPixel.pyx":228 * 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_29 = __pyx_v_idx; __pyx_t_30 = 1; __pyx_t_31 = 0; __pyx_v_b0 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_31, __pyx_pybuffernd_cpos.diminfo[2].strides)));
229: b1 = < double > cpos[idx, 1, 1]
/* "splitPixel.pyx":229 * 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_32 = __pyx_v_idx; __pyx_t_33 = 1; __pyx_t_34 = 1; __pyx_v_b1 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_34, __pyx_pybuffernd_cpos.diminfo[2].strides)));
230: c0 = < double > cpos[idx, 2, 0]
/* "splitPixel.pyx":230 * 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_35 = __pyx_v_idx; __pyx_t_36 = 2; __pyx_t_37 = 0; __pyx_v_c0 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_37, __pyx_pybuffernd_cpos.diminfo[2].strides)));
231: c1 = < double > cpos[idx, 2, 1]
/* "splitPixel.pyx":231 * 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_38 = __pyx_v_idx; __pyx_t_39 = 2; __pyx_t_40 = 1; __pyx_v_c1 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_40, __pyx_pybuffernd_cpos.diminfo[2].strides)));
232: d0 = < double > cpos[idx, 3, 0]
/* "splitPixel.pyx":232 * c0 =<
double > cpos[idx, 2, 0] * 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_41 = __pyx_v_idx; __pyx_t_42 = 3; __pyx_t_43 = 0; __pyx_v_d0 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_43, __pyx_pybuffernd_cpos.diminfo[2].strides)));
233: d1 = < double > cpos[idx, 3, 1]
/* "splitPixel.pyx":233 * c1 =<
double > cpos[idx, 2, 1] * d0 =<
double > cpos[idx, 3, 0] * d1 =<
double > cpos[idx, 3, 1] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min0 = min4f(a0, b0, c0, d0) * max0 = max4f(a0, b0, c0, d0) */ __pyx_t_44 = __pyx_v_idx; __pyx_t_45 = 3; __pyx_t_46 = 1; __pyx_v_d1 = ((double)(*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_46, __pyx_pybuffernd_cpos.diminfo[2].strides)));
234: min0 = min4f(a0, b0, c0, d0)
/* "splitPixel.pyx":234 * d0 =<
double > cpos[idx, 3, 0] * d1 =<
double > cpos[idx, 3, 1] * min0 = min4f(a0, b0, c0, d0) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max0 = max4f(a0, b0, c0, d0) * if (max0<
pos0_min) or (min0 > pos0_maxin): */ __pyx_v_min0 = __pyx_f_10splitPixel_min4f(__pyx_v_a0, __pyx_v_b0, __pyx_v_c0, __pyx_v_d0);
235: max0 = max4f(a0, b0, c0, d0)
/* "splitPixel.pyx":235 * d1 =<
double > cpos[idx, 3, 1] * min0 = min4f(a0, b0, c0, d0) * max0 = max4f(a0, b0, c0, d0) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if (max0<
pos0_min) or (min0 > pos0_maxin): * continue */ __pyx_v_max0 = __pyx_f_10splitPixel_max4f(__pyx_v_a0, __pyx_v_b0, __pyx_v_c0, __pyx_v_d0);
236: if (max0<pos0_min) or (min0 > pos0_maxin):
/* "splitPixel.pyx":236 * min0 = min4f(a0, b0, c0, d0) * max0 = max4f(a0, b0, c0, d0) * if (max0<
pos0_min) or (min0 > pos0_maxin): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * if check_pos1: */ __pyx_t_15 = (__pyx_v_max0<
__pyx_v_pos0_min); if (!__pyx_t_15) { __pyx_t_14 = (__pyx_v_min0 > __pyx_v_pos0_maxin); __pyx_t_22 = __pyx_t_14; } else { __pyx_t_22 = __pyx_t_15; } if (__pyx_t_22) {
237: continue
/* "splitPixel.pyx":237 * max0 = max4f(a0, b0, c0, d0) * if (max0<
pos0_min) or (min0 > pos0_maxin): * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if check_pos1: * min1 = min4f(a1, b1, c1, d1) */ goto __pyx_L15_continue; goto __pyx_L19; } __pyx_L19:;
238: if check_pos1:
/* "splitPixel.pyx":238 * if (max0<
pos0_min) or (min0 > pos0_maxin): * continue * if check_pos1: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min1 = min4f(a1, b1, c1, d1) * max1 = max4f(a1, b1, c1, d1) */ if (__pyx_v_check_pos1) {
239: min1 = min4f(a1, b1, c1, d1)
/* "splitPixel.pyx":239 * continue * if check_pos1: * min1 = min4f(a1, b1, c1, d1) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max1 = max4f(a1, b1, c1, d1) * if (max1<
pos1_min) or (min1 > pos1_maxin): */ __pyx_v_min1 = __pyx_f_10splitPixel_min4f(__pyx_v_a1, __pyx_v_b1, __pyx_v_c1, __pyx_v_d1);
240: max1 = max4f(a1, b1, c1, d1)
/* "splitPixel.pyx":240 * if check_pos1: * min1 = min4f(a1, b1, c1, d1) * max1 = max4f(a1, b1, c1, d1) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if (max1<
pos1_min) or (min1 > pos1_maxin): * continue */ __pyx_v_max1 = __pyx_f_10splitPixel_max4f(__pyx_v_a1, __pyx_v_b1, __pyx_v_c1, __pyx_v_d1);
241: if (max1<pos1_min) or (min1 > pos1_maxin):
/* "splitPixel.pyx":241 * min1 = min4f(a1, b1, c1, d1) * max1 = max4f(a1, b1, c1, d1) * if (max1<
pos1_min) or (min1 > pos1_maxin): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * if min0<
pos0_min: */ __pyx_t_22 = (__pyx_v_max1<
__pyx_v_pos1_min); if (!__pyx_t_22) { __pyx_t_15 = (__pyx_v_min1 > __pyx_v_pos1_maxin); __pyx_t_14 = __pyx_t_15; } else { __pyx_t_14 = __pyx_t_22; } if (__pyx_t_14) {
242: continue
/* "splitPixel.pyx":242 * max1 = max4f(a1, b1, c1, d1) * if (max1<
pos1_min) or (min1 > pos1_maxin): * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if min0<
pos0_min: * min0=pos0_min */ goto __pyx_L15_continue; goto __pyx_L21; } __pyx_L21:; goto __pyx_L20; } __pyx_L20:;
243: if min0<pos0_min:
/* "splitPixel.pyx":243 * if (max1<
pos1_min) or (min1 > pos1_maxin): * continue * if min0<
pos0_min: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min0=pos0_min * if max0>pos0_maxin: */ __pyx_t_14 = (__pyx_v_min0<
__pyx_v_pos0_min); if (__pyx_t_14) {
244: min0=pos0_min
/* "splitPixel.pyx":244 * continue * if min0<
pos0_min: * min0=pos0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if max0>pos0_maxin: * max0=pos0_maxin */ __pyx_v_min0 = __pyx_v_pos0_min; goto __pyx_L22; } __pyx_L22:;
245: if max0>pos0_maxin:
/* "splitPixel.pyx":245 * if min0<
pos0_min: * min0=pos0_min * if max0>pos0_maxin: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max0=pos0_maxin * */ __pyx_t_14 = (__pyx_v_max0 > __pyx_v_pos0_maxin); if (__pyx_t_14) {
246: max0=pos0_maxin
/* "splitPixel.pyx":246 * min0=pos0_min * if max0>pos0_maxin: * max0=pos0_maxin #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if do_dark: */ __pyx_v_max0 = __pyx_v_pos0_maxin; goto __pyx_L23; } __pyx_L23:;
247:
248: if do_dark:
/* "splitPixel.pyx":248 * max0=pos0_maxin * * if do_dark: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data -= cdark[idx] * if do_flat: */ if (__pyx_v_do_dark) {
249: data -= cdark[idx]
/* "splitPixel.pyx":249 * * if do_dark: * data -= cdark[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if do_flat: * data /= cflat[idx] */ if (unlikely(!__pyx_v_cdark.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cdark"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L13;} } __pyx_t_47 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data - (*((double *) ( /* dim=0 */ (__pyx_v_cdark.data + __pyx_t_47 * __pyx_v_cdark.strides[0]) )))); goto __pyx_L24; } __pyx_L24:;
250: if do_flat:
/* "splitPixel.pyx":250 * if do_dark: * data -= cdark[idx] * if do_flat: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data /= cflat[idx] * if do_polarization: */ if (__pyx_v_do_flat) {
251: data /= cflat[idx]
/* "splitPixel.pyx":251 * data -= cdark[idx] * if do_flat: * data /= cflat[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if do_polarization: * data /= cpolarization[idx] */ if (unlikely(!__pyx_v_cflat.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cflat"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L13;} } __pyx_t_48 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data / (*((double *) ( /* dim=0 */ (__pyx_v_cflat.data + __pyx_t_48 * __pyx_v_cflat.strides[0]) )))); goto __pyx_L25; } __pyx_L25:;
252: if do_polarization:
/* "splitPixel.pyx":252 * if do_flat: * data /= cflat[idx] * if do_polarization: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data /= cpolarization[idx] * if do_solidangle: */ if (__pyx_v_do_polarization) {
253: data /= cpolarization[idx]
/* "splitPixel.pyx":253 * data /= cflat[idx] * if do_polarization: * data /= cpolarization[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if do_solidangle: * data /= csolidangle[idx] */ if (unlikely(!__pyx_v_cpolarization.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cpolarization"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L13;} } __pyx_t_49 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data / (*((double *) ( /* dim=0 */ (__pyx_v_cpolarization.data + __pyx_t_49 * __pyx_v_cpolarization.strides[0]) )))); goto __pyx_L26; } __pyx_L26:;
254: if do_solidangle:
/* "splitPixel.pyx":254 * if do_polarization: * data /= cpolarization[idx] * if do_solidangle: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data /= csolidangle[idx] * */ if (__pyx_v_do_solidangle) {
255: data /= csolidangle[idx]
/* "splitPixel.pyx":255 * data /= cpolarization[idx] * if do_solidangle: * data /= csolidangle[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * fbin0_min = getBinNr(min0, pos0_min, dpos) */ if (unlikely(!__pyx_v_csolidangle.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("csolidangle"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L13;} } __pyx_t_50 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data / (*((double *) ( /* dim=0 */ (__pyx_v_csolidangle.data + __pyx_t_50 * __pyx_v_csolidangle.strides[0]) )))); goto __pyx_L27; } __pyx_L27:;
256:
257: fbin0_min = getBinNr(min0, pos0_min, dpos)
/* "splitPixel.pyx":257 * data /= csolidangle[idx] * * fbin0_min = getBinNr(min0, pos0_min, dpos) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* fbin0_max = getBinNr(max0, pos0_min, dpos) * bin0_min =<
size_t > fbin0_min */ __pyx_v_fbin0_min = __pyx_f_10splitPixel_getBinNr(__pyx_v_min0, __pyx_v_pos0_min, __pyx_v_dpos);
258: fbin0_max = getBinNr(max0, pos0_min, dpos)
/* "splitPixel.pyx":258 * * fbin0_min = getBinNr(min0, pos0_min, dpos) * fbin0_max = getBinNr(max0, pos0_min, dpos) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bin0_min =<
size_t > fbin0_min * bin0_max =<
size_t > fbin0_max */ __pyx_v_fbin0_max = __pyx_f_10splitPixel_getBinNr(__pyx_v_max0, __pyx_v_pos0_min, __pyx_v_dpos);
259: bin0_min = < size_t > fbin0_min
/* "splitPixel.pyx":259 * fbin0_min = getBinNr(min0, pos0_min, dpos) * fbin0_max = getBinNr(max0, pos0_min, dpos) * bin0_min =<
size_t > fbin0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bin0_max =<
size_t > fbin0_max * */ __pyx_v_bin0_min = ((size_t)__pyx_v_fbin0_min);
260: bin0_max = < size_t > fbin0_max
/* "splitPixel.pyx":260 * fbin0_max = getBinNr(max0, pos0_min, dpos) * bin0_min =<
size_t > fbin0_min * bin0_max =<
size_t > fbin0_max #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if bin0_min == bin0_max: */ __pyx_v_bin0_max = ((size_t)__pyx_v_fbin0_max);
261:
262: if bin0_min == bin0_max:
/* "splitPixel.pyx":262 * bin0_max =<
size_t > 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) {
263: #All pixel is within a single bin
264: outCount[bin0_min] += 1.0
/* "splitPixel.pyx":264 * if bin0_min == bin0_max: * #All pixel is within a single bin * outCount[bin0_min] += 1.0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min] += data * */ __pyx_t_51 = __pyx_v_bin0_min; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_51, __pyx_pybuffernd_outCount.diminfo[0].strides) += 1.0;
265: outData[bin0_min] += data
/* "splitPixel.pyx":265 * #All pixel is within a single bin * outCount[bin0_min] += 1.0 * outData[bin0_min] += data #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * # else we have pixel spliting. */ __pyx_t_52 = __pyx_v_bin0_min; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_52, __pyx_pybuffernd_outData.diminfo[0].strides) += __pyx_v_data; goto __pyx_L28; } /*else*/ {
266:
267: # else we have pixel spliting.
268: else:
269: aeraPixel = fbin0_max - fbin0_min
/* "splitPixel.pyx":269 * # 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);
270: deltaA = 1.0 / aeraPixel
/* "splitPixel.pyx":270 * else: * aeraPixel = fbin0_max - fbin0_min * deltaA = 1.0 / aeraPixel #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * deltaL =<
double>(bin0_min) + 1.0 - fbin0_min */ __pyx_v_deltaA = (1.0 / __pyx_v_aeraPixel);
271:
272: deltaL = <double>(bin0_min) + 1.0 - fbin0_min
/* "splitPixel.pyx":272 * deltaA = 1.0 / aeraPixel * * deltaL =<
double>(bin0_min) + 1.0 - fbin0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaR = fbin0_max -<
double>(bin0_max) * */ __pyx_v_deltaL = ((((double)__pyx_v_bin0_min) + 1.0) - __pyx_v_fbin0_min);
273: deltaR = fbin0_max - <double>(bin0_max)
/* "splitPixel.pyx":273 * * deltaL =<
double>(bin0_min) + 1.0 - fbin0_min * deltaR = fbin0_max -<
double>(bin0_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * tmp = deltaA * deltaL */ __pyx_v_deltaR = (__pyx_v_fbin0_max - ((double)__pyx_v_bin0_max));
274:
275: tmp = deltaA * deltaL
/* "splitPixel.pyx":275 * deltaR = fbin0_max -<
double>(bin0_max) * * tmp = deltaA * deltaL #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[bin0_min] += tmp * outData[bin0_min] += data * tmp */ __pyx_v_tmp = (__pyx_v_deltaA * __pyx_v_deltaL);
276: outCount[bin0_min] += tmp
/* "splitPixel.pyx":276 * * tmp = deltaA * deltaL * outCount[bin0_min] += tmp #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min] += data * tmp * */ __pyx_t_53 = __pyx_v_bin0_min; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_53, __pyx_pybuffernd_outCount.diminfo[0].strides) += __pyx_v_tmp;
277: outData[bin0_min] += data * tmp
/* "splitPixel.pyx":277 * tmp = deltaA * deltaL * outCount[bin0_min] += tmp * outData[bin0_min] += data * tmp #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * tmp = deltaA * deltaR */ __pyx_t_54 = __pyx_v_bin0_min; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_54, __pyx_pybuffernd_outData.diminfo[0].strides) += (__pyx_v_data * __pyx_v_tmp);
278:
279: tmp = deltaA * deltaR
/* "splitPixel.pyx":279 * outData[bin0_min] += data * tmp * * tmp = deltaA * deltaR #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[bin0_max] += tmp * outData[bin0_max] += data * tmp */ __pyx_v_tmp = (__pyx_v_deltaA * __pyx_v_deltaR);
280: outCount[bin0_max] += tmp
/* "splitPixel.pyx":280 * * tmp = deltaA * deltaR * outCount[bin0_max] += tmp #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_max] += data * tmp * */ __pyx_t_55 = __pyx_v_bin0_max; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_55, __pyx_pybuffernd_outCount.diminfo[0].strides) += __pyx_v_tmp;
281: outData[bin0_max] += data * tmp
/* "splitPixel.pyx":281 * tmp = deltaA * deltaR * outCount[bin0_max] += tmp * outData[bin0_max] += data * tmp #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if bin0_min + 1 != bin0_max: */ __pyx_t_56 = __pyx_v_bin0_max; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_56, __pyx_pybuffernd_outData.diminfo[0].strides) += (__pyx_v_data * __pyx_v_tmp);
282:
283: if bin0_min + 1 != bin0_max:
/* "splitPixel.pyx":283 * outData[bin0_max] += data * tmp * * 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) {
284: for i in range(bin0_min + 1, bin0_max):
/* "splitPixel.pyx":284 * * if bin0_min + 1 != bin0_max: * for i in range(bin0_min + 1, bin0_max): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outCount[i] += deltaA * outData[i] += data * deltaA */ __pyx_t_57 = __pyx_v_bin0_max; for (__pyx_t_58 = (__pyx_v_bin0_min + 1); __pyx_t_58<
__pyx_t_57; __pyx_t_58+=1) { __pyx_v_i = __pyx_t_58;
285: outCount[i] += deltaA
/* "splitPixel.pyx":285 * if bin0_min + 1 != bin0_max: * for i in range(bin0_min + 1, bin0_max): * outCount[i] += deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[i] += data * deltaA * */ __pyx_t_59 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_59, __pyx_pybuffernd_outCount.diminfo[0].strides) += __pyx_v_deltaA;
286: outData[i] += data * deltaA
/* "splitPixel.pyx":286 * for i in range(bin0_min + 1, bin0_max): * outCount[i] += deltaA * outData[i] += data * deltaA #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * */ __pyx_t_60 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_60, __pyx_pybuffernd_outData.diminfo[0].strides) += (__pyx_v_data * __pyx_v_deltaA); } goto __pyx_L29; } __pyx_L29:; } __pyx_L28:; __pyx_L15_continue:; }
287:
288:
289: for i in range(bins):
/* "splitPixel.pyx":289 * * * for i in range(bins): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if outCount[i] > epsilon: * outMerge[i] = outData[i] / outCount[i] */ __pyx_t_2 = __pyx_v_bins; for (__pyx_t_19 = 0; __pyx_t_19<
__pyx_t_2; __pyx_t_19+=1) { __pyx_v_i = __pyx_t_19;
290: if outCount[i] > epsilon:
/* "splitPixel.pyx":290 * * for i in range(bins): * if outCount[i] > epsilon: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outMerge[i] = outData[i] / outCount[i] * else: */ __pyx_t_57 = __pyx_v_i; __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_57, __pyx_pybuffernd_outCount.diminfo[0].strides)) > __pyx_v_epsilon); if (__pyx_t_14) {
291: outMerge[i] = outData[i] / outCount[i]
/* "splitPixel.pyx":291 * for i in range(bins): * if outCount[i] > epsilon: * outMerge[i] = outData[i] / outCount[i] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * outMerge[i] = cdummy */ __pyx_t_58 = __pyx_v_i; __pyx_t_61 = __pyx_v_i; __pyx_t_62 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.buf, __pyx_t_62, __pyx_pybuffernd_outMerge.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_58, __pyx_pybuffernd_outData.diminfo[0].strides)) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_61, __pyx_pybuffernd_outCount.diminfo[0].strides))); goto __pyx_L34; } /*else*/ {
292: else:
293: outMerge[i] = cdummy
/* "splitPixel.pyx":293 * outMerge[i] = outData[i] / outCount[i] * else: * outMerge[i] = cdummy #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * return outPos, outMerge, outData, outCount */ __pyx_t_63 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.buf, __pyx_t_63, __pyx_pybuffernd_outMerge.diminfo[0].strides) = __pyx_v_cdummy; } __pyx_L34:; } }
294:
295: return outPos, outMerge, outData, outCount
/* "splitPixel.pyx":295 * outMerge[i] = cdummy * * return outPos, outMerge, outData, outCount #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_outPos); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_outPos); __Pyx_GIVEREF(__pyx_v_outPos); __Pyx_INCREF(((PyObject *)__pyx_v_outMerge)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_outMerge)); __Pyx_GIVEREF(((PyObject *)__pyx_v_outMerge)); __Pyx_INCREF(((PyObject *)__pyx_v_outData)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_outData)); __Pyx_GIVEREF(((PyObject *)__pyx_v_outData)); __Pyx_INCREF(((PyObject *)__pyx_v_outCount)); PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_outCount)); __Pyx_GIVEREF(((PyObject *)__pyx_v_outCount)); __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1); __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cdata.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outCount.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outData.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outMerge.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("splitPixel.fullSplit1D", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cdata.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outCount.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outData.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outMerge.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_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_XDEC_MEMVIEW(&__pyx_v_cmask, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_cflat, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_cdark, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_cpolarization, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_csolidangle, 1); __Pyx_XDECREF(__pyx_v_outPos); __Pyx_XDECREF((PyObject *)__pyx_v_pos); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_10splitPixel_3fullSplit2D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_10splitPixel_2fullSplit2D[] = "\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 @param delta_dummy: precision of dummy value\n @param mask: array (of int8) with masked pixels with 1 (0=not masked)\n @param dark: array (of float64) with dark noise to be subtracted (or None)\n @param flat: array (of float64) with flat-field image\n @param polarization: array (of float64) with polarization correction\n @param solidangle: array (of float64)with solid angle corrections\n @return I, edges0, edges1, weighted histogram(2D), unweighted histogram (2D)\n "; static PyMethodDef __pyx_mdef_10splitPixel_3fullSplit2D = {__Pyx_NAMESTR("fullSplit2D"), (PyCFunction)__pyx_pw_10splitPixel_3fullSplit2D, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_10splitPixel_2fullSplit2D)}; static PyObject *__pyx_pw_10splitPixel_3fullSplit2D(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; PyObject *__pyx_v_dummy = 0; PyObject *__pyx_v_delta_dummy = 0; PyObject *__pyx_v_mask = 0; PyObject *__pyx_v_dark = 0; PyObject *__pyx_v_flat = 0; PyObject *__pyx_v_solidangle = 0; PyObject *__pyx_v_polarization = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fullSplit2D (wrapper)", 0); { 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,&__pyx_n_s__delta_dummy,&__pyx_n_s__mask,&__pyx_n_s__dark,&__pyx_n_s__flat,&__pyx_n_s__solidangle,&__pyx_n_s__polarization,0}; PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
296:
297:
298:
299:
300:
301:
302: @cython.cdivision(True)
303: @cython.boundscheck(False)
304: @cython.wraparound(False)
305: def fullSplit2D(numpy.ndarray pos not None,
/* "splitPixel.pyx":305 * @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_2fullSplit2D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_weights, PyObject *__pyx_v_bins, PyObject *__pyx_v_pos0Range, PyObject *__pyx_v_pos1Range, PyObject *__pyx_v_dummy, PyObject *__pyx_v_delta_dummy, PyObject *__pyx_v_mask, PyObject *__pyx_v_dark, PyObject *__pyx_v_flat, PyObject *__pyx_v_solidangle, PyObject *__pyx_v_polarization) { size_t __pyx_v_bins0; size_t __pyx_v_bins1; size_t __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; __Pyx_memviewslice __pyx_v_cmask = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_cflat = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_cdark = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_cpolarization = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_v_csolidangle = { 0, 0, { 0 }, { 0 }, { 0 } }; int __pyx_v_check_mask; CYTHON_UNUSED int __pyx_v_do_dummy; int __pyx_v_do_dark; int __pyx_v_do_flat; int __pyx_v_do_polarization; int __pyx_v_do_solidangle; double __pyx_v_cdummy; double __pyx_v_cddummy; double __pyx_v_data; 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_aeraPixel; double __pyx_v_fbin0_min; double __pyx_v_fbin0_max; double __pyx_v_fbin1_min; double __pyx_v_fbin1_max; 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; size_t __pyx_v_bin0_max; size_t __pyx_v_bin0_min; size_t __pyx_v_bin1_max; size_t __pyx_v_bin1_min; size_t __pyx_v_i; size_t __pyx_v_j; size_t __pyx_v_idx; double __pyx_v_dpos0; double __pyx_v_dpos1; int __pyx_v_check_dummy; __Pyx_LocalBuf_ND __pyx_pybuffernd_cdata; __Pyx_Buffer __pyx_pybuffer_cdata; __Pyx_LocalBuf_ND __pyx_pybuffernd_cpos; __Pyx_Buffer __pyx_pybuffer_cpos; __Pyx_LocalBuf_ND __pyx_pybuffernd_edges0; __Pyx_Buffer __pyx_pybuffer_edges0; __Pyx_LocalBuf_ND __pyx_pybuffernd_edges1; __Pyx_Buffer __pyx_pybuffer_edges1; __Pyx_LocalBuf_ND __pyx_pybuffernd_outCount; __Pyx_Buffer __pyx_pybuffer_outCount; __Pyx_LocalBuf_ND __pyx_pybuffernd_outData; __Pyx_Buffer __pyx_pybuffer_outData; __Pyx_LocalBuf_ND __pyx_pybuffernd_outMerge; __Pyx_Buffer __pyx_pybuffer_outMerge; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fullSplit2D", 0); __Pyx_INCREF((PyObject *)__pyx_v_pos); __pyx_pybuffer_cpos.pybuffer.buf = NULL; __pyx_pybuffer_cpos.refcount = 0; __pyx_pybuffernd_cpos.data = NULL; __pyx_pybuffernd_cpos.rcbuffer = &__pyx_pybuffer_cpos; __pyx_pybuffer_cdata.pybuffer.buf = NULL; __pyx_pybuffer_cdata.refcount = 0; __pyx_pybuffernd_cdata.data = NULL; __pyx_pybuffernd_cdata.rcbuffer = &__pyx_pybuffer_cdata; __pyx_pybuffer_outData.pybuffer.buf = NULL; __pyx_pybuffer_outData.refcount = 0; __pyx_pybuffernd_outData.data = NULL; __pyx_pybuffernd_outData.rcbuffer = &__pyx_pybuffer_outData; __pyx_pybuffer_outCount.pybuffer.buf = NULL; __pyx_pybuffer_outCount.refcount = 0; __pyx_pybuffernd_outCount.data = NULL; __pyx_pybuffernd_outCount.rcbuffer = &__pyx_pybuffer_outCount; __pyx_pybuffer_outMerge.pybuffer.buf = NULL; __pyx_pybuffer_outMerge.refcount = 0; __pyx_pybuffernd_outMerge.data = NULL; __pyx_pybuffernd_outMerge.rcbuffer = &__pyx_pybuffer_outMerge; __pyx_pybuffer_edges0.pybuffer.buf = NULL; __pyx_pybuffer_edges0.refcount = 0; __pyx_pybuffernd_edges0.data = NULL; __pyx_pybuffernd_edges0.rcbuffer = &__pyx_pybuffer_edges0; __pyx_pybuffer_edges1.pybuffer.buf = NULL; __pyx_pybuffer_edges1.refcount = 0; __pyx_pybuffernd_edges1.data = NULL; __pyx_pybuffernd_edges1.rcbuffer = &__pyx_pybuffer_edges1; /* "splitPixel.pyx":305 * @cython.boundscheck(False) * @cython.wraparound(False) * def fullSplit2D(numpy.ndarray pos not None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray weights not None, * bins not None, */ __pyx_k_tuple_77 = PyTuple_New(75); if (unlikely(!__pyx_k_tuple_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_77); __Pyx_INCREF(((PyObject *)__pyx_n_s__pos)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 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_77, 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_77, 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_77, 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_77, 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_77, 5, ((PyObject *)__pyx_n_s__dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__delta_dummy)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 6, ((PyObject *)__pyx_n_s__delta_dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta_dummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__mask)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 7, ((PyObject *)__pyx_n_s__mask)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dark)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 8, ((PyObject *)__pyx_n_s__dark)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dark)); __Pyx_INCREF(((PyObject *)__pyx_n_s__flat)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 9, ((PyObject *)__pyx_n_s__flat)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__flat)); __Pyx_INCREF(((PyObject *)__pyx_n_s__solidangle)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 10, ((PyObject *)__pyx_n_s__solidangle)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__solidangle)); __Pyx_INCREF(((PyObject *)__pyx_n_s__polarization)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 11, ((PyObject *)__pyx_n_s__polarization)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__polarization)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bins0)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 12, ((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_77, 13, ((PyObject *)__pyx_n_s__bins1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bins1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__size)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 14, ((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_77, 15, ((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_77, 16, ((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_77, 17, ((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_77, 18, ((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_77, 19, ((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_77, 20, ((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_77, 21, ((PyObject *)__pyx_n_s__edges1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__edges1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cmask)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 22, ((PyObject *)__pyx_n_s__cmask)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cmask)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cflat)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 23, ((PyObject *)__pyx_n_s__cflat)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cflat)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cdark)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 24, ((PyObject *)__pyx_n_s__cdark)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cdark)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cpolarization)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 25, ((PyObject *)__pyx_n_s__cpolarization)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cpolarization)); __Pyx_INCREF(((PyObject *)__pyx_n_s__csolidangle)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 26, ((PyObject *)__pyx_n_s__csolidangle)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__csolidangle)); __Pyx_INCREF(((PyObject *)__pyx_n_s__check_mask)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 27, ((PyObject *)__pyx_n_s__check_mask)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__check_mask)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_dummy)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 28, ((PyObject *)__pyx_n_s__do_dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_dummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_dark)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 29, ((PyObject *)__pyx_n_s__do_dark)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_dark)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_flat)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 30, ((PyObject *)__pyx_n_s__do_flat)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_flat)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_polarization)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 31, ((PyObject *)__pyx_n_s__do_polarization)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_polarization)); __Pyx_INCREF(((PyObject *)__pyx_n_s__do_solidangle)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 32, ((PyObject *)__pyx_n_s__do_solidangle)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_solidangle)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cdummy)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 33, ((PyObject *)__pyx_n_s__cdummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cdummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cddummy)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 34, ((PyObject *)__pyx_n_s__cddummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cddummy)); __Pyx_INCREF(((PyObject *)__pyx_n_s__data)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 35, ((PyObject *)__pyx_n_s__data)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data)); __Pyx_INCREF(((PyObject *)__pyx_n_s__min0)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 36, ((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_77, 37, ((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_77, 38, ((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_77, 39, ((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_77, 40, ((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_77, 41, ((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_77, 42, ((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_77, 43, ((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_77, 44, ((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_77, 45, ((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_77, 46, ((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_77, 47, ((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_77, 48, ((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_77, 49, ((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_77, 50, ((PyObject *)__pyx_n_s__pos1_maxin)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos1_maxin)); __Pyx_INCREF(((PyObject *)__pyx_n_s__aeraPixel)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 51, ((PyObject *)__pyx_n_s__aeraPixel)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__aeraPixel)); __Pyx_INCREF(((PyObject *)__pyx_n_s__fbin0_min)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 52, ((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_77, 53, ((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_77, 54, ((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_77, 55, ((PyObject *)__pyx_n_s__fbin1_max)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fbin1_max)); __Pyx_INCREF(((PyObject *)__pyx_n_s__a0)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 56, ((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_77, 57, ((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_77, 58, ((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_77, 59, ((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_77, 60, ((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_77, 61, ((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_77, 62, ((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_77, 63, ((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_77, 64, ((PyObject *)__pyx_n_s__epsilon)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__epsilon)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bin0_max)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 65, ((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_77, 66, ((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_77, 67, ((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_77, 68, ((PyObject *)__pyx_n_s__bin1_min)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bin1_min)); __Pyx_INCREF(((PyObject *)__pyx_n_s__i)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 69, ((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_77, 70, ((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_77, 71, ((PyObject *)__pyx_n_s__idx)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dpos0)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 72, ((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_77, 73, ((PyObject *)__pyx_n_s__dpos1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dpos1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__check_dummy)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 74, ((PyObject *)__pyx_n_s__check_dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__check_dummy)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77)); /* "splitPixel.pyx":305 * @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_3fullSplit2D, NULL, __pyx_n_s__splitPixel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __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 = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k_codeobj_78 = (PyObject*)__Pyx_PyCode_New(12, 0, 75, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_76, __pyx_n_s__fullSplit2D, 305, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
306: numpy.ndarray weights not None,
307: bins not None,
308: pos0Range=None,
/* "splitPixel.pyx":308 * numpy.ndarray weights not None, * bins not None, * pos0Range=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1Range=None, * dummy=None, */ values[3] = ((PyObject *)Py_None);
309: pos1Range=None,
/* "splitPixel.pyx":309 * bins not None, * pos0Range=None, * pos1Range=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* dummy=None, * delta_dummy=None, */ values[4] = ((PyObject *)Py_None);
310: dummy=None,
/* "splitPixel.pyx":310 * pos0Range=None, * pos1Range=None, * dummy=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* delta_dummy=None, * mask=None, */ values[5] = ((PyObject *)Py_None);
311: delta_dummy=None,
/* "splitPixel.pyx":311 * pos1Range=None, * dummy=None, * delta_dummy=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* mask=None, * dark=None, */ values[6] = ((PyObject *)Py_None);
312: mask=None,
/* "splitPixel.pyx":312 * dummy=None, * delta_dummy=None, * mask=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* dark=None, * flat=None, */ values[7] = ((PyObject *)Py_None);
313: dark=None,
/* "splitPixel.pyx":313 * delta_dummy=None, * mask=None, * dark=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* flat=None, * solidangle=None, */ values[8] = ((PyObject *)Py_None);
314: flat=None,
/* "splitPixel.pyx":314 * mask=None, * dark=None, * flat=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* solidangle=None, * polarization=None): */ values[9] = ((PyObject *)Py_None);
315: solidangle=None,
/* "splitPixel.pyx":315 * dark=None, * flat=None, * solidangle=None, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* polarization=None): * """ */ values[10] = ((PyObject *)Py_None);
316: polarization=None):
/* "splitPixel.pyx":316 * flat=None, * solidangle=None, * polarization=None): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* """ * Calculate 2D histogram of pos weighted by weights */ values[11] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__weights)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("fullSplit2D", 0, 3, 12, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("fullSplit2D", 0, 3, 12, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __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--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__delta_dummy); if (value) { values[6] = value; kw_args--; } } case 7: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask); if (value) { values[7] = value; kw_args--; } } case 8: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dark); if (value) { values[8] = value; kw_args--; } } case 9: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__flat); if (value) { values[9] = value; kw_args--; } } case 10: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__solidangle); if (value) { values[10] = value; kw_args--; } } case 11: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__polarization); if (value) { values[11] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fullSplit2D")<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_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]; __pyx_v_dummy = values[5]; __pyx_v_delta_dummy = values[6]; __pyx_v_mask = values[7]; __pyx_v_dark = values[8]; __pyx_v_flat = values[9]; __pyx_v_solidangle = values[10]; __pyx_v_polarization = values[11]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("fullSplit2D", 0, 3, 12, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __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:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 0, "pos", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __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 = 306; __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 = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_r = __pyx_pf_10splitPixel_2fullSplit2D(__pyx_self, __pyx_v_pos, __pyx_v_weights, __pyx_v_bins, __pyx_v_pos0Range, __pyx_v_pos1Range, __pyx_v_dummy, __pyx_v_delta_dummy, __pyx_v_mask, __pyx_v_dark, __pyx_v_flat, __pyx_v_solidangle, __pyx_v_polarization); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
317: """
318: Calculate 2D histogram of pos weighted by weights
319:
320: Splitting is done on the pixel's bounding box like fit2D
321:
322:
323: @param pos: 3D array with pos0; Corner A,B,C,D; tth or chi
324: @param weights: array with intensities
325: @param bins: number of output bins int or 2-tuple of int
326: @param pos0Range: minimum and maximum of the 2th range
327: @param pos1Range: minimum and maximum of the chi range
328: @param dummy: value for bins without pixels
329: @param delta_dummy: precision of dummy value
330: @param mask: array (of int8) with masked pixels with 1 (0=not masked)
331: @param dark: array (of float64) with dark noise to be subtracted (or None)
332: @param flat: array (of float64) with flat-field image
333: @param polarization: array (of float64) with polarization correction
334: @param solidangle: array (of float64)with solid angle corrections
335: @return I, edges0, edges1, weighted histogram(2D), unweighted histogram (2D)
336: """
337:
338: cdef size_t bins0=0, bins1=0, size = weights.size
/* "splitPixel.pyx":338 * """ * * cdef size_t bins0=0, bins1=0, size = weights.size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if pos.ndim>3: #create a view * pos = pos.reshape((-1,4,2)) */ __pyx_v_bins0 = 0; __pyx_v_bins1 = 0; __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 = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AsSize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_size = __pyx_t_2;
339: if pos.ndim>3: #create a view
/* "splitPixel.pyx":339 * * cdef size_t bins0=0, bins1=0, size = weights.size * if pos.ndim>3: #create a view #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos = pos.reshape((-1,4,2)) * */ __pyx_t_3 = (__pyx_v_pos->nd > 3); if (__pyx_t_3) {
340: pos = pos.reshape((-1,4,2))
/* "splitPixel.pyx":340 * cdef size_t bins0=0, bins1=0, size = weights.size * if pos.ndim>3: #create a view * pos = pos.reshape((-1,4,2)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * assert pos.shape[0] == size */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_pos), __pyx_n_s__reshape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "splitPixel.pyx":340 * cdef size_t bins0=0, bins1=0, size = weights.size * if pos.ndim>3: #create a view * pos = pos.reshape((-1,4,2)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * assert pos.shape[0] == size */ __pyx_k_tuple_15 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_15); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_INCREF(__pyx_int_4); PyTuple_SET_ITEM(__pyx_k_tuple_15, 1, __pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); __Pyx_INCREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_k_tuple_15, 2, __pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15)); __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 = 340; __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 = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_v_pos)); __pyx_v_pos = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } __pyx_L3:; __pyx_k_tuple_16 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_16); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_15)); PyTuple_SET_ITEM(__pyx_k_tuple_16, 0, ((PyObject *)__pyx_k_tuple_15)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));
341:
342: assert pos.shape[0] == size
/* "splitPixel.pyx":342 * pos = pos.reshape((-1,4,2)) * * assert pos.shape[0] == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert pos.shape[1] == 4 # 4 corners * assert pos.shape[2] == 2 # tth and chi */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!((__pyx_v_pos->dimensions[0]) == __pyx_v_size))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
343: assert pos.shape[1] == 4 # 4 corners
/* "splitPixel.pyx":343 * * assert pos.shape[0] == 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 = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
344: assert pos.shape[2] == 2 # tth and chi
/* "splitPixel.pyx":344 * assert pos.shape[0] == 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 = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
345: assert pos.ndim == 3
/* "splitPixel.pyx":345 * 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 = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
346: try:
/* "splitPixel.pyx":346 * assert pos.shape[2] == 2 # tth and chi * assert pos.ndim == 3 * try: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bins0, bins1 = tuple(bins) * except: */ { __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ {
347: bins0, bins1 = tuple(bins)
/* "splitPixel.pyx":347 * assert pos.ndim == 3 * try: * bins0, bins1 = tuple(bins) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* except: * bins0 = bins1 =<
size_t > bins */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__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_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (1) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L4_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L4_error;} #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else if (1) { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L4_error;} } else { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L13_unpacking_done; __pyx_L12_unpacking_failed:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __pyx_L13_unpacking_done:; } __pyx_t_2 = __Pyx_PyInt_AsSize_t(__pyx_t_4); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = __Pyx_PyInt_AsSize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_bins0 = __pyx_t_2; __pyx_v_bins1 = __pyx_t_11; } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
348: except:
/* "splitPixel.pyx":348 * try: * bins0, bins1 = tuple(bins) * except: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bins0 = bins1 =<
size_t > bins * if bins0<
= 0: */ /*except:*/ { __Pyx_AddTraceback("splitPixel.fullSplit2D", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_4)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_4);
349: bins0 = bins1 = < size_t > bins
/* "splitPixel.pyx":349 * bins0, bins1 = tuple(bins) * except: * bins0 = bins1 =<
size_t > bins #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if bins0<
= 0: * bins0 = 1 */ __pyx_t_11 = __Pyx_PyInt_AsSize_t(__pyx_v_bins); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} __pyx_v_bins0 = ((size_t)__pyx_t_11); __pyx_v_bins1 = ((size_t)__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5_exception_handled; } __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L11_try_end:; }
350: if bins0 <= 0:
/* "splitPixel.pyx":350 * except: * bins0 = bins1 =<
size_t > bins * if bins0<
= 0: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bins0 = 1 * if bins1<
= 0: */ __pyx_t_3 = (__pyx_v_bins0<
= 0); if (__pyx_t_3) {
351: bins0 = 1
/* "splitPixel.pyx":351 * bins0 = bins1 =<
size_t > bins * if bins0<
= 0: * bins0 = 1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if bins1<
= 0: * bins1 = 1 */ __pyx_v_bins0 = 1; goto __pyx_L16; } __pyx_L16:;
352: if bins1 <= 0:
/* "splitPixel.pyx":352 * if bins0<
= 0: * bins0 = 1 * if bins1<
= 0: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bins1 = 1 * */ __pyx_t_3 = (__pyx_v_bins1<
= 0); if (__pyx_t_3) {
353: bins1 = 1
/* "splitPixel.pyx":353 * bins0 = 1 * if bins1<
= 0: * bins1 = 1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef numpy.ndarray[numpy.float64_t, ndim = 3] cpos = pos.astype(numpy.float64) */ __pyx_v_bins1 = 1; goto __pyx_L17; } __pyx_L17:;
354:
355: cdef numpy.ndarray[numpy.float64_t, ndim = 3] cpos = pos.astype(numpy.float64)
/* "splitPixel.pyx":355 * bins1 = 1 * * cdef numpy.ndarray[numpy.float64_t, ndim = 3] cpos = pos.astype(numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float64_t, ndim = 1] cdata = weights.astype(numpy.float64).ravel() * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype=numpy.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 = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__float64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 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 = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cpos.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) { __pyx_v_cpos = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_cpos.diminfo[0].strides = __pyx_pybuffernd_cpos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cpos.diminfo[0].shape = __pyx_pybuffernd_cpos.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_cpos.diminfo[1].strides = __pyx_pybuffernd_cpos.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_cpos.diminfo[1].shape = __pyx_pybuffernd_cpos.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_cpos.diminfo[2].strides = __pyx_pybuffernd_cpos.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_cpos.diminfo[2].shape = __pyx_pybuffernd_cpos.rcbuffer->pybuffer.shape[2]; } } __pyx_t_12 = 0; __pyx_v_cpos = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0;
356: cdef numpy.ndarray[numpy.float64_t, ndim = 1] cdata = weights.astype(numpy.float64).ravel()
/* "splitPixel.pyx":356 * * cdef numpy.ndarray[numpy.float64_t, ndim = 3] cpos = pos.astype(numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] cdata = weights.astype(numpy.float64).ravel() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype=numpy.float64) */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_weights), __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__float64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __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_8)); __pyx_t_8 = 0; __pyx_t_8 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__ravel); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 356; __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_pybuffernd_cdata.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_cdata = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_cdata.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_cdata.diminfo[0].strides = __pyx_pybuffernd_cdata.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cdata.diminfo[0].shape = __pyx_pybuffernd_cdata.rcbuffer->pybuffer.shape[0]; } } __pyx_t_13 = 0; __pyx_v_cdata = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0;
357: cdef numpy.ndarray[numpy.float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype=numpy.float64)
/* "splitPixel.pyx":357 * cdef numpy.ndarray[numpy.float64_t, ndim = 3] cpos = pos.astype(numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] cdata = weights.astype(numpy.float64).ravel() * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype=numpy.float64) */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__zeros); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_bins0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_bins1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_9)); __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_14)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_14); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outData.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { __pyx_v_outData = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_outData.diminfo[0].strides = __pyx_pybuffernd_outData.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outData.diminfo[0].shape = __pyx_pybuffernd_outData.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outData.diminfo[1].strides = __pyx_pybuffernd_outData.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outData.diminfo[1].shape = __pyx_pybuffernd_outData.rcbuffer->pybuffer.shape[1]; } } __pyx_t_15 = 0; __pyx_v_outData = ((PyArrayObject *)__pyx_t_14); __pyx_t_14 = 0;
358: cdef numpy.ndarray[numpy.float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype=numpy.float64)
/* "splitPixel.pyx":358 * cdef numpy.ndarray[numpy.float64_t, ndim = 1] cdata = weights.astype(numpy.float64).ravel() * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float64_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] edges0 = numpy.zeros(bins0, dtype=numpy.float64) */ __pyx_t_14 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_9 = PyObject_GetAttr(__pyx_t_14, __pyx_n_s__zeros); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyInt_FromSize_t(__pyx_v_bins0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_bins1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_14 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_8)); __Pyx_GIVEREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __pyx_t_14 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_4 = PyObject_GetAttr(__pyx_t_14, __pyx_n_s__float64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outCount.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { __pyx_v_outCount = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_outCount.diminfo[0].strides = __pyx_pybuffernd_outCount.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outCount.diminfo[0].shape = __pyx_pybuffernd_outCount.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outCount.diminfo[1].strides = __pyx_pybuffernd_outCount.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outCount.diminfo[1].shape = __pyx_pybuffernd_outCount.rcbuffer->pybuffer.shape[1]; } } __pyx_t_16 = 0; __pyx_v_outCount = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0;
359: cdef numpy.ndarray[numpy.float64_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype=numpy.float64)
/* "splitPixel.pyx":359 * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outData = numpy.zeros((bins0, bins1), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float64_t, ndim = 1] edges0 = numpy.zeros(bins0, dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] edges1 = numpy.zeros(bins1, dtype=numpy.float64) */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__zeros); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_bins0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_bins1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_9)); __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_14)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = ((PyArrayObject *)__pyx_t_14); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outMerge.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { __pyx_v_outMerge = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_outMerge.diminfo[0].strides = __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outMerge.diminfo[0].shape = __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outMerge.diminfo[1].strides = __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outMerge.diminfo[1].shape = __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.shape[1]; } } __pyx_t_17 = 0; __pyx_v_outMerge = ((PyArrayObject *)__pyx_t_14); __pyx_t_14 = 0;
360: cdef numpy.ndarray[numpy.float64_t, ndim = 1] edges0 = numpy.zeros(bins0, dtype=numpy.float64)
/* "splitPixel.pyx":360 * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outCount = numpy.zeros((bins0, bins1), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] edges0 = numpy.zeros(bins0, dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[numpy.float64_t, ndim = 1] edges1 = numpy.zeros(bins1, dtype=numpy.float64) * cdef numpy.int8_t[:] cmask */ __pyx_t_14 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_9 = PyObject_GetAttr(__pyx_t_14, __pyx_n_s__zeros); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyInt_FromSize_t(__pyx_v_bins0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_14)); __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__float64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_14, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_14)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 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 = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_18 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edges0.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_edges0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_edges0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_edges0.diminfo[0].strides = __pyx_pybuffernd_edges0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edges0.diminfo[0].shape = __pyx_pybuffernd_edges0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_18 = 0; __pyx_v_edges0 = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0;
361: cdef numpy.ndarray[numpy.float64_t, ndim = 1] edges1 = numpy.zeros(bins1, dtype=numpy.float64)
/* "splitPixel.pyx":361 * cdef numpy.ndarray[numpy.float64_t, ndim = 2] outMerge = numpy.zeros((bins0, bins1), dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] edges0 = numpy.zeros(bins0, dtype=numpy.float64) * cdef numpy.ndarray[numpy.float64_t, ndim = 1] edges1 = numpy.zeros(bins1, dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.int8_t[:] cmask * cdef double[:] cflat, cdark, cpolarization, csolidangle */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__zeros); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_bins1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__float64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edges1.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_edges1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_edges1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_edges1.diminfo[0].strides = __pyx_pybuffernd_edges1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edges1.diminfo[0].shape = __pyx_pybuffernd_edges1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_19 = 0; __pyx_v_edges1 = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0;
362: cdef numpy.int8_t[:] cmask
363: cdef double[:] cflat, cdark, cpolarization, csolidangle
364:
365: cdef bint check_mask=False, do_dummy=False, do_dark=False, do_flat=False, do_polarization=False, do_solidangle=False
/* "splitPixel.pyx":365 * cdef double[:] cflat, cdark, cpolarization, csolidangle * * cdef bint check_mask=False, do_dummy=False, do_dark=False, do_flat=False, do_polarization=False, do_solidangle=False #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef double cdummy=0, cddummy=0, data=0 */ __pyx_v_check_mask = 0; __pyx_v_do_dummy = 0; __pyx_v_do_dark = 0; __pyx_v_do_flat = 0; __pyx_v_do_polarization = 0; __pyx_v_do_solidangle = 0;
366:
367: cdef double cdummy=0, cddummy=0, data=0
/* "splitPixel.pyx":367 * cdef bint check_mask=False, do_dummy=False, do_dark=False, do_flat=False, do_polarization=False, do_solidangle=False * * cdef double cdummy=0, cddummy=0, data=0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef double min0=0, max0=0, min1=0, max1=0, deltaR=0, deltaL=0, deltaU=0, deltaD=0, deltaA=0 * cdef double pos0_min=0, pos0_max=0, pos1_min=0, pos1_max=0, pos0_maxin=0, pos1_maxin=0 */ __pyx_v_cdummy = 0.0; __pyx_v_cddummy = 0.0; __pyx_v_data = 0.0;
368: cdef double min0=0, max0=0, min1=0, max1=0, deltaR=0, deltaL=0, deltaU=0, deltaD=0, deltaA=0
/* "splitPixel.pyx":368 * * cdef double cdummy=0, cddummy=0, data=0 * cdef double min0=0, max0=0, min1=0, max1=0, deltaR=0, deltaL=0, deltaU=0, deltaD=0, deltaA=0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef double pos0_min=0, pos0_max=0, pos1_min=0, pos1_max=0, pos0_maxin=0, pos1_maxin=0 * cdef double aeraPixel=0, fbin0_min=0, fbin0_max=0, fbin1_min=0, fbin1_max=0 */ __pyx_v_min0 = 0.0; __pyx_v_max0 = 0.0; __pyx_v_min1 = 0.0; __pyx_v_max1 = 0.0; __pyx_v_deltaR = 0.0; __pyx_v_deltaL = 0.0; __pyx_v_deltaU = 0.0; __pyx_v_deltaD = 0.0; __pyx_v_deltaA = 0.0;
369: cdef double pos0_min=0, pos0_max=0, pos1_min=0, pos1_max=0, pos0_maxin=0, pos1_maxin=0
/* "splitPixel.pyx":369 * cdef double cdummy=0, cddummy=0, data=0 * cdef double min0=0, max0=0, min1=0, max1=0, deltaR=0, deltaL=0, deltaU=0, deltaD=0, deltaA=0 * cdef double pos0_min=0, pos0_max=0, pos1_min=0, pos1_max=0, pos0_maxin=0, pos1_maxin=0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef double aeraPixel=0, fbin0_min=0, fbin0_max=0, fbin1_min=0, fbin1_max=0 * cdef double a0=0, a1=0, b0=0, b1=0, c0=0, c1=0, d0=0, d1=0 */ __pyx_v_pos0_min = 0.0; __pyx_v_pos0_max = 0.0; __pyx_v_pos1_min = 0.0; __pyx_v_pos1_max = 0.0; __pyx_v_pos0_maxin = 0.0; __pyx_v_pos1_maxin = 0.0;
370: cdef double aeraPixel=0, fbin0_min=0, fbin0_max=0, fbin1_min=0, fbin1_max=0
/* "splitPixel.pyx":370 * cdef double min0=0, max0=0, min1=0, max1=0, deltaR=0, deltaL=0, deltaU=0, deltaD=0, deltaA=0 * cdef double pos0_min=0, pos0_max=0, pos1_min=0, pos1_max=0, pos0_maxin=0, pos1_maxin=0 * cdef double aeraPixel=0, fbin0_min=0, fbin0_max=0, fbin1_min=0, fbin1_max=0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef double a0=0, a1=0, b0=0, b1=0, c0=0, c1=0, d0=0, d1=0 * cdef double epsilon = 1e-10 */ __pyx_v_aeraPixel = 0.0; __pyx_v_fbin0_min = 0.0; __pyx_v_fbin0_max = 0.0; __pyx_v_fbin1_min = 0.0; __pyx_v_fbin1_max = 0.0;
371: cdef double a0=0, a1=0, b0=0, b1=0, c0=0, c1=0, d0=0, d1=0
/* "splitPixel.pyx":371 * cdef double pos0_min=0, pos0_max=0, pos1_min=0, pos1_max=0, pos0_maxin=0, pos1_maxin=0 * cdef double aeraPixel=0, fbin0_min=0, fbin0_max=0, fbin1_min=0, fbin1_max=0 * cdef double a0=0, a1=0, b0=0, b1=0, c0=0, c1=0, d0=0, d1=0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef double epsilon = 1e-10 * */ __pyx_v_a0 = 0.0; __pyx_v_a1 = 0.0; __pyx_v_b0 = 0.0; __pyx_v_b1 = 0.0; __pyx_v_c0 = 0.0; __pyx_v_c1 = 0.0; __pyx_v_d0 = 0.0; __pyx_v_d1 = 0.0;
372: cdef double epsilon = 1e-10
/* "splitPixel.pyx":372 * cdef double aeraPixel=0, fbin0_min=0, fbin0_max=0, fbin1_min=0, fbin1_max=0 * cdef double a0=0, a1=0, b0=0, b1=0, c0=0, c1=0, d0=0, d1=0 * cdef double epsilon = 1e-10 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef size_t bin0_max=0, bin0_min=0, bin1_max=0, bin1_min=0, i=0, j=0, idx=0 */ __pyx_v_epsilon = 1e-10;
373:
374: cdef size_t bin0_max=0, bin0_min=0, bin1_max=0, bin1_min=0, i=0, j=0, idx=0
/* "splitPixel.pyx":374 * cdef double epsilon = 1e-10 * * cdef size_t bin0_max=0, bin0_min=0, bin1_max=0, bin1_min=0, i=0, j=0, idx=0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if pos0Range is not None and len(pos0Range) == 2: */ __pyx_v_bin0_max = 0; __pyx_v_bin0_min = 0; __pyx_v_bin1_max = 0; __pyx_v_bin1_min = 0; __pyx_v_i = 0; __pyx_v_j = 0; __pyx_v_idx = 0;
375:
376: if pos0Range is not None and len(pos0Range) == 2:
/* "splitPixel.pyx":376 * cdef size_t bin0_max=0, bin0_min=0, bin1_max=0, bin1_min=0, i=0, j=0, idx=0 * * if pos0Range is not None and len(pos0Range) == 2: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_min = min(pos0Range) * pos0_maxin = max(pos0Range) */ __pyx_t_3 = (__pyx_v_pos0Range != Py_None); if (__pyx_t_3) { __pyx_t_20 = PyObject_Length(__pyx_v_pos0Range); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = (__pyx_t_20 == 2); __pyx_t_22 = __pyx_t_21; } else { __pyx_t_22 = __pyx_t_3; } if (__pyx_t_22) {
377: pos0_min = min(pos0Range)
/* "splitPixel.pyx":377 * * if pos0Range is not None and len(pos0Range) == 2: * 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 = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__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_4 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pos0_min = __pyx_t_23;
378: pos0_maxin = max(pos0Range)
/* "splitPixel.pyx":378 * 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_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_pos0Range); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pos0Range); __Pyx_GIVEREF(__pyx_v_pos0Range); __pyx_t_8 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_pos0_maxin = __pyx_t_23; goto __pyx_L18; } /*else*/ {
379: else:
380: pos0_min = pos[:, :, 0].min()
/* "splitPixel.pyx":380 * pos0_maxin = max(pos0Range) * else: * pos0_min = pos[:, :, 0].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_maxin = pos[:, :, 0].max() * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.float32).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 = 380; __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 = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_18); __Pyx_GIVEREF(__pyx_k_slice_18); /* "splitPixel.pyx":380 * pos0_maxin = max(pos0Range) * else: * pos0_min = pos[:, :, 0].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_maxin = pos[:, :, 0].max() * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.float32).eps) */ __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_19)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__min); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_pos0_min = __pyx_t_23; __pyx_k_tuple_19 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__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));
381: pos0_maxin = pos[:, :, 0].max()
/* "splitPixel.pyx":381 * else: * pos0_min = pos[:, :, 0].min() * pos0_maxin = pos[:, :, 0].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.float32).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 = 381; __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 = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_21); __Pyx_GIVEREF(__pyx_k_slice_21); /* "splitPixel.pyx":381 * else: * pos0_min = pos[:, :, 0].min() * pos0_maxin = pos[:, :, 0].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.float32).eps) * */ __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_22)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__max); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_pos0_maxin = __pyx_t_23; } __pyx_L18:; __pyx_k_tuple_22 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__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));
382: pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.float32).eps)
/* "splitPixel.pyx":382 * pos0_min = pos[:, :, 0].min() * pos0_maxin = pos[:, :, 0].max() * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.float32).eps) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if pos1Range is not None and len(pos1Range) > 1: */ __pyx_t_8 = PyFloat_FromDouble(__pyx_v_pos0_maxin); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__finfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __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 = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float32); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __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 = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetAttr(__pyx_t_14, __pyx_n_s__eps); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyNumber_Add(__pyx_int_1, __pyx_t_4); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Multiply(__pyx_t_8, __pyx_t_14); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pos0_max = __pyx_t_23;
383:
384: if pos1Range is not None and len(pos1Range) > 1:
/* "splitPixel.pyx":384 * pos0_max = pos0_maxin * (1 + numpy.finfo(numpy.float32).eps) * * if pos1Range is not None and len(pos1Range) > 1: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_min = min(pos1Range) * pos1_maxin = max(pos1Range) */ __pyx_t_22 = (__pyx_v_pos1Range != Py_None); if (__pyx_t_22) { __pyx_t_20 = PyObject_Length(__pyx_v_pos1Range); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = (__pyx_t_20 > 1); __pyx_t_21 = __pyx_t_3; } else { __pyx_t_21 = __pyx_t_22; } if (__pyx_t_21) {
385: pos1_min = min(pos1Range)
/* "splitPixel.pyx":385 * * if pos1Range is not None and len(pos1Range) > 1: * pos1_min = min(pos1Range) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_maxin = max(pos1Range) * else: */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_pos1Range); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pos1Range); __Pyx_GIVEREF(__pyx_v_pos1Range); __pyx_t_14 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_14); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_v_pos1_min = __pyx_t_23;
386: pos1_maxin = max(pos1Range)
/* "splitPixel.pyx":386 * 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_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(__pyx_v_pos1Range); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_pos1Range); __Pyx_GIVEREF(__pyx_v_pos1Range); __pyx_t_4 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pos1_maxin = __pyx_t_23; goto __pyx_L19; } /*else*/ {
387: else:
388: pos1_min = pos[:, :, 1].min()
/* "splitPixel.pyx":388 * pos1_maxin = max(pos1Range) * else: * pos1_min = pos[:, :, 1].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_maxin = pos[:, :, 1].max() * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.float32).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 = 388; __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 = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_24); __Pyx_GIVEREF(__pyx_k_slice_24); /* "splitPixel.pyx":388 * pos1_maxin = max(pos1Range) * else: * pos1_min = pos[:, :, 1].min() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_maxin = pos[:, :, 1].max() * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.float32).eps) */ __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_25)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__min); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pos1_min = __pyx_t_23; __pyx_k_tuple_25 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__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));
389: pos1_maxin = pos[:, :, 1].max()
/* "splitPixel.pyx":389 * else: * pos1_min = pos[:, :, 1].min() * pos1_maxin = pos[:, :, 1].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.float32).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 = 389; __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 = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_27); __Pyx_GIVEREF(__pyx_k_slice_27); /* "splitPixel.pyx":389 * else: * pos1_min = pos[:, :, 1].min() * pos1_maxin = pos[:, :, 1].max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.float32).eps) * */ __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_k_tuple_28)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__max); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pos1_maxin = __pyx_t_23; } __pyx_L19:; __pyx_k_tuple_28 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__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));
390: pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.float32).eps)
/* "splitPixel.pyx":390 * pos1_min = pos[:, :, 1].min() * pos1_maxin = pos[:, :, 1].max() * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.float32).eps) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * cdef double dpos0 = (pos0_max - pos0_min) / (<
double > (bins0)) */ __pyx_t_4 = PyFloat_FromDouble(__pyx_v_pos1_maxin); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_8 = PyObject_GetAttr(__pyx_t_14, __pyx_n_s__finfo); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_1 = PyObject_GetAttr(__pyx_t_14, __pyx_n_s__float32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __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_14)); __pyx_t_14 = 0; __pyx_t_14 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__eps); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_int_1, __pyx_t_14); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyNumber_Multiply(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_14); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_v_pos1_max = __pyx_t_23;
391:
392: cdef double dpos0 = (pos0_max - pos0_min) / (< double > (bins0))
/* "splitPixel.pyx":392 * pos1_max = pos1_maxin * (1 + numpy.finfo(numpy.float32).eps) * * cdef double dpos0 = (pos0_max - pos0_min) / (<
double > (bins0)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef double dpos1 = (pos1_max - pos1_min) / (<
double > (bins1)) * edges0 = numpy.linspace(pos0_min+0.5*dpos0, pos0_maxin-0.5*dpos0, bins0) */ __pyx_v_dpos0 = ((__pyx_v_pos0_max - __pyx_v_pos0_min) / ((double)__pyx_v_bins0));
393: cdef double dpos1 = (pos1_max - pos1_min) / (< double > (bins1))
/* "splitPixel.pyx":393 * * cdef double dpos0 = (pos0_max - pos0_min) / (<
double > (bins0)) * cdef double dpos1 = (pos1_max - pos1_min) / (<
double > (bins1)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* edges0 = numpy.linspace(pos0_min+0.5*dpos0, pos0_maxin-0.5*dpos0, bins0) * edges1 = numpy.linspace(pos1_min+0.5*dpos1, pos1_maxin-0.5*dpos1, bins1) */ __pyx_v_dpos1 = ((__pyx_v_pos1_max - __pyx_v_pos1_min) / ((double)__pyx_v_bins1));
394: edges0 = numpy.linspace(pos0_min+0.5*dpos0, pos0_maxin-0.5*dpos0, bins0)
/* "splitPixel.pyx":394 * cdef double dpos0 = (pos0_max - pos0_min) / (<
double > (bins0)) * cdef double dpos1 = (pos1_max - pos1_min) / (<
double > (bins1)) * edges0 = numpy.linspace(pos0_min+0.5*dpos0, pos0_maxin-0.5*dpos0, bins0) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* edges1 = numpy.linspace(pos1_min+0.5*dpos1, pos1_maxin-0.5*dpos1, bins1) * */ __pyx_t_14 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_1 = PyObject_GetAttr(__pyx_t_14, __pyx_n_s__linspace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyFloat_FromDouble((__pyx_v_pos0_min + (0.5 * __pyx_v_dpos0))); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_4 = PyFloat_FromDouble((__pyx_v_pos0_maxin - (0.5 * __pyx_v_dpos0))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyInt_FromSize_t(__pyx_v_bins0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_14 = 0; __pyx_t_4 = 0; __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 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 = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_18 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges0.rcbuffer->pybuffer); __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edges0.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_24<
0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edges0.rcbuffer->pybuffer, (PyObject*)__pyx_v_edges0, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_7, __pyx_t_6, __pyx_t_5); } } __pyx_pybuffernd_edges0.diminfo[0].strides = __pyx_pybuffernd_edges0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edges0.diminfo[0].shape = __pyx_pybuffernd_edges0.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_24<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = 0; __Pyx_DECREF(((PyObject *)__pyx_v_edges0)); __pyx_v_edges0 = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0;
395: edges1 = numpy.linspace(pos1_min+0.5*dpos1, pos1_maxin-0.5*dpos1, bins1)
/* "splitPixel.pyx":395 * cdef double dpos1 = (pos1_max - pos1_min) / (<
double > (bins1)) * edges0 = numpy.linspace(pos0_min+0.5*dpos0, pos0_maxin-0.5*dpos0, bins0) * edges1 = numpy.linspace(pos1_min+0.5*dpos1, pos1_maxin-0.5*dpos1, bins1) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if (dummy is not None) and (delta_dummy is not None): */ __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__linspace); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyFloat_FromDouble((__pyx_v_pos1_min + (0.5 * __pyx_v_dpos1))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyFloat_FromDouble((__pyx_v_pos1_maxin - (0.5 * __pyx_v_dpos1))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_bins1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_8 = 0; __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 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 = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges1.rcbuffer->pybuffer); __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edges1.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_24<
0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edges1.rcbuffer->pybuffer, (PyObject*)__pyx_v_edges1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7); } } __pyx_pybuffernd_edges1.diminfo[0].strides = __pyx_pybuffernd_edges1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edges1.diminfo[0].shape = __pyx_pybuffernd_edges1.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_24<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __Pyx_DECREF(((PyObject *)__pyx_v_edges1)); __pyx_v_edges1 = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0;
396:
397: if (dummy is not None) and (delta_dummy is not None):
/* "splitPixel.pyx":397 * edges1 = numpy.linspace(pos1_min+0.5*dpos1, pos1_maxin-0.5*dpos1, bins1) * * if (dummy is not None) and (delta_dummy is not None): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* check_dummy = True * cdummy = float(dummy) */ __pyx_t_21 = (__pyx_v_dummy != Py_None); if (__pyx_t_21) { __pyx_t_22 = (__pyx_v_delta_dummy != Py_None); __pyx_t_3 = __pyx_t_22; } else { __pyx_t_3 = __pyx_t_21; } if (__pyx_t_3) {
398: check_dummy = True
/* "splitPixel.pyx":398 * * if (dummy is not None) and (delta_dummy is not None): * check_dummy = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdummy = float(dummy) * cddummy = float(delta_dummy) */ __pyx_v_check_dummy = 1;
399: cdummy = float(dummy)
/* "splitPixel.pyx":399 * if (dummy is not None) and (delta_dummy is not None): * check_dummy = True * cdummy = float(dummy) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cddummy = float(delta_dummy) * elif (dummy is not None): */ __pyx_t_23 = __Pyx_PyObject_AsDouble(__pyx_v_dummy); if (unlikely(__pyx_t_23 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cdummy = __pyx_t_23;
400: cddummy = float(delta_dummy)
/* "splitPixel.pyx":400 * check_dummy = True * cdummy = float(dummy) * cddummy = float(delta_dummy) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* elif (dummy is not None): * check_dummy = True */ __pyx_t_23 = __Pyx_PyObject_AsDouble(__pyx_v_delta_dummy); if (unlikely(__pyx_t_23 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cddummy = __pyx_t_23; goto __pyx_L20; }
401: elif (dummy is not None):
/* "splitPixel.pyx":401 * cdummy = float(dummy) * cddummy = float(delta_dummy) * elif (dummy is not None): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* check_dummy = True * cdummy = float(dummy) */ __pyx_t_3 = (__pyx_v_dummy != Py_None); if (__pyx_t_3) {
402: check_dummy = True
/* "splitPixel.pyx":402 * cddummy = float(delta_dummy) * elif (dummy is not None): * check_dummy = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdummy = float(dummy) * cddummy = 0.0 */ __pyx_v_check_dummy = 1;
403: cdummy = float(dummy)
/* "splitPixel.pyx":403 * elif (dummy is not None): * check_dummy = True * cdummy = float(dummy) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cddummy = 0.0 * else: */ __pyx_t_23 = __Pyx_PyObject_AsDouble(__pyx_v_dummy); if (unlikely(__pyx_t_23 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cdummy = __pyx_t_23;
404: cddummy = 0.0
/* "splitPixel.pyx":404 * check_dummy = True * cdummy = float(dummy) * cddummy = 0.0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * check_dummy = False */ __pyx_v_cddummy = 0.0; goto __pyx_L20; } /*else*/ {
405: else:
406: check_dummy = False
/* "splitPixel.pyx":406 * cddummy = 0.0 * else: * check_dummy = False #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdummy = 0.0 * cddummy = 0.0 */ __pyx_v_check_dummy = 0;
407: cdummy = 0.0
/* "splitPixel.pyx":407 * else: * check_dummy = False * cdummy = 0.0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cddummy = 0.0 * */ __pyx_v_cdummy = 0.0;
408: cddummy = 0.0
/* "splitPixel.pyx":408 * check_dummy = False * cdummy = 0.0 * cddummy = 0.0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if mask is not None: */ __pyx_v_cddummy = 0.0; } __pyx_L20:;
409:
410: if mask is not None:
/* "splitPixel.pyx":410 * cddummy = 0.0 * * if mask is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* check_mask = True * assert mask.size == size */ __pyx_t_3 = (__pyx_v_mask != Py_None); if (__pyx_t_3) {
411: check_mask = True
/* "splitPixel.pyx":411 * * if mask is not None: * check_mask = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert mask.size == size * cmask = numpy.ascontiguousarray(mask.ravel(), dtype=numpy.int8) */ __pyx_v_check_mask = 1;
412: assert mask.size == size
/* "splitPixel.pyx":412 * if mask is not None: * check_mask = True * assert mask.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cmask = numpy.ascontiguousarray(mask.ravel(), dtype=numpy.int8) * if dark is not None: */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyObject_GetAttr(__pyx_v_mask, __pyx_n_s__size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_9 = PyObject_RichCompare(__pyx_t_4, __pyx_t_14, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
413: cmask = numpy.ascontiguousarray(mask.ravel(), dtype=numpy.int8)
/* "splitPixel.pyx":413 * check_mask = True * assert mask.size == size * cmask = numpy.ascontiguousarray(mask.ravel(), dtype=numpy.int8) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if dark is not None: * do_dark = True */ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_14 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_GetAttr(__pyx_v_mask, __pyx_n_s__ravel); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 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 = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__int8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_9), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_25 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int8_t(__pyx_t_8); if (unlikely(!__pyx_t_25.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_cmask = __pyx_t_25; __pyx_t_25.memview = NULL; __pyx_t_25.data = NULL; goto __pyx_L21; } __pyx_L21:;
414: if dark is not None:
/* "splitPixel.pyx":414 * assert mask.size == size * cmask = numpy.ascontiguousarray(mask.ravel(), dtype=numpy.int8) * if dark is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_dark = True * assert dark.size == size */ __pyx_t_3 = (__pyx_v_dark != Py_None); if (__pyx_t_3) {
415: do_dark = True
/* "splitPixel.pyx":415 * cmask = numpy.ascontiguousarray(mask.ravel(), dtype=numpy.int8) * if dark is not None: * do_dark = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert dark.size == size * cdark = numpy.ascontiguousarray(dark.ravel(), dtype=numpy.float64) */ __pyx_v_do_dark = 1;
416: assert dark.size == size
/* "splitPixel.pyx":416 * if dark is not None: * do_dark = True * assert dark.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdark = numpy.ascontiguousarray(dark.ravel(), dtype=numpy.float64) * if flat is not None: */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_8 = PyObject_GetAttr(__pyx_v_dark, __pyx_n_s__size); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = PyObject_RichCompare(__pyx_t_8, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
417: cdark = numpy.ascontiguousarray(dark.ravel(), dtype=numpy.float64)
/* "splitPixel.pyx":417 * do_dark = True * assert dark.size == size * cdark = numpy.ascontiguousarray(dark.ravel(), dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if flat is not None: * do_flat = True */ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_GetAttr(__pyx_v_dark, __pyx_n_s__ravel); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 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 = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __pyx_t_14 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_1 = PyObject_GetAttr(__pyx_t_14, __pyx_n_s__float64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_9), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_26 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1); if (unlikely(!__pyx_t_26.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_cdark = __pyx_t_26; __pyx_t_26.memview = NULL; __pyx_t_26.data = NULL; goto __pyx_L22; } __pyx_L22:;
418: if flat is not None:
/* "splitPixel.pyx":418 * assert dark.size == size * cdark = numpy.ascontiguousarray(dark.ravel(), dtype=numpy.float64) * if flat is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_flat = True * assert flat.size == size */ __pyx_t_3 = (__pyx_v_flat != Py_None); if (__pyx_t_3) {
419: do_flat = True
/* "splitPixel.pyx":419 * cdark = numpy.ascontiguousarray(dark.ravel(), dtype=numpy.float64) * if flat is not None: * do_flat = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert flat.size == size * cflat = numpy.ascontiguousarray(flat.ravel(), dtype=numpy.float64) */ __pyx_v_do_flat = 1;
420: assert flat.size == size
/* "splitPixel.pyx":420 * if flat is not None: * do_flat = True * assert flat.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cflat = numpy.ascontiguousarray(flat.ravel(), dtype=numpy.float64) * if polarization is not None: */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_1 = PyObject_GetAttr(__pyx_v_flat, __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
421: cflat = numpy.ascontiguousarray(flat.ravel(), dtype=numpy.float64)
/* "splitPixel.pyx":421 * do_flat = True * assert flat.size == size * cflat = numpy.ascontiguousarray(flat.ravel(), dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if polarization is not None: * do_polarization = True */ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_GetAttr(__pyx_v_flat, __pyx_n_s__ravel); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_14)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_9), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_26 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_14); if (unlikely(!__pyx_t_26.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_v_cflat = __pyx_t_26; __pyx_t_26.memview = NULL; __pyx_t_26.data = NULL; goto __pyx_L23; } __pyx_L23:;
422: if polarization is not None:
/* "splitPixel.pyx":422 * assert flat.size == size * cflat = numpy.ascontiguousarray(flat.ravel(), dtype=numpy.float64) * if polarization is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_polarization = True * assert polarization.size == size */ __pyx_t_3 = (__pyx_v_polarization != Py_None); if (__pyx_t_3) {
423: do_polarization = True
/* "splitPixel.pyx":423 * cflat = numpy.ascontiguousarray(flat.ravel(), dtype=numpy.float64) * if polarization is not None: * do_polarization = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert polarization.size == size * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float64) */ __pyx_v_do_polarization = 1;
424: assert polarization.size == size
/* "splitPixel.pyx":424 * if polarization is not None: * do_polarization = True * assert polarization.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float64) * if solidangle is not None: */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_14 = PyObject_GetAttr(__pyx_v_polarization, __pyx_n_s__size); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyObject_RichCompare(__pyx_t_14, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
425: cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float64)
/* "splitPixel.pyx":425 * do_polarization = True * assert polarization.size == size * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if solidangle is not None: * do_solidangle = True */ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_GetAttr(__pyx_v_polarization, __pyx_n_s__ravel); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_14 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_14)); __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__float64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_14, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), ((PyObject *)__pyx_t_14)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; __pyx_t_26 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4); if (unlikely(!__pyx_t_26.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_cpolarization = __pyx_t_26; __pyx_t_26.memview = NULL; __pyx_t_26.data = NULL; goto __pyx_L24; } __pyx_L24:;
426: if solidangle is not None:
/* "splitPixel.pyx":426 * assert polarization.size == size * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float64) * if solidangle is not None: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* do_solidangle = True * assert solidangle.size == size */ __pyx_t_3 = (__pyx_v_solidangle != Py_None); if (__pyx_t_3) {
427: do_solidangle = True
/* "splitPixel.pyx":427 * cpolarization = numpy.ascontiguousarray(polarization.ravel(), dtype=numpy.float64) * if solidangle is not None: * do_solidangle = True #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert solidangle.size == size * csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float64) */ __pyx_v_do_solidangle = 1;
428: assert solidangle.size == size
/* "splitPixel.pyx":428 * if solidangle is not None: * do_solidangle = True * assert solidangle.size == size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float64) * */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyObject_GetAttr(__pyx_v_solidangle, __pyx_n_s__size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_9 = PyObject_RichCompare(__pyx_t_4, __pyx_t_14, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
429: csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float64)
/* "splitPixel.pyx":429 * do_solidangle = True * assert solidangle.size == size * csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * with nogil: */ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_14 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_GetAttr(__pyx_v_solidangle, __pyx_n_s__ravel); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 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 = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_9), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_26 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_8); if (unlikely(!__pyx_t_26.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_csolidangle = __pyx_t_26; __pyx_t_26.memview = NULL; __pyx_t_26.data = NULL; goto __pyx_L25; } __pyx_L25:;
430:
431: with nogil:
/* "splitPixel.pyx":431 * csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float64) * * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for idx in range(size): * */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "splitPixel.pyx":431 * csolidangle = numpy.ascontiguousarray(solidangle.ravel(), dtype=numpy.float64) * * with nogil: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for idx in range(size): * */ /*finally:*/ { int __pyx_why; __pyx_why = 0; goto __pyx_L28; __pyx_L27: __pyx_why = 4; goto __pyx_L28; __pyx_L28:; Py_BLOCK_THREADS switch (__pyx_why) { case 4: goto __pyx_L1_error; } } }
432: for idx in range(size):
/* "splitPixel.pyx":432 * * with nogil: * for idx in range(size): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if (check_mask) and (cmask[idx]): */ __pyx_t_11 = __pyx_v_size; for (__pyx_t_2 = 0; __pyx_t_2<
__pyx_t_11; __pyx_t_2+=1) { __pyx_v_idx = __pyx_t_2;
433:
434: if (check_mask) and (cmask[idx]):
/* "splitPixel.pyx":434 * for idx in range(size): * * if (check_mask) and (cmask[idx]): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * */ __pyx_t_3 = __pyx_v_check_mask; if (__pyx_t_3) { if (unlikely(!__pyx_v_cmask.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cmask"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L27;} } __pyx_t_27 = __pyx_v_idx; __pyx_t_21 = (*((__pyx_t_5numpy_int8_t *) ( /* dim=0 */ (__pyx_v_cmask.data + __pyx_t_27 * __pyx_v_cmask.strides[0]) ))); } else { __pyx_t_21 = __pyx_t_3; } if (__pyx_t_21) {
435: continue
/* "splitPixel.pyx":435 * * if (check_mask) and (cmask[idx]): * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * data = cdata[idx] */ goto __pyx_L29_continue; goto __pyx_L31; } __pyx_L31:;
436:
437: data = cdata[idx]
/* "splitPixel.pyx":437 * continue * * data = cdata[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if check_dummy and ( (cddummy==0.0 and data==cdummy) or (cddummy!=0.0 and fabs(data-cdummy)<
=cddummy)): * continue */ __pyx_t_28 = __pyx_v_idx; __pyx_v_data = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cdata.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_cdata.diminfo[0].strides));
438: if check_dummy and ( (cddummy==0.0 and data==cdummy) or (cddummy!=0.0 and fabs(data-cdummy)<=cddummy)):
/* "splitPixel.pyx":438 * * data = cdata[idx] * if check_dummy and ( (cddummy==0.0 and data==cdummy) or (cddummy!=0.0 and fabs(data-cdummy)<
=cddummy)): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * */ if (__pyx_v_check_dummy) { __pyx_t_21 = (__pyx_v_cddummy == 0.0); if (__pyx_t_21) { __pyx_t_3 = (__pyx_v_data == __pyx_v_cdummy); __pyx_t_22 = __pyx_t_3; } else { __pyx_t_22 = __pyx_t_21; } if (!__pyx_t_22) { __pyx_t_21 = (__pyx_v_cddummy != 0.0); if (__pyx_t_21) { __pyx_t_3 = (fabs((__pyx_v_data - __pyx_v_cdummy))<
= __pyx_v_cddummy); __pyx_t_29 = __pyx_t_3; } else { __pyx_t_29 = __pyx_t_21; } __pyx_t_21 = __pyx_t_29; } else { __pyx_t_21 = __pyx_t_22; } __pyx_t_22 = __pyx_t_21; } else { __pyx_t_22 = __pyx_v_check_dummy; } if (__pyx_t_22) {
439: continue
/* "splitPixel.pyx":439 * data = cdata[idx] * if check_dummy and ( (cddummy==0.0 and data==cdummy) or (cddummy!=0.0 and fabs(data-cdummy)<
=cddummy)): * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * a0 = cpos[idx, 0, 0] */ goto __pyx_L29_continue; goto __pyx_L32; } __pyx_L32:;
440:
441: a0 = cpos[idx, 0, 0]
/* "splitPixel.pyx":441 * continue * * a0 = cpos[idx, 0, 0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* a1 = cpos[idx, 0, 1] * b0 = cpos[idx, 1, 0] */ __pyx_t_30 = __pyx_v_idx; __pyx_t_31 = 0; __pyx_t_32 = 0; __pyx_v_a0 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_32, __pyx_pybuffernd_cpos.diminfo[2].strides));
442: a1 = cpos[idx, 0, 1]
/* "splitPixel.pyx":442 * * a0 = cpos[idx, 0, 0] * a1 = cpos[idx, 0, 1] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* b0 = cpos[idx, 1, 0] * b1 = cpos[idx, 1, 1] */ __pyx_t_33 = __pyx_v_idx; __pyx_t_34 = 0; __pyx_t_35 = 1; __pyx_v_a1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_35, __pyx_pybuffernd_cpos.diminfo[2].strides));
443: b0 = cpos[idx, 1, 0]
/* "splitPixel.pyx":443 * a0 = cpos[idx, 0, 0] * a1 = cpos[idx, 0, 1] * b0 = cpos[idx, 1, 0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* b1 = cpos[idx, 1, 1] * c0 = cpos[idx, 2, 0] */ __pyx_t_36 = __pyx_v_idx; __pyx_t_37 = 1; __pyx_t_38 = 0; __pyx_v_b0 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_38, __pyx_pybuffernd_cpos.diminfo[2].strides));
444: b1 = cpos[idx, 1, 1]
/* "splitPixel.pyx":444 * a1 = cpos[idx, 0, 1] * b0 = cpos[idx, 1, 0] * b1 = cpos[idx, 1, 1] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* c0 = cpos[idx, 2, 0] * c1 = cpos[idx, 2, 1] */ __pyx_t_39 = __pyx_v_idx; __pyx_t_40 = 1; __pyx_t_41 = 1; __pyx_v_b1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_41, __pyx_pybuffernd_cpos.diminfo[2].strides));
445: c0 = cpos[idx, 2, 0]
/* "splitPixel.pyx":445 * b0 = cpos[idx, 1, 0] * b1 = cpos[idx, 1, 1] * c0 = cpos[idx, 2, 0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* c1 = cpos[idx, 2, 1] * d0 = cpos[idx, 3, 0] */ __pyx_t_42 = __pyx_v_idx; __pyx_t_43 = 2; __pyx_t_44 = 0; __pyx_v_c0 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_44, __pyx_pybuffernd_cpos.diminfo[2].strides));
446: c1 = cpos[idx, 2, 1]
/* "splitPixel.pyx":446 * b1 = cpos[idx, 1, 1] * c0 = cpos[idx, 2, 0] * c1 = cpos[idx, 2, 1] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* d0 = cpos[idx, 3, 0] * d1 = cpos[idx, 3, 1] */ __pyx_t_45 = __pyx_v_idx; __pyx_t_46 = 2; __pyx_t_47 = 1; __pyx_v_c1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_47, __pyx_pybuffernd_cpos.diminfo[2].strides));
447: d0 = cpos[idx, 3, 0]
/* "splitPixel.pyx":447 * c0 = cpos[idx, 2, 0] * c1 = cpos[idx, 2, 1] * d0 = cpos[idx, 3, 0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* d1 = cpos[idx, 3, 1] * */ __pyx_t_48 = __pyx_v_idx; __pyx_t_49 = 3; __pyx_t_50 = 0; __pyx_v_d0 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_49, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_50, __pyx_pybuffernd_cpos.diminfo[2].strides));
448: d1 = cpos[idx, 3, 1]
/* "splitPixel.pyx":448 * c1 = cpos[idx, 2, 1] * d0 = cpos[idx, 3, 0] * d1 = cpos[idx, 3, 1] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * min0 = min4f(a0, b0, c0, d0) */ __pyx_t_51 = __pyx_v_idx; __pyx_t_52 = 3; __pyx_t_53 = 1; __pyx_v_d1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_cpos.rcbuffer->pybuffer.buf, __pyx_t_51, __pyx_pybuffernd_cpos.diminfo[0].strides, __pyx_t_52, __pyx_pybuffernd_cpos.diminfo[1].strides, __pyx_t_53, __pyx_pybuffernd_cpos.diminfo[2].strides));
449:
450: min0 = min4f(a0, b0, c0, d0)
/* "splitPixel.pyx":450 * d1 = 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);
451: max0 = max4f(a0, b0, c0, d0)
/* "splitPixel.pyx":451 * * 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);
452: min1 = min4f(a1, b1, c1, d1)
/* "splitPixel.pyx":452 * 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_min1 = __pyx_f_10splitPixel_min4f(__pyx_v_a1, __pyx_v_b1, __pyx_v_c1, __pyx_v_d1);
453: max1 = max4f(a1, b1, c1, d1)
/* "splitPixel.pyx":453 * max0 = max4f(a0, b0, c0, d0) * min1 = min4f(a1, b1, c1, d1) * max1 = max4f(a1, b1, c1, d1) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if (max0<
pos0_min) or (min0 > pos0_maxin) or (max1<
pos1_min) or (min1 > pos1_maxin): */ __pyx_v_max1 = __pyx_f_10splitPixel_max4f(__pyx_v_a1, __pyx_v_b1, __pyx_v_c1, __pyx_v_d1);
454:
455: if (max0<pos0_min) or (min0 > pos0_maxin) or (max1<pos1_min) or (min1 > pos1_maxin):
/* "splitPixel.pyx":455 * max1 = max4f(a1, b1, c1, d1) * * if (max0<
pos0_min) or (min0 > pos0_maxin) or (max1<
pos1_min) or (min1 > pos1_maxin): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* continue * */ __pyx_t_22 = (__pyx_v_max0<
__pyx_v_pos0_min); if (!__pyx_t_22) { __pyx_t_21 = (__pyx_v_min0 > __pyx_v_pos0_maxin); if (!__pyx_t_21) { __pyx_t_29 = (__pyx_v_max1<
__pyx_v_pos1_min); if (!__pyx_t_29) { __pyx_t_3 = (__pyx_v_min1 > __pyx_v_pos1_maxin); __pyx_t_54 = __pyx_t_3; } else { __pyx_t_54 = __pyx_t_29; } __pyx_t_29 = __pyx_t_54; } else { __pyx_t_29 = __pyx_t_21; } __pyx_t_21 = __pyx_t_29; } else { __pyx_t_21 = __pyx_t_22; } if (__pyx_t_21) {
456: continue
/* "splitPixel.pyx":456 * * if (max0<
pos0_min) or (min0 > pos0_maxin) or (max1<
pos1_min) or (min1 > pos1_maxin): * continue #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * if do_dark: */ goto __pyx_L29_continue; goto __pyx_L33; } __pyx_L33:;
457:
458: if do_dark:
/* "splitPixel.pyx":458 * continue * * if do_dark: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data -= cdark[idx] * if do_flat: */ if (__pyx_v_do_dark) {
459: data -= cdark[idx]
/* "splitPixel.pyx":459 * * if do_dark: * data -= cdark[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if do_flat: * data /= cflat[idx] */ if (unlikely(!__pyx_v_cdark.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cdark"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L27;} } __pyx_t_55 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data - (*((double *) ( /* dim=0 */ (__pyx_v_cdark.data + __pyx_t_55 * __pyx_v_cdark.strides[0]) )))); goto __pyx_L34; } __pyx_L34:;
460: if do_flat:
/* "splitPixel.pyx":460 * if do_dark: * data -= cdark[idx] * if do_flat: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data /= cflat[idx] * if do_polarization: */ if (__pyx_v_do_flat) {
461: data /= cflat[idx]
/* "splitPixel.pyx":461 * data -= cdark[idx] * if do_flat: * data /= cflat[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if do_polarization: * data /= cpolarization[idx] */ if (unlikely(!__pyx_v_cflat.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cflat"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L27;} } __pyx_t_56 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data / (*((double *) ( /* dim=0 */ (__pyx_v_cflat.data + __pyx_t_56 * __pyx_v_cflat.strides[0]) )))); goto __pyx_L35; } __pyx_L35:;
462: if do_polarization:
/* "splitPixel.pyx":462 * if do_flat: * data /= cflat[idx] * if do_polarization: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data /= cpolarization[idx] * if do_solidangle: */ if (__pyx_v_do_polarization) {
463: data /= cpolarization[idx]
/* "splitPixel.pyx":463 * data /= cflat[idx] * if do_polarization: * data /= cpolarization[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if do_solidangle: * data /= csolidangle[idx] */ if (unlikely(!__pyx_v_cpolarization.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("cpolarization"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L27;} } __pyx_t_57 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data / (*((double *) ( /* dim=0 */ (__pyx_v_cpolarization.data + __pyx_t_57 * __pyx_v_cpolarization.strides[0]) )))); goto __pyx_L36; } __pyx_L36:;
464: if do_solidangle:
/* "splitPixel.pyx":464 * if do_polarization: * data /= cpolarization[idx] * if do_solidangle: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data /= csolidangle[idx] * */ if (__pyx_v_do_solidangle) {
465: data /= csolidangle[idx]
/* "splitPixel.pyx":465 * data /= cpolarization[idx] * if do_solidangle: * data /= csolidangle[idx] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * */ if (unlikely(!__pyx_v_csolidangle.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("csolidangle"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L27;} } __pyx_t_58 = __pyx_v_idx; __pyx_v_data = (__pyx_v_data / (*((double *) ( /* dim=0 */ (__pyx_v_csolidangle.data + __pyx_t_58 * __pyx_v_csolidangle.strides[0]) )))); goto __pyx_L37; } __pyx_L37:;
466:
467:
468: if min0 < pos0_min:
/* "splitPixel.pyx":468 * * * if min0<
pos0_min: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* data = data * (pos0_min - min0) / (max0 - min0) * min0 = pos0_min */ __pyx_t_21 = (__pyx_v_min0<
__pyx_v_pos0_min); if (__pyx_t_21) {
469: data = data * (pos0_min - min0) / (max0 - min0)
/* "splitPixel.pyx":469 * * 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));
470: min0 = pos0_min
/* "splitPixel.pyx":470 * 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_L38; } __pyx_L38:;
471: if min1 < pos1_min:
/* "splitPixel.pyx":471 * 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_21 = (__pyx_v_min1<
__pyx_v_pos1_min); if (__pyx_t_21) {
472: data = data * (pos1_min - min1) / (max1 - min1)
/* "splitPixel.pyx":472 * 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));
473: min1 = pos1_min
/* "splitPixel.pyx":473 * 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_L39; } __pyx_L39:;
474: if max0 > pos0_maxin:
/* "splitPixel.pyx":474 * 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_21 = (__pyx_v_max0 > __pyx_v_pos0_maxin); if (__pyx_t_21) {
475: data = data * (max0 - pos0_maxin) / (max0 - min0)
/* "splitPixel.pyx":475 * 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));
476: max0 = pos0_maxin
/* "splitPixel.pyx":476 * 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_L40; } __pyx_L40:;
477: if max1 > pos1_maxin:
/* "splitPixel.pyx":477 * 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_21 = (__pyx_v_max1 > __pyx_v_pos1_maxin); if (__pyx_t_21) {
478: data = data * (max1 - pos1_maxin) / (max1 - min1)
/* "splitPixel.pyx":478 * 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));
479: max1 = pos1_maxin
/* "splitPixel.pyx":479 * 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_L41; } __pyx_L41:;
480:
481: ## treat data for pixel on chi discontinuity
482: if ((max1 - min1) / dpos1) > (bins1 / 2.0):
/* "splitPixel.pyx":482 * * ## treat data for pixel on chi discontinuity * if ((max1 - min1) / dpos1) > (bins1 / 2.0): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if pos1_maxin - max1 > min1 - pos1_min: * min1 = max1 */ __pyx_t_21 = (((__pyx_v_max1 - __pyx_v_min1) / __pyx_v_dpos1) > (__pyx_v_bins1 / 2.0)); if (__pyx_t_21) {
483: if pos1_maxin - max1 > min1 - pos1_min:
/* "splitPixel.pyx":483 * ## treat data for pixel on chi discontinuity * if ((max1 - min1) / dpos1) > (bins1 / 2.0): * if pos1_maxin - max1 > min1 - pos1_min: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min1 = max1 * max1 = pos1_maxin */ __pyx_t_21 = ((__pyx_v_pos1_maxin - __pyx_v_max1) > (__pyx_v_min1 - __pyx_v_pos1_min)); if (__pyx_t_21) {
484: min1 = max1
/* "splitPixel.pyx":484 * if ((max1 - min1) / dpos1) > (bins1 / 2.0): * if pos1_maxin - max1 > min1 - pos1_min: * min1 = max1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* max1 = pos1_maxin * else: */ __pyx_v_min1 = __pyx_v_max1;
485: max1 = pos1_maxin
/* "splitPixel.pyx":485 * if pos1_maxin - max1 > min1 - pos1_min: * min1 = max1 * max1 = pos1_maxin #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * max1 = min1 */ __pyx_v_max1 = __pyx_v_pos1_maxin; goto __pyx_L43; } /*else*/ {
486: else:
487: max1 = min1
/* "splitPixel.pyx":487 * max1 = pos1_maxin * else: * max1 = min1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* min1 = pos1_min * */ __pyx_v_max1 = __pyx_v_min1;
488: min1 = pos1_min
/* "splitPixel.pyx":488 * else: * max1 = min1 * min1 = pos1_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * fbin0_min = getBinNr(min0, pos0_min, dpos0) */ __pyx_v_min1 = __pyx_v_pos1_min; } __pyx_L43:; goto __pyx_L42; } __pyx_L42:;
489:
490: fbin0_min = getBinNr(min0, pos0_min, dpos0)
/* "splitPixel.pyx":490 * 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);
491: fbin0_max = getBinNr(max0, pos0_min, dpos0)
/* "splitPixel.pyx":491 * * 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);
492: fbin1_min = getBinNr(min1, pos1_min, dpos1)
/* "splitPixel.pyx":492 * 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);
493: fbin1_max = getBinNr(max1, pos1_min, dpos1)
/* "splitPixel.pyx":493 * fbin0_max = getBinNr(max0, pos0_min, dpos0) * fbin1_min = getBinNr(min1, pos1_min, dpos1) * fbin1_max = getBinNr(max1, pos1_min, dpos1) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * bin0_min =<
size_t > fbin0_min */ __pyx_v_fbin1_max = __pyx_f_10splitPixel_getBinNr(__pyx_v_max1, __pyx_v_pos1_min, __pyx_v_dpos1);
494:
495: bin0_min = < size_t > fbin0_min
/* "splitPixel.pyx":495 * fbin1_max = getBinNr(max1, pos1_min, dpos1) * * bin0_min =<
size_t > fbin0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bin0_max =<
size_t > fbin0_max * bin1_min =<
size_t > fbin1_min */ __pyx_v_bin0_min = ((size_t)__pyx_v_fbin0_min);
496: bin0_max = < size_t > fbin0_max
/* "splitPixel.pyx":496 * * bin0_min =<
size_t > fbin0_min * bin0_max =<
size_t > fbin0_max #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bin1_min =<
size_t > fbin1_min * bin1_max =<
size_t > fbin1_max */ __pyx_v_bin0_max = ((size_t)__pyx_v_fbin0_max);
497: bin1_min = < size_t > fbin1_min
/* "splitPixel.pyx":497 * bin0_min =<
size_t > fbin0_min * bin0_max =<
size_t > fbin0_max * bin1_min =<
size_t > fbin1_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* bin1_max =<
size_t > fbin1_max * */ __pyx_v_bin1_min = ((size_t)__pyx_v_fbin1_min);
498: bin1_max = < size_t > fbin1_max
/* "splitPixel.pyx":498 * bin0_max =<
size_t > fbin0_max * bin1_min =<
size_t > fbin1_min * bin1_max =<
size_t > fbin1_max #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * */ __pyx_v_bin1_max = ((size_t)__pyx_v_fbin1_max);
499:
500:
501: if bin0_min == bin0_max:
/* "splitPixel.pyx":501 * * * if bin0_min == bin0_max: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if bin1_min == bin1_max: * #All pixel is within a single bin */ __pyx_t_21 = (__pyx_v_bin0_min == __pyx_v_bin0_max); if (__pyx_t_21) {
502: if bin1_min == bin1_max:
/* "splitPixel.pyx":502 * * 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_21 = (__pyx_v_bin1_min == __pyx_v_bin1_max); if (__pyx_t_21) {
503: #All pixel is within a single bin
504: outCount[bin0_min, bin1_min] += 1.0
/* "splitPixel.pyx":504 * 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_59 = __pyx_v_bin0_min; __pyx_t_60 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_59, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_60, __pyx_pybuffernd_outCount.diminfo[1].strides) += 1.0;
505: outData[bin0_min, bin1_min] += data
/* "splitPixel.pyx":505 * #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_61 = __pyx_v_bin0_min; __pyx_t_62 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_61, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_62, __pyx_pybuffernd_outData.diminfo[1].strides) += __pyx_v_data; goto __pyx_L45; } /*else*/ {
506: else:
507: #spread on more than 2 bins
508: aeraPixel = fbin1_max - fbin1_min
/* "splitPixel.pyx":508 * 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);
509: deltaD = (< double > (bin1_min + 1)) - fbin1_min
/* "splitPixel.pyx":509 * #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);
510: deltaU = fbin1_max - (< double > bin1_max)
/* "splitPixel.pyx":510 * 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));
511: deltaA = 1.0 / aeraPixel
/* "splitPixel.pyx":511 * 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);
512:
513: outCount[bin0_min, bin1_min] += deltaA * deltaD
/* "splitPixel.pyx":513 * deltaA = 1.0 / aeraPixel * * outCount[bin0_min, bin1_min] += deltaA * deltaD #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min, bin1_min] += data * deltaA * deltaD * */ __pyx_t_63 = __pyx_v_bin0_min; __pyx_t_64 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_63, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_64, __pyx_pybuffernd_outCount.diminfo[1].strides) += (__pyx_v_deltaA * __pyx_v_deltaD);
514: outData[bin0_min, bin1_min] += data * deltaA * deltaD
/* "splitPixel.pyx":514 * * outCount[bin0_min, bin1_min] += deltaA * deltaD * outData[bin0_min, bin1_min] += data * deltaA * deltaD #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * outCount[bin0_min, bin1_max] += deltaA * deltaU */ __pyx_t_65 = __pyx_v_bin0_min; __pyx_t_66 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_65, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_66, __pyx_pybuffernd_outData.diminfo[1].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaD);
515:
516: outCount[bin0_min, bin1_max] += deltaA * deltaU
/* "splitPixel.pyx":516 * 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_67 = __pyx_v_bin0_min; __pyx_t_68 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_67, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_68, __pyx_pybuffernd_outCount.diminfo[1].strides) += (__pyx_v_deltaA * __pyx_v_deltaU);
517: outData[bin0_min, bin1_max] += data * deltaA * deltaU
/* "splitPixel.pyx":517 * * 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_69 = __pyx_v_bin0_min; __pyx_t_70 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_70, __pyx_pybuffernd_outData.diminfo[1].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaU);
518: # if bin1_min +1< bin1_max:
519: for j in range(bin1_min + 1, bin1_max):
/* "splitPixel.pyx":519 * 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_71 = __pyx_v_bin1_max; for (__pyx_t_72 = (__pyx_v_bin1_min + 1); __pyx_t_72<
__pyx_t_71; __pyx_t_72+=1) { __pyx_v_j = __pyx_t_72;
520: outCount[bin0_min, j] += deltaA
/* "splitPixel.pyx":520 * # 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_73 = __pyx_v_bin0_min; __pyx_t_74 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_73, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_74, __pyx_pybuffernd_outCount.diminfo[1].strides) += __pyx_v_deltaA;
521: outData[bin0_min, j] += data * deltaA
/* "splitPixel.pyx":521 * 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_75 = __pyx_v_bin0_min; __pyx_t_76 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_75, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_76, __pyx_pybuffernd_outData.diminfo[1].strides) += (__pyx_v_data * __pyx_v_deltaA); } } __pyx_L45:; goto __pyx_L44; } /*else*/ {
522:
523: else: #spread on more than 2 bins in dim 0
524: if bin1_min == bin1_max:
/* "splitPixel.pyx":524 * * 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_21 = (__pyx_v_bin1_min == __pyx_v_bin1_max); if (__pyx_t_21) {
525: #All pixel fall on 1 bins in dim 1
526: aeraPixel = fbin0_max - fbin0_min
/* "splitPixel.pyx":526 * 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);
527: deltaL = (< double > (bin0_min + 1)) - fbin0_min
/* "splitPixel.pyx":527 * #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);
528: deltaA = deltaL / aeraPixel
/* "splitPixel.pyx":528 * 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);
529: outCount[bin0_min, bin1_min] += deltaA
/* "splitPixel.pyx":529 * 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_71 = __pyx_v_bin0_min; __pyx_t_72 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_71, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_72, __pyx_pybuffernd_outCount.diminfo[1].strides) += __pyx_v_deltaA;
530: outData[bin0_min, bin1_min] += data * deltaA
/* "splitPixel.pyx":530 * 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_77 = __pyx_v_bin0_min; __pyx_t_78 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_77, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_78, __pyx_pybuffernd_outData.diminfo[1].strides) += (__pyx_v_data * __pyx_v_deltaA);
531: deltaR = fbin0_max - (< double > bin0_max)
/* "splitPixel.pyx":531 * 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));
532: deltaA = deltaR / aeraPixel
/* "splitPixel.pyx":532 * 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);
533: outCount[bin0_max, bin1_min] += deltaA
/* "splitPixel.pyx":533 * 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_79 = __pyx_v_bin0_max; __pyx_t_80 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_79, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_80, __pyx_pybuffernd_outCount.diminfo[1].strides) += __pyx_v_deltaA;
534: outData[bin0_max, bin1_min] += data * deltaA
/* "splitPixel.pyx":534 * 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_81 = __pyx_v_bin0_max; __pyx_t_82 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_81, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_82, __pyx_pybuffernd_outData.diminfo[1].strides) += (__pyx_v_data * __pyx_v_deltaA);
535: deltaA = 1.0 / aeraPixel
/* "splitPixel.pyx":535 * 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);
536: for i in range(bin0_min + 1, bin0_max):
/* "splitPixel.pyx":536 * 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_83 = __pyx_v_bin0_max; for (__pyx_t_84 = (__pyx_v_bin0_min + 1); __pyx_t_84<
__pyx_t_83; __pyx_t_84+=1) { __pyx_v_i = __pyx_t_84;
537: outCount[i, bin1_min] += deltaA
/* "splitPixel.pyx":537 * 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_85 = __pyx_v_i; __pyx_t_86 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_85, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_86, __pyx_pybuffernd_outCount.diminfo[1].strides) += __pyx_v_deltaA;
538: outData[i, bin1_min] += data * deltaA
/* "splitPixel.pyx":538 * 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_87 = __pyx_v_i; __pyx_t_88 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_87, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_88, __pyx_pybuffernd_outData.diminfo[1].strides) += (__pyx_v_data * __pyx_v_deltaA); } goto __pyx_L48; } /*else*/ {
539: else:
540: #spread on n pix in dim0 and m pixel in dim1:
541: aeraPixel = (fbin0_max - fbin0_min) * (fbin1_max - fbin1_min)
/* "splitPixel.pyx":541 * 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.0)) - 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));
542: deltaL = (< double > (bin0_min + 1.0)) - fbin0_min
/* "splitPixel.pyx":542 * #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.0)) - fbin0_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaR = fbin0_max - (<
double > bin0_max) * deltaD = (<
double > (bin1_min + 1.0)) - fbin1_min */ __pyx_v_deltaL = (((double)(__pyx_v_bin0_min + 1.0)) - __pyx_v_fbin0_min);
543: deltaR = fbin0_max - (< double > bin0_max)
/* "splitPixel.pyx":543 * aeraPixel = (fbin0_max - fbin0_min) * (fbin1_max - fbin1_min) * deltaL = (<
double > (bin0_min + 1.0)) - fbin0_min * deltaR = fbin0_max - (<
double > bin0_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaD = (<
double > (bin1_min + 1.0)) - fbin1_min * deltaU = fbin1_max - (<
double > bin1_max) */ __pyx_v_deltaR = (__pyx_v_fbin0_max - ((double)__pyx_v_bin0_max));
544: deltaD = (< double > (bin1_min + 1.0)) - fbin1_min
/* "splitPixel.pyx":544 * deltaL = (<
double > (bin0_min + 1.0)) - fbin0_min * deltaR = fbin0_max - (<
double > bin0_max) * deltaD = (<
double > (bin1_min + 1.0)) - fbin1_min #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaU = fbin1_max - (<
double > bin1_max) * deltaA = 1.0 / aeraPixel */ __pyx_v_deltaD = (((double)(__pyx_v_bin1_min + 1.0)) - __pyx_v_fbin1_min);
545: deltaU = fbin1_max - (< double > bin1_max)
/* "splitPixel.pyx":545 * deltaR = fbin0_max - (<
double > bin0_max) * deltaD = (<
double > (bin1_min + 1.0)) - fbin1_min * deltaU = fbin1_max - (<
double > bin1_max) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* deltaA = 1.0 / aeraPixel * */ __pyx_v_deltaU = (__pyx_v_fbin1_max - ((double)__pyx_v_bin1_max));
546: deltaA = 1.0 / aeraPixel
/* "splitPixel.pyx":546 * deltaD = (<
double > (bin1_min + 1.0)) - 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);
547:
548: outCount[bin0_min, bin1_min] += deltaA * deltaL * deltaD
/* "splitPixel.pyx":548 * deltaA = 1.0 / aeraPixel * * outCount[bin0_min, bin1_min] += deltaA * deltaL * deltaD #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_min, bin1_min] += data * deltaA * deltaL * deltaD * */ __pyx_t_83 = __pyx_v_bin0_min; __pyx_t_84 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_83, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_84, __pyx_pybuffernd_outCount.diminfo[1].strides) += ((__pyx_v_deltaA * __pyx_v_deltaL) * __pyx_v_deltaD);
549: outData[bin0_min, bin1_min] += data * deltaA * deltaL * deltaD
/* "splitPixel.pyx":549 * * 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_89 = __pyx_v_bin0_min; __pyx_t_90 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_89, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_90, __pyx_pybuffernd_outData.diminfo[1].strides) += (((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaL) * __pyx_v_deltaD);
550:
551: outCount[bin0_min, bin1_max] += deltaA * deltaL * deltaU
/* "splitPixel.pyx":551 * 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_91 = __pyx_v_bin0_min; __pyx_t_92 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_91, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_92, __pyx_pybuffernd_outCount.diminfo[1].strides) += ((__pyx_v_deltaA * __pyx_v_deltaL) * __pyx_v_deltaU);
552: outData[bin0_min, bin1_max] += data * deltaA * deltaL * deltaU
/* "splitPixel.pyx":552 * * 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_93 = __pyx_v_bin0_min; __pyx_t_94 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_93, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_94, __pyx_pybuffernd_outData.diminfo[1].strides) += (((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaL) * __pyx_v_deltaU);
553:
554: outCount[bin0_max, bin1_min] += deltaA * deltaR * deltaD
/* "splitPixel.pyx":554 * 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_95 = __pyx_v_bin0_max; __pyx_t_96 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_95, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_96, __pyx_pybuffernd_outCount.diminfo[1].strides) += ((__pyx_v_deltaA * __pyx_v_deltaR) * __pyx_v_deltaD);
555: outData[bin0_max, bin1_min] += data * deltaA * deltaR * deltaD
/* "splitPixel.pyx":555 * * 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_97 = __pyx_v_bin0_max; __pyx_t_98 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_97, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_98, __pyx_pybuffernd_outData.diminfo[1].strides) += (((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaR) * __pyx_v_deltaD);
556:
557: outCount[bin0_max, bin1_max] += deltaA * deltaR * deltaU
/* "splitPixel.pyx":557 * 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_99 = __pyx_v_bin0_max; __pyx_t_100 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_99, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_100, __pyx_pybuffernd_outCount.diminfo[1].strides) += ((__pyx_v_deltaA * __pyx_v_deltaR) * __pyx_v_deltaU);
558: outData[bin0_max, bin1_max] += data * deltaA * deltaR * deltaU
/* "splitPixel.pyx":558 * * 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_101 = __pyx_v_bin0_max; __pyx_t_102 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_101, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_102, __pyx_pybuffernd_outData.diminfo[1].strides) += (((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaR) * __pyx_v_deltaU);
559: for i in range(bin0_min + 1, bin0_max):
/* "splitPixel.pyx":559 * 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_103 = __pyx_v_bin0_max; for (__pyx_t_104 = (__pyx_v_bin0_min + 1); __pyx_t_104<
__pyx_t_103; __pyx_t_104+=1) { __pyx_v_i = __pyx_t_104;
560: outCount[i, bin1_min] += deltaA * deltaD
/* "splitPixel.pyx":560 * 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_105 = __pyx_v_i; __pyx_t_106 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_105, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_106, __pyx_pybuffernd_outCount.diminfo[1].strides) += (__pyx_v_deltaA * __pyx_v_deltaD);
561: outData[i, bin1_min] += data * deltaA * deltaD
/* "splitPixel.pyx":561 * 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_107 = __pyx_v_i; __pyx_t_108 = __pyx_v_bin1_min; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_107, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_108, __pyx_pybuffernd_outData.diminfo[1].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaD);
562: for j in range(bin1_min + 1, bin1_max):
/* "splitPixel.pyx":562 * 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_109 = __pyx_v_bin1_max; for (__pyx_t_110 = (__pyx_v_bin1_min + 1); __pyx_t_110<
__pyx_t_109; __pyx_t_110+=1) { __pyx_v_j = __pyx_t_110;
563: outCount[i, j] += deltaA
/* "splitPixel.pyx":563 * 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_111 = __pyx_v_i; __pyx_t_112 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_111, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_112, __pyx_pybuffernd_outCount.diminfo[1].strides) += __pyx_v_deltaA;
564: outData[i, j] += data * deltaA
/* "splitPixel.pyx":564 * 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_113 = __pyx_v_i; __pyx_t_114 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_113, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_114, __pyx_pybuffernd_outData.diminfo[1].strides) += (__pyx_v_data * __pyx_v_deltaA); }
565: outCount[i, bin1_max] += deltaA * deltaU
/* "splitPixel.pyx":565 * 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_109 = __pyx_v_i; __pyx_t_110 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_109, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_110, __pyx_pybuffernd_outCount.diminfo[1].strides) += (__pyx_v_deltaA * __pyx_v_deltaU);
566: outData[i, bin1_max] += data * deltaA * deltaU
/* "splitPixel.pyx":566 * 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_115 = __pyx_v_i; __pyx_t_116 = __pyx_v_bin1_max; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_115, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_116, __pyx_pybuffernd_outData.diminfo[1].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaU); }
567: for j in range(bin1_min + 1, bin1_max):
/* "splitPixel.pyx":567 * 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_103 = __pyx_v_bin1_max; for (__pyx_t_104 = (__pyx_v_bin1_min + 1); __pyx_t_104<
__pyx_t_103; __pyx_t_104+=1) { __pyx_v_j = __pyx_t_104;
568: outCount[bin0_min, j] += deltaA * deltaL
/* "splitPixel.pyx":568 * 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_117 = __pyx_v_bin0_min; __pyx_t_118 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_117, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_118, __pyx_pybuffernd_outCount.diminfo[1].strides) += (__pyx_v_deltaA * __pyx_v_deltaL);
569: outData[bin0_min, j] += data * deltaA * deltaL
/* "splitPixel.pyx":569 * 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_119 = __pyx_v_bin0_min; __pyx_t_120 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_119, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_120, __pyx_pybuffernd_outData.diminfo[1].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaL);
570:
571: outCount[bin0_max, j] += deltaA * deltaR
/* "splitPixel.pyx":571 * outData[bin0_min, j] += data * deltaA * deltaL * * outCount[bin0_max, j] += deltaA * deltaR #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* outData[bin0_max, j] += data * deltaA * deltaR * */ __pyx_t_121 = __pyx_v_bin0_max; __pyx_t_122 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_121, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_122, __pyx_pybuffernd_outCount.diminfo[1].strides) += (__pyx_v_deltaA * __pyx_v_deltaR);
572: outData[bin0_max, j] += data * deltaA * deltaR
/* "splitPixel.pyx":572 * * outCount[bin0_max, j] += deltaA * deltaR * outData[bin0_max, j] += data * deltaA * deltaR #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * #with nogil: */ __pyx_t_123 = __pyx_v_bin0_max; __pyx_t_124 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_123, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_124, __pyx_pybuffernd_outData.diminfo[1].strides) += ((__pyx_v_data * __pyx_v_deltaA) * __pyx_v_deltaR); } } __pyx_L48:; } __pyx_L44:; __pyx_L29_continue:; }
573:
574: #with nogil:
575: for i in range(bins0):
/* "splitPixel.pyx":575 * * #with nogil: * for i in range(bins0): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for j in range(bins1): * if outCount[i, j] > epsilon: */ __pyx_t_11 = __pyx_v_bins0; for (__pyx_t_2 = 0; __pyx_t_2<
__pyx_t_11; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2;
576: for j in range(bins1):
/* "splitPixel.pyx":576 * #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_103 = __pyx_v_bins1; for (__pyx_t_104 = 0; __pyx_t_104<
__pyx_t_103; __pyx_t_104+=1) { __pyx_v_j = __pyx_t_104;
577: if outCount[i, j] > epsilon:
/* "splitPixel.pyx":577 * 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_125 = __pyx_v_i; __pyx_t_126 = __pyx_v_j; __pyx_t_21 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_125, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_126, __pyx_pybuffernd_outCount.diminfo[1].strides)) > __pyx_v_epsilon); if (__pyx_t_21) {
578: outMerge[i, j] = outData[i, j] / outCount[i, j]
/* "splitPixel.pyx":578 * for j in range(bins1): * if outCount[i, j] > epsilon: * outMerge[i, j] = outData[i, j] / outCount[i, j] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* else: * outMerge[i, j] = cdummy */ __pyx_t_127 = __pyx_v_i; __pyx_t_128 = __pyx_v_j; __pyx_t_129 = __pyx_v_i; __pyx_t_130 = __pyx_v_j; __pyx_t_131 = __pyx_v_i; __pyx_t_132 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.buf, __pyx_t_131, __pyx_pybuffernd_outMerge.diminfo[0].strides, __pyx_t_132, __pyx_pybuffernd_outMerge.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outData.rcbuffer->pybuffer.buf, __pyx_t_127, __pyx_pybuffernd_outData.diminfo[0].strides, __pyx_t_128, __pyx_pybuffernd_outData.diminfo[1].strides)) / (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outCount.rcbuffer->pybuffer.buf, __pyx_t_129, __pyx_pybuffernd_outCount.diminfo[0].strides, __pyx_t_130, __pyx_pybuffernd_outCount.diminfo[1].strides))); goto __pyx_L61; } /*else*/ {
579: else:
580: outMerge[i, j] = cdummy
/* "splitPixel.pyx":580 * outMerge[i, j] = outData[i, j] / outCount[i, j] * else: * outMerge[i, j] = cdummy #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* return outMerge.T, edges0, edges1, outData.T, outCount.T * */ __pyx_t_133 = __pyx_v_i; __pyx_t_134 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outMerge.rcbuffer->pybuffer.buf, __pyx_t_133, __pyx_pybuffernd_outMerge.diminfo[0].strides, __pyx_t_134, __pyx_pybuffernd_outMerge.diminfo[1].strides) = __pyx_v_cdummy; } __pyx_L61:; } } }
581: return outMerge.T, edges0, edges1, outData.T, outCount.T
/* "splitPixel.pyx":581 * else: * outMerge[i, j] = cdummy * return outMerge.T, edges0, edges1, outData.T, outCount.T #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_outMerge), __pyx_n_s__T); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_outData), __pyx_n_s__T); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_outCount), __pyx_n_s__T); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_14 = PyTuple_New(5); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_edges0)); PyTuple_SET_ITEM(__pyx_t_14, 1, ((PyObject *)__pyx_v_edges0)); __Pyx_GIVEREF(((PyObject *)__pyx_v_edges0)); __Pyx_INCREF(((PyObject *)__pyx_v_edges1)); PyTuple_SET_ITEM(__pyx_t_14, 2, ((PyObject *)__pyx_v_edges1)); __Pyx_GIVEREF(((PyObject *)__pyx_v_edges1)); PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_8 = 0; __pyx_t_4 = 0; __pyx_t_9 = 0; __pyx_r = ((PyObject *)__pyx_t_14); __pyx_t_14 = 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_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_14); __PYX_XDEC_MEMVIEW(&__pyx_t_25, 1); __PYX_XDEC_MEMVIEW(&__pyx_t_26, 1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cdata.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outCount.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outData.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outMerge.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("splitPixel.fullSplit2D", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cdata.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cpos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outCount.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outData.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outMerge.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_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_XDEC_MEMVIEW(&__pyx_v_cmask, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_cflat, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_cdark, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_cpolarization, 1); __PYX_XDEC_MEMVIEW(&__pyx_v_csolidangle, 1); __Pyx_XDECREF((PyObject *)__pyx_v_pos); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ static int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); __Pyx_RefNannyFinishContext(); return __pyx_r; }
582: