Skip to content

Commit

Permalink
notebook updates
Browse files Browse the repository at this point in the history
  • Loading branch information
camisowers committed Aug 21, 2023
1 parent 3d39f3b commit 0ddeac4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
6 changes: 4 additions & 2 deletions templates/3a_monitor_MIBI_run.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@
"\n",
"* The `plot_mph_metrics` run callback will compute the median pulse height data for each FOV, and plot the results once the run has completed. Additional arguments are: `regression` which when set to True will also plot the linear regression line for the data. <br/> (See [3d_compute_median_pulse_height](./3d_compute_median_pulse_height.ipynb) for more details.)\n",
"\n",
"* The `image_stitching` run callback will create a single image, which stitched together all FOV images for a specific channel. Additional arguments are: `channels`. <br/> (See [3e_stitch_images](./3e_stitch_images.ipynb) for more details.)"
"* The `image_stitching` run callback will create a single image, which stitched together all FOV images for a specific channel. Additional arguments are: `channels`. <br/> (See [3e_stitch_images](./3e_stitch_images.ipynb) for more details.)\n",
"\n",
"* The `check_incomplete_fovs` run callback will check the run for any partially generated images. <br/> (See [3b_extract_images_from_bin](./3b_extract_images_from_bin.ipynb) for more details.)"
]
},
{
Expand All @@ -103,7 +105,7 @@
"outputs": [],
"source": [
"fov_callback, run_callback, intermediate_callback = build_callbacks(\n",
" run_callbacks = ['image_stitching'],\n",
" run_callbacks = ['image_stitching', 'check_incomplete_fovs'],\n",
" intermediate_callbacks = ['plot_qc_metrics', 'plot_mph_metrics'],\n",
" fov_callbacks = ['extract_tiffs', 'generate_pulse_heights'],\n",
" tiff_out_dir=extraction_dir,\n",
Expand Down
23 changes: 21 additions & 2 deletions templates/3b_extract_images_from_bin.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"import os\n",
"\n",
"from toffy.panel_utils import load_panel\n",
"from toffy.bin_extraction import extract_missing_fovs"
"from toffy.bin_extraction import extract_missing_fovs, incomplete_fov_check"
]
},
{
Expand Down Expand Up @@ -99,6 +99,25 @@
"source": [
"extract_missing_fovs(base_dir, extraction_dir, panel)"
]
},
{
"cell_type": "markdown",
"id": "3c7985e3-7f9a-499c-bb42-13e72cd340e5",
"metadata": {},
"source": [
"## Check for any incomplete FOVs\n",
"If the instrument is shut off part way through a run, this can result in output FOVs which are generated, but missing counts in parts of the images. The cell below will check for any incompete FOVs and warn you if any exist."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5cdf46cf-edf3-4889-b1b5-08601b5b3496",
"metadata": {},
"outputs": [],
"source": [
"incomplete_fov_check(bin_file_dir, extraction_dir)"
]
}
],
"metadata": {
Expand All @@ -117,7 +136,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.16"
"version": "3.9.16"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 0ddeac4

Please sign in to comment.