internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: sunpy/sunpy

Issue:
Broken PDF build of documentation
I just fixed the bug that was preventing Read the Docs from building our HTML documentation (for the past month!), but the PDF building has been broken for the past two months.  See https://readthedocs.org/builds/sunpy/ for the logs.  Granted, I don't imagine anyone is actually looking at the PDF, and I gather that Sphinx is prone to providing buggy LaTeX, but it'd still be nice to fix if possible.



Discussion:

Resolving patch:
diff --git a/doc/source/conf.py b/doc/source/conf.py
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -76,7 +76,7 @@ def __complex__(self):
     'pandas', 'pandas.io', 'pandas.io.parsers',
     'suds', 'matplotlib.ticker', 'matplotlib.colorbar',
     'matplotlib.dates', 'scipy.optimize', 'scipy.ndimage',
-    'matplotlib.figure', 'scipy.ndimage.interpolation']
+    'matplotlib.figure', 'scipy.ndimage.interpolation', 'bs4']
 for mod_name in MOCK_MODULES:
     sys.modules[mod_name] = Mock(pi=math.pi, G=6.67364e-11)
 
@@ -165,7 +165,7 @@ def __complex__(self):
 pygments_style = 'sphinx'
 
 # A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
+modindex_common_prefix = ['sunpy.']
 
 
 # -- Options for HTML output ---------------------------------------------------
diff --git a/sunpy/map/compositemap.py b/sunpy/map/compositemap.py
--- a/sunpy/map/compositemap.py
+++ b/sunpy/map/compositemap.py
@@ -13,7 +13,9 @@
 class CompositeMap:
     """
     CompositeMap(map1 [,map2,..])
-    
+
+    A Composite Map class
+
     Parameters
     ----------
     args : [sunpy.map | string]
diff --git a/sunpy/net/vso/__init__.py b/sunpy/net/vso/__init__.py
--- a/sunpy/net/vso/__init__.py
+++ b/sunpy/net/vso/__init__.py
@@ -67,7 +67,8 @@ def __init__(self, callback, n=0, done=None):
     
     def submit(self, keys, value):
         """
-        
+        Submit
+
         Parameters
         ----------
         keys : list


Test patch:
Repository: sunpy/sunpy

Issue:
Callisto downloader maxgap



Discussion:

Resolving patch:
diff --git a/sunpy/spectra/sources/callisto.py b/sunpy/spectra/sources/callisto.py
--- a/sunpy/spectra/sources/callisto.py
+++ b/sunpy/spectra/sources/callisto.py
@@ -346,7 +346,7 @@ def from_range(cls, instrument, start, end, **kwargs):
             end of the measurement
         """
         kw = {
-            'maxgap': 1,
+            'maxgap': None,
             'fill': cls.JOIN_REPEAT,
         }
         


Test patch:
Repository: sunpy/sunpy

Issue:
Logical Light Curve - updated example
Logical light curve works, but the example needs to be updated.

```
"""
Logical light curve.  Originated from a need to analyze the times of HEK
results, where 'True' indicates an event was observed, and 'False'
indicates an event was not observed.

Examples
--------
import sunpy
import datetime
base = datetime.datetime.today()
dates = [base - datetime.timedelta(minutes=x) for x in range(0, 24 * 60)]
z = [True for x in range(0, 24 * 60)]
light_curve = sunpy.lightcurve.LogicalLightCurve.create({"param1": z}, index=dates)
"""
```



Discussion:
Thanks :)

Not 0.3?

all yours @wafels 

My pleasure!


Resolving patch:
diff --git a/sunpy/lightcurve/sources/logical.py b/sunpy/lightcurve/sources/logical.py
--- a/sunpy/lightcurve/sources/logical.py
+++ b/sunpy/lightcurve/sources/logical.py
@@ -21,13 +21,17 @@
 class LogicalLightCurve(LightCurve):
     """
     Logical light curve.  Originated from a need to analyze the times of HEK
