prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Fix CROTA keyword in EUI maps
  Currently EUI maps have a `CROTA` keyword, which by the FITS standard should really be a `CROTA2` keyword. This results in the warning
  ```python
  /home/docs/checkouts/readthedocs.org/user_builds/solar-orbiter-python/envs/latest/lib/python3.8/site-packages/astropy/wcs/wcs.py:482: FITSFixedWarning: CROTA = 2.486914995997215 / [deg] rotation angle
  keyword looks very much like CROTAn but isn't.
    wcsprm = _wcs.Wcsprm(header=header_bytes, key=key,
  ```
  It would be good to
  - Check if CROTA is in the header and CROTA2 isn't
  - If so, rename the CROTA keyword to CROTA2
  
  </issue>
  <code>
  [start of sunpy/map/sources/solo.py]
  1 """
  2 Solar Orbiter Map subclass definitions.
  3 """
  4 import astropy.units as u
  5 from astropy.coordinates import CartesianRepresentation
  6 from astropy.visualization import ImageNormalize, LinearStretch
  7 
  8 from sunpy.coordinates import HeliocentricInertial
  9 from sunpy.map import GenericMap
  10 from sunpy.map.sources.source_type import source_stretch
  11 from sunpy.time import parse_time
  12 
  13 __all__ = ['EUIMap']
  14 
  15 
  16 class EUIMap(GenericMap):
  17     """
  18     EUI Image Map
  19 
  20     The Extreme Ultraviolet Imager (EUI) is a remote sensing instrument onboard the
  21     Solar Orbiter (SolO) spacecraft. EUI has three telescopes that image the Sun in
  22     Lyman-alpha (1216 Å) and the EUV (174 Å and 304 Å). The three telescopes are the
  23     Full Sun Imager (FSI) and two High Resolution Imagers (HRI). The FSI images the
  24     whole Sun in both 174 Å and 304 Å. The EUV and Lyman-alpha HRI telescopes image a
  25     1000"-by-1000" patch in 174 Å and 1216 Å, respectively.
  26 
  27     References
  28     ----------
  29     * `Solar Orbiter Mission Page <https://sci.esa.int/web/solar-orbiter/>`__
  30     * `EUI Instrument Page <https://wwwbis.sidc.be/EUI/EUI/EUI/EUI/EUI/>`__
  31     * `Instrument Paper <https://doi.org/10.1051/0004-6361/201936663>`__
  32     """
  33 
  34     def __init__(self, data, header, **kwargs):
  35         super().__init__(data, header, **kwargs)
  36         self._nickname = self.detector
  37         self.plot_settings['cmap'] = self._get_cmap_name()
  38         self.plot_settings['norm'] = ImageNormalize(
  39             stretch=source_stretch(self.meta, LinearStretch()), clip=False)
  40 
  41     @property
  42     def processing_level(self):
  43         if self.meta.get('level'):
  44             # The level number is prepended by the letter L
  45             return int(self.meta.get('level')[1:])
  46 
  47     @property
  48     def exposure_time(self):
  49         return self.meta.get('xposure', 0.0) * self.timeunit
  50 
  51     @property
  52     def date(self):
  53         t = self.meta.get('date-avg')
  54         timesys = self.meta.get('timesys')
  55         return parse_time(t, scale=timesys.lower())
  56 
  57     @property
  58     def _supported_observer_coordinates(self):
  59         return [(('hcix_obs', 'hciy_obs', 'hciz_obs'),
  60                  {'x': self.meta.get('hcix_obs'),
  61                   'y': self.meta.get('hciy_obs'),
  62                   'z': self.meta.get('hciz_obs'),
  63                   'unit': u.m,
  64                   'representation_type': CartesianRepresentation,
  65                   'frame': HeliocentricInertial})] + super()._supported_observer_coordinates
  66 
  67     @classmethod
  68     def is_datasource_for(cls, data, header, **kwargs):
  69         """Determines if header corresponds to an EUI image"""
  70         is_solo = 'solar orbiter' in str(header.get('obsrvtry', '')).lower()
  71         is_eui = str(header.get('instrume', '')).startswith('EUI')
  72         return is_solo and is_eui
  73
  [end of sunpy/map/sources/solo.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/map/sources/solo.py b/sunpy/map/sources/solo.py
  --- a/sunpy/map/sources/solo.py
  +++ b/sunpy/map/sources/solo.py
  @@ -5,6 +5,7 @@
   from astropy.coordinates import CartesianRepresentation
   from astropy.visualization import ImageNormalize, LinearStretch
   
  +from sunpy import log
   from sunpy.coordinates import HeliocentricInertial
   from sunpy.map import GenericMap
   from sunpy.map.sources.source_type import source_stretch
  @@ -38,6 +39,10 @@
           self.plot_settings['norm'] = ImageNormalize(
               stretch=source_stretch(self.meta, LinearStretch()), clip=False)
   
  +        if 'CROTA' in self.meta and 'CROTA2' not in self.meta:
  +            log.debug("Renaming 'CROTA' to 'CROTA2'")
  +            self.meta['CROTA2'] = self.meta.pop('CROTA')
  +
       @property
       def processing_level(self):
           if self.meta.get('level'):
  
verification_info: {"golden_diff": "diff --git a/sunpy/map/sources/solo.py b/sunpy/map/sources/solo.py\n--- a/sunpy/map/sources/solo.py\n+++ b/sunpy/map/sources/solo.py\n@@ -5,6 +5,7 @@\n from astropy.coordinates import CartesianRepresentation\n from astropy.visualization import ImageNormalize, LinearStretch\n \n+from sunpy import log\n from sunpy.coordinates import HeliocentricInertial\n from sunpy.map import GenericMap\n from sunpy.map.sources.source_type import source_stretch\n@@ -38,6 +39,10 @@\n         self.plot_settings['norm'] = ImageNormalize(\n             stretch=source_stretch(self.meta, LinearStretch()), clip=False)\n \n+        if 'CROTA' in self.meta and 'CROTA2' not in self.meta:\n+            log.debug(\"Renaming 'CROTA' to 'CROTA2'\")\n+            self.meta['CROTA2'] = self.meta.pop('CROTA')\n+\n     @property\n     def processing_level(self):\n         if self.meta.get('level'):\n", "issue": "Fix CROTA keyword in EUI maps\nCurrently EUI maps have a `CROTA` keyword, which by the FITS standard should really be a `CROTA2` keyword. This results in the warning\r\n```python\r\n/home/docs/checkouts/readthedocs.org/user_builds/solar-orbiter-python/envs/latest/lib/python3.8/site-packages/astropy/wcs/wcs.py:482: FITSFixedWarning: CROTA = 2.486914995997215 / [deg] rotation angle\r\nkeyword looks very much like CROTAn but isn't.\r\n  wcsprm = _wcs.Wcsprm(header=header_bytes, key=key,\r\n```\r\nIt would be good to\r\n- Check if CROTA is in the header and CROTA2 isn't\r\n- If so, rename the CROTA keyword to CROTA2\n", "before_files": [{"content": "\"\"\"\nSolar Orbiter Map subclass definitions.\n\"\"\"\nimport astropy.units as u\nfrom astropy.coordinates import CartesianRepresentation\nfrom astropy.visualization import ImageNormalize, LinearStretch\n\nfrom sunpy.coordinates import HeliocentricInertial\nfrom sunpy.map import GenericMap\nfrom sunpy.map.sources.source_type import source_stretch\nfrom sunpy.time import parse_time\n\n__all__ = ['EUIMap']\n\n\nclass EUIMap(GenericMap):\n    \"\"\"\n    EUI Image Map\n\n    The Extreme Ultraviolet Imager (EUI) is a remote sensing instrument onboard the\n    Solar Orbiter (SolO) spacecraft. EUI has three telescopes that image the Sun in\n    Lyman-alpha (1216 \u00c5) and the EUV (174 \u00c5 and 304 \u00c5). The three telescopes are the\n    Full Sun Imager (FSI) and two High Resolution Imagers (HRI). The FSI images the\n    whole Sun in both 174 \u00c5 and 304 \u00c5. The EUV and Lyman-alpha HRI telescopes image a\n    1000\"-by-1000\" patch in 174 \u00c5 and 1216 \u00c5, respectively.\n\n    References\n    ----------\n    * `Solar Orbiter Mission Page <https://sci.esa.int/web/solar-orbiter/>`__\n    * `EUI Instrument Page <https://wwwbis.sidc.be/EUI/EUI/EUI/EUI/EUI/>`__\n    * `Instrument Paper <https://doi.org/10.1051/0004-6361/201936663>`__\n    \"\"\"\n\n    def __init__(self, data, header, **kwargs):\n        super().__init__(data, header, **kwargs)\n        self._nickname = self.detector\n        self.plot_settings['cmap'] = self._get_cmap_name()\n        self.plot_settings['norm'] = ImageNormalize(\n            stretch=source_stretch(self.meta, LinearStretch()), clip=False)\n\n    @property\n    def processing_level(self):\n        if self.meta.get('level'):\n            # The level number is prepended by the letter L\n            return int(self.meta.get('level')[1:])\n\n    @property\n    def exposure_time(self):\n        return self.meta.get('xposure', 0.0) * self.timeunit\n\n    @property\n    def date(self):\n        t = self.meta.get('date-avg')\n        timesys = self.meta.get('timesys')\n        return parse_time(t, scale=timesys.lower())\n\n    @property\n    def _supported_observer_coordinates(self):\n        return [(('hcix_obs', 'hciy_obs', 'hciz_obs'),\n                 {'x': self.meta.get('hcix_obs'),\n                  'y': self.meta.get('hciy_obs'),\n                  'z': self.meta.get('hciz_obs'),\n                  'unit': u.m,\n                  'representation_type': CartesianRepresentation,\n                  'frame': HeliocentricInertial})] + super()._supported_observer_coordinates\n\n    @classmethod\n    def is_datasource_for(cls, data, header, **kwargs):\n        \"\"\"Determines if header corresponds to an EUI image\"\"\"\n        is_solo = 'solar orbiter' in str(header.get('obsrvtry', '')).lower()\n        is_eui = str(header.get('instrume', '')).startswith('EUI')\n        return is_solo and is_eui\n", "path": "sunpy/map/sources/solo.py"}]}