Skip to content

Commit 27bd789

Browse files
committed
updated 103_8
1 parent 838dc86 commit 27bd789

1 file changed

Lines changed: 38 additions & 38 deletions

File tree

DP1/100_How_to_Use_RSP_Tools/103_Image_access_and_display/103_8_Image_display_with_matplotlib.ipynb

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@
391391
"outputs": [],
392392
"source": [
393393
"fig, ax = plt.subplots()\n",
394-
"display = afwDisplay.Display(frame=fig)\n",
395-
"display.scale('linear', 'zscale')\n",
396-
"display.image(deep_coadd.image)\n",
394+
"afw_display = afwDisplay.Display(frame=fig)\n",
395+
"afw_display.scale('linear', 'zscale')\n",
396+
"afw_display.image(deep_coadd.image)\n",
397397
"plt.show()\n",
398398
"remove_figure(fig)"
399399
]
@@ -406,12 +406,40 @@
406406
"> Figure 1: A `deep_coadd` with the `linear` and `zscale` scaling and without the mask overlay, displayed in grayscale with a scale bar at right. Axes labels are in pixels. "
407407
]
408408
},
409+
{
410+
"cell_type": "markdown",
411+
"id": "224d5adb-6d3b-484d-bc43-910c7f0a401c",
412+
"metadata": {},
413+
"source": [
414+
"Read the API documentation about the above functions using the Jupyter notebook `help()` function."
415+
]
416+
},
417+
{
418+
"cell_type": "code",
419+
"execution_count": null,
420+
"id": "80560317-1473-41c3-8534-da8cdacceecf",
421+
"metadata": {},
422+
"outputs": [],
423+
"source": [
424+
"help(afw_display.scale)"
425+
]
426+
},
427+
{
428+
"cell_type": "code",
429+
"execution_count": null,
430+
"id": "0861e1d6-e5ca-4a5c-b587-c476a9db41f2",
431+
"metadata": {},
432+
"outputs": [],
433+
"source": [
434+
"help(afw_display.image)"
435+
]
436+
},
409437
{
410438
"cell_type": "markdown",
411439
"id": "b9cf4589-1cb6-4d89-98c4-b090028a6e4f",
412440
"metadata": {},
413441
"source": [
414-
"### 2.1 Scaling options "
442+
"### 2.1. Scaling options "
415443
]
416444
},
417445
{
@@ -461,7 +489,7 @@
461489
"id": "ebc31bf9-13c1-4aa8-9649-e1f06a92de70",
462490
"metadata": {},
463491
"source": [
464-
"### 2.2 Manipulate the mask display\n",
492+
"### 2.2. Manipulate the mask display\n",
465493
"\n",
466494
"Each image returned by the butler contains more than just the image pixel values. \n",
467495
"One other component is the mask associated with the image. \n",
@@ -707,40 +735,12 @@
707735
"> Figure 8: Similar to the previous figure of `visit_image`, but with the mask transparency reduced to 10% (mostly opaque), and the color representing 'DETECTED' pixels changed from blue to green."
708736
]
709737
},
710-
{
711-
"cell_type": "markdown",
712-
"id": "ac2f7284-4a5c-4550-ab67-5b564629b5e2",
713-
"metadata": {},
714-
"source": [
715-
"Read the API documentation about the above functions using the Jupyter notebook `help()` function."
716-
]
717-
},
718-
{
719-
"cell_type": "code",
720-
"execution_count": null,
721-
"id": "80560317-1473-41c3-8534-da8cdacceecf",
722-
"metadata": {},
723-
"outputs": [],
724-
"source": [
725-
"help(display.scale)"
726-
]
727-
},
728-
{
729-
"cell_type": "code",
730-
"execution_count": null,
731-
"id": "0861e1d6-e5ca-4a5c-b587-c476a9db41f2",
732-
"metadata": {},
733-
"outputs": [],
734-
"source": [
735-
"help(display.image)"
736-
]
737-
},
738738
{
739739
"cell_type": "markdown",
740740
"id": "6a31c94a-51cb-4452-bdd1-9a9a237c032b",
741741
"metadata": {},
742742
"source": [
743-
"### 2.3 Plot markers\n",
743+
"### 2.3. Plot markers\n",
744744
"\n",
745745
"In general the Table Access Protocol(TAP)service is the recommended access mechanism for catalog data.\n",
746746
"\n",
@@ -957,7 +957,7 @@
957957
"id": "7f3ae3f7-388b-4827-96ae-d4fe822a9a1e",
958958
"metadata": {},
959959
"source": [
960-
"## 3. Display an image with `matplotlib` `imshow`\n"
960+
"## 3. Display an image with `imshow`\n"
961961
]
962962
},
963963
{
@@ -973,7 +973,7 @@
973973
"id": "e5ec48bf-eb0a-42f4-9dd7-e5024cc93e9f",
974974
"metadata": {},
975975
"source": [
976-
"### 3.1 Display the `deep_coadd`\n"
976+
"### 3.1. Display the `deep_coadd`\n"
977977
]
978978
},
979979
{
@@ -1057,7 +1057,7 @@
10571057
"id": "b2fdd04d-fe39-4e12-8477-5d2ef1112dac",
10581058
"metadata": {},
10591059
"source": [
1060-
"### 3.2 Display the `visit_image`"
1060+
"### 3.2. Display the `visit_image`"
10611061
]
10621062
},
10631063
{
@@ -1182,7 +1182,7 @@
11821182
"id": "894b8da3-ad2a-49bd-868c-ef098d491171",
11831183
"metadata": {},
11841184
"source": [
1185-
"### 3.3 Plot markers"
1185+
"### 3.3. Plot markers"
11861186
]
11871187
},
11881188
{

0 commit comments

Comments
 (0)