-    results, where 'True' indicates an event was observed, and 'False' indicates 
-    an event was not observed.
-
-    Examples
-    --------
-    import sunpy
-    light_curve = sunpy.lightcurve.LogicalLightCurve.create()
+    results, where 'True' indicates an event was observed, and 'False'
+    indicates an event was not observed.
+    
+    Example
+    -------
+    import sunpy.lightcurve as lightcurve
+    import datetime
+    base = datetime.datetime.today()
+    dates = [base - datetime.timedelta(minutes=x) for x in range(0, 24 * 60)]
+    z = [True for x in range(0, 24 * 60)]
+    light_curve = lightcurve.LogicalLightCurve.create({"param1": z}, index=dates)
     """
 
     def complement(self):


Test patch:
Repository: sunpy/sunpy

Issue:
InteractiveVSOClient.get lacks documentation
`InteractiveVSOClient` differs to `VSOClient.get` in two important ways:
- it supports '~' to refer to the home directory of the user
- it appends `'{file}'` to the path if it exists

This behaviour is not documented.



Discussion:
all yours @derdon 


Resolving patch:
diff --git a/sunpy/net/vso/vso.py b/sunpy/net/vso/vso.py
--- a/sunpy/net/vso/vso.py
+++ b/sunpy/net/vso/vso.py
@@ -800,6 +800,12 @@ def search(self, *args, **kwargs):
             return self.query_legacy(*args, **kwargs)
     
     def get(self, query_response, path=None, methods=('URL-FILE',), downloader=None):
+        """The path expands ``~`` to refer to the user's home directory.
+        If the given path is an already existing directory, ``{file}`` is
+        appended to this path. After that, all received parameters (including
+        the updated path) are passed to :meth:`VSOClient.get`.
+
+        """
         if path is not None:
             path = os.path.abspath(os.path.expanduser(path))
             if os.path.exists(path) and os.path.isdir(path):


Test patch:
Repository: sunpy/sunpy

Issue:
GOES light curve should only return data from time range requested
Currently it returns all data for the day of the time range. Take a look at http://stackoverflow.com/questions/14539992/pandas-drop-rows-outside-of-time-range to reduce data in a pandas time series.

GOES light curve should only return data from time range requested
Currently it returns all data for the day of the time range. Take a look at http://stackoverflow.com/questions/14539992/pandas-drop-rows-outside-of-time-range to reduce data in a pandas time series.



Discussion:
+1

+1


Resolving patch:
diff --git a/sunpy/lightcurve/lightcurve.py b/sunpy/lightcurve/lightcurve.py
--- a/sunpy/lightcurve/lightcurve.py
+++ b/sunpy/lightcurve/lightcurve.py
@@ -88,7 +88,9 @@ def from_range(cls, from_, to, **kwargs):
             url, kwargs, 
             err = "Unable to download data for specified date range"
         )
-        return cls.from_file(filepath)
+        result = cls.from_file(filepath)
+        result.data = result.data.ix[result.data.index.indexer_between_time(from_, to)]
+        return result
 
     @classmethod
     def from_timerange(cls, timerange, **kwargs):
@@ -97,7 +99,9 @@ def from_timerange(cls, timerange, **kwargs):
             url, kwargs,
             err = "Unable to download data for specified date range"
         )
-        return cls.from_file(filepath)
+        result = cls.from_file(filepath)
+        result.data = result.data.ix[ts.index.indexer_between_time(timerange.start(), timerange.end())]
+        return result
 
     @classmethod
     def from_file(cls, filename):


Test patch:
Repository: sunpy/sunpy

Issue:
Helioviewer JP2s are upside down
From the docs:
filepath = hv.download_jp2('2012/07/05 00:30:00', observatory='SDO', instrument='HMI', detector='HMI', measurement='continuum')
from sunpy.map import Map
hmi = Map(filepath)
hmi.peek()

yields 
![hmi_cont_20120705](https://f.cloud.github.com/assets/983575/1646528/43b87e92-591e-11e3-8336-39391b081d30.png)

whereas

![2012_07_05_00_29_56_hmi_int](https://f.cloud.github.com/assets/983575/1646546/a5cc392a-591e-11e3-9bd8-7df858e68452.png)

http://helioviewer.org/?date=2012-07-05T06:29:11.000Z&imageScale=4.8408818&centerX=484.370495830072&centerY=170.92347314606627&imageLayers=%5BSDO,HMI,HMI,continuum,1,100%5D&eventLayers=%5BAR,NOAA_SWPC_Observer,1%5D,%5BCC,all,1%5D,%5BCD,all,1%5D,%5BCJ,all,1%5D,%5BCE,all,1%5D,%5BCR,all,1%5D,%5BCW,all,1%5D,%5BER,all,1%5D,%5BFI,all,1%5D,%5BFA,all,1%5D,%5BFE,all,1%5D,%5BLP,all,1%5D,%5BOS,all,1%5D,%5BPG,all,1%5D,%5BSP,all,1%5D,%5BSS,all,1%5D&eventLabels=true

Images read in to sunpy from helioviewer are upside down.



Discussion:

Resolving patch:
diff --git a/sunpy/io/jp2.py b/sunpy/io/jp2.py
--- a/sunpy/io/jp2.py
+++ b/sunpy/io/jp2.py
@@ -37,7 +37,8 @@ def read(filepath):
     header = get_header(filepath)
     data = Jp2k(filepath).read()
     
-    return [(data, header[0])]
+    # Data is read in north-south flipped, so flip it around.
+    return [(data[::-1], header[0])]
 
 def get_header(filepath):
     """


