From 4444536f2d5ed1b9eed44433a613741fa109b9ee Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Mon, 4 Sep 2023 16:37:51 +0200 Subject: [PATCH] Minor polishing commits --- 3_POSIX_Bash.ipynb | 2 ++ 4_OMETiff_Python.ipynb | 79 +++++++++++++++++++++++++++++++++++++----- 2 files changed, 73 insertions(+), 8 deletions(-) diff --git a/3_POSIX_Bash.ipynb b/3_POSIX_Bash.ipynb index 899b933..f468865 100644 --- a/3_POSIX_Bash.ipynb +++ b/3_POSIX_Bash.ipynb @@ -67,6 +67,8 @@ " \n", "
\n", " \n", + "
\n", + "
\n", " \n", " \"Clara shares\"\n", " by Henning Falk, ©2022 NumFOCUS, is used under a CC BY 4.0 license. Modifications to this photo include cropping.\n", diff --git a/4_OMETiff_Python.ipynb b/4_OMETiff_Python.ipynb index 1c40359..a9f2f65 100644 --- a/4_OMETiff_Python.ipynb +++ b/4_OMETiff_Python.ipynb @@ -32,19 +32,82 @@ "
  • aicsimageio
  • \n", "
  • tifffile
  • \n", "
  • and ome-types
  • \n", - " \n", + " \n", "

    \n", " \n", " \n", "
    \n", " \n", "
    \n", + "
    \n", + " \n", + " https://ome-model.readthedocs.io/en/stable/ome-tiff/index.html#support\n", + " \n", + "
    \n", " \n", " \n", "\n", "\n" ] }, + { + "cell_type": "code", + "execution_count": 1, + "id": "c2bb2db9-8423-475d-baec-575c5e3f34ad", + "metadata": {}, + "outputs": [], + "source": [ + "%%bash\n", + "##\n", + "## Setup & Sanity checks\n", + "##\n", + "\n", + "YOURNAME=$(whoami)\n", + "WORKDIR=/scratch/${YOURNAME}/session1/\n", + "test -e ${WORKDIR} || {\n", + " echo Please run the first the POSIX notebook first.\n", + " exit 1\n", + "}" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "13b54bbb-865a-4f8a-ba6c-176aece5c55f", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "env: YOURNAME=jamoore\n" + ] + } + ], + "source": [ + "import os\n", + "YOURNAME = os.getlogin()\n", + "%env YOURNAME=$YOURNAME" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "3f3cb95c-e131-4282-965f-6f4d86cdca38", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/System/Volumes/Data/scratch/jamoore/session1\n" + ] + } + ], + "source": [ + "%cd /scratch/{YOURNAME}/session1" + ] + }, { "cell_type": "markdown", "id": "5ef9f593-672a-46f5-bcd9-ccb74aa34848", @@ -57,7 +120,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 4, "id": "c65afca4-27bd-41f6-b59a-ce2fc7d9cd88", "metadata": {}, "outputs": [], @@ -86,7 +149,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 5, "id": "b9ec37a2-5bd0-42a2-89a7-07bc03a614db", "metadata": {}, "outputs": [], @@ -108,7 +171,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 6, "id": "79ded011-475a-4320-993d-2227b620681c", "metadata": {}, "outputs": [], @@ -131,7 +194,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 7, "id": "8a8d96dc-e6d3-4e9d-944c-b66160811305", "metadata": {}, "outputs": [ @@ -139,7 +202,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "id='Image:0' name='data/a' pixels={'channels': [{'annotation_refs': [], 'light_path': {'excitation_filters': [], 'emission_filters': [], 'annotation_refs': []}, 'id': 'Channel:0:0', 'samples_per_pixel': 1, 'color': Color('white', rgb=(255, 255, 255))}], 'bin_data_blocks': [], 'tiff_data_blocks': [{'uuid': {'value': 'urn:uuid:d8f35575-5655-4b0e-8885-a952f05ebaeb', 'file_name': 'a.ome.tiff'}, 'plane_count': 1}], 'planes': [], 'id': 'Pixels:0', 'dimension_order': , 'type': , 'significant_bits': 8, 'interleaved': False, 'big_endian': False, 'size_x': 512, 'size_y': 512, 'size_z': 1, 'size_c': 1, 'size_t': 1}\n" + "id='Image:0' name='a' pixels={'channels': [{'annotation_refs': [], 'light_path': {'excitation_filters': [], 'emission_filters': [], 'annotation_refs': []}, 'id': 'Channel:0:0', 'samples_per_pixel': 1, 'color': Color('white', rgb=(255, 255, 255))}], 'bin_data_blocks': [], 'tiff_data_blocks': [{'uuid': {'value': 'urn:uuid:a4331d69-3db3-419b-a28f-b4c6021bcf87', 'file_name': 'a.ome.tiff'}, 'plane_count': 1}], 'planes': [], 'id': 'Pixels:0', 'dimension_order': , 'type': , 'significant_bits': 8, 'interleaved': False, 'big_endian': False, 'size_x': 512, 'size_y': 512, 'size_z': 1, 'size_c': 1, 'size_t': 1}\n" ] } ], @@ -152,7 +215,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 8, "id": "2869cf30-3f91-44ef-8fc3-bdbc45ba242c", "metadata": { "scrolled": true @@ -162,7 +225,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "id='Image:0' name='data/a' pixels={'channels': [{'annotation_refs': [], 'light_path': {'excitation_filters': [], 'emission_filters': [], 'annotation_refs': []}, 'id': 'Channel:0:0', 'samples_per_pixel': 1, 'color': Color('white', rgb=(255, 255, 255))}], 'bin_data_blocks': [], 'tiff_data_blocks': [{'uuid': {'value': 'urn:uuid:d8f35575-5655-4b0e-8885-a952f05ebaeb', 'file_name': 'a.ome.tiff'}, 'plane_count': 1}], 'planes': [], 'id': 'Pixels:0', 'dimension_order': , 'type': , 'significant_bits': 8, 'interleaved': False, 'big_endian': False, 'size_x': 512, 'size_y': 512, 'size_z': 1, 'size_c': 1, 'size_t': 1}\n" + "id='Image:0' name='a' pixels={'channels': [{'annotation_refs': [], 'light_path': {'excitation_filters': [], 'emission_filters': [], 'annotation_refs': []}, 'id': 'Channel:0:0', 'samples_per_pixel': 1, 'color': Color('white', rgb=(255, 255, 255))}], 'bin_data_blocks': [], 'tiff_data_blocks': [{'uuid': {'value': 'urn:uuid:a4331d69-3db3-419b-a28f-b4c6021bcf87', 'file_name': 'a.ome.tiff'}, 'plane_count': 1}], 'planes': [], 'id': 'Pixels:0', 'dimension_order': , 'type': , 'significant_bits': 8, 'interleaved': False, 'big_endian': False, 'size_x': 512, 'size_y': 512, 'size_z': 1, 'size_c': 1, 'size_t': 1}\n" ] } ],