Repository: sunpy/sunpy

Issue:
Add HEEQ coordinates frame
Feature request for a heliocentric earth equatorial (HEEQ) coordinates frame. Essentially, this is a "de-tilted" HCC frame with the axes permuted such that the z-axis is aligned with the North Pole of solar rotation axis.

 For more details, see [Thompson (2006)](http://adsabs.harvard.edu/abs/2006A%26A...449..791T) and [Hapgood (1992)](http://adsabs.harvard.edu/abs/1992P%26SS...40..711H). 


Discussion:

Resolving patch:
diff --git a/sunpy/coordinates/frames.py b/sunpy/coordinates/frames.py
--- a/sunpy/coordinates/frames.py
+++ b/sunpy/coordinates/frames.py
@@ -29,32 +29,46 @@
 RSUN_METERS = sun.constants.get('radius').si.to(u.m)
 DSUN_METERS = sun.constants.get('mean distance').si.to(u.m)
 
-__all__ = ['HeliographicStonyhurst', 'HeliographicCarrington', 'Heliocentric', 'Helioprojective']
+__all__ = ['HeliographicStonyhurst', 'HeliographicCarrington', 'Heliocentric',
+           'Helioprojective']
 
 
 class HeliographicStonyhurst(BaseCoordinateFrame):
     """
-    A coordinate or frame in the Stonyhurst Heliographic
-    system.
+    A coordinate or frame in the Stonyhurst Heliographic system.
 
-    This frame has its origin at the solar centre and the north pole above the
-    solar north pole, and the zero line on longitude pointing towards the
-    Earth.
+    In a cartesian representation this is also known as the Heliocentric
+    Earth Equatorial (HEEQ) system. This frame has its origin at the solar
+    centre and the north pole above the solar north pole, and the zero line on
+    longitude pointing towards the Earth.
+
+    A new instance can be created using the following signatures
+    (note that all the arguments must be supplied as keywords)::
+
+        HeliographicStonyhurst(lon, lat, obstime)
+        HeliographicStonyhurst(lon, lat, radius, obstime)
+        HeliographicStonyhurst(x, y, z, obstime, representation='cartesian')
 
     Parameters
     ----------
-    representation: `~astropy.coordinates.BaseRepresentation` or `None`
+    representation : `~astropy.coordinates.BaseRepresentation` or `None`
         A representation object or None to have no data.
-    lon: `Angle` object.
+    lon : `~astropy.coordinates.Angle`, optional
         The longitude for this object (``lat`` must also be given and
         ``representation`` must be None).
-    lat: `Angle` object.
+    lat : `~astropy.coordinates.Angle`, optional
         The latitude for this object (``lon`` must also be given and
         ``representation`` must be None).
-    radius: `astropy.units.Quantity` object.
+    radius : `~astropy.units.Quantity`, optional
         This quantity holds the radial distance. If not specified, it is, by
-        default, the radius of the photosphere. Optional.
-    obstime: SunPy Time
+        default, the radius of the photosphere.
+    x : `~astropy.units.Quantity`, optional
+        x coordinate.
+    y : `~astropy.units.Quantity`, optional
+        y coordinate.
+    z : `~astropy.units.Quantity`, optional
+        z coordinate.
+    obstime: `~sunpy.time.Time`
         The date and time of the observation, used to convert to heliographic
         carrington coordinates.
 
@@ -95,6 +109,12 @@ class HeliographicStonyhurst(BaseCoordinateFrame):
                                   RepresentationMapping(reprname='distance',
                                                         framename='radius',
                                                         defaultunit=None)],
+        CartesianRepresentation: [RepresentationMapping(reprname='x',
+                                                        framename='x'),
+                                  RepresentationMapping(reprname='y',
+                                                        framename='y'),
+                                  RepresentationMapping(reprname='z',
+                                                        framename='z')]
     }
 
     obstime = TimeFrameAttributeSunPy()


Test patch:
diff --git a/sunpy/coordinates/tests/test_frames.py b/sunpy/coordinates/tests/test_frames.py
--- a/sunpy/coordinates/tests/test_frames.py
+++ b/sunpy/coordinates/tests/test_frames.py
@@ -1,5 +1,6 @@
 # -*- coding: utf-8 -*-
 
+from datetime import datetime
 import numpy as np
 
 import pytest
@@ -201,11 +202,19 @@ def test_wrapping_off():
     assert_quantity_allclose(hpc1.Tx.wrap_angle, 360*u.deg)
 
 
-
 # ==============================================================================
 # ## Heliographic Tests
 # ==============================================================================
 
+def test_HEE_creation():
+    # Smoke test to make sure HEE constructors work fine
+    _ = HeliographicStonyhurst(lon=0*u.deg, lat=90*u.deg,
+                               obstime=datetime(2018, 12, 21))
+    _ = HeliographicStonyhurst(lon=0*u.deg, lat=90*u.deg, radius=1*u.km,
+                               obstime=datetime(2018, 12, 21))
+    _ = HeliographicStonyhurst(x=1*u.km, y=1*u.km, z=1*u.km,
+                               obstime=datetime(2018, 12, 21),
+                               representation='cartesian')
 
 @pytest.mark.parametrize('frame',
                          [HeliographicStonyhurst, HeliographicCarrington])
diff --git a/sunpy/coordinates/tests/test_transformations.py b/sunpy/coordinates/tests/test_transformations.py
--- a/sunpy/coordinates/tests/test_transformations.py
+++ b/sunpy/coordinates/tests/test_transformations.py
@@ -1,4 +1,5 @@
 import numpy as np
+import pytest
 
 import astropy.units as u
 from astropy.tests.helper import quantity_allclose, assert_quantity_allclose