Test patch:
Repository: sunpy/sunpy

Issue:
Make Glymur an optional dependancy
This is "make io imports optional"



Discussion:
This just happened to me and it was very confusing! Definitely need to get this fixed.

Sorry about that! Glymur is really cool, it will make SunPy's JP2 powers
stronger,

On 6 November 2013 22:23, aringlis notifications@github.com wrote:

> This just happened to me and it was very confusing! Definitely need to get
> this fixed.
> 
> —
> Reply to this email directly or view it on GitHubhttps://github.com/sunpy/sunpy/issues/647#issuecomment-27919935
> .

I am not convinced by glymur. It seems to be causing more trouble then it's worth. I doubt very many of our users use JP2 anyway. Anyway, this needs to be fixed ASAP.

For those that use JP2 glymur is an improvement, it dosen't add any more deps for those that have openjpeg installed at the moment, and it makes that part of SunPy much more robust. I would however agree that it needs fixing for those folks that don't use it, and I will get to it before 0.4 goes out of the door.


Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -109,19 +109,12 @@ def install(setup): #pylint: disable=W0621
         classifiers=CLASSIFIERS,
         description=DOCLINES[0],
         download_url="http://www.sunpy.org/download/",
-        # 2011/11/21: disabling for now to prevent paver warnings
-        #extra_requires={
-        #    "Plotman": ['PyQt4']
-        #},
         install_requires=[
             'numpy>1.6.0',
             'astropy>=0.3.0',
             'scipy',
- #           'suds',
             'pandas>=0.10.0',
             'matplotlib>=1.1',
-            'glymur>=0.5.9',
- #           'beautifulsoup4',
             'sqlalchemy',
         ],
         license="BSD",


Test patch:
Repository: sunpy/sunpy

Issue:
CRotate Bug?
Got the following output when trying to use rotate(). I thought we were checking whether Crotate existed but maybe this has broken.

``` python
hmi_map.rotate(np.deg2rad(hmi_map.rotation_angle.get('x')))
/Users/schriste/Dropbox/Developer/python/sunpy/sunpy/map/mapbase.py:587: Warning: The C extension sunpy.image.Crotate is not
installed, falling back to the interpolation='spline' of order=3
  installed, falling back to the interpolation='spline' of order=3""" ,Warning)
ERROR: NameError: global name 'Crotate' is not defined [sunpy.map.mapbase]
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-60-a7eadafb2496> in <module>()
----> 1 hmi_map.rotate(np.deg2rad(hmi_map.rotation_angle.get('x'))
      2 )

/Users/schriste/Dropbox/Developer/python/sunpy/sunpy/map/mapbase.pyc in rotate(self, angle, rmatrix, scale, rotation_center, recenter, missing, interpolation, interp_param)
    595                 interp_type = Crotate.BILINEAR
    596             elif interpolation == 'bicubic':
--> 597                 interp_type = Crotate.BICUBIC
    598             #Make call to extension
    599             data = Crotate.affine_transform(image,

NameError: global name 'Crotate' is not defined
```



Discussion:
Oh boy.

@ehsteve you wanna take this??


