Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!DOCTYPE html>
<!-- Generated by Cython 0.21.2 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body.cython { font-family: courier; font-size: 12; }
.cython.tag { }
.cython.line { margin: 0em }
.cython.code { font-size: 9; color: #444444; display: none; margin: 0px 0px 0px 20px; }
.cython.code .py_c_api { color: red; }
.cython.code .py_macro_api { color: #FF7000; }
.cython.code .pyx_c_api { color: #FF3000; }
.cython.code .pyx_macro_api { color: #FF7000; }
.cython.code .refnanny { color: #FFA000; }
.cython.code .error_goto { color: #FFA000; }
.cython.code .coerce { color: #008000; border: 1px dotted #008000 }
.cython.code .py_attr { color: #FF0000; font-weight: bold; }
.cython.code .c_attr { color: #0000FF; }
.cython.code .py_call { color: #FF0000; font-weight: bold; }
.cython.code .c_call { color: #0000FF; }
.cython.score-0 {background-color: #FFFFff;}
.cython.score-1 {background-color: #FFFFe7;}
.cython.score-2 {background-color: #FFFFd4;}
.cython.score-3 {background-color: #FFFFc4;}
.cython.score-4 {background-color: #FFFFb6;}
.cython.score-5 {background-color: #FFFFaa;}
.cython.score-6 {background-color: #FFFF9f;}
.cython.score-7 {background-color: #FFFF96;}
.cython.score-8 {background-color: #FFFF8d;}
.cython.score-9 {background-color: #FFFF86;}
.cython.score-10 {background-color: #FFFF7f;}
.cython.score-11 {background-color: #FFFF79;}
.cython.score-12 {background-color: #FFFF73;}
.cython.score-13 {background-color: #FFFF6e;}
.cython.score-14 {background-color: #FFFF6a;}
.cython.score-15 {background-color: #FFFF66;}
.cython.score-16 {background-color: #FFFF62;}
.cython.score-17 {background-color: #FFFF5e;}
.cython.score-18 {background-color: #FFFF5b;}
.cython.score-19 {background-color: #FFFF57;}
.cython.score-20 {background-color: #FFFF55;}
.cython.score-21 {background-color: #FFFF52;}
.cython.score-22 {background-color: #FFFF4f;}
.cython.score-23 {background-color: #FFFF4d;}
.cython.score-24 {background-color: #FFFF4b;}
.cython.score-25 {background-color: #FFFF48;}
.cython.score-26 {background-color: #FFFF46;}
.cython.score-27 {background-color: #FFFF44;}
.cython.score-28 {background-color: #FFFF43;}
.cython.score-29 {background-color: #FFFF41;}
.cython.score-30 {background-color: #FFFF3f;}
.cython.score-31 {background-color: #FFFF3e;}
.cython.score-32 {background-color: #FFFF3c;}
.cython.score-33 {background-color: #FFFF3b;}
.cython.score-34 {background-color: #FFFF39;}
.cython.score-35 {background-color: #FFFF38;}
.cython.score-36 {background-color: #FFFF37;}
.cython.score-37 {background-color: #FFFF36;}
.cython.score-38 {background-color: #FFFF35;}
.cython.score-39 {background-color: #FFFF34;}
.cython.score-40 {background-color: #FFFF33;}
.cython.score-41 {background-color: #FFFF32;}
.cython.score-42 {background-color: #FFFF31;}
.cython.score-43 {background-color: #FFFF30;}
.cython.score-44 {background-color: #FFFF2f;}
.cython.score-45 {background-color: #FFFF2e;}
.cython.score-46 {background-color: #FFFF2d;}
.cython.score-47 {background-color: #FFFF2c;}
.cython.score-48 {background-color: #FFFF2b;}
.cython.score-49 {background-color: #FFFF2b;}
.cython.score-50 {background-color: #FFFF2a;}
.cython.score-51 {background-color: #FFFF29;}
.cython.score-52 {background-color: #FFFF29;}
.cython.score-53 {background-color: #FFFF28;}
.cython.score-54 {background-color: #FFFF27;}
.cython.score-55 {background-color: #FFFF27;}
.cython.score-56 {background-color: #FFFF26;}
.cython.score-57 {background-color: #FFFF26;}
.cython.score-58 {background-color: #FFFF25;}
.cython.score-59 {background-color: #FFFF24;}
.cython.score-60 {background-color: #FFFF24;}
.cython.score-61 {background-color: #FFFF23;}
.cython.score-62 {background-color: #FFFF23;}
.cython.score-63 {background-color: #FFFF22;}
.cython.score-64 {background-color: #FFFF22;}
.cython.score-65 {background-color: #FFFF22;}
.cython.score-66 {background-color: #FFFF21;}
.cython.score-67 {background-color: #FFFF21;}
.cython.score-68 {background-color: #FFFF20;}
.cython.score-69 {background-color: #FFFF20;}
.cython.score-70 {background-color: #FFFF1f;}
.cython.score-71 {background-color: #FFFF1f;}
.cython.score-72 {background-color: #FFFF1f;}
.cython.score-73 {background-color: #FFFF1e;}
.cython.score-74 {background-color: #FFFF1e;}
.cython.score-75 {background-color: #FFFF1e;}
.cython.score-76 {background-color: #FFFF1d;}
.cython.score-77 {background-color: #FFFF1d;}
.cython.score-78 {background-color: #FFFF1c;}
.cython.score-79 {background-color: #FFFF1c;}
.cython.score-80 {background-color: #FFFF1c;}
.cython.score-81 {background-color: #FFFF1c;}
.cython.score-82 {background-color: #FFFF1b;}
.cython.score-83 {background-color: #FFFF1b;}
.cython.score-84 {background-color: #FFFF1b;}
.cython.score-85 {background-color: #FFFF1a;}
.cython.score-86 {background-color: #FFFF1a;}
.cython.score-87 {background-color: #FFFF1a;}
.cython.score-88 {background-color: #FFFF1a;}
.cython.score-89 {background-color: #FFFF19;}
.cython.score-90 {background-color: #FFFF19;}
.cython.score-91 {background-color: #FFFF19;}
.cython.score-92 {background-color: #FFFF19;}
.cython.score-93 {background-color: #FFFF18;}
.cython.score-94 {background-color: #FFFF18;}
.cython.score-95 {background-color: #FFFF18;}
.cython.score-96 {background-color: #FFFF18;}
.cython.score-97 {background-color: #FFFF17;}
.cython.score-98 {background-color: #FFFF17;}
.cython.score-99 {background-color: #FFFF17;}
.cython.score-100 {background-color: #FFFF17;}
.cython.score-101 {background-color: #FFFF16;}
.cython.score-102 {background-color: #FFFF16;}
.cython.score-103 {background-color: #FFFF16;}
.cython.score-104 {background-color: #FFFF16;}
.cython.score-105 {background-color: #FFFF16;}
.cython.score-106 {background-color: #FFFF15;}
.cython.score-107 {background-color: #FFFF15;}
.cython.score-108 {background-color: #FFFF15;}
.cython.score-109 {background-color: #FFFF15;}
.cython.score-110 {background-color: #FFFF15;}
.cython.score-111 {background-color: #FFFF15;}
.cython.score-112 {background-color: #FFFF14;}
.cython.score-113 {background-color: #FFFF14;}
.cython.score-114 {background-color: #FFFF14;}
.cython.score-115 {background-color: #FFFF14;}
.cython.score-116 {background-color: #FFFF14;}
.cython.score-117 {background-color: #FFFF14;}
.cython.score-118 {background-color: #FFFF13;}
.cython.score-119 {background-color: #FFFF13;}
.cython.score-120 {background-color: #FFFF13;}
.cython.score-121 {background-color: #FFFF13;}
.cython.score-122 {background-color: #FFFF13;}
.cython.score-123 {background-color: #FFFF13;}
.cython.score-124 {background-color: #FFFF13;}
.cython.score-125 {background-color: #FFFF12;}
.cython.score-126 {background-color: #FFFF12;}
.cython.score-127 {background-color: #FFFF12;}
.cython.score-128 {background-color: #FFFF12;}
.cython.score-129 {background-color: #FFFF12;}
.cython.score-130 {background-color: #FFFF12;}
.cython.score-131 {background-color: #FFFF12;}
.cython.score-132 {background-color: #FFFF11;}
.cython.score-133 {background-color: #FFFF11;}
.cython.score-134 {background-color: #FFFF11;}
.cython.score-135 {background-color: #FFFF11;}
.cython.score-136 {background-color: #FFFF11;}
.cython.score-137 {background-color: #FFFF11;}
.cython.score-138 {background-color: #FFFF11;}
.cython.score-139 {background-color: #FFFF11;}
.cython.score-140 {background-color: #FFFF11;}
.cython.score-141 {background-color: #FFFF10;}
.cython.score-142 {background-color: #FFFF10;}
.cython.score-143 {background-color: #FFFF10;}
.cython.score-144 {background-color: #FFFF10;}
.cython.score-145 {background-color: #FFFF10;}
.cython.score-146 {background-color: #FFFF10;}
.cython.score-147 {background-color: #FFFF10;}
.cython.score-148 {background-color: #FFFF10;}
.cython.score-149 {background-color: #FFFF10;}
.cython.score-150 {background-color: #FFFF0f;}
.cython.score-151 {background-color: #FFFF0f;}
.cython.score-152 {background-color: #FFFF0f;}
.cython.score-153 {background-color: #FFFF0f;}
.cython.score-154 {background-color: #FFFF0f;}
.cython.score-155 {background-color: #FFFF0f;}
.cython.score-156 {background-color: #FFFF0f;}
.cython.score-157 {background-color: #FFFF0f;}
.cython.score-158 {background-color: #FFFF0f;}
.cython.score-159 {background-color: #FFFF0f;}
.cython.score-160 {background-color: #FFFF0f;}
.cython.score-161 {background-color: #FFFF0e;}
.cython.score-162 {background-color: #FFFF0e;}
.cython.score-163 {background-color: #FFFF0e;}
.cython.score-164 {background-color: #FFFF0e;}
.cython.score-165 {background-color: #FFFF0e;}
.cython.score-166 {background-color: #FFFF0e;}
.cython.score-167 {background-color: #FFFF0e;}
.cython.score-168 {background-color: #FFFF0e;}
.cython.score-169 {background-color: #FFFF0e;}
.cython.score-170 {background-color: #FFFF0e;}
.cython.score-171 {background-color: #FFFF0e;}
.cython.score-172 {background-color: #FFFF0e;}
.cython.score-173 {background-color: #FFFF0d;}
.cython.score-174 {background-color: #FFFF0d;}
.cython.score-175 {background-color: #FFFF0d;}
.cython.score-176 {background-color: #FFFF0d;}
.cython.score-177 {background-color: #FFFF0d;}
.cython.score-178 {background-color: #FFFF0d;}
.cython.score-179 {background-color: #FFFF0d;}
.cython.score-180 {background-color: #FFFF0d;}
.cython.score-181 {background-color: #FFFF0d;}
.cython.score-182 {background-color: #FFFF0d;}
.cython.score-183 {background-color: #FFFF0d;}
.cython.score-184 {background-color: #FFFF0d;}
.cython.score-185 {background-color: #FFFF0d;}
.cython.score-186 {background-color: #FFFF0d;}
.cython.score-187 {background-color: #FFFF0c;}
.cython.score-188 {background-color: #FFFF0c;}
.cython.score-189 {background-color: #FFFF0c;}
.cython.score-190 {background-color: #FFFF0c;}
.cython.score-191 {background-color: #FFFF0c;}
.cython.score-192 {background-color: #FFFF0c;}
.cython.score-193 {background-color: #FFFF0c;}
.cython.score-194 {background-color: #FFFF0c;}
.cython.score-195 {background-color: #FFFF0c;}
.cython.score-196 {background-color: #FFFF0c;}
.cython.score-197 {background-color: #FFFF0c;}
.cython.score-198 {background-color: #FFFF0c;}
.cython.score-199 {background-color: #FFFF0c;}
.cython.score-200 {background-color: #FFFF0c;}
.cython.score-201 {background-color: #FFFF0c;}
.cython.score-202 {background-color: #FFFF0c;}
.cython.score-203 {background-color: #FFFF0b;}
.cython.score-204 {background-color: #FFFF0b;}
.cython.score-205 {background-color: #FFFF0b;}
.cython.score-206 {background-color: #FFFF0b;}
.cython.score-207 {background-color: #FFFF0b;}
.cython.score-208 {background-color: #FFFF0b;}
.cython.score-209 {background-color: #FFFF0b;}
.cython.score-210 {background-color: #FFFF0b;}
.cython.score-211 {background-color: #FFFF0b;}
.cython.score-212 {background-color: #FFFF0b;}
.cython.score-213 {background-color: #FFFF0b;}
.cython.score-214 {background-color: #FFFF0b;}
.cython.score-215 {background-color: #FFFF0b;}
.cython.score-216 {background-color: #FFFF0b;}
.cython.score-217 {background-color: #FFFF0b;}
.cython.score-218 {background-color: #FFFF0b;}
.cython.score-219 {background-color: #FFFF0b;}
.cython.score-220 {background-color: #FFFF0b;}
.cython.score-221 {background-color: #FFFF0b;}
.cython.score-222 {background-color: #FFFF0a;}
.cython.score-223 {background-color: #FFFF0a;}
.cython.score-224 {background-color: #FFFF0a;}
.cython.score-225 {background-color: #FFFF0a;}
.cython.score-226 {background-color: #FFFF0a;}
.cython.score-227 {background-color: #FFFF0a;}
.cython.score-228 {background-color: #FFFF0a;}
.cython.score-229 {background-color: #FFFF0a;}
.cython.score-230 {background-color: #FFFF0a;}
.cython.score-231 {background-color: #FFFF0a;}
.cython.score-232 {background-color: #FFFF0a;}
.cython.score-233 {background-color: #FFFF0a;}
.cython.score-234 {background-color: #FFFF0a;}
.cython.score-235 {background-color: #FFFF0a;}
.cython.score-236 {background-color: #FFFF0a;}
.cython.score-237 {background-color: #FFFF0a;}
.cython.score-238 {background-color: #FFFF0a;}
.cython.score-239 {background-color: #FFFF0a;}
.cython.score-240 {background-color: #FFFF0a;}
.cython.score-241 {background-color: #FFFF0a;}
.cython.score-242 {background-color: #FFFF0a;}
.cython.score-243 {background-color: #FFFF0a;}
.cython.score-244 {background-color: #FFFF0a;}
.cython.score-245 {background-color: #FFFF0a;}
.cython.score-246 {background-color: #FFFF09;}
.cython.score-247 {background-color: #FFFF09;}
.cython.score-248 {background-color: #FFFF09;}
.cython.score-249 {background-color: #FFFF09;}
.cython.score-250 {background-color: #FFFF09;}
.cython.score-251 {background-color: #FFFF09;}
.cython.score-252 {background-color: #FFFF09;}
.cython.score-253 {background-color: #FFFF09;}
.cython.score-254 {background-color: #FFFF09;}.cython .hll { background-color: #ffffcc }
.cython { background: #f8f8f8; }
.cython .c { color: #408080; font-style: italic } /* Comment */
.cython .err { border: 1px solid #FF0000 } /* Error */
.cython .k { color: #008000; font-weight: bold } /* Keyword */
.cython .o { color: #666666 } /* Operator */
.cython .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.cython .cp { color: #BC7A00 } /* Comment.Preproc */
.cython .c1 { color: #408080; font-style: italic } /* Comment.Single */
.cython .cs { color: #408080; font-style: italic } /* Comment.Special */
.cython .gd { color: #A00000 } /* Generic.Deleted */
.cython .ge { font-style: italic } /* Generic.Emph */
.cython .gr { color: #FF0000 } /* Generic.Error */
.cython .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.cython .gi { color: #00A000 } /* Generic.Inserted */
.cython .go { color: #888888 } /* Generic.Output */
.cython .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.cython .gs { font-weight: bold } /* Generic.Strong */
.cython .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.cython .gt { color: #0044DD } /* Generic.Traceback */
.cython .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.cython .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.cython .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.cython .kp { color: #008000 } /* Keyword.Pseudo */
.cython .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.cython .kt { color: #B00040 } /* Keyword.Type */
.cython .m { color: #666666 } /* Literal.Number */
.cython .s { color: #BA2121 } /* Literal.String */
.cython .na { color: #7D9029 } /* Name.Attribute */
.cython .nb { color: #008000 } /* Name.Builtin */
.cython .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.cython .no { color: #880000 } /* Name.Constant */
.cython .nd { color: #AA22FF } /* Name.Decorator */
.cython .ni { color: #999999; font-weight: bold } /* Name.Entity */
.cython .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.cython .nf { color: #0000FF } /* Name.Function */
.cython .nl { color: #A0A000 } /* Name.Label */
.cython .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.cython .nt { color: #008000; font-weight: bold } /* Name.Tag */
.cython .nv { color: #19177C } /* Name.Variable */
.cython .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.cython .w { color: #bbbbbb } /* Text.Whitespace */
.cython .mb { color: #666666 } /* Literal.Number.Bin */
.cython .mf { color: #666666 } /* Literal.Number.Float */
.cython .mh { color: #666666 } /* Literal.Number.Hex */
.cython .mi { color: #666666 } /* Literal.Number.Integer */
.cython .mo { color: #666666 } /* Literal.Number.Oct */
.cython .sb { color: #BA2121 } /* Literal.String.Backtick */
.cython .sc { color: #BA2121 } /* Literal.String.Char */
.cython .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.cython .s2 { color: #BA2121 } /* Literal.String.Double */
.cython .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.cython .sh { color: #BA2121 } /* Literal.String.Heredoc */
.cython .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.cython .sx { color: #008000 } /* Literal.String.Other */
.cython .sr { color: #BB6688 } /* Literal.String.Regex */
.cython .s1 { color: #BA2121 } /* Literal.String.Single */
.cython .ss { color: #19177C } /* Literal.String.Symbol */
.cython .bp { color: #008000 } /* Name.Builtin.Pseudo */
.cython .vc { color: #19177C } /* Name.Variable.Class */
.cython .vg { color: #19177C } /* Name.Variable.Global */
.cython .vi { color: #19177C } /* Name.Variable.Instance */
.cython .il { color: #666666 } /* Literal.Number.Integer.Long */
</style>
<script>
function toggleDiv(id) {
theDiv = id.nextElementSibling
if (theDiv.style.display != 'block') theDiv.style.display = 'block';
else theDiv.style.display = 'none';
}
</script>
</head>
<body class="cython">
<p>Generated by Cython 0.21.2</p>
<p>Raw output: <a href="_gate_to_grid_map.c">_gate_to_grid_map.c</a></p>
<div class="cython"><pre class='cython line score-11' onclick='toggleDiv(this)'>+001: <span class="sd">&quot;&quot;&quot;</span></pre>
<pre class='cython code score-11'> __pyx_t_1 = <span class='py_c_api'>PyDict_New</span>();<span class='error_goto'> if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_test, __pyx_t_1) &lt; 0) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
</pre><pre class='cython line score-0'>&#xA0;002: <span class="sd">pyart.map._gate_to_grid_map</span></pre>
<pre class='cython line score-0'>&#xA0;003: <span class="sd">===========================</span></pre>
<pre class='cython line score-0'>&#xA0;004: </pre>
<pre class='cython line score-0'>&#xA0;005: <span class="sd">Cython classes and functions for efficient mapping of radar gates to</span></pre>
<pre class='cython line score-0'>&#xA0;006: <span class="sd">a uniform grid.</span></pre>
<pre class='cython line score-0'>&#xA0;007: </pre>
<pre class='cython line score-0'>&#xA0;008: <span class="sd">.. autosummary::</span></pre>
<pre class='cython line score-0'>&#xA0;009: <span class="sd"> :toctree: generated/</span></pre>
<pre class='cython line score-0'>&#xA0;010: <span class="sd"> :template: dev_template.rst</span></pre>
<pre class='cython line score-0'>&#xA0;011: </pre>
<pre class='cython line score-0'>&#xA0;012: <span class="sd"> GateToGridMapper</span></pre>
<pre class='cython line score-0'>&#xA0;013: <span class="sd"> RoIFunction</span></pre>
<pre class='cython line score-0'>&#xA0;014: <span class="sd"> ConstantRoI</span></pre>
<pre class='cython line score-0'>&#xA0;015: <span class="sd"> DistRoI</span></pre>
<pre class='cython line score-0'>&#xA0;016: <span class="sd"> DistBeamRoI</span></pre>
<pre class='cython line score-0'>&#xA0;017: </pre>
<pre class='cython line score-0'>&#xA0;018: <span class="sd">&quot;&quot;&quot;</span></pre>
<pre class='cython line score-0'>&#xA0;019: </pre>
<pre class='cython line score-0'>&#xA0;020: <span class="k">from</span> <span class="nn">libc.math</span> <span class="k">cimport</span> <span class="n">sqrt</span><span class="p">,</span> <span class="n">exp</span><span class="p">,</span> <span class="n">ceil</span><span class="p">,</span> <span class="n">floor</span><span class="p">,</span> <span class="n">sin</span><span class="p">,</span> <span class="n">cos</span><span class="p">,</span> <span class="n">tan</span><span class="p">,</span> <span class="n">asin</span><span class="p">,</span> <span class="n">isfinite</span></pre>
<pre class='cython line score-0'>&#xA0;021: <span class="k">from</span> <span class="nn">cython.view</span> <span class="k">cimport</span> <span class="n">array</span> <span class="k">as</span> <span class="n">cvarray</span></pre>
<pre class='cython line score-0'>&#xA0;022: </pre>
<pre class='cython line score-0'>&#xA0;023: <span class="k">cimport</span> <span class="nn">cython</span></pre>
<pre class='cython line score-0'>&#xA0;024: </pre>
<pre class='cython line score-0'>&#xA0;025: <span class="c"># constants</span></pre>
<pre class='cython line score-0' onclick='toggleDiv(this)'>+026: <span class="k">cdef</span> <span class="kt">int</span> <span class="nf">BARNES</span> <span class="o">=</span> <span class="mf">0</span></pre>
<pre class='cython code score-0'> __pyx_v_5pyart_3map_17_gate_to_grid_map_BARNES = 0;
</pre><pre class='cython line score-0' onclick='toggleDiv(this)'>+027: <span class="k">cdef</span> <span class="kt">int</span> <span class="nf">CRESSMAN</span> <span class="o">=</span> <span class="mf">0</span></pre>
<pre class='cython code score-0'> __pyx_v_5pyart_3map_17_gate_to_grid_map_CRESSMAN = 0;
</pre><pre class='cython line score-0' onclick='toggleDiv(this)'>+028: <span class="k">cdef</span> <span class="kt">float</span> <span class="nf">PI</span> <span class="o">=</span> <span class="mf">3.141592653589793</span></pre>
<pre class='cython code score-0'> __pyx_v_5pyart_3map_17_gate_to_grid_map_PI = 3.141592653589793;
</pre><pre class='cython line score-0' onclick='toggleDiv(this)'>+029: <span class="k">cdef</span> <span class="kt">float</span> <span class="nf">R</span> <span class="o">=</span> <span class="mf">8494666.66666667</span> <span class="c"># 4/3 earths radius of 6371 km in meters</span></pre>
<pre class='cython code score-0'> __pyx_v_5pyart_3map_17_gate_to_grid_map_R = 8494666.66666667;
</pre><pre class='cython line score-0'>&#xA0;030: </pre>
<pre class='cython line score-0'>&#xA0;031: <span class="c"># This definition can be added to a .pxd file so others can defined fast</span></pre>
<pre class='cython line score-0'>&#xA0;032: <span class="c"># RoI functions</span></pre>
<pre class='cython line score-0' onclick='toggleDiv(this)'>+033: <span class="k">cdef</span> <span class="k">class</span> <span class="nf">RoIFunction</span><span class="p">:</span></pre>
<pre class='cython code score-0'>struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_RoIFunction {
PyObject_HEAD
struct __pyx_vtabstruct_5pyart_3map_17_gate_to_grid_map_RoIFunction *__pyx_vtab;
};
/* … */
struct __pyx_vtabstruct_5pyart_3map_17_gate_to_grid_map_RoIFunction {
float (*get_roi)(struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_RoIFunction *, float, float, float, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5pyart_3map_17_gate_to_grid_map_RoIFunction *__pyx_vtabptr_5pyart_3map_17_gate_to_grid_map_RoIFunction;
</pre><pre class='cython line score-0'>&#xA0;034: <span class="sd">&quot;&quot;&quot; A class for storing radius of interest calculations. &quot;&quot;&quot;</span></pre>
<pre class='cython line score-0'>&#xA0;035: </pre>
<pre class='cython line score-122' onclick='toggleDiv(this)'>+036: <span class="k">cpdef</span> <span class="kt">float</span> <span class="nf">get_roi</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="nb">float</span> <span class="n">z</span><span class="p">,</span> <span class="nb">float</span> <span class="n">y</span><span class="p">,</span> <span class="nb">float</span> <span class="n">x</span><span class="p">):</span></pre>
<pre class='cython code score-122'>static PyObject *__pyx_pw_5pyart_3map_17_gate_to_grid_map_11RoIFunction_1get_roi(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static float __pyx_f_5pyart_3map_17_gate_to_grid_map_11RoIFunction_get_roi(CYTHON_UNUSED struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_RoIFunction *__pyx_v_self, CYTHON_UNUSED float __pyx_v_z, CYTHON_UNUSED float __pyx_v_y, CYTHON_UNUSED float __pyx_v_x, int __pyx_skip_dispatch) {
float __pyx_r;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_roi", 0);
/* Check if called by wrapper */
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dictoffset != 0)) {
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_get_roi);<span class='error_goto'> if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5pyart_3map_17_gate_to_grid_map_11RoIFunction_1get_roi)) {
__pyx_t_3 = <span class='py_c_api'>PyFloat_FromDouble</span>(__pyx_v_z);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
__pyx_t_4 = <span class='py_c_api'>PyFloat_FromDouble</span>(__pyx_v_y);<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
__pyx_t_5 = <span class='py_c_api'>PyFloat_FromDouble</span>(__pyx_v_x);<span class='error_goto'> if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);
__pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL;
__pyx_t_8 = 0;
if (CYTHON_COMPILING_IN_CPYTHON &amp;&amp; unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_6))) {
__pyx_t_7 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_6);
if (likely(__pyx_t_7)) {
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_6);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_7);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_6, function);
__pyx_t_8 = 1;
}
}
__pyx_t_9 = <span class='py_c_api'>PyTuple_New</span>(3+__pyx_t_8);<span class='error_goto'> if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9);
if (__pyx_t_7) {
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 0, __pyx_t_7); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_7); __pyx_t_7 = NULL;
}
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);
__pyx_t_3 = 0;
__pyx_t_4 = 0;
__pyx_t_5 = 0;
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_6, __pyx_t_9, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0;
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_10 = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(__pyx_t_2);<span class='error_goto'> if (unlikely((__pyx_t_10 == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_10;
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
}
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
}
/* … */
/* function exit code */
__pyx_L1_error:;
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9);
<span class='pyx_c_api'>__Pyx_WriteUnraisable</span>("pyart.map._gate_to_grid_map.RoIFunction.get_roi", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
__pyx_r = 0;
__pyx_L0:;
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_5pyart_3map_17_gate_to_grid_map_11RoIFunction_1get_roi(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyart_3map_17_gate_to_grid_map_11RoIFunction_get_roi[] = " Return the radius of influence for coordinates in meters. ";
static PyObject *__pyx_pw_5pyart_3map_17_gate_to_grid_map_11RoIFunction_1get_roi(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
float __pyx_v_z;
float __pyx_v_y;
float __pyx_v_x;
PyObject *__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_roi (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&amp;__pyx_n_s_z,&amp;__pyx_n_s_y,&amp;__pyx_n_s_x,0};
PyObject* values[3] = {0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
switch (pos_args) {
case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);
case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);
case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds);
switch (pos_args) {
case 0:
if (likely((values[0] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
else {
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("get_roi", 1, 3, 3, 1); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
case 2:
if (likely((values[2] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
else {
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("get_roi", 1, 3, 3, 2); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
}
if (unlikely(kw_args &gt; 0)) {
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_roi") &lt; 0)) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
} else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);
values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);
values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);
}
__pyx_v_z = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(values[0]);<span class='error_goto'> if (unlikely((__pyx_v_z == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
__pyx_v_y = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(values[1]);<span class='error_goto'> if (unlikely((__pyx_v_y == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
__pyx_v_x = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(values[2]);<span class='error_goto'> if (unlikely((__pyx_v_x == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("get_roi", 1, 3, 3, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
__pyx_L3_error:;
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyart.map._gate_to_grid_map.RoIFunction.get_roi", __pyx_clineno, __pyx_lineno, __pyx_filename);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_5pyart_3map_17_gate_to_grid_map_11RoIFunction_get_roi(((struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_RoIFunction *)__pyx_v_self), __pyx_v_z, __pyx_v_y, __pyx_v_x);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_5pyart_3map_17_gate_to_grid_map_11RoIFunction_get_roi(struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_RoIFunction *__pyx_v_self, float __pyx_v_z, float __pyx_v_y, float __pyx_v_x) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_roi", 0);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
__pyx_t_1 = <span class='py_c_api'>PyFloat_FromDouble</span>(__pyx_f_5pyart_3map_17_gate_to_grid_map_11RoIFunction_get_roi(__pyx_v_self, __pyx_v_z, __pyx_v_y, __pyx_v_x, 1));<span class='error_goto'> if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyart.map._gate_to_grid_map.RoIFunction.get_roi", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
</pre><pre class='cython line score-0'>&#xA0;037: <span class="sd">&quot;&quot;&quot; Return the radius of influence for coordinates in meters. &quot;&quot;&quot;</span></pre>
<pre class='cython line score-0' onclick='toggleDiv(this)'>+038: <span class="k">return</span> <span class="mf">0</span></pre>
<pre class='cython code score-0'> __pyx_r = 0.0;
goto __pyx_L0;
</pre><pre class='cython line score-0'>&#xA0;039: </pre>
<pre class='cython line score-0'>&#xA0;040: </pre>
<pre class='cython line score-0' onclick='toggleDiv(this)'>+041: <span class="k">cdef</span> <span class="k">class</span> <span class="nf">ConstantRoI</span><span class="p">(</span><span class="n">RoIFunction</span><span class="p">):</span></pre>
<pre class='cython code score-0'>struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_ConstantRoI {
struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_RoIFunction __pyx_base;
float constant_roi;
};
/* … */
struct __pyx_vtabstruct_5pyart_3map_17_gate_to_grid_map_ConstantRoI {
struct __pyx_vtabstruct_5pyart_3map_17_gate_to_grid_map_RoIFunction __pyx_base;
};
static struct __pyx_vtabstruct_5pyart_3map_17_gate_to_grid_map_ConstantRoI *__pyx_vtabptr_5pyart_3map_17_gate_to_grid_map_ConstantRoI;
</pre><pre class='cython line score-0'>&#xA0;042: <span class="sd">&quot;&quot;&quot; Constant radius of influence class. &quot;&quot;&quot;</span></pre>
<pre class='cython line score-0'>&#xA0;043: </pre>
<pre class='cython line score-0'>&#xA0;044: <span class="k">cdef</span> <span class="kt">float</span> <span class="nf">constant_roi</span></pre>
<pre class='cython line score-0'>&#xA0;045: </pre>
<pre class='cython line score-26' onclick='toggleDiv(this)'>+046: <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="nb">float</span> <span class="n">constant_roi</span><span class="p">):</span></pre>
<pre class='cython code score-26'>/* Python wrapper */
static int __pyx_pw_5pyart_3map_17_gate_to_grid_map_11ConstantRoI_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyart_3map_17_gate_to_grid_map_11ConstantRoI___init__[] = " intialize. ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_5pyart_3map_17_gate_to_grid_map_11ConstantRoI___init__;
#endif
static int __pyx_pw_5pyart_3map_17_gate_to_grid_map_11ConstantRoI_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
float __pyx_v_constant_roi;
int __pyx_r;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&amp;__pyx_n_s_constant_roi,0};
PyObject* values[1] = {0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
switch (pos_args) {
case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds);
switch (pos_args) {
case 0:
if (likely((values[0] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_constant_roi)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args &gt; 0)) {
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") &lt; 0)) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
} else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 1) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);
}
__pyx_v_constant_roi = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(values[0]);<span class='error_goto'> if (unlikely((__pyx_v_constant_roi == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 1, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
__pyx_L3_error:;
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyart.map._gate_to_grid_map.ConstantRoI.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return -1;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_5pyart_3map_17_gate_to_grid_map_11ConstantRoI___init__(((struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_ConstantRoI *)__pyx_v_self), __pyx_v_constant_roi);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static int __pyx_pf_5pyart_3map_17_gate_to_grid_map_11ConstantRoI___init__(struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_ConstantRoI *__pyx_v_self, float __pyx_v_constant_roi) {
int __pyx_r;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__", 0);
/* … */
/* function exit code */
__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
</pre><pre class='cython line score-0'>&#xA0;047: <span class="sd">&quot;&quot;&quot; intialize. &quot;&quot;&quot;</span></pre>
<pre class='cython line score-0' onclick='toggleDiv(this)'>+048: <span class="bp">self</span><span class="o">.</span><span class="n">constant_roi</span> <span class="o">=</span> <span class="n">constant_roi</span></pre>
<pre class='cython code score-0'> __pyx_v_self-&gt;constant_roi = __pyx_v_constant_roi;
</pre><pre class='cython line score-0'>&#xA0;049: </pre>
<pre class='cython line score-122' onclick='toggleDiv(this)'>+050: <span class="k">cpdef</span> <span class="kt">float</span> <span class="nf">get_roi</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="nb">float</span> <span class="n">z</span><span class="p">,</span> <span class="nb">float</span> <span class="n">y</span><span class="p">,</span> <span class="nb">float</span> <span class="n">x</span><span class="p">):</span></pre>
<pre class='cython code score-122'>static PyObject *__pyx_pw_5pyart_3map_17_gate_to_grid_map_11ConstantRoI_3get_roi(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static float __pyx_f_5pyart_3map_17_gate_to_grid_map_11ConstantRoI_get_roi(struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_ConstantRoI *__pyx_v_self, CYTHON_UNUSED float __pyx_v_z, CYTHON_UNUSED float __pyx_v_y, CYTHON_UNUSED float __pyx_v_x, int __pyx_skip_dispatch) {
float __pyx_r;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_roi", 0);
/* Check if called by wrapper */
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dictoffset != 0)) {
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_get_roi);<span class='error_goto'> if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5pyart_3map_17_gate_to_grid_map_11ConstantRoI_3get_roi)) {
__pyx_t_3 = <span class='py_c_api'>PyFloat_FromDouble</span>(__pyx_v_z);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
__pyx_t_4 = <span class='py_c_api'>PyFloat_FromDouble</span>(__pyx_v_y);<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
__pyx_t_5 = <span class='py_c_api'>PyFloat_FromDouble</span>(__pyx_v_x);<span class='error_goto'> if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);
__pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL;
__pyx_t_8 = 0;
if (CYTHON_COMPILING_IN_CPYTHON &amp;&amp; unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_6))) {
__pyx_t_7 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_6);
if (likely(__pyx_t_7)) {
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_6);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_7);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_6, function);
__pyx_t_8 = 1;
}
}
__pyx_t_9 = <span class='py_c_api'>PyTuple_New</span>(3+__pyx_t_8);<span class='error_goto'> if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9);
if (__pyx_t_7) {
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 0, __pyx_t_7); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_7); __pyx_t_7 = NULL;
}
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);
__pyx_t_3 = 0;
__pyx_t_4 = 0;
__pyx_t_5 = 0;
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_6, __pyx_t_9, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0;
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_10 = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(__pyx_t_2);<span class='error_goto'> if (unlikely((__pyx_t_10 == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_10;
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
}
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
}
/* … */
/* function exit code */
__pyx_L1_error:;
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9);
<span class='pyx_c_api'>__Pyx_WriteUnraisable</span>("pyart.map._gate_to_grid_map.ConstantRoI.get_roi", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
__pyx_r = 0;
__pyx_L0:;
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_5pyart_3map_17_gate_to_grid_map_11ConstantRoI_3get_roi(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyart_3map_17_gate_to_grid_map_11ConstantRoI_2get_roi[] = " Return contstant radius of influence. ";
static PyObject *__pyx_pw_5pyart_3map_17_gate_to_grid_map_11ConstantRoI_3get_roi(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
float __pyx_v_z;
float __pyx_v_y;
float __pyx_v_x;
PyObject *__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_roi (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&amp;__pyx_n_s_z,&amp;__pyx_n_s_y,&amp;__pyx_n_s_x,0};
PyObject* values[3] = {0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
switch (pos_args) {
case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);
case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);
case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds);
switch (pos_args) {
case 0:
if (likely((values[0] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
else {
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("get_roi", 1, 3, 3, 1); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
case 2:
if (likely((values[2] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
else {
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("get_roi", 1, 3, 3, 2); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
}
if (unlikely(kw_args &gt; 0)) {
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_roi") &lt; 0)) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
} else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);
values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);
values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);
}
__pyx_v_z = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(values[0]);<span class='error_goto'> if (unlikely((__pyx_v_z == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
__pyx_v_y = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(values[1]);<span class='error_goto'> if (unlikely((__pyx_v_y == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
__pyx_v_x = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(values[2]);<span class='error_goto'> if (unlikely((__pyx_v_x == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("get_roi", 1, 3, 3, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
__pyx_L3_error:;
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyart.map._gate_to_grid_map.ConstantRoI.get_roi", __pyx_clineno, __pyx_lineno, __pyx_filename);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_5pyart_3map_17_gate_to_grid_map_11ConstantRoI_2get_roi(((struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_ConstantRoI *)__pyx_v_self), __pyx_v_z, __pyx_v_y, __pyx_v_x);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_5pyart_3map_17_gate_to_grid_map_11ConstantRoI_2get_roi(struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_ConstantRoI *__pyx_v_self, float __pyx_v_z, float __pyx_v_y, float __pyx_v_x) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_roi", 0);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
__pyx_t_1 = <span class='py_c_api'>PyFloat_FromDouble</span>(__pyx_f_5pyart_3map_17_gate_to_grid_map_11ConstantRoI_get_roi(__pyx_v_self, __pyx_v_z, __pyx_v_y, __pyx_v_x, 1));<span class='error_goto'> if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyart.map._gate_to_grid_map.ConstantRoI.get_roi", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
</pre><pre class='cython line score-0'>&#xA0;051: <span class="sd">&quot;&quot;&quot; Return contstant radius of influence. &quot;&quot;&quot;</span></pre>
<pre class='cython line score-0' onclick='toggleDiv(this)'>+052: <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">constant_roi</span></pre>
<pre class='cython code score-0'> __pyx_r = __pyx_v_self-&gt;constant_roi;
goto __pyx_L0;
</pre><pre class='cython line score-0'>&#xA0;053: </pre>
<pre class='cython line score-0'>&#xA0;054: </pre>
<pre class='cython line score-0' onclick='toggleDiv(this)'>+055: <span class="k">cdef</span> <span class="k">class</span> <span class="nf">DistRoI</span><span class="p">(</span><span class="n">RoIFunction</span><span class="p">):</span></pre>
<pre class='cython code score-0'>struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_DistRoI {
struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_RoIFunction __pyx_base;
float z_factor;
float xy_factor;
float min_radius;
int num_offsets;
__Pyx_memviewslice offsets;
};
/* … */
struct __pyx_vtabstruct_5pyart_3map_17_gate_to_grid_map_DistRoI {
struct __pyx_vtabstruct_5pyart_3map_17_gate_to_grid_map_RoIFunction __pyx_base;
};
static struct __pyx_vtabstruct_5pyart_3map_17_gate_to_grid_map_DistRoI *__pyx_vtabptr_5pyart_3map_17_gate_to_grid_map_DistRoI;
</pre><pre class='cython line score-0'>&#xA0;056: <span class="sd">&quot;&quot;&quot; Radius of influence which expands with distance from the radar. &quot;&quot;&quot;</span></pre>
<pre class='cython line score-0'>&#xA0;057: </pre>
<pre class='cython line score-0'>&#xA0;058: <span class="k">cdef</span> <span class="kt">float</span> <span class="nf">z_factor</span><span class="p">,</span> <span class="nf">xy_factor</span><span class="p">,</span> <span class="nf">min_radius</span></pre>
<pre class='cython line score-0'>&#xA0;059: <span class="k">cdef</span> <span class="kt">int</span> <span class="nf">num_offsets</span></pre>
<pre class='cython line score-0'>&#xA0;060: <span class="k">cdef</span> <span class="kt">float</span>[<span class="p">:,</span> <span class="p">:]</span> <span class="n">offsets</span></pre>
<pre class='cython line score-0'>&#xA0;061: </pre>
<pre class='cython line score-61' onclick='toggleDiv(this)'>+062: <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">z_factor</span><span class="p">,</span> <span class="n">xy_factor</span><span class="p">,</span> <span class="n">min_radius</span><span class="p">,</span> <span class="n">offsets</span><span class="p">):</span></pre>
<pre class='cython code score-61'>/* Python wrapper */
static int __pyx_pw_5pyart_3map_17_gate_to_grid_map_7DistRoI_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyart_3map_17_gate_to_grid_map_7DistRoI___init__[] = " initalize. ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_5pyart_3map_17_gate_to_grid_map_7DistRoI___init__;
#endif
static int __pyx_pw_5pyart_3map_17_gate_to_grid_map_7DistRoI_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_z_factor = 0;
PyObject *__pyx_v_xy_factor = 0;
PyObject *__pyx_v_min_radius = 0;
PyObject *__pyx_v_offsets = 0;
int __pyx_r;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&amp;__pyx_n_s_z_factor,&amp;__pyx_n_s_xy_factor,&amp;__pyx_n_s_min_radius,&amp;__pyx_n_s_offsets,0};
PyObject* values[4] = {0,0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
switch (pos_args) {
case 4: values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3);
case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);
case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);
case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds);
switch (pos_args) {
case 0:
if (likely((values[0] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_z_factor)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_xy_factor)) != 0)) kw_args--;
else {
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 4, 4, 1); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
case 2:
if (likely((values[2] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_min_radius)) != 0)) kw_args--;
else {
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 4, 4, 2); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
case 3:
if (likely((values[3] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_offsets)) != 0)) kw_args--;
else {
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 4, 4, 3); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
}
if (unlikely(kw_args &gt; 0)) {
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") &lt; 0)) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
} else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 4) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);
values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);
values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);
values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3);
}
__pyx_v_z_factor = values[0];
__pyx_v_xy_factor = values[1];
__pyx_v_min_radius = values[2];
__pyx_v_offsets = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 4, 4, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
__pyx_L3_error:;
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyart.map._gate_to_grid_map.DistRoI.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return -1;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_5pyart_3map_17_gate_to_grid_map_7DistRoI___init__(((struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_DistRoI *)__pyx_v_self), __pyx_v_z_factor, __pyx_v_xy_factor, __pyx_v_min_radius, __pyx_v_offsets);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static int __pyx_pf_5pyart_3map_17_gate_to_grid_map_7DistRoI___init__(struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_DistRoI *__pyx_v_self, PyObject *__pyx_v_z_factor, PyObject *__pyx_v_xy_factor, PyObject *__pyx_v_min_radius, PyObject *__pyx_v_offsets) {
PyObject *__pyx_v_i = NULL;
PyObject *__pyx_v_z_offset = NULL;
PyObject *__pyx_v_y_offset = NULL;
PyObject *__pyx_v_x_offset = NULL;
int __pyx_r;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__", 0);
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5);
__PYX_XDEC_MEMVIEW(&amp;__pyx_t_6, 1);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11);
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyart.map._gate_to_grid_map.DistRoI.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_i);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_z_offset);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_y_offset);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_x_offset);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
</pre><pre class='cython line score-0'>&#xA0;063: <span class="sd">&quot;&quot;&quot; initalize. &quot;&quot;&quot;</span></pre>
<pre class='cython line score-5' onclick='toggleDiv(this)'>+064: <span class="bp">self</span><span class="o">.</span><span class="n">z_factor</span> <span class="o">=</span> <span class="n">z_factor</span></pre>
<pre class='cython code score-5'> __pyx_t_1 = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(__pyx_v_z_factor);<span class='error_goto'> if (unlikely((__pyx_t_1 == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
__pyx_v_self-&gt;z_factor = __pyx_t_1;
</pre><pre class='cython line score-5' onclick='toggleDiv(this)'>+065: <span class="bp">self</span><span class="o">.</span><span class="n">xy_factor</span> <span class="o">=</span> <span class="n">xy_factor</span></pre>
<pre class='cython code score-5'> __pyx_t_1 = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(__pyx_v_xy_factor);<span class='error_goto'> if (unlikely((__pyx_t_1 == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
__pyx_v_self-&gt;xy_factor = __pyx_t_1;
</pre><pre class='cython line score-5' onclick='toggleDiv(this)'>+066: <span class="bp">self</span><span class="o">.</span><span class="n">min_radius</span> <span class="o">=</span> <span class="n">min_radius</span></pre>
<pre class='cython code score-5'> __pyx_t_1 = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(__pyx_v_min_radius);<span class='error_goto'> if (unlikely((__pyx_t_1 == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
__pyx_v_self-&gt;min_radius = __pyx_t_1;
</pre><pre class='cython line score-0'>&#xA0;067: </pre>
<pre class='cython line score-5' onclick='toggleDiv(this)'>+068: <span class="bp">self</span><span class="o">.</span><span class="n">num_offsets</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">offsets</span><span class="p">)</span></pre>
<pre class='cython code score-5'> __pyx_t_2 = <span class='py_c_api'>PyObject_Length</span>(__pyx_v_offsets);<span class='error_goto'> if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
__pyx_v_self-&gt;num_offsets = __pyx_t_2;
</pre><pre class='cython line score-0'>&#xA0;069: <span class="c"># does this array need to be explicitly de-allocated when the</span></pre>
<pre class='cython line score-0'>&#xA0;070: <span class="c"># class instance is removed?</span></pre>
<pre class='cython line score-11' onclick='toggleDiv(this)'>+071: <span class="bp">self</span><span class="o">.</span><span class="n">offsets</span> <span class="o">=</span> <span class="n">cvarray</span><span class="p">(</span></pre>
<pre class='cython code score-11'> __pyx_t_3 = <span class='py_c_api'>PyDict_New</span>();<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
/* … */
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(((PyObject *)((PyObject *)__pyx_array_type)), __pyx_empty_tuple, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_dsds_float</span>(__pyx_t_5);
if (unlikely(!__pyx_t_6.memview)) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
__PYX_XDEC_MEMVIEW(&amp;__pyx_v_self-&gt;offsets, 0);
__pyx_v_self-&gt;offsets = __pyx_t_6;
__pyx_t_6.memview = NULL;
__pyx_t_6.data = NULL;
</pre><pre class='cython line score-29' onclick='toggleDiv(this)'>+072: <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">num_offsets</span><span class="p">,</span> <span class="mf">3</span><span class="p">),</span> <span class="n">itemsize</span><span class="o">=</span><span class="n">sizeof</span><span class="p">(</span><span class="nb">float</span><span class="p">),</span> <span class="n">format</span><span class="o">=</span><span class="s">&#39;f&#39;</span><span class="p">)</span></pre>
<pre class='cython code score-29'> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyInt_From_int</span>(__pyx_v_self-&gt;num_offsets);<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
__pyx_t_5 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 0, __pyx_t_4);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_int_3);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 1, __pyx_int_3);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_int_3);
__pyx_t_4 = 0;
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) &lt; 0) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyInt_FromSize_t</span>((sizeof(float)));<span class='error_goto'> if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_itemsize, __pyx_t_5) &lt; 0) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_format, __pyx_n_s_f) &lt; 0) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
</pre><pre class='cython line score-0'>&#xA0;073: </pre>
<pre class='cython line score-109' onclick='toggleDiv(this)'>+074: <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="p">(</span><span class="n">z_offset</span><span class="p">,</span> <span class="n">y_offset</span><span class="p">,</span> <span class="n">x_offset</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">offsets</span><span class="p">):</span></pre>
<pre class='cython code score-109'> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_int_0);
__pyx_t_5 = __pyx_int_0;
if (likely(<span class='py_c_api'>PyList_CheckExact</span>(__pyx_v_offsets)) || <span class='py_c_api'>PyTuple_CheckExact</span>(__pyx_v_offsets)) {
__pyx_t_3 = __pyx_v_offsets; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); __pyx_t_2 = 0;
__pyx_t_7 = NULL;
} else {
__pyx_t_2 = -1; __pyx_t_3 = <span class='py_c_api'>PyObject_GetIter</span>(__pyx_v_offsets);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
__pyx_t_7 = Py_TYPE(__pyx_t_3)-&gt;tp_iternext;<span class='error_goto'> if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
}
for (;;) {
if (likely(!__pyx_t_7)) {
if (likely(<span class='py_c_api'>PyList_CheckExact</span>(__pyx_t_3))) {
if (__pyx_t_2 &gt;= <span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = <span class='py_macro_api'>PyList_GET_ITEM</span>(__pyx_t_3, __pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); __pyx_t_2++;<span class='error_goto'> if (unlikely(0 &lt; 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
#else
__pyx_t_4 = <span class='py_macro_api'>PySequence_ITEM</span>(__pyx_t_3, __pyx_t_2); __pyx_t_2++;<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
#endif
} else {
if (__pyx_t_2 &gt;= <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_t_3, __pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); __pyx_t_2++;<span class='error_goto'> if (unlikely(0 &lt; 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
#else
__pyx_t_4 = <span class='py_macro_api'>PySequence_ITEM</span>(__pyx_t_3, __pyx_t_2); __pyx_t_2++;<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
#endif
}
} else {
__pyx_t_4 = __pyx_t_7(__pyx_t_3);
if (unlikely(!__pyx_t_4)) {
PyObject* exc_type = <span class='py_c_api'>PyErr_Occurred</span>();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || <span class='py_c_api'>PyErr_GivenExceptionMatches</span>(exc_type, PyExc_StopIteration))) <span class='py_c_api'>PyErr_Clear</span>();
else <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
}
break;
}
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
}
if ((likely(<span class='py_c_api'>PyTuple_CheckExact</span>(__pyx_t_4))) || (<span class='py_c_api'>PyList_CheckExact</span>(__pyx_t_4))) {
PyObject* sequence = __pyx_t_4;
#if CYTHON_COMPILING_IN_CPYTHON
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = <span class='py_c_api'>PySequence_Size</span>(sequence);
#endif
if (unlikely(size != 3)) {
if (size &gt; 3) <span class='pyx_c_api'>__Pyx_RaiseTooManyValuesError</span>(3);
else if (size &gt;= 0) <span class='pyx_c_api'>__Pyx_RaiseNeedMoreValuesError</span>(size);
<span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(<span class='py_c_api'>PyTuple_CheckExact</span>(sequence))) {
__pyx_t_8 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(sequence, 0);
__pyx_t_9 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(sequence, 1);
__pyx_t_10 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(sequence, 2);
} else {
__pyx_t_8 = <span class='py_macro_api'>PyList_GET_ITEM</span>(sequence, 0);
__pyx_t_9 = <span class='py_macro_api'>PyList_GET_ITEM</span>(sequence, 1);
__pyx_t_10 = <span class='py_macro_api'>PyList_GET_ITEM</span>(sequence, 2);
}
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_8);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_9);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_10);
#else
__pyx_t_8 = <span class='py_macro_api'>PySequence_ITEM</span>(sequence, 0);<span class='error_goto'> if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8);
__pyx_t_9 = <span class='py_macro_api'>PySequence_ITEM</span>(sequence, 1);<span class='error_goto'> if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9);
__pyx_t_10 = <span class='py_macro_api'>PySequence_ITEM</span>(sequence, 2);<span class='error_goto'> if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_10);
#endif
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
} else {
Py_ssize_t index = -1;
__pyx_t_11 = <span class='py_c_api'>PyObject_GetIter</span>(__pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_11);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_12 = Py_TYPE(__pyx_t_11)-&gt;tp_iternext;
index = 0; __pyx_t_8 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_8)) goto __pyx_L5_unpacking_failed;
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8);
index = 1; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L5_unpacking_failed;
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9);
index = 2; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L5_unpacking_failed;
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_10);
if (<span class='pyx_c_api'>__Pyx_IternextUnpackEndCheck</span>(__pyx_t_12(__pyx_t_11), 3) &lt; 0) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
__pyx_t_12 = NULL;
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_11); __pyx_t_11 = 0;
goto __pyx_L6_unpacking_done;
__pyx_L5_unpacking_failed:;
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_11); __pyx_t_11 = 0;
__pyx_t_12 = NULL;
if (<span class='pyx_c_api'>__Pyx_IterFinish</span>() == 0) <span class='pyx_c_api'>__Pyx_RaiseNeedMoreValuesError</span>(index);
<span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
__pyx_L6_unpacking_done:;
}
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_z_offset, __pyx_t_8);
__pyx_t_8 = 0;
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_y_offset, __pyx_t_9);
__pyx_t_9 = 0;
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_x_offset, __pyx_t_10);
__pyx_t_10 = 0;
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5);
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_i, __pyx_t_5);
__pyx_t_4 = <span class='py_c_api'>PyNumber_Add</span>(__pyx_t_5, __pyx_int_1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5);
__pyx_t_5 = __pyx_t_4;
__pyx_t_4 = 0;
/* … */
}
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
</pre><pre class='cython line score-14' onclick='toggleDiv(this)'>+075: <span class="bp">self</span><span class="o">.</span><span class="n">offsets</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="mf">0</span><span class="p">]</span> <span class="o">=</span> <span class="n">z_offset</span></pre>
<pre class='cython code score-14'> __pyx_t_1 = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(__pyx_v_z_offset);<span class='error_goto'> if (unlikely((__pyx_t_1 == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
if (unlikely(!__pyx_v_self-&gt;offsets.memview)) {<span class='py_c_api'>PyErr_SetString</span>(PyExc_AttributeError,"Memoryview is not initialized");<span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>}
__pyx_t_13 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_v_i);<span class='error_goto'> if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
__pyx_t_14 = __pyx_t_13;
__pyx_t_15 = 0;
__pyx_t_16 = -1;
if (__pyx_t_14 &lt; 0) {
__pyx_t_14 += __pyx_v_self-&gt;offsets.shape[0];
if (unlikely(__pyx_t_14 &lt; 0)) __pyx_t_16 = 0;
} else if (unlikely(__pyx_t_14 &gt;= __pyx_v_self-&gt;offsets.shape[0])) __pyx_t_16 = 0;
if (__pyx_t_15 &lt; 0) {
__pyx_t_15 += __pyx_v_self-&gt;offsets.shape[1];
if (unlikely(__pyx_t_15 &lt; 0)) __pyx_t_16 = 1;
} else if (unlikely(__pyx_t_15 &gt;= __pyx_v_self-&gt;offsets.shape[1])) __pyx_t_16 = 1;
if (unlikely(__pyx_t_16 != -1)) {
<span class='pyx_c_api'>__Pyx_RaiseBufferIndexError</span>(__pyx_t_16);
<span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
}
*((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self-&gt;offsets.data + __pyx_t_14 * __pyx_v_self-&gt;offsets.strides[0]) ) + __pyx_t_15 * __pyx_v_self-&gt;offsets.strides[1]) )) = __pyx_t_1;
</pre><pre class='cython line score-14' onclick='toggleDiv(this)'>+076: <span class="bp">self</span><span class="o">.</span><span class="n">offsets</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="mf">1</span><span class="p">]</span> <span class="o">=</span> <span class="n">y_offset</span></pre>
<pre class='cython code score-14'> __pyx_t_1 = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(__pyx_v_y_offset);<span class='error_goto'> if (unlikely((__pyx_t_1 == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
if (unlikely(!__pyx_v_self-&gt;offsets.memview)) {<span class='py_c_api'>PyErr_SetString</span>(PyExc_AttributeError,"Memoryview is not initialized");<span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>}
__pyx_t_13 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_v_i);<span class='error_goto'> if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
__pyx_t_17 = __pyx_t_13;
__pyx_t_18 = 1;
__pyx_t_16 = -1;
if (__pyx_t_17 &lt; 0) {
__pyx_t_17 += __pyx_v_self-&gt;offsets.shape[0];
if (unlikely(__pyx_t_17 &lt; 0)) __pyx_t_16 = 0;
} else if (unlikely(__pyx_t_17 &gt;= __pyx_v_self-&gt;offsets.shape[0])) __pyx_t_16 = 0;
if (__pyx_t_18 &lt; 0) {
__pyx_t_18 += __pyx_v_self-&gt;offsets.shape[1];
if (unlikely(__pyx_t_18 &lt; 0)) __pyx_t_16 = 1;
} else if (unlikely(__pyx_t_18 &gt;= __pyx_v_self-&gt;offsets.shape[1])) __pyx_t_16 = 1;
if (unlikely(__pyx_t_16 != -1)) {
<span class='pyx_c_api'>__Pyx_RaiseBufferIndexError</span>(__pyx_t_16);
<span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
}
*((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self-&gt;offsets.data + __pyx_t_17 * __pyx_v_self-&gt;offsets.strides[0]) ) + __pyx_t_18 * __pyx_v_self-&gt;offsets.strides[1]) )) = __pyx_t_1;
</pre><pre class='cython line score-14' onclick='toggleDiv(this)'>+077: <span class="bp">self</span><span class="o">.</span><span class="n">offsets</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="mf">2</span><span class="p">]</span> <span class="o">=</span> <span class="n">x_offset</span></pre>
<pre class='cython code score-14'> __pyx_t_1 = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(__pyx_v_x_offset);<span class='error_goto'> if (unlikely((__pyx_t_1 == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
if (unlikely(!__pyx_v_self-&gt;offsets.memview)) {<span class='py_c_api'>PyErr_SetString</span>(PyExc_AttributeError,"Memoryview is not initialized");<span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>}
__pyx_t_13 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_v_i);<span class='error_goto'> if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
__pyx_t_19 = __pyx_t_13;
__pyx_t_20 = 2;
__pyx_t_16 = -1;
if (__pyx_t_19 &lt; 0) {
__pyx_t_19 += __pyx_v_self-&gt;offsets.shape[0];
if (unlikely(__pyx_t_19 &lt; 0)) __pyx_t_16 = 0;
} else if (unlikely(__pyx_t_19 &gt;= __pyx_v_self-&gt;offsets.shape[0])) __pyx_t_16 = 0;
if (__pyx_t_20 &lt; 0) {
__pyx_t_20 += __pyx_v_self-&gt;offsets.shape[1];
if (unlikely(__pyx_t_20 &lt; 0)) __pyx_t_16 = 1;
} else if (unlikely(__pyx_t_20 &gt;= __pyx_v_self-&gt;offsets.shape[1])) __pyx_t_16 = 1;
if (unlikely(__pyx_t_16 != -1)) {
<span class='pyx_c_api'>__Pyx_RaiseBufferIndexError</span>(__pyx_t_16);
<span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
}
*((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self-&gt;offsets.data + __pyx_t_19 * __pyx_v_self-&gt;offsets.strides[0]) ) + __pyx_t_20 * __pyx_v_self-&gt;offsets.strides[1]) )) = __pyx_t_1;
</pre><pre class='cython line score-0'>&#xA0;078: </pre>
<pre class='cython line score-0'>&#xA0;079: <span class="nd">@cython</span><span class="o">.</span><span class="n">initializedcheck</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span></pre>
<pre class='cython line score-0'>&#xA0;080: <span class="nd">@cython</span><span class="o">.</span><span class="n">cdivision</span><span class="p">(</span><span class="bp">True</span><span class="p">)</span></pre>
<pre class='cython line score-0'>&#xA0;081: <span class="nd">@cython</span><span class="o">.</span><span class="n">boundscheck</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span></pre>
<pre class='cython line score-0'>&#xA0;082: <span class="nd">@cython</span><span class="o">.</span><span class="n">wraparound</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span></pre>
<pre class='cython line score-122' onclick='toggleDiv(this)'>+083: <span class="k">cpdef</span> <span class="kt">float</span> <span class="nf">get_roi</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="nb">float</span> <span class="n">z</span><span class="p">,</span> <span class="nb">float</span> <span class="n">y</span><span class="p">,</span> <span class="nb">float</span> <span class="n">x</span><span class="p">):</span></pre>
<pre class='cython code score-122'>static PyObject *__pyx_pw_5pyart_3map_17_gate_to_grid_map_7DistRoI_3get_roi(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static float __pyx_f_5pyart_3map_17_gate_to_grid_map_7DistRoI_get_roi(struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_DistRoI *__pyx_v_self, float __pyx_v_z, float __pyx_v_y, float __pyx_v_x, int __pyx_skip_dispatch) {
float __pyx_v_min_roi;
float __pyx_v_roi;
float __pyx_v_z_offset;
float __pyx_v_y_offset;
float __pyx_v_x_offset;
int __pyx_v_i;
float __pyx_r;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_roi", 0);
/* Check if called by wrapper */
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dictoffset != 0)) {
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_get_roi);<span class='error_goto'> if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5pyart_3map_17_gate_to_grid_map_7DistRoI_3get_roi)) {
__pyx_t_3 = <span class='py_c_api'>PyFloat_FromDouble</span>(__pyx_v_z);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
__pyx_t_4 = <span class='py_c_api'>PyFloat_FromDouble</span>(__pyx_v_y);<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
__pyx_t_5 = <span class='py_c_api'>PyFloat_FromDouble</span>(__pyx_v_x);<span class='error_goto'> if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);
__pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL;
__pyx_t_8 = 0;
if (CYTHON_COMPILING_IN_CPYTHON &amp;&amp; unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_6))) {
__pyx_t_7 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_6);
if (likely(__pyx_t_7)) {
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_6);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_7);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_6, function);
__pyx_t_8 = 1;
}
}
__pyx_t_9 = <span class='py_c_api'>PyTuple_New</span>(3+__pyx_t_8);<span class='error_goto'> if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9);
if (__pyx_t_7) {
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 0, __pyx_t_7); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_7); __pyx_t_7 = NULL;
}
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);
__pyx_t_3 = 0;
__pyx_t_4 = 0;
__pyx_t_5 = 0;
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_6, __pyx_t_9, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0;
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_10 = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(__pyx_t_2);<span class='error_goto'> if (unlikely((__pyx_t_10 == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_10;
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
}
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
}
/* … */
/* function exit code */
__pyx_L1_error:;
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9);
<span class='pyx_c_api'>__Pyx_WriteUnraisable</span>("pyart.map._gate_to_grid_map.DistRoI.get_roi", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
__pyx_r = 0;
__pyx_L0:;
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_5pyart_3map_17_gate_to_grid_map_7DistRoI_3get_roi(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyart_3map_17_gate_to_grid_map_7DistRoI_2get_roi[] = " Return the radius of influence for coordinates in meters. ";
static PyObject *__pyx_pw_5pyart_3map_17_gate_to_grid_map_7DistRoI_3get_roi(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
float __pyx_v_z;
float __pyx_v_y;
float __pyx_v_x;
PyObject *__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_roi (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&amp;__pyx_n_s_z,&amp;__pyx_n_s_y,&amp;__pyx_n_s_x,0};
PyObject* values[3] = {0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
switch (pos_args) {
case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);
case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);
case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds);
switch (pos_args) {
case 0:
if (likely((values[0] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
else {
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("get_roi", 1, 3, 3, 1); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
case 2:
if (likely((values[2] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
else {
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("get_roi", 1, 3, 3, 2); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
}
if (unlikely(kw_args &gt; 0)) {
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_roi") &lt; 0)) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
} else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);
values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);
values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);
}
__pyx_v_z = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(values[0]);<span class='error_goto'> if (unlikely((__pyx_v_z == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
__pyx_v_y = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(values[1]);<span class='error_goto'> if (unlikely((__pyx_v_y == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
__pyx_v_x = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(values[2]);<span class='error_goto'> if (unlikely((__pyx_v_x == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("get_roi", 1, 3, 3, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
__pyx_L3_error:;
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyart.map._gate_to_grid_map.DistRoI.get_roi", __pyx_clineno, __pyx_lineno, __pyx_filename);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_5pyart_3map_17_gate_to_grid_map_7DistRoI_2get_roi(((struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_DistRoI *)__pyx_v_self), __pyx_v_z, __pyx_v_y, __pyx_v_x);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_5pyart_3map_17_gate_to_grid_map_7DistRoI_2get_roi(struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_DistRoI *__pyx_v_self, float __pyx_v_z, float __pyx_v_y, float __pyx_v_x) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_roi", 0);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
__pyx_t_1 = <span class='py_c_api'>PyFloat_FromDouble</span>(__pyx_f_5pyart_3map_17_gate_to_grid_map_7DistRoI_get_roi(__pyx_v_self, __pyx_v_z, __pyx_v_y, __pyx_v_x, 1));<span class='error_goto'> if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyart.map._gate_to_grid_map.DistRoI.get_roi", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
</pre><pre class='cython line score-0'>&#xA0;084: <span class="sd">&quot;&quot;&quot; Return the radius of influence for coordinates in meters. &quot;&quot;&quot;</span></pre>
<pre class='cython line score-0'>&#xA0;085: <span class="k">cdef</span> <span class="kt">float</span> <span class="nf">min_roi</span><span class="p">,</span> <span class="nf">roi</span><span class="p">,</span> <span class="nf">z_offset</span><span class="p">,</span> <span class="nf">y_offset</span><span class="p">,</span> <span class="nf">x_offset</span></pre>
<pre class='cython line score-0'>&#xA0;086: <span class="k">cdef</span> <span class="kt">int</span> <span class="nf">i</span></pre>
<pre class='cython line score-0'>&#xA0;087: </pre>
<pre class='cython line score-0' onclick='toggleDiv(this)'>+088: <span class="n">min_roi</span> <span class="o">=</span> <span class="mf">999999999.0</span></pre>
<pre class='cython code score-0'> __pyx_v_min_roi = 999999999.0;
</pre><pre class='cython line score-0' onclick='toggleDiv(this)'>+089: <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">num_offsets</span><span class="p">):</span></pre>
<pre class='cython code score-0'> __pyx_t_11 = __pyx_v_self-&gt;num_offsets;
for (__pyx_t_12 = 0; __pyx_t_12 &lt; __pyx_t_11; __pyx_t_12+=1) {
__pyx_v_i = __pyx_t_12;
</pre><pre class='cython line score-0' onclick='toggleDiv(this)'>+090: <span class="n">z_offset</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">offsets</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="mf">0</span><span class="p">]</span></pre>
<pre class='cython code score-0'> __pyx_t_13 = __pyx_v_i;
__pyx_t_8 = 0;
__pyx_v_z_offset = (*((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self-&gt;offsets.data + __pyx_t_13 * __pyx_v_self-&gt;offsets.strides[0]) ) + __pyx_t_8 * __pyx_v_self-&gt;offsets.strides[1]) )));
</pre><pre class='cython line score-0' onclick='toggleDiv(this)'>+091: <span class="n">y_offset</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">offsets</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="mf">1</span><span class="p">]</span></pre>
<pre class='cython code score-0'>
/* "pyart/map/_gate_to_grid_map.pyx":91
* for i in range(self.num_offsets):
* z_offset = self.offsets[i, 0]
* y_offset = self.offsets[i, 1] # &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;
* x_offset = self.offsets[i, 2]
* roi = (self.z_factor * (z - z_offset) + self.xy_factor *
*/
__pyx_t_14 = __pyx_v_i;
__pyx_t_15 = 1;
__pyx_v_y_offset = (*((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self-&gt;offsets.data + __pyx_t_14 * __pyx_v_self-&gt;offsets.strides[0]) ) + __pyx_t_15 * __pyx_v_self-&gt;offsets.strides[1]) )));
</pre><pre class='cython line score-0' onclick='toggleDiv(this)'>+092: <span class="n">x_offset</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">offsets</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="mf">2</span><span class="p">]</span></pre>
<pre class='cython code score-0'> __pyx_t_16 = __pyx_v_i;
__pyx_t_17 = 2;
__pyx_v_x_offset = (*((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self-&gt;offsets.data + __pyx_t_16 * __pyx_v_self-&gt;offsets.strides[0]) ) + __pyx_t_17 * __pyx_v_self-&gt;offsets.strides[1]) )));
</pre><pre class='cython line score-0'>&#xA0;093: <span class="n">roi</span> <span class="o">=</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">z_factor</span> <span class="o">*</span> <span class="p">(</span><span class="n">z</span> <span class="o">-</span> <span class="n">z_offset</span><span class="p">)</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">xy_factor</span> <span class="o">*</span></pre>
<pre class='cython line score-0' onclick='toggleDiv(this)'>+094: <span class="n">sqrt</span><span class="p">((</span><span class="n">x</span> <span class="o">-</span> <span class="n">x_offset</span><span class="p">)</span><span class="o">**</span><span class="mf">2</span> <span class="o">+</span> <span class="p">(</span><span class="n">y</span> <span class="o">-</span> <span class="n">y_offset</span><span class="p">)</span><span class="o">**</span><span class="mf">2</span><span class="p">)</span> <span class="o">+</span></pre>
<pre class='cython code score-0'> __pyx_v_roi = (((__pyx_v_self-&gt;z_factor * (__pyx_v_z - __pyx_v_z_offset)) + (__pyx_v_self-&gt;xy_factor * sqrt((powf((__pyx_v_x - __pyx_v_x_offset), 2.0) + powf((__pyx_v_y - __pyx_v_y_offset), 2.0))))) + __pyx_v_self-&gt;min_radius);
</pre><pre class='cython line score-0'>&#xA0;095: <span class="bp">self</span><span class="o">.</span><span class="n">min_radius</span><span class="p">)</span></pre>
<pre class='cython line score-0' onclick='toggleDiv(this)'>+096: <span class="k">if</span> <span class="n">roi</span> <span class="o">&lt;</span> <span class="n">min_roi</span><span class="p">:</span></pre>
<pre class='cython code score-0'> __pyx_t_18 = ((__pyx_v_roi &lt; __pyx_v_min_roi) != 0);
if (__pyx_t_18) {
</pre><pre class='cython line score-0' onclick='toggleDiv(this)'>+097: <span class="n">min_roi</span> <span class="o">=</span> <span class="n">roi</span></pre>
<pre class='cython code score-0'> __pyx_v_min_roi = __pyx_v_roi;
goto __pyx_L5;
}
__pyx_L5:;
}
</pre><pre class='cython line score-0' onclick='toggleDiv(this)'>+098: <span class="k">return</span> <span class="n">min_roi</span></pre>
<pre class='cython code score-0'> __pyx_r = __pyx_v_min_roi;
goto __pyx_L0;
</pre><pre class='cython line score-0'>&#xA0;099: </pre>
<pre class='cython line score-0'>&#xA0;100: </pre>
<pre class='cython line score-0' onclick='toggleDiv(this)'>+101: <span class="k">cdef</span> <span class="k">class</span> <span class="nf">DistBeamRoI</span><span class="p">(</span><span class="n">RoIFunction</span><span class="p">):</span></pre>
<pre class='cython code score-0'>struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_DistBeamRoI {
struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_RoIFunction __pyx_base;
float h_factor;
float min_radius;
float beam_factor;
int num_offsets;
__Pyx_memviewslice offsets;
};
/* … */
struct __pyx_vtabstruct_5pyart_3map_17_gate_to_grid_map_DistBeamRoI {
struct __pyx_vtabstruct_5pyart_3map_17_gate_to_grid_map_RoIFunction __pyx_base;
};
static struct __pyx_vtabstruct_5pyart_3map_17_gate_to_grid_map_DistBeamRoI *__pyx_vtabptr_5pyart_3map_17_gate_to_grid_map_DistBeamRoI;
</pre><pre class='cython line score-0'>&#xA0;102: <span class="sd">&quot;&quot;&quot;</span></pre>
<pre class='cython line score-0'>&#xA0;103: <span class="sd"> Radius of influence which expands with distance from multiple radars.</span></pre>
<pre class='cython line score-0'>&#xA0;104: <span class="sd"> &quot;&quot;&quot;</span></pre>
<pre class='cython line score-0'>&#xA0;105: </pre>
<pre class='cython line score-0'>&#xA0;106: <span class="k">cdef</span> <span class="kt">float</span> <span class="nf">h_factor</span><span class="p">,</span> <span class="nf">min_radius</span><span class="p">,</span> <span class="nf">beam_factor</span></pre>
<pre class='cython line score-0'>&#xA0;107: <span class="k">cdef</span> <span class="kt">int</span> <span class="nf">num_offsets</span></pre>
<pre class='cython line score-0'>&#xA0;108: <span class="k">cdef</span> <span class="kt">float</span>[<span class="p">:,</span> <span class="p">:]</span> <span class="n">offsets</span></pre>
<pre class='cython line score-0'>&#xA0;109: </pre>
<pre class='cython line score-70' onclick='toggleDiv(this)'>+110: <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">h_factor</span><span class="p">,</span> <span class="n">nb</span><span class="p">,</span> <span class="n">bsp</span><span class="p">,</span> <span class="n">min_radius</span><span class="p">,</span> <span class="n">offsets</span><span class="p">):</span></pre>
<pre class='cython code score-70'>/* Python wrapper */
static int __pyx_pw_5pyart_3map_17_gate_to_grid_map_11DistBeamRoI_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyart_3map_17_gate_to_grid_map_11DistBeamRoI___init__[] = " initalize. ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_5pyart_3map_17_gate_to_grid_map_11DistBeamRoI___init__;
#endif
static int __pyx_pw_5pyart_3map_17_gate_to_grid_map_11DistBeamRoI_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_h_factor = 0;
PyObject *__pyx_v_nb = 0;
PyObject *__pyx_v_bsp = 0;
PyObject *__pyx_v_min_radius = 0;
PyObject *__pyx_v_offsets = 0;
int __pyx_r;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&amp;__pyx_n_s_h_factor,&amp;__pyx_n_s_nb,&amp;__pyx_n_s_bsp,&amp;__pyx_n_s_min_radius,&amp;__pyx_n_s_offsets,0};
PyObject* values[5] = {0,0,0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
switch (pos_args) {
case 5: values[4] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 4);
case 4: values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3);
case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);
case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);
case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds);
switch (pos_args) {
case 0:
if (likely((values[0] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_h_factor)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_nb)) != 0)) kw_args--;
else {
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 5, 5, 1); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
case 2:
if (likely((values[2] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_bsp)) != 0)) kw_args--;
else {
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 5, 5, 2); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
case 3:
if (likely((values[3] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_min_radius)) != 0)) kw_args--;
else {
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 5, 5, 3); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
case 4:
if (likely((values[4] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s_offsets)) != 0)) kw_args--;
else {
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 5, 5, 4); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
}
if (unlikely(kw_args &gt; 0)) {
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") &lt; 0)) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
}
} else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 5) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);
values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);
values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);
values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3);
values[4] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 4);
}
__pyx_v_h_factor = values[0];
__pyx_v_nb = values[1];
__pyx_v_bsp = values[2];
__pyx_v_min_radius = values[3];
__pyx_v_offsets = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 5, 5, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
__pyx_L3_error:;
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyart.map._gate_to_grid_map.DistBeamRoI.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return -1;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_5pyart_3map_17_gate_to_grid_map_11DistBeamRoI___init__(((struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_DistBeamRoI *)__pyx_v_self), __pyx_v_h_factor, __pyx_v_nb, __pyx_v_bsp, __pyx_v_min_radius, __pyx_v_offsets);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static int __pyx_pf_5pyart_3map_17_gate_to_grid_map_11DistBeamRoI___init__(struct __pyx_obj_5pyart_3map_17_gate_to_grid_map_DistBeamRoI *__pyx_v_self, PyObject *__pyx_v_h_factor, PyObject *__pyx_v_nb, PyObject *__pyx_v_bsp, PyObject *__pyx_v_min_radius, PyObject *__pyx_v_offsets) {
PyObject *__pyx_v_i = NULL;
PyObject *__pyx_v_z_offset = NULL;
PyObject *__pyx_v_y_offset = NULL;
PyObject *__pyx_v_x_offset = NULL;
int __pyx_r;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__", 0);
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
__PYX_XDEC_MEMVIEW(&amp;__pyx_t_7, 1);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12);
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyart.map._gate_to_grid_map.DistBeamRoI.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_i);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_z_offset);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_y_offset);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_x_offset);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
</pre><pre class='cython line score-0'>&#xA0;111: <span class="sd">&quot;&quot;&quot; initalize. &quot;&quot;&quot;</span></pre>
<pre class='cython line score-5' onclick='toggleDiv(this)'>+112: <span class="bp">self</span><span class="o">.</span><span class="n">h_factor</span> <span class="o">=</span> <span class="n">h_factor</span></pre>
<pre class='cython code score-5'> __pyx_t_1 = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(__pyx_v_h_factor);<span class='error_goto'> if (unlikely((__pyx_t_1 == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
__pyx_v_self-&gt;h_factor = __pyx_t_1;
</pre><pre class='cython line score-5' onclick='toggleDiv(this)'>+113: <span class="bp">self</span><span class="o">.</span><span class="n">min_radius</span> <span class="o">=</span> <span class="n">min_radius</span></pre>
<pre class='cython code score-5'> __pyx_t_1 = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(__pyx_v_min_radius);<span class='error_goto'> if (unlikely((__pyx_t_1 == (float)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
__pyx_v_self-&gt;min_radius = __pyx_t_1;
</pre><pre class='cython line score-26' onclick='toggleDiv(this)'>+114: <span class="bp">self</span><span class="o">.</span><span class="n">beam_factor</span> <span class="o">=</span> <span class="n">tan</span><span class="p">(</span><span class="n">nb</span> <span class="o">*</span> <span class="n">bsp</span> <span class="o">*</span> <span class="n">PI</span> <span class="o">/</span> <span class="mf">180.</span><span class="p">)</span></pre>
<pre class='cython code score-26'> __pyx_t_2 = <span class='py_c_api'>PyNumber_Multiply</span>(__pyx_v_nb, __pyx_v_bsp);<span class='error_goto'> if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
__pyx_t_3 = <span class='py_c_api'>PyFloat_FromDouble</span>(__pyx_v_5pyart_3map_17_gate_to_grid_map_PI);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
__pyx_t_4 = <span class='py_c_api'>PyNumber_Multiply</span>(__pyx_t_2, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyNumber_Divide</span>(__pyx_t_4, __pyx_float_180_);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_5 = __pyx_<span class='py_c_api'>PyFloat_AsDouble</span>(__pyx_t_3);<span class='error_goto'> if (unlikely((__pyx_t_5 == (double)-1) &amp;&amp; PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_self-&gt;beam_factor = tan(__pyx_t_5);
</pre><pre class='cython line score-0'>&#xA0;115: </pre>
<pre class='cython line score-5' onclick='toggleDiv(this)'>+116: <span class="bp">self</span><span class="o">.</span><span class="n">num_offsets</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">offsets</span><span class="p">)</span></pre>
<pre class='cython code score-5'> __pyx_t_6 = <span class='py_c_api'>PyObject_Length</span>(__pyx_v_offsets);<span class='error_goto'> if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
__pyx_v_self-&gt;num_offsets = __pyx_t_6;
</pre><pre class='cython line score-0'>&#xA0;117: <span class="c"># does this array need to be explicitly de-allocated when the</span></pre>
<pre class='cython line score-0'>&#xA0;118: <span class="c"># class instance is removed?</span></pre>
<pre class='cython line score-11' onclick='toggleDiv(this)'>+119: <span class="bp">self</span><span class="o">.</span><span class="n">offsets</span> <span class="o">=</span> <span class="n">cvarray</span><span class="p">(</span></pre>
<pre class='cython code score-11'> __pyx_t_3 = <span class='py_c_api'>PyDict_New</span>();<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(((PyObject *)((PyObject *)__pyx_array_type)), __pyx_empty_tuple, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_dsds_float</span>(__pyx_t_2);
if (unlikely(!__pyx_t_7.memview)) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
__PYX_XDEC_MEMVIEW(&amp;__pyx_v_self-&gt;offsets, 0);
__pyx_v_self-&gt;offsets = __pyx_t_7;
__pyx_t_7.memview = NULL;
__pyx_t_7.data = NULL;
</pre><pre class='cython line score-29' onclick='toggleDiv(this)'>+120: <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">num_offsets</span><span class="p">,</span> <span class="mf">3</span><span class="p">),</span> <span class="n">itemsize</span><span class="o">=</span><span class="n">sizeof</span><span class="p">(</span><span class="nb">float</span><span class="p">),</span> <span class="n">format</span><span class="o">=</span><span class="s">&#39;f&#39;</span><span class="p">)</span></pre>
<pre class='cython code score-29'> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyInt_From_int</span>(__pyx_v_self-&gt;num_offsets);<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
__pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_t_4);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_int_3);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 1, __pyx_int_3);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_int_3);
__pyx_t_4 = 0;
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_shape, __pyx_t_2) &lt; 0) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyInt_FromSize_t</span>((sizeof(float)));<span class='error_goto'> if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_itemsize, __pyx_t_2) &lt; 0) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_format, __pyx_n_s_f) &lt; 0) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
</pre><pre class='cython line score-0'>&#xA0;121: </pre>
<pre class='cython line score-109' onclick='toggleDiv(this)'>+122: <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="p">(</span><span class="n">z_offset</span><span class="p">,</span> <span class="n">y_offset</span><span class="p">,</span> <span class="n">x_offset</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">offsets</span><span class="p">):</span></pre>
<pre class='cython code score-109'> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_int_0);
__pyx_t_2 = __pyx_int_0;
if (likely(<span class='py_c_api'>PyList_CheckExact</span>(__pyx_v_offsets)) || <span class='py_c_api'>PyTuple_CheckExact</span>(__pyx_v_offsets)) {
__pyx_t_3 = __pyx_v_offsets; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); __pyx_t_6 = 0;
__pyx_t_8 = NULL;
} else {
__pyx_t_6 = -1; __pyx_t_3 = <span class='py_c_api'>PyObject_GetIter</span>(__pyx_v_offsets);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
__pyx_t_8 = Py_TYPE(__pyx_t_3)-&gt;tp_iternext;<span class='error_goto'> if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
}
for (;;) {
if (likely(!__pyx_t_8)) {
if (likely(<span class='py_c_api'>PyList_CheckExact</span>(__pyx_t_3))) {
if (__pyx_t_6 &gt;= <span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = <span class='py_macro_api'>PyList_GET_ITEM</span>(__pyx_t_3, __pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); __pyx_t_6++;<span class='error_goto'> if (unlikely(0 &lt; 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
#else
__pyx_t_4 = <span class='py_macro_api'>PySequence_ITEM</span>(__pyx_t_3, __pyx_t_6); __pyx_t_6++;<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
#endif
} else {
if (__pyx_t_6 &gt;= <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_t_3, __pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); __pyx_t_6++;<span class='error_goto'> if (unlikely(0 &lt; 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
#else
__pyx_t_4 = <span class='py_macro_api'>PySequence_ITEM</span>(__pyx_t_3, __pyx_t_6); __pyx_t_6++;<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
#endif
}
} else {
__pyx_t_4 = __pyx_t_8(__pyx_t_3);
if (unlikely(!__pyx_t_4)) {
PyObject* exc_type = <span class='py_c_api'>PyErr_Occurred</span>();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || <span class='py_c_api'>PyErr_GivenExceptionMatches</span>(exc_type, PyExc_StopIteration))) <span class='py_c_api'>PyErr_Clear</span>();
else <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
}
break;
}
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
}
if ((likely(<span class='py_c_api'>PyTuple_CheckExact</span>(__pyx_t_4))) || (<span class='py_c_api'>PyList_CheckExact</span>(__pyx_t_4))) {
PyObject* sequence = __pyx_t_4;
#if CYTHON_COMPILING_IN_CPYTHON
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = <span class='py_c_api'>PySequence_Size</span>(sequence);
#endif
if (unlikely(size != 3)) {
if (size &gt; 3) <span class='pyx_c_api'>__Pyx_RaiseTooManyValuesError</span>(3);
else if (size &gt;= 0) <span class='pyx_c_api'>__Pyx_RaiseNeedMoreValuesError</span>(size);
<span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(<span class='py_c_api'>PyTuple_CheckExact</span>(sequence))) {
__pyx_t_9 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(sequence, 0);
__pyx_t_10 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(sequence, 1);
__pyx_t_11 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(sequence, 2);
} else {
__pyx_t_9 = <span class='py_macro_api'>PyList_GET_ITEM</span>(sequence, 0);
__pyx_t_10 = <span class='py_macro_api'>PyList_GET_ITEM</span>(sequence, 1);
__pyx_t_11 = <span class='py_macro_api'>PyList_GET_ITEM</span>(sequence, 2);
}
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_9);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_10);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_11);
#else
__pyx_t_9 = <span class='py_macro_api'>PySequence_ITEM</span>(sequence, 0);<span class='error_goto'> if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9);
__pyx_t_10 = <span class='py_macro_api'>PySequence_ITEM</span>(sequence, 1);<span class='error_goto'> if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_10);
__pyx_t_11 = <span class='py_macro_api'>PySequence_ITEM</span>(sequence, 2);<span class='error_goto'> if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_11);
#endif
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
} else {
Py_ssize_t index = -1;
__pyx_t_12 = <span class='py_c_api'>PyObject_GetIter</span>(__pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_12);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_13 = Py_TYPE(__pyx_t_12)-&gt;tp_iternext;
index = 0; __pyx_t_9 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_9)) goto __pyx_L5_unpacking_failed;
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9);
index = 1; __pyx_t_10 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_10)) goto __pyx_L5_unpacking_failed;
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_10);
index = 2; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L5_unpacking_failed;
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_11);
if (<span class='pyx_c_api'>__Pyx_IternextUnpackEndCheck</span>(__pyx_t_13(__pyx_t_12), 3) &lt; 0) <span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
__pyx_t_13 = NULL;
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_12); __pyx_t_12 = 0;
goto __pyx_L6_unpacking_done;
__pyx_L5_unpacking_failed:;
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_12); __pyx_t_12 = 0;
__pyx_t_13 = NULL;
if (<span class='pyx_c_api'>__Pyx_IterFinish</span>() == 0) <span class='pyx_c_api'>__Pyx_RaiseNeedMoreValuesError</span>(index);
<span class='error_goto'>{__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
__pyx_L6_unpacking_done:;
}
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_z_offset, __pyx_t_9);
__pyx_t_9 = 0;
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_y_offset, __pyx_t_10);
__pyx_t_10 = 0;
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_x_offset, __pyx_t_11);
__pyx_t_11 = 0;
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2);
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_i, __pyx_t_2);
__pyx_t_4 = <span class='py_c_api'>PyNumber_Add</span