     <span class="n">H</span> <span class="o">=</span> <span class="kc">None</span>

            <span class="c1"># calculate cart. co.:</span>
            <span class="k">if</span> <span class="s1">&#39;aM&#39;</span> <span class="ow">in</span> <span class="n">outin</span><span class="p">:</span>
                <span class="n">aM</span> <span class="o">=</span> <span class="n">M</span><span class="o">*</span><span class="n">np</span><span class="o">.</span><span class="n">cos</span><span class="p">(</span