We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update "Masking out the solar disk" example to use maputils function
Example: https://docs.sunpy.org/en/stable/generated/gallery/computer_vision_techniques/mask_disk.html

Update to use `sunpy.map.coordinate_is_on_solar_disk()`

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `examples/computer_vision_techniques/mask_disk.py`
Content:
```
1 """
2 ==========================
3 Masking out the solar disk
4 ==========================
5 
6 How to mask out all emission from the solar disk.
7 """
8 import matplotlib.pyplot as plt
9 import numpy as np
10 import numpy.ma as ma
11 
12 import sunpy.map
13 from sunpy.data.sample import AIA_171_IMAGE
14 from sunpy.map.maputils import all_coordinates_from_map
15 
16 ###############################################################################
17 # We start with the sample data
18 aia = sunpy.map.Map(AIA_171_IMAGE)
19 
20 ###############################################################################
21 # A utility function gives us access to the helioprojective coordinate of each
22 # pixels. We can use that to create a new array which
23 # contains the normalized radial position for each pixel.
24 hpc_coords = all_coordinates_from_map(aia)
25 r = np.sqrt(hpc_coords.Tx ** 2 + hpc_coords.Ty ** 2) / aia.rsun_obs
26 
27 ###############################################################################
28 # With this information, we create a mask where all values which are less then
29 # the solar radius are masked. We also make a slight change to the colormap
30 # so that masked values are shown as black instead of the default white.
31 mask = ma.masked_less_equal(r, 1)
32 palette = aia.cmap
33 palette.set_bad('black')
34 
35 ###############################################################################
36 # Finally we create a new map with our new mask.
37 scaled_map = sunpy.map.Map(aia.data, aia.meta, mask=mask.mask)
38 
39 ###############################################################################
40 # Let's plot the results using our modified colormap
41 fig = plt.figure()
42 plt.subplot(projection=scaled_map)
43 scaled_map.plot(cmap=palette)
44 scaled_map.draw_limb()
45 plt.show()
46
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/examples/computer_vision_techniques/mask_disk.py b/examples/computer_vision_techniques/mask_disk.py
--- a/examples/computer_vision_techniques/mask_disk.py
+++ b/examples/computer_vision_techniques/mask_disk.py
@@ -6,12 +6,10 @@
 How to mask out all emission from the solar disk.
 """
 import matplotlib.pyplot as plt
-import numpy as np
-import numpy.ma as ma
 
 import sunpy.map
 from sunpy.data.sample import AIA_171_IMAGE
-from sunpy.map.maputils import all_coordinates_from_map
+from sunpy.map.maputils import all_coordinates_from_map, coordinate_is_on_solar_disk
 
 ###############################################################################
 # We start with the sample data
@@ -19,22 +17,22 @@
 
 ###############################################################################
 # A utility function gives us access to the helioprojective coordinate of each
-# pixels. We can use that to create a new array which
-# contains the normalized radial position for each pixel.
+# pixels. We can use that to create a new array of all the coordinates
+# that are on the solar disk.
 hpc_coords = all_coordinates_from_map(aia)
-r = np.sqrt(hpc_coords.Tx ** 2 + hpc_coords.Ty ** 2) / aia.rsun_obs
 
 ###############################################################################
-# With this information, we create a mask where all values which are less then
-# the solar radius are masked. We also make a slight change to the colormap
-# so that masked values are shown as black instead of the default white.
-mask = ma.masked_less_equal(r, 1)
+# Now, we can create a mask from the coordinates by using another utility
+# function that gives us a mask that has `True` for those coordinates that are
+# on the solar disk. We also make a slight change to the colormap so that
+# masked values are shown as black instead of the default white.
+mask = coordinate_is_on_solar_disk(hpc_coords)
 palette = aia.cmap
 palette.set_bad('black')
 
 ###############################################################################
 # Finally we create a new map with our new mask.
-scaled_map = sunpy.map.Map(aia.data, aia.meta, mask=mask.mask)
+scaled_map = sunpy.map.Map(aia.data, aia.meta, mask=mask)
 
 ###############################################################################
 # Let's plot the results using our modified colormap

{"golden_diff": "diff --git a/examples/computer_vision_techniques/mask_disk.py b/examples/computer_vision_techniques/mask_disk.py\n--- a/examples/computer_vision_techniques/mask_disk.py\n+++ b/examples/computer_vision_techniques/mask_disk.py\n@@ -6,12 +6,10 @@\n How to mask out all emission from the solar disk.\n \"\"\"\n import matplotlib.pyplot as plt\n-import numpy as np\n-import numpy.ma as ma\n \n import sunpy.map\n from sunpy.data.sample import AIA_171_IMAGE\n-from sunpy.map.maputils import all_coordinates_from_map\n+from sunpy.map.maputils import all_coordinates_from_map, coordinate_is_on_solar_disk\n \n ###############################################################################\n # We start with the sample data\n@@ -19,22 +17,22 @@\n \n ###############################################################################\n # A utility function gives us access to the helioprojective coordinate of each\n-# pixels. We can use that to create a new array which\n-# contains the normalized radial position for each pixel.\n+# pixels. We can use that to create a new array of all the coordinates\n+# that are on the solar disk.\n hpc_coords = all_coordinates_from_map(aia)\n-r = np.sqrt(hpc_coords.Tx ** 2 + hpc_coords.Ty ** 2) / aia.rsun_obs\n \n ###############################################################################\n-# With this information, we create a mask where all values which are less then\n-# the solar radius are masked. We also make a slight change to the colormap\n-# so that masked values are shown as black instead of the default white.\n-mask = ma.masked_less_equal(r, 1)\n+# Now, we can create a mask from the coordinates by using another utility\n+# function that gives us a mask that has `True` for those coordinates that are\n+# on the solar disk. We also make a slight change to the colormap so that\n+# masked values are shown as black instead of the default white.\n+mask = coordinate_is_on_solar_disk(hpc_coords)\n palette = aia.cmap\n palette.set_bad('black')\n \n ###############################################################################\n # Finally we create a new map with our new mask.\n-scaled_map = sunpy.map.Map(aia.data, aia.meta, mask=mask.mask)\n+scaled_map = sunpy.map.Map(aia.data, aia.meta, mask=mask)\n \n ###############################################################################\n # Let's plot the results using our modified colormap\n", "issue": "Update \"Masking out the solar disk\" example to use maputils function\nExample: https://docs.sunpy.org/en/stable/generated/gallery/computer_vision_techniques/mask_disk.html\r\n\r\nUpdate to use `sunpy.map.coordinate_is_on_solar_disk()`\n", "before_files": [{"content": "\"\"\"\n==========================\nMasking out the solar disk\n==========================\n\nHow to mask out all emission from the solar disk.\n\"\"\"\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport numpy.ma as ma\n\nimport sunpy.map\nfrom sunpy.data.sample import AIA_171_IMAGE\nfrom sunpy.map.maputils import all_coordinates_from_map\n\n###############################################################################\n# We start with the sample data\naia = sunpy.map.Map(AIA_171_IMAGE)\n\n###############################################################################\n# A utility function gives us access to the helioprojective coordinate of each\n# pixels. We can use that to create a new array which\n# contains the normalized radial position for each pixel.\nhpc_coords = all_coordinates_from_map(aia)\nr = np.sqrt(hpc_coords.Tx ** 2 + hpc_coords.Ty ** 2) / aia.rsun_obs\n\n###############################################################################\n# With this information, we create a mask where all values which are less then\n# the solar radius are masked. We also make a slight change to the colormap\n# so that masked values are shown as black instead of the default white.\nmask = ma.masked_less_equal(r, 1)\npalette = aia.cmap\npalette.set_bad('black')\n\n###############################################################################\n# Finally we create a new map with our new mask.\nscaled_map = sunpy.map.Map(aia.data, aia.meta, mask=mask.mask)\n\n###############################################################################\n# Let's plot the results using our modified colormap\nfig = plt.figure()\nplt.subplot(projection=scaled_map)\nscaled_map.plot(cmap=palette)\nscaled_map.draw_limb()\nplt.show()\n", "path": "examples/computer_vision_techniques/mask_disk.py"}], "after_files": [{"content": "\"\"\"\n==========================\nMasking out the solar disk\n==========================\n\nHow to mask out all emission from the solar disk.\n\"\"\"\nimport matplotlib.pyplot as plt\n\nimport sunpy.map\nfrom sunpy.data.sample import AIA_171_IMAGE\nfrom sunpy.map.maputils import all_coordinates_from_map, coordinate_is_on_solar_disk\n\n###############################################################################\n# We start with the sample data\naia = sunpy.map.Map(AIA_171_IMAGE)\n\n###############################################################################\n# A utility function gives us access to the helioprojective coordinate of each\n# pixels. We can use that to create a new array of all the coordinates\n# that are on the solar disk.\nhpc_coords = all_coordinates_from_map(aia)\n\n###############################################################################\n# Now, we can create a mask from the coordinates by using another utility\n# function that gives us a mask that has `True` for those coordinates that are\n# on the solar disk. We also make a slight change to the colormap so that\n# masked values are shown as black instead of the default white.\nmask = coordinate_is_on_solar_disk(hpc_coords)\npalette = aia.cmap\npalette.set_bad('black')\n\n###############################################################################\n# Finally we create a new map with our new mask.\nscaled_map = sunpy.map.Map(aia.data, aia.meta, mask=mask)\n\n###############################################################################\n# Let's plot the results using our modified colormap\nfig = plt.figure()\nplt.subplot(projection=scaled_map)\nscaled_map.plot(cmap=palette)\nscaled_map.draw_limb()\nplt.show()\n", "path": "examples/computer_vision_techniques/mask_disk.py"}]}