From c3c01cb000022aa1ad5a79da178a6fd426553dc3 Mon Sep 17 00:00:00 2001 From: Jesse Averbukh Date: Thu, 22 Jul 2021 14:03:25 -0400 Subject: [PATCH 1/3] Add information about adding cutouts in nb --- notebooks/MosvizExample.ipynb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/notebooks/MosvizExample.ipynb b/notebooks/MosvizExample.ipynb index 58c4014857..4f058d310e 100644 --- a/notebooks/MosvizExample.ipynb +++ b/notebooks/MosvizExample.ipynb @@ -129,7 +129,13 @@ " elif 's2d' in file_path:\n", " spectra_2d.append(file_path)\n", "\n", - "images = [str(level3_path / 'mosviz_cutouts' / '227.fits')] * len(spectra_1d)" + "images = [str(level3_path / 'mosviz_cutouts' / '227.fits')] * len(spectra_1d)\n", + "\n", + "# *** OR ***\n", + "# If images are available in a cutouts directory, uncomment the following lines\n", + "\n", + "# for file_path in glob.iglob(str(level3_path / 'cutouts' / '*')):\n", + "# images.append(file_path)" ] }, { @@ -220,7 +226,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -234,7 +240,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.3" + "version": "3.8.10" } }, "nbformat": 4, From cd518c074a415eec0448616a13fd8d003049433a Mon Sep 17 00:00:00 2001 From: Jesse Averbukh Date: Thu, 22 Jul 2021 14:06:50 -0400 Subject: [PATCH 2/3] Clarify comments --- notebooks/MosvizExample.ipynb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/notebooks/MosvizExample.ipynb b/notebooks/MosvizExample.ipynb index 4f058d310e..0bae41ff26 100644 --- a/notebooks/MosvizExample.ipynb +++ b/notebooks/MosvizExample.ipynb @@ -132,8 +132,10 @@ "images = [str(level3_path / 'mosviz_cutouts' / '227.fits')] * len(spectra_1d)\n", "\n", "# *** OR ***\n", - "# If images are available in a cutouts directory, uncomment the following lines\n", + "# If images are available in a cutouts directory, uncomment the following lines.\n", + "# Please make sure the number of cutouts matches the number of x1d and s2d files.\n", "\n", + "# images = []\n", "# for file_path in glob.iglob(str(level3_path / 'cutouts' / '*')):\n", "# images.append(file_path)" ] From fb002a385e55b20faf00f5bb825527af63ae877f Mon Sep 17 00:00:00 2001 From: Jesse Averbukh Date: Fri, 23 Jul 2021 10:36:14 -0400 Subject: [PATCH 3/3] Update notebooks/MosvizExample.ipynb Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com> --- notebooks/MosvizExample.ipynb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/notebooks/MosvizExample.ipynb b/notebooks/MosvizExample.ipynb index 0bae41ff26..49b992a76b 100644 --- a/notebooks/MosvizExample.ipynb +++ b/notebooks/MosvizExample.ipynb @@ -135,9 +135,7 @@ "# If images are available in a cutouts directory, uncomment the following lines.\n", "# Please make sure the number of cutouts matches the number of x1d and s2d files.\n", "\n", - "# images = []\n", - "# for file_path in glob.iglob(str(level3_path / 'cutouts' / '*')):\n", - "# images.append(file_path)" + "# images = [file_path for file_path in glob.iglob(str(level3_path / 'cutouts' / '*'))]\n" ] }, {