Skip to content

Commit

Permalink
Deploying to gh-pages from main @ 6ba5a46 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
mogres committed Jan 10, 2024
1 parent f176ed4 commit 22ae2df
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 7 deletions.
4 changes: 2 additions & 2 deletions _modules/cellpack/autopack/Analysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -2424,8 +2424,8 @@ <h1>Source code for cellpack.autopack.Analysis</h1><div class="highlight"><pre>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Packs one seed of a recipe and returns the recipe object</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">seed_basename</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">add_seed_number_to_base_name</span><span class="p">(</span><span class="n">seed_index</span><span class="p">)</span>
<span class="n">seed</span> <span class="o">=</span> <span class="n">seed_list</span><span class="p">[</span><span class="n">seed_index</span><span class="p">]</span>
<span class="n">seed</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">seed_list</span><span class="p">[</span><span class="n">seed_index</span><span class="p">])</span>
<span class="n">seed_basename</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">add_seed_number_to_base_name</span><span class="p">(</span><span class="n">seed</span><span class="p">)</span>
<span class="c1"># Clear</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">afviewer</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">afviewer</span><span class="o">.</span><span class="n">clearFill</span><span class="p">(</span><span class="s2">&quot;Test_Spheres2D&quot;</span><span class="p">)</span>
Expand Down
6 changes: 3 additions & 3 deletions _modules/cellpack/autopack/Environment.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ <h1>Source code for cellpack.autopack.Environment</h1><div class="highlight"><pr
<span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">out_folder</span><span class="si">}</span><span class="s2">/</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="si">}</span><span class="s2">_</span><span class="si">{</span><span class="n">config</span><span class="p">[</span><span class="s1">&#39;name&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">_</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">version</span><span class="si">}</span><span class="s2">_grid.dat&quot;</span>
<span class="p">)</span>
<span class="k">if</span> <span class="n">recipe</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;grid_file_path&quot;</span><span class="p">)</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">recipe</span><span class="p">[</span><span class="s2">&quot;grid_file_path&quot;</span><span class="p">]):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">grid_file_out</span> <span class="o">=</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">&quot;grid_file_path&quot;</span><span class="p">]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">grid_file_out</span> <span class="o">=</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">&quot;grid_file_path&quot;</span><span class="p">]</span>

<span class="n">should_load_grid_file</span> <span class="o">=</span> <span class="p">(</span>
<span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_file_out</span><span class="p">)</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">load_from_grid_file</span>
Expand Down Expand Up @@ -2071,7 +2070,8 @@ <h1>Source code for cellpack.autopack.Environment</h1><div class="highlight"><pr
<span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">ingr</span><span class="p">,</span> <span class="s2">&quot;count_options&quot;</span><span class="p">)</span> <span class="ow">and</span> <span class="n">ingr</span><span class="o">.</span><span class="n">count_options</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>

<span class="n">count</span> <span class="o">=</span> <span class="n">get_value_from_distribution</span><span class="p">(</span>
<span class="n">distribution_options</span><span class="o">=</span><span class="n">ingr</span><span class="o">.</span><span class="n">count_options</span>
<span class="n">distribution_options</span><span class="o">=</span><span class="n">ingr</span><span class="o">.</span><span class="n">count_options</span><span class="p">,</span>
<span class="n">return_int</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="p">)</span>
<span class="k">if</span> <span class="n">count</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">ingr</span><span class="o">.</span><span class="n">count</span> <span class="o">=</span> <span class="n">count</span>
Expand Down
26 changes: 26 additions & 0 deletions _modules/cellpack/autopack/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,32 @@ <h1>Source code for cellpack.autopack.utils</h1><div class="highlight"><pre>

<span class="k">return</span> <span class="n">value</span></div>



<div class="viewcode-block" id="get_seed_list">
<a class="viewcode-back" href="../../../cellpack.autopack.html#cellpack.autopack.utils.get_seed_list">[docs]</a>
<span class="k">def</span> <span class="nf">get_seed_list</span><span class="p">(</span><span class="n">packing_config_data</span><span class="p">,</span> <span class="n">recipe_data</span><span class="p">):</span>
<span class="c1"># Returns a list of seeds to use for packing</span>
<span class="k">if</span> <span class="n">packing_config_data</span><span class="p">[</span><span class="s2">&quot;randomness_seed&quot;</span><span class="p">]</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">seed_list</span> <span class="o">=</span> <span class="n">packing_config_data</span><span class="p">[</span><span class="s2">&quot;randomness_seed&quot;</span><span class="p">]</span>
<span class="k">elif</span> <span class="n">recipe_data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;randomness_seed&quot;</span><span class="p">)</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">seed_list</span> <span class="o">=</span> <span class="n">recipe_data</span><span class="p">[</span><span class="s2">&quot;randomness_seed&quot;</span><span class="p">]</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">seed_list</span> <span class="o">=</span> <span class="kc">None</span>

