# convert_hcc_hg¶

sunpy.wcs.convert_hcc_hg(x, y, z=None, b0_deg=0, l0_deg=0, radius=False)[source] [edit on github]

Deprecated since version 0.8.0: The convert_hcc_hg function is deprecated and may be removed in a future version. Use sunpy.coordinates instead.

Convert from Heliocentric-Cartesian (HCC) (given in meters) to Stonyhurst Heliographic coordinates (HG) given in degrees, with radial output in meters.

Parameters: y (x,) – Data coordinate in meters. z (float (meters)) – Data coordinate in meters. If None, then the z-coordinate is assumed to be on the Sun. b0_deg (float (degrees)) – Tilt of the solar North rotational axis toward the observer (heliographic latitude of the observer). Usually given as SOLAR_B0, HGLT_OBS, or CRLT_OBS. Default is 0. l0_deg (float (degrees)) – Carrington longitude of central meridian as seen from Earth. Default is 0. radius (Bool) – If true, forces the output to return a triple of (lon, lat, r). If false, return (lon, lat) only. out (ndarray (degrees, meters)) – if radius is false, return the data coordinates (lon, lat). If radius=True, return the data coordinates (lon, lat, r). The quantities (lon, lat) are the heliographic coordinates in degrees. The quantity ‘r’ is the heliographic radius in meters.

Notes

Implements Eq. (12) of Thompson (2006), A&A, 449, 791.

Examples

>>> import sunpy.wcs
>>> sunpy.wcs.convert_hcc_hg(230000.0,45000000.0,
...                          z=695508000.0 + 8000000.0, radius=True)
(0.01873188196651189, 3.6599471896203317, 704945784.4146597)