We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove sunpy.instr.aia.aiaprep
The `aiaprep` function should be removed from the `sunpy.instr` subpackage. Any AIA specific functionality should transition to the new [`aiapy` package](https://gitlab.com/LMSAL_HUB/aia_hub/aiapy).

This is part of the broader goal of moving instrument-specific functionality out of the core sunpy package and into affiliated packages.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `sunpy/instr/aia.py`
Content:
```
1 """
2 This module provides processing routines for data captured with the AIA
3 instrument on SDO.
4 """
5 import numpy as np
6 
7 import astropy.units as u
8 
9 from sunpy.map.sources.sdo import AIAMap, HMIMap
10 from sunpy.util.decorators import deprecated
11 
12 __all__ = ['aiaprep']
13 
14 
15 @deprecated("2.0", alternative="`register` in aiapy (https://aiapy.readthedocs.io) for converting \
16 AIA images to level 1.5")
17 def aiaprep(aiamap):
18     """
19     Processes a level 1 `~sunpy.map.sources.sdo.AIAMap` into a level 1.5
20     `~sunpy.map.sources.sdo.AIAMap`.
21 
22     Rotates, scales and translates the image so that solar North is aligned
23     with the y axis, each pixel is 0.6 arcsec across, and the center of the
24     Sun is at the center of the image. The actual transformation is done by Map's
25     `~sunpy.map.mapbase.GenericMap.rotate` method.
26 
27     This function is similar in functionality to ``aia_prep`` in SSWIDL, but
28     it does not use the same transformation to rotate the image and it handles
29     the meta data differently. It should therefore not be expected to produce
30     the same results.
31 
32     Parameters
33     ----------
34     aiamap : `~sunpy.map.sources.sdo.AIAMap`
35         A `sunpy.map.Map` from AIA.
36 
37     Returns
38     -------
39     `~sunpy.map.sources.sdo.AIAMap`:
40         A level 1.5 copy of `~sunpy.map.sources.sdo.AIAMap`.
41 
42     Notes
43     -----
44     This routine modifies the header information to the standard PCi_j WCS
45     formalism. The FITS header resulting in saving a file after this
46     procedure will therefore differ from the original file.
47     """
48 
49     if not isinstance(aiamap, (AIAMap, HMIMap)):
50         raise ValueError("Input must be an AIAMap or HMIMap.")
51 
52     # Target scale is 0.6 arcsec/pixel, but this needs to be adjusted if the map
53     # has already been rescaled.
54     if ((aiamap.scale[0] / 0.6).round() != 1.0 * u.arcsec / u.pix
55             and aiamap.data.shape != (4096, 4096)):
56         scale = (aiamap.scale[0] / 0.6).round() * 0.6 * u.arcsec
57     else:
58         scale = 0.6 * u.arcsec  # pragma: no cover # can't test this because it needs a full res image
59     scale_factor = aiamap.scale[0] / scale
60 
61     tempmap = aiamap.rotate(recenter=True, scale=scale_factor.value, missing=aiamap.min())
62 
63     # extract center from padded aiamap.rotate output
64     # crpix1 and crpix2 will be equal (recenter=True), as aiaprep does not work with submaps
65     center = np.floor(tempmap.meta['crpix1'])
66     range_side = (center + np.array([-1, 1]) * aiamap.data.shape[0] / 2) * u.pix
67     newmap = tempmap.submap(u.Quantity([range_side[0], range_side[0]]),
68                             u.Quantity([range_side[1] - 1 * u.pix,
69                                         range_side[1] - 1 * u.pix]))
70 
71     newmap.meta['r_sun'] = newmap.meta['rsun_obs'] / newmap.meta['cdelt1']
72     newmap.meta['lvl_num'] = 1.5
73     newmap.meta['bitpix'] = -64
74 
75     return newmap
76
```
--- 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/sunpy/instr/aia.py b/sunpy/instr/aia.py
deleted file mode 100644
--- a/sunpy/instr/aia.py
+++ /dev/null
@@ -1,75 +0,0 @@
-"""
-This module provides processing routines for data captured with the AIA
-instrument on SDO.
-"""
-import numpy as np
-
-import astropy.units as u
-
-from sunpy.map.sources.sdo import AIAMap, HMIMap
-from sunpy.util.decorators import deprecated
-
-__all__ = ['aiaprep']
-
-
-@deprecated("2.0", alternative="`register` in aiapy (https://aiapy.readthedocs.io) for converting \
-AIA images to level 1.5")
-def aiaprep(aiamap):
-    """
-    Processes a level 1 `~sunpy.map.sources.sdo.AIAMap` into a level 1.5
-    `~sunpy.map.sources.sdo.AIAMap`.
-
-    Rotates, scales and translates the image so that solar North is aligned
-    with the y axis, each pixel is 0.6 arcsec across, and the center of the
-    Sun is at the center of the image. The actual transformation is done by Map's
-    `~sunpy.map.mapbase.GenericMap.rotate` method.
-
-    This function is similar in functionality to ``aia_prep`` in SSWIDL, but
-    it does not use the same transformation to rotate the image and it handles
-    the meta data differently. It should therefore not be expected to produce
-    the same results.
-
-    Parameters
-    ----------
-    aiamap : `~sunpy.map.sources.sdo.AIAMap`
-        A `sunpy.map.Map` from AIA.
-
-    Returns
-    -------
-    `~sunpy.map.sources.sdo.AIAMap`:
-        A level 1.5 copy of `~sunpy.map.sources.sdo.AIAMap`.
-
-    Notes
-    -----
-    This routine modifies the header information to the standard PCi_j WCS
-    formalism. The FITS header resulting in saving a file after this
-    procedure will therefore differ from the original file.
-    """
-
-    if not isinstance(aiamap, (AIAMap, HMIMap)):
-        raise ValueError("Input must be an AIAMap or HMIMap.")
-
-    # Target scale is 0.6 arcsec/pixel, but this needs to be adjusted if the map
-    # has already been rescaled.
-    if ((aiamap.scale[0] / 0.6).round() != 1.0 * u.arcsec / u.pix
-            and aiamap.data.shape != (4096, 4096)):
-        scale = (aiamap.scale[0] / 0.6).round() * 0.6 * u.arcsec
-    else:
-        scale = 0.6 * u.arcsec  # pragma: no cover # can't test this because it needs a full res image
-    scale_factor = aiamap.scale[0] / scale
-
-    tempmap = aiamap.rotate(recenter=True, scale=scale_factor.value, missing=aiamap.min())
-
-    # extract center from padded aiamap.rotate output
-    # crpix1 and crpix2 will be equal (recenter=True), as aiaprep does not work with submaps
-    center = np.floor(tempmap.meta['crpix1'])
-    range_side = (center + np.array([-1, 1]) * aiamap.data.shape[0] / 2) * u.pix
-    newmap = tempmap.submap(u.Quantity([range_side[0], range_side[0]]),
-                            u.Quantity([range_side[1] - 1 * u.pix,
-                                        range_side[1] - 1 * u.pix]))
-
-    newmap.meta['r_sun'] = newmap.meta['rsun_obs'] / newmap.meta['cdelt1']
-    newmap.meta['lvl_num'] = 1.5
-    newmap.meta['bitpix'] = -64
-
-    return newmap

{"golden_diff": "diff --git a/sunpy/instr/aia.py b/sunpy/instr/aia.py\ndeleted file mode 100644\n--- a/sunpy/instr/aia.py\n+++ /dev/null\n@@ -1,75 +0,0 @@\n-\"\"\"\n-This module provides processing routines for data captured with the AIA\n-instrument on SDO.\n-\"\"\"\n-import numpy as np\n-\n-import astropy.units as u\n-\n-from sunpy.map.sources.sdo import AIAMap, HMIMap\n-from sunpy.util.decorators import deprecated\n-\n-__all__ = ['aiaprep']\n-\n-\n-@deprecated(\"2.0\", alternative=\"`register` in aiapy (https://aiapy.readthedocs.io) for converting \\\n-AIA images to level 1.5\")\n-def aiaprep(aiamap):\n-    \"\"\"\n-    Processes a level 1 `~sunpy.map.sources.sdo.AIAMap` into a level 1.5\n-    `~sunpy.map.sources.sdo.AIAMap`.\n-\n-    Rotates, scales and translates the image so that solar North is aligned\n-    with the y axis, each pixel is 0.6 arcsec across, and the center of the\n-    Sun is at the center of the image. The actual transformation is done by Map's\n-    `~sunpy.map.mapbase.GenericMap.rotate` method.\n-\n-    This function is similar in functionality to ``aia_prep`` in SSWIDL, but\n-    it does not use the same transformation to rotate the image and it handles\n-    the meta data differently. It should therefore not be expected to produce\n-    the same results.\n-\n-    Parameters\n-    ----------\n-    aiamap : `~sunpy.map.sources.sdo.AIAMap`\n-        A `sunpy.map.Map` from AIA.\n-\n-    Returns\n-    -------\n-    `~sunpy.map.sources.sdo.AIAMap`:\n-        A level 1.5 copy of `~sunpy.map.sources.sdo.AIAMap`.\n-\n-    Notes\n-    -----\n-    This routine modifies the header information to the standard PCi_j WCS\n-    formalism. The FITS header resulting in saving a file after this\n-    procedure will therefore differ from the original file.\n-    \"\"\"\n-\n-    if not isinstance(aiamap, (AIAMap, HMIMap)):\n-        raise ValueError(\"Input must be an AIAMap or HMIMap.\")\n-\n-    # Target scale is 0.6 arcsec/pixel, but this needs to be adjusted if the map\n-    # has already been rescaled.\n-    if ((aiamap.scale[0] / 0.6).round() != 1.0 * u.arcsec / u.pix\n-            and aiamap.data.shape != (4096, 4096)):\n-        scale = (aiamap.scale[0] / 0.6).round() * 0.6 * u.arcsec\n-    else:\n-        scale = 0.6 * u.arcsec  # pragma: no cover # can't test this because it needs a full res image\n-    scale_factor = aiamap.scale[0] / scale\n-\n-    tempmap = aiamap.rotate(recenter=True, scale=scale_factor.value, missing=aiamap.min())\n-\n-    # extract center from padded aiamap.rotate output\n-    # crpix1 and crpix2 will be equal (recenter=True), as aiaprep does not work with submaps\n-    center = np.floor(tempmap.meta['crpix1'])\n-    range_side = (center + np.array([-1, 1]) * aiamap.data.shape[0] / 2) * u.pix\n-    newmap = tempmap.submap(u.Quantity([range_side[0], range_side[0]]),\n-                            u.Quantity([range_side[1] - 1 * u.pix,\n-                                        range_side[1] - 1 * u.pix]))\n-\n-    newmap.meta['r_sun'] = newmap.meta['rsun_obs'] / newmap.meta['cdelt1']\n-    newmap.meta['lvl_num'] = 1.5\n-    newmap.meta['bitpix'] = -64\n-\n-    return newmap\n", "issue": "Remove sunpy.instr.aia.aiaprep\nThe `aiaprep` function should be removed from the `sunpy.instr` subpackage. Any AIA specific functionality should transition to the new [`aiapy` package](https://gitlab.com/LMSAL_HUB/aia_hub/aiapy).\r\n\r\nThis is part of the broader goal of moving instrument-specific functionality out of the core sunpy package and into affiliated packages.\n", "before_files": [{"content": "\"\"\"\nThis module provides processing routines for data captured with the AIA\ninstrument on SDO.\n\"\"\"\nimport numpy as np\n\nimport astropy.units as u\n\nfrom sunpy.map.sources.sdo import AIAMap, HMIMap\nfrom sunpy.util.decorators import deprecated\n\n__all__ = ['aiaprep']\n\n\n@deprecated(\"2.0\", alternative=\"`register` in aiapy (https://aiapy.readthedocs.io) for converting \\\nAIA images to level 1.5\")\ndef aiaprep(aiamap):\n    \"\"\"\n    Processes a level 1 `~sunpy.map.sources.sdo.AIAMap` into a level 1.5\n    `~sunpy.map.sources.sdo.AIAMap`.\n\n    Rotates, scales and translates the image so that solar North is aligned\n    with the y axis, each pixel is 0.6 arcsec across, and the center of the\n    Sun is at the center of the image. The actual transformation is done by Map's\n    `~sunpy.map.mapbase.GenericMap.rotate` method.\n\n    This function is similar in functionality to ``aia_prep`` in SSWIDL, but\n    it does not use the same transformation to rotate the image and it handles\n    the meta data differently. It should therefore not be expected to produce\n    the same results.\n\n    Parameters\n    ----------\n    aiamap : `~sunpy.map.sources.sdo.AIAMap`\n        A `sunpy.map.Map` from AIA.\n\n    Returns\n    -------\n    `~sunpy.map.sources.sdo.AIAMap`:\n        A level 1.5 copy of `~sunpy.map.sources.sdo.AIAMap`.\n\n    Notes\n    -----\n    This routine modifies the header information to the standard PCi_j WCS\n    formalism. The FITS header resulting in saving a file after this\n    procedure will therefore differ from the original file.\n    \"\"\"\n\n    if not isinstance(aiamap, (AIAMap, HMIMap)):\n        raise ValueError(\"Input must be an AIAMap or HMIMap.\")\n\n    # Target scale is 0.6 arcsec/pixel, but this needs to be adjusted if the map\n    # has already been rescaled.\n    if ((aiamap.scale[0] / 0.6).round() != 1.0 * u.arcsec / u.pix\n            and aiamap.data.shape != (4096, 4096)):\n        scale = (aiamap.scale[0] / 0.6).round() * 0.6 * u.arcsec\n    else:\n        scale = 0.6 * u.arcsec  # pragma: no cover # can't test this because it needs a full res image\n    scale_factor = aiamap.scale[0] / scale\n\n    tempmap = aiamap.rotate(recenter=True, scale=scale_factor.value, missing=aiamap.min())\n\n    # extract center from padded aiamap.rotate output\n    # crpix1 and crpix2 will be equal (recenter=True), as aiaprep does not work with submaps\n    center = np.floor(tempmap.meta['crpix1'])\n    range_side = (center + np.array([-1, 1]) * aiamap.data.shape[0] / 2) * u.pix\n    newmap = tempmap.submap(u.Quantity([range_side[0], range_side[0]]),\n                            u.Quantity([range_side[1] - 1 * u.pix,\n                                        range_side[1] - 1 * u.pix]))\n\n    newmap.meta['r_sun'] = newmap.meta['rsun_obs'] / newmap.meta['cdelt1']\n    newmap.meta['lvl_num'] = 1.5\n    newmap.meta['bitpix'] = -64\n\n    return newmap\n", "path": "sunpy/instr/aia.py"}], "after_files": [{"content": null, "path": "sunpy/instr/aia.py"}]}