<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">seed_list</span><span class="p">,</span> <span class="nb">int</span><span class="p">):</span>
<span class="n">seed_list</span> <span class="o">=</span> <span class="p">[</span><span class="n">seed_list</span><span class="p">]</span>

<span class="k">if</span> <span class="p">(</span><span class="n">seed_list</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">)</span> <span class="ow">and</span> <span class="p">(</span>
<span class="nb">len</span><span class="p">(</span><span class="n">seed_list</span><span class="p">)</span> <span class="o">!=</span> <span class="n">packing_config_data</span><span class="p">[</span><span class="s2">&quot;number_of_packings&quot;</span><span class="p">]</span>
<span class="p">):</span>
<span class="n">base_seed</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">seed_list</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="n">seed_list</span> <span class="o">=</span> <span class="p">[</span>
<span class="n">base_seed</span> <span class="o">+</span> <span class="n">i</span> <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="n">packing_config_data</span><span class="p">[</span><span class="s2">&quot;number_of_packings&quot;</span><span class="p">])</span>
<span class="p">]</span>

<span class="k">return</span> <span class="n">seed_list</span></div>

</pre></div>

<div class="clearer"></div>
Expand Down
6 changes: 5 additions & 1 deletion _modules/cellpack/bin/pack.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ <h1>Source code for cellpack.bin.pack</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">cellpack.autopack.loaders.config_loader</span> <span class="kn">import</span> <span class="n">ConfigLoader</span>
<span class="kn">from</span> <span class="nn">cellpack.autopack.loaders.recipe_loader</span> <span class="kn">import</span> <span class="n">RecipeLoader</span>
<span class="kn">from</span> <span class="nn">cellpack.autopack.loaders.analysis_config_loader</span> <span class="kn">import</span> <span class="n">AnalysisConfigLoader</span>
<span class="kn">from</span> <span class="nn">cellpack.autopack.utils</span> <span class="kn">import</span> <span class="n">get_seed_list</span>