Resolving patch:
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py
--- a/sunpy/map/mapbase.py
+++ b/sunpy/map/mapbase.py
@@ -589,15 +589,16 @@ def rotate(self, angle=None, rmatrix=None, scale=1.0, rotation_center=None, rece
                 data = scipy.ndimage.interpolation.affine_transform(image, rsmat,
                            offset=offs, order=3, mode='constant',
                            cval=missing)
-            #Set up call parameters depending on interp type.
-            if interpolation == 'nearest':
-                interp_type = Crotate.NEAREST
-            elif interpolation == 'bilinear':
-                interp_type = Crotate.BILINEAR
-            elif interpolation == 'bicubic':
-                interp_type = Crotate.BICUBIC
-            #Make call to extension
-            data = Crotate.affine_transform(image,
+            else:
+                #Set up call parameters depending on interp type.
+                if interpolation == 'nearest':
+                    interp_type = Crotate.NEAREST
+                elif interpolation == 'bilinear':
+                    interp_type = Crotate.BILINEAR
+                elif interpolation == 'bicubic':
+                    interp_type = Crotate.BICUBIC
+                #Make call to extension
+                data = Crotate.affine_transform(image,
                                       rsmat, offset=offs,
                                       kernel=interp_type, cubic=interp_param,
                                       mode='constant', cval=missing)


Test patch:
Repository: sunpy/sunpy

Issue:
EIT fits file do not provide rotation information
map.plot() from an EIT image requires an CROTA2 key which is not provided in EIT fits file

``` python
>>> map.plot()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/sunpy/visualization/visualization.py", line 15, in fn_itoggle
    ret = fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sunpy/map/mapbase.py", line 1063, in plot
    if not np.array_equal(self.rotation_matrix, np.matrix(np.identity(2))):
  File "/usr/local/lib/python2.7/dist-packages/sunpy/map/mapbase.py", line 385, in rotation_matrix
    return self._rotation_matrix_from_crota()
  File "/usr/local/lib/python2.7/dist-packages/sunpy/map/mapbase.py", line 396, in _rotation_matrix_from_crota
    p = np.deg2rad(self.meta['CROTA2'])
  File "/usr/local/lib/python2.7/dist-packages/sunpy/map/header.py", line 37, in __getitem__
    return OrderedDict.__getitem__(self, key.lower())
KeyError: 'crota2'
```



Discussion:

Resolving patch:
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py
--- a/sunpy/map/mapbase.py
+++ b/sunpy/map/mapbase.py
@@ -396,7 +396,7 @@ def _rotation_matrix_from_crota(self):
         conversion.
         """
         lam = self.scale['y'] / self.scale['x']
-        p = np.deg2rad(self.meta['CROTA2'])
+        p = np.deg2rad(self.meta.get('CROTA2', 0))
 
         return np.matrix([[np.cos(p), -1 * lam * np.sin(p)],
                           [1/lam * np.sin(p), np.cos(p)]])


Test patch:
Repository: sunpy/sunpy

Issue:
Fix for sunpy paper listing 3.7



Discussion:
[![Coverage Status](https://coveralls.io/builds/1133721/badge)](https://coveralls.io/builds/1133721)

Coverage increased (+0.1%) when pulling **a8d7d42393abeb5f6dee4b645d321a5ced94a564 on ehsteve:0.5** into **8a836d9f05eacbf402ac2d920aef3761ac054141 on sunpy:0.5**.


Resolving patch:
diff --git a/sunpy/net/helio/parser.py b/sunpy/net/helio/parser.py
--- a/sunpy/net/helio/parser.py
+++ b/sunpy/net/helio/parser.py
@@ -54,7 +54,7 @@ def webservice_parser(service='HEC'):
     'http://festung1.oats.inaf.it:8080/helio-hec/HelioLongQueryService',
     'http://hec.helio-vo.eu/helio_hec/HelioLongQueryService']
     """
-    link = RL.LINK + service.lower()
+    link = RL.LINK + '/' + service.lower()
     xml = link_test(link)
     if xml is None:
         return xml
@@ -182,7 +182,7 @@ def link_test(link):
     None
     """
     try:
-        with closing(urlopen(link)) as fd:
+        with closing(urlopen(link, timeout=LINK_TIMEOUT)) as fd:
             return fd.read()
     except (ValueError, URLError):
         return None


Test patch:
Repository: sunpy/sunpy

Issue:
Possible issue with checking of Quantity input
In my branch ji_diff_rot3 I've started using the quantity_input decorator.  It now decorates rot_hpc, a differential rotation calculator.  The decorator crashes when applied to this function

``` python
In [1]: from sunpy.physics.transforms.differential_rotation import rot_hpc
In [2]: import astropy.units as u
In [3]: rot_hpc( -570 * u.arcsec, 120 * u.arcsec, '2010-09-10 12:34:56', '2010-09-10 13:34:56')
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-3-0803dabeac04> in <module>()
----> 1 rot_hpc( -570 * u.arcsec, 120 * u.arcsec, '2010-09-10 12:34:56', '2010-09-10 13:34:56')

/Users/ireland/sunpy/sunpy/util/unit_decorators.pyc in wrapper(*func_args, **func_kwargs)
     81 
     82                 # Get the value of this parameter (argument to new function)
---> 83                 arg = bound_args.arguments[param.name]
     84 
     85                 # Get target unit, either from decotrator kwargs or annotations

KeyError: 'kwargs'
```

The error is reproducible with much simpler functions:

``` python
In [2]: import astropy.units as u
In [3]: from sunpy.util import quantity_input

In [4]: @quantity_input(a=u.deg)
   ...: def funct(a, **kwargs):
   ...:     pass
   ...: 

In [5]: funct(1 * u.deg)
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-5-5fb4e89adcc1> in <module>()
----> 1 funct(1 * u.deg)

/Users/ireland/sunpy/sunpy/util/unit_decorators.pyc in wrapper(*func_args, **func_kwargs)
     81 
     82                 # Get the value of this parameter (argument to new function)
---> 83                 arg = bound_args.arguments[param.name]
     84 
     85                 # Get target unit, either from decotrator kwargs or annotations

KeyError: 'kwargs'
```



Discussion:
ooooo. This looks like a real problem, probably needs raising against astropy as well. I will check it out.

There is a fix for this issue in astropy/astropy#3293. I will port it over when it is merged.


Resolving patch:
diff --git a/sunpy/util/unit_decorators.py b/sunpy/util/unit_decorators.py
--- a/sunpy/util/unit_decorators.py
+++ b/sunpy/util/unit_decorators.py
@@ -75,6 +75,11 @@ def wrapper(*func_args, **func_kwargs):
 
             # Iterate through the parameters of the original signature
             for param in wrapped_signature.parameters.values():
+                 # We do not support variable arguments (*args,
+                 # **kwargs)
+                if param.kind in (funcsigs.Parameter.VAR_KEYWORD,
+                                  funcsigs.Parameter.VAR_POSITIONAL):
+                    continue
                 # Catch the (never triggered) case where bind relied on a default value.
                 if param.name not in bound_args.arguments and param.default is not param.empty:
                     bound_args.arguments[param.name] = param.default


Test patch:
Repository: sunpy/sunpy

Issue:
database complains of EIT non-existent wavelengths units
Without any reason I've been able to find, `database.fetch` fails with some EIT files... not always the same, with the following error message:

```
WaveunitNotFoundError: the wavelength unit cannot be found in ~/sunpy/data/efz20000912.203610
```

That was from this query:

``` python
db.fetch(vso.attrs.Time('2000/9/12T20:30:00', '2000/9/12T22:00:00'),
vso.attrs.Instrument('EIT'))
```



Discussion:
@dpshelio yes, some EIT data does not have waveunit info in the header, you need to init the database with the `default_waveunit` kwarg.

That's right! Thanks @Cadair 

We should probably document this better, if even you didn't work it out. Maybe even change the error message.

@Cadair How about we change the exception message to "the wavelength unit cannot be found in xxxx and deffault_waveunit not specified" ? 

@dumindux Yeah that sounds good. Maybe say "the wavelength unit cannot be found in xxxx and deffault_waveunit not specified when opening the database"


Resolving patch:
diff --git a/sunpy/database/tables.py b/sunpy/database/tables.py
--- a/sunpy/database/tables.py
+++ b/sunpy/database/tables.py
@@ -48,7 +48,8 @@ def __init__(self, obj):
         self.obj = obj
 
     def __str__(self):  # pragma: no cover
-        return 'the wavelength unit cannot be found in {0}'.format(self.obj)
+        return 'the wavelength unit cannot be found in {0}'.format(self.obj) + \
+               ' and default_waveunit not specified when opening the database'
 
 
 class WaveunitNotConvertibleError(Exception):


Test patch:
Repository: sunpy/sunpy

Issue:
JSOC download skips first file in Results object



Discussion:
 @Cadair : could you please update the description

Here a file is skipped because results.poke() is called at following line,
https://github.com/sunpy/sunpy/blob/master/sunpy/net/jsoc/jsoc.py#L427

vso.Results object keeps count of the downloads and poke() tells that a one download is finished. since in the above poke() is called earlier, Results object only keeps track of (real downloads-1) downloads. Because of this. Results.wait() method returns when only (real downloads-1)  completed. So it leaves out a download.  


Resolving patch:
diff --git a/sunpy/net/jsoc/jsoc.py b/sunpy/net/jsoc/jsoc.py
--- a/sunpy/net/jsoc/jsoc.py
+++ b/sunpy/net/jsoc/jsoc.py
@@ -423,8 +423,8 @@ def get_request(self, requestIDs, path=None, overwrite=False, progress=True,
         else:
             #Make Results think it has finished.
             results.require([])
+            results.poke()
 
-        results.poke()
         return results
 
     def _process_time(self, time):


Test patch:
diff --git a/sunpy/net/jsoc/tests/test_jsoc.py b/sunpy/net/jsoc/tests/test_jsoc.py
--- a/sunpy/net/jsoc/tests/test_jsoc.py
+++ b/sunpy/net/jsoc/tests/test_jsoc.py
@@ -212,7 +212,6 @@ def test_get_request():
     assert isinstance(aa, Results)
 
 @pytest.mark.online
-@pytest.mark.xfail
 def test_results_filenames():
     responses = client.query(attrs.Time('2014/1/1T1:00:36', '2014/1/1T01:01:38'),
                              attrs.Series('hmi.M_45s'), attrs.Notify('jsoc@cadair.com'))
Repository: sunpy/sunpy

Issue:
Add wcsaxes to intersphinx
There are references in plotting.rst to wcsaxes which do not resolve because we do not have intersphinx settings set up properly.



Discussion:
You just need to put a link to the `objects.inv` file in `conf.py`.


Resolving patch:
diff --git a/doc/source/conf.py b/doc/source/conf.py
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -97,11 +97,12 @@
 # The full version, including alpha/beta/rc tags.
 release = sunpy.__version__
 
-intersphinx_mapping.pop('h5py',None)
+intersphinx_mapping.pop('h5py', None)
 intersphinx_mapping['astropy'] = ('http://docs.astropy.org/en/stable/', None)
 intersphinx_mapping['sqlalchemy'] = ('http://docs.sqlalchemy.org/en/rel_0_8/', None)
 intersphinx_mapping['pandas'] = ('http://pandas.pydata.org/pandas-docs/stable/', None)
 intersphinx_mapping['skimage'] = ('http://scikit-image.org/docs/stable/', None)
+intersphinx_mapping['wcsaxes'] = ('http://wcsaxes.readthedocs.org/en/stable/', None)
 
 # -- Options for HTML output ---------------------------------------------------
 


Test patch:
Repository: sunpy/sunpy

Issue:
EIT data fails with wcsaxes
The wcs information in the EIT header is not being identified as celestial axes by wcslib (inside astropy.wcs). This means that wcs is not detecting them as angular axes properly so therefore the set to arcsecond formatting is failing.



Discussion:
see astrofrog/wcsaxes#171


Resolving patch:
diff --git a/sunpy/visualization/wcsaxes_compat.py b/sunpy/visualization/wcsaxes_compat.py
--- a/sunpy/visualization/wcsaxes_compat.py
+++ b/sunpy/visualization/wcsaxes_compat.py
@@ -84,6 +84,11 @@ def default_wcs_grid(axes):
     x.set_ticks_position('bl')
     y.set_ticks_position('bl')
 
+    if x.coord_type != 'longitude':
+        x.set_coord_type('longitude', coord_wrap=180.)
+    if y.coord_type != 'latitude':
+        y.set_coord_type('latitude')
+
     x.set_major_formatter('s.s')
     y.set_major_formatter('s.s')
 


Test patch: