From 22ae2dff96eecd0323cfa478e88c1490f09d2b56 Mon Sep 17 00:00:00 2001 From: mogres Date: Wed, 10 Jan 2024 22:06:45 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20main=20@=206?= =?UTF-8?q?ba5a468d2b40f2c8997f4396ab166d9193aec1d=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _modules/cellpack/autopack/Analysis.html | 4 +-- _modules/cellpack/autopack/Environment.html | 6 ++--- _modules/cellpack/autopack/utils.html | 26 ++++++++++++++++++++ _modules/cellpack/bin/pack.html | 6 ++++- cellpack.autopack.html | 6 +++++ cellpack.html | 1 + genindex.html | 2 ++ objects.inv | Bin 11946 -> 11954 bytes searchindex.js | 2 +- 9 files changed, 46 insertions(+), 7 deletions(-) diff --git a/_modules/cellpack/autopack/Analysis.html b/_modules/cellpack/autopack/Analysis.html index 87b22dd9..f07fdb4c 100644 --- a/_modules/cellpack/autopack/Analysis.html +++ b/_modules/cellpack/autopack/Analysis.html @@ -2424,8 +2424,8 @@

Source code for cellpack.autopack.Analysis

         """
         Packs one seed of a recipe and returns the recipe object
         """
-        seed_basename = self.env.add_seed_number_to_base_name(seed_index)
-        seed = seed_list[seed_index]
+        seed = int(seed_list[seed_index])
+        seed_basename = self.env.add_seed_number_to_base_name(seed)
         # Clear
         if self.afviewer:
             self.afviewer.clearFill("Test_Spheres2D")
diff --git a/_modules/cellpack/autopack/Environment.html b/_modules/cellpack/autopack/Environment.html
index 5b759783..9836d869 100644
--- a/_modules/cellpack/autopack/Environment.html
+++ b/_modules/cellpack/autopack/Environment.html
@@ -199,8 +199,7 @@ 

Source code for cellpack.autopack.Environment

f"{self.out_folder}/{self.name}_{config['name']}_{self.version}_grid.dat" ) if recipe.get("grid_file_path") is not None: - if os.path.isfile(recipe["grid_file_path"]): - self.grid_file_out = recipe["grid_file_path"] + self.grid_file_out = recipe["grid_file_path"] should_load_grid_file = ( os.path.isfile(self.grid_file_out) and self.load_from_grid_file @@ -2071,7 +2070,8 @@

Source code for cellpack.autopack.Environment

if hasattr(ingr, "count_options") and ingr.count_options is not None: count = get_value_from_distribution( - distribution_options=ingr.count_options + distribution_options=ingr.count_options, + return_int=True, ) if count is not None: ingr.count = count diff --git a/_modules/cellpack/autopack/utils.html b/_modules/cellpack/autopack/utils.html index d3c1fc6f..43a0e206 100644 --- a/_modules/cellpack/autopack/utils.html +++ b/_modules/cellpack/autopack/utils.html @@ -339,6 +339,32 @@

Source code for cellpack.autopack.utils

 
     return value
+ + +
+[docs] +def get_seed_list(packing_config_data, recipe_data): + # Returns a list of seeds to use for packing + if packing_config_data["randomness_seed"] is not None: + seed_list = packing_config_data["randomness_seed"] + elif recipe_data.get("randomness_seed") is not None: + seed_list = recipe_data["randomness_seed"] + else: + seed_list = None + + if isinstance(seed_list, int): + seed_list = [seed_list] + + if (seed_list is not None) and ( + len(seed_list) != packing_config_data["number_of_packings"] + ): + base_seed = int(seed_list[0]) + seed_list = [ + base_seed + i for i in range(packing_config_data["number_of_packings"]) + ] + + return seed_list
+
diff --git a/_modules/cellpack/bin/pack.html b/_modules/cellpack/bin/pack.html index d46718f6..fde8dd81 100644 --- a/_modules/cellpack/bin/pack.html +++ b/_modules/cellpack/bin/pack.html @@ -51,6 +51,7 @@

Source code for cellpack.bin.pack

 from cellpack.autopack.loaders.config_loader import ConfigLoader
 from cellpack.autopack.loaders.recipe_loader import RecipeLoader
 from cellpack.autopack.loaders.analysis_config_loader import AnalysisConfigLoader
+from cellpack.autopack.utils import get_seed_list
 
 ###############################################################################
 log_file_path = path.abspath(path.join(__file__, "../../logging.conf"))
@@ -97,12 +98,15 @@ 

Source code for cellpack.bin.pack

             result_file=None,
         )
         log.info(f"saving to {env.out_folder}")
+
+        seed_list = get_seed_list(packing_config_data, recipe_data)
+
         analyze.doloop(
             packing_config_data["number_of_packings"],
             env.boundingBox,
             plot_figures=packing_config_data.get("save_plot_figures", True),
             show_grid=packing_config_data["show_grid_plot"],
-            seed_list=packing_config_data["randomness_seed"],
+            seed_list=seed_list,
             config_name=packing_config_data["name"],
             recipe_version=recipe_data["version"],
             image_export_options=packing_config_data.get("image_export_options"),
diff --git a/cellpack.autopack.html b/cellpack.autopack.html
index 2ff8f6d8..4b7932e2 100644
--- a/cellpack.autopack.html
+++ b/cellpack.autopack.html
@@ -5506,6 +5506,11 @@ 

Requirements +
+cellpack.autopack.utils.get_seed_list(packing_config_data, recipe_data)[source]
+
+
cellpack.autopack.utils.get_value_from_distribution(distribution_options, return_int=False)[source]
@@ -6522,6 +6527,7 @@

Table of Contents

  • get_max_value_from_distribution()
  • get_min_value_from_distribution()
  • get_paired_key()
  • +
  • get_seed_list()
  • get_value_from_distribution()
  • ingredient_compare0()
  • ingredient_compare1()
  • diff --git a/cellpack.html b/cellpack.html index 150a5e4a..e8cbf2e7 100644 --- a/cellpack.html +++ b/cellpack.html @@ -906,6 +906,7 @@

    Subpackagesget_max_value_from_distribution()
  • get_min_value_from_distribution()
  • get_paired_key()
  • +
  • get_seed_list()
  • get_value_from_distribution()
  • ingredient_compare0()
  • ingredient_compare1()
  • diff --git a/genindex.html b/genindex.html index 119dbcae..4e2a4e55 100644 --- a/genindex.html +++ b/genindex.html @@ -1705,6 +1705,8 @@

    G

  • get_rotations_for_ingredient() (cellpack.autopack.interface_objects.packed_objects.PackedObjects method)
  • get_scaled_distances_between_surfaces() (cellpack.autopack.MeshStore.MeshStore method) +
  • +
  • get_seed_list() (in module cellpack.autopack.utils)
  • get_signed_distance() (cellpack.autopack.ingredient.grow.GrowIngredient method) diff --git a/objects.inv b/objects.inv index 0cce8e583fbeb501d50b59c459ccd29d63469526..8b876aade63027a3b8aee9ba86e2a449a856a21e 100644 GIT binary patch delta 916 zcmV;F18e-MU9w%UEh~RdGlM3$4m7}M&u*rxd2SBj04_g{{Ral(ZfyzOK@!P0;2L~~Y%I??%|#YY_`q7D7<$FBTqWhkXpN81BHN}zD4^t?Z;bIp zHE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