<span class="c1">###############################################################################</span>
<span class="n">log_file_path</span> <span class="o">=</span> <span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="vm">__file__</span><span class="p">,</span> <span class="s2">&quot;../../logging.conf&quot;</span><span class="p">))</span>
Expand Down Expand Up @@ -97,12 +98,15 @@ <h1>Source code for cellpack.bin.pack</h1><div class="highlight"><pre>
<span class="n">result_file</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;saving to </span><span class="si">{</span><span class="n">env</span><span class="o">.</span><span class="n">out_folder</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>

<span class="n">seed_list</span> <span class="o">=</span> <span class="n">get_seed_list</span><span class="p">(</span><span class="n">packing_config_data</span><span class="p">,</span> <span class="n">recipe_data</span><span class="p">)</span>

<span class="n">analyze</span><span class="o">.</span><span class="n">doloop</span><span class="p">(</span>
<span class="n">packing_config_data</span><span class="p">[</span><span class="s2">&quot;number_of_packings&quot;</span><span class="p">],</span>
<span class="n">env</span><span class="o">.</span><span class="n">boundingBox</span><span class="p">,</span>
<span class="n">plot_figures</span><span class="o">=</span><span class="n">packing_config_data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;save_plot_figures&quot;</span><span class="p">,</span> <span class="kc">True</span><span class="p">),</span>
<span class="n">show_grid</span><span class="o">=</span><span class="n">packing_config_data</span><span class="p">[</span><span class="s2">&quot;show_grid_plot&quot;</span><span class="p">],</span>
<span class="n">seed_list</span><span class="o">=</span><span class="n">packing_config_data</span><span class="p">[</span><span class="s2">&quot;randomness_seed&quot;</span><span class="p">],</span>
<span class="n">seed_list</span><span class="o">=</span><span class="n">seed_list</span><span class="p">,</span>
<span class="n">config_name</span><span class="o">=</span><span class="n">packing_config_data</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">],</span>
<span class="n">recipe_version</span><span class="o">=</span><span class="n">recipe_data</span><span class="p">[</span><span class="s2">&quot;version&quot;</span><span class="p">],</span>
<span class="n">image_export_options</span><span class="o">=</span><span class="n">packing_config_data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;image_export_options&quot;</span><span class="p">),</span>
Expand Down
6 changes: 6 additions & 0 deletions cellpack.autopack.html
Original file line number Diff line number Diff line change
Expand Up @@ -5506,6 +5506,11 @@ <h3>Requirements<a class="headerlink" href="#requirements" title="Link to this h
<dd><p>Get the combined key from dict</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="cellpack.autopack.utils.get_seed_list">
<span class="sig-prename descclassname"><span class="pre">cellpack.autopack.utils.</span></span><span class="sig-name descname"><span class="pre">get_seed_list</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">packing_config_data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">recipe_data</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/cellpack/autopack/utils.html#get_seed_list"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#cellpack.autopack.utils.get_seed_list" title="Link to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="cellpack.autopack.utils.get_value_from_distribution">
<span class="sig-prename descclassname"><span class="pre">cellpack.autopack.utils.</span></span><span class="sig-name descname"><span class="pre">get_value_from_distribution</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">distribution_options</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_int</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/cellpack/autopack/utils.html#get_value_from_distribution"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#cellpack.autopack.utils.get_value_from_distribution" title="Link to this definition">¶</a></dt>
Expand Down Expand Up @@ -6522,6 +6527,7 @@ <h3><a href="index.html">Table of Contents</a></h3>
<li><a class="reference internal" href="#cellpack.autopack.utils.get_max_value_from_distribution"><code class="docutils literal notranslate"><span class="pre">get_max_value_from_distribution()</span></code></a></li>
<li><a class="reference internal" href="#cellpack.autopack.utils.get_min_value_from_distribution"><code class="docutils literal notranslate"><span class="pre">get_min_value_from_distribution()</span></code></a></li>
<li><a class="reference internal" href="#cellpack.autopack.utils.get_paired_key"><code class="docutils literal notranslate"><span class="pre">get_paired_key()</span></code></a></li>
<li><a class="reference internal" href="#cellpack.autopack.utils.get_seed_list"><code class="docutils literal notranslate"><span class="pre">get_seed_list()</span></code></a></li>
<li><a class="reference internal" href="#cellpack.autopack.utils.get_value_from_distribution"><code class="docutils literal notranslate"><span class="pre">get_value_from_distribution()</span></code></a></li>
<li><a class="reference internal" href="#cellpack.autopack.utils.ingredient_compare0"><code class="docutils literal notranslate"><span class="pre">ingredient_compare0()</span></code></a></li>
<li><a class="reference internal" href="#cellpack.autopack.utils.ingredient_compare1"><code class="docutils literal notranslate"><span class="pre">ingredient_compare1()</span></code></a></li>
Expand Down
1 change: 1 addition & 0 deletions cellpack.html
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@ <h2>Subpackages<a class="headerlink" href="#subpackages" title="Link to this hea
<li class="toctree-l3"><a class="reference internal" href="cellpack.autopack.html#cellpack.autopack.utils.get_max_value_from_distribution"><code class="docutils literal notranslate"><span class="pre">get_max_value_from_distribution()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="cellpack.autopack.html#cellpack.autopack.utils.get_min_value_from_distribution"><code class="docutils literal notranslate"><span class="pre">get_min_value_from_distribution()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="cellpack.autopack.html#cellpack.autopack.utils.get_paired_key"><code class="docutils literal notranslate"><span class="pre">get_paired_key()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="cellpack.autopack.html#cellpack.autopack.utils.get_seed_list"><code class="docutils literal notranslate"><span class="pre">get_seed_list()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="cellpack.autopack.html#cellpack.autopack.utils.get_value_from_distribution"><code class="docutils literal notranslate"><span class="pre">get_value_from_distribution()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="cellpack.autopack.html#cellpack.autopack.utils.ingredient_compare0"><code class="docutils literal notranslate"><span class="pre">ingredient_compare0()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="cellpack.autopack.html#cellpack.autopack.utils.ingredient_compare1"><code class="docutils literal notranslate"><span class="pre">ingredient_compare1()</span></code></a></li>
Expand Down
2 changes: 2 additions & 0 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -1705,6 +1705,8 @@ <h2 id="G">G</h2>
<li><a href="cellpack.autopack.interface_objects.html#cellpack.autopack.interface_objects.packed_objects.PackedObjects.get_rotations_for_ingredient">get_rotations_for_ingredient() (cellpack.autopack.interface_objects.packed_objects.PackedObjects method)</a>
</li>
<li><a href="cellpack.autopack.html#cellpack.autopack.MeshStore.MeshStore.get_scaled_distances_between_surfaces">get_scaled_distances_between_surfaces() (cellpack.autopack.MeshStore.MeshStore method)</a>
</li>
<li><a href="cellpack.autopack.html#cellpack.autopack.utils.get_seed_list">get_seed_list() (in module cellpack.autopack.utils)</a>
</li>
<li><a href="cellpack.autopack.ingredient.html#cellpack.autopack.ingredient.grow.GrowIngredient.get_signed_distance">get_signed_distance() (cellpack.autopack.ingredient.grow.GrowIngredient method)</a>

Expand Down
Binary file modified objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 22ae2df

Please sign in to comment.