Skip to content

Commit

Permalink
Deploying to gh-pages from main @ 12276f5 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
mogres committed Jul 8, 2024
1 parent a83a34c commit 0a26106
Show file tree
Hide file tree
Showing 9 changed files with 223 additions and 34 deletions.
14 changes: 11 additions & 3 deletions _modules/cellpack/autopack/Analysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -956,9 +956,17 @@ <h1>Source code for cellpack.autopack.Analysis</h1><div class="highlight"><pre>

<span class="n">get_angles</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">if</span> <span class="n">ingr</span><span class="o">.</span><span class="n">packing_mode</span> <span class="o">==</span> <span class="s2">&quot;gradient&quot;</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">use_gradient</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">center</span> <span class="o">=</span> <span class="n">center</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">gradients</span><span class="p">[</span><span class="n">ingr</span><span class="o">.</span><span class="n">gradient</span><span class="p">]</span><span class="o">.</span><span class="n">mode_settings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span>
<span class="s2">&quot;center&quot;</span><span class="p">,</span> <span class="n">center</span>
<span class="p">)</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">ingr</span><span class="o">.</span><span class="n">gradient</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">ingr</span><span class="o">.</span><span class="n">gradient</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">1</span> <span class="ow">or</span> <span class="nb">len</span><span class="p">(</span><span class="n">ingr</span><span class="o">.</span><span class="n">gradient</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">center</span> <span class="o">=</span> <span class="n">center</span>
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">center</span> <span class="o">=</span> <span class="n">center</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">gradients</span><span class="p">[</span>
<span class="n">ingr</span><span class="o">.</span><span class="n">gradient</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="p">]</span><span class="o">.</span><span class="n">mode_settings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;center&quot;</span><span class="p">,</span> <span class="n">center</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">center</span> <span class="o">=</span> <span class="n">center</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">gradients</span><span class="p">[</span>
<span class="n">ingr</span><span class="o">.</span><span class="n">gradient</span>
<span class="p">]</span><span class="o">.</span><span class="n">mode_settings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;center&quot;</span><span class="p">,</span> <span class="n">center</span><span class="p">)</span>
<span class="n">get_angles</span> <span class="o">=</span> <span class="kc">True</span>

<span class="c1"># get angles wrt gradient</span>
Expand Down
4 changes: 3 additions & 1 deletion _modules/cellpack/autopack/Environment.html
Original file line number Diff line number Diff line change
Expand Up @@ -1921,7 +1921,9 @@ <h1>Source code for cellpack.autopack.Environment</h1><div class="highlight"><pr
<span class="c1"># get the most probable point using the gradient</span>
<span class="c1"># use the gradient weighted map and get mot probabl point</span>
<span class="bp">self</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;pick point from gradients </span><span class="si">%d</span><span class="s2">&quot;</span><span class="p">,</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">allIngrPts</span><span class="p">)))</span>
<span class="n">ptInd</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">gradients</span><span class="p">[</span><span class="n">ingr</span><span class="o">.</span><span class="n">gradient</span><span class="p">]</span><span class="o">.</span><span class="n">pickPoint</span><span class="p">(</span><span class="n">allIngrPts</span><span class="p">)</span>
<span class="n">ptInd</span> <span class="o">=</span> <span class="n">Gradient</span><span class="o">.</span><span class="n">pick_point_for_ingredient</span><span class="p">(</span>
<span class="n">ingr</span><span class="p">,</span> <span class="n">allIngrPts</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">gradients</span>
<span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># pick a point randomly among free points</span>
<span class="c1"># random or uniform?</span>
Expand Down
Loading

0 comments on commit 0a26106

Please sign in to comment.