Skip to content

Commit

Permalink
Merge pull request #245 from scottclowe/enh_save-compare-params
Browse files Browse the repository at this point in the history
ENH: Compare analysis params when loading from cache
  • Loading branch information
scottclowe committed Jul 16, 2021
2 parents 862a251 + 4643ff4 commit 1d61058
Show file tree
Hide file tree
Showing 4 changed files with 663 additions and 44 deletions.
5 changes: 3 additions & 2 deletions examples/Basic usage - Functional.ipynb
Expand Up @@ -582,8 +582,9 @@
"alpha = 0.02\n",
"\n",
"# If you change the experiment parameters, you need to change the cache directory too.\n",
"# Otherwise you will reload the results from the previous run instead of computing\n",
"# the new results.\n",
"# Otherwise FISSA will try to reload the results from the previous run instead of\n",
"# computing the new results. FISSA will throw an error if you try to load data which\n",
"# was generated with different analysis parameters to its parameters.\n",
"output_folder2 = output_folder + \"_alt\"\n",
"\n",
"# Run FISSA with these parameters\n",
Expand Down
17 changes: 9 additions & 8 deletions examples/Basic usage.ipynb
Expand Up @@ -817,25 +817,26 @@
"# The degree of signal sparsity can be controlled with the alpha parameter.\n",
"alpha = 0.02\n",
"\n",
"# If you change the experiment parameters, you need to change the cache directory too.\n",
"# Otherwise FISSA will try to reload the results from the previous run instead of\n",
"# computing the new results. FISSA will throw an error if you try to load data which\n",
"# was generated with different analysis parameters to its parameters.\n",
"output_folder2 = output_folder + \"_alt\"\n",
"\n",
"# Set up a FISSA experiment with these parameters\n",
"experiment = fissa.Experiment(\n",
" images_location,\n",
" rois_location,\n",
" output_folder,\n",
" output_folder2,\n",
" nRegions=nRegions,\n",
" expansion=expansion,\n",
" alpha=alpha,\n",
" ncores_preparation=ncores_preparation,\n",
" ncores_separation=ncores_separation,\n",
")\n",
"\n",
"# Extract the data with these new parameters.\n",
"# Note that we are using the same output folder as before. Since FISSA has cached\n",
"# a result alrady to this directory, its default behaviour is to restore the\n",
"# previously generated results.\n",
"# To make sure FISSA runs a fresh decontamination process with the new parameters,\n",
"# we need to make sure to specify to redo the preparation and separation.\n",
"# FISSA will then ignore the cached output and overwrite it with new results.\n",
"experiment.separate(redo_prep=True)"
"experiment.separate()"
]
},
{
Expand Down

0 comments on commit 1d61058

Please sign in to comment.