prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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.
  
  </issue>
  <code>
  [start of sunpy/instr/aia.py]
  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 of sunpy/instr/aia.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: 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
  
verification_info: {"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"}]}