HeliographicCarrington

class sunpy.coordinates.frames.HeliographicCarrington(*args, **kwargs)[source]

Bases: sunpy.coordinates.frames.BaseHeliographic

A coordinate or frame in the Carrington Heliographic (HGC) system.

  • The origin is the center of the Sun.

  • The Z-axis (+90 degrees latitude) is aligned with the Sun’s north pole.

  • The X-axis and Y-axis rotate with a period of 25.38 days.

This system differs from Stonyhurst Heliographic (HGS) in its definition of longitude. This longitude is an “apparent” longitude because it takes into account the time it takes for light to travel from the Sun’s surface to the observer. Thus, the observer needs to be specified to be able to transform to any other coordinate frame.

A new instance can be created using the following signatures (note that if supplied, obstime and observer must be a keyword argument):

HeliographicCarrington(lon, lat, obstime=obstime, observer=observer)
HeliographicCarrington(lon, lat, radius, obstime=obstime, observer=observer)
Parameters
  • data (BaseRepresentation or None) – A representation object or None to have no data (or use the coordinate component arguments, see below).

  • lon (Angle or Quantity, optional) – The longitude coordinate for this object (lat must also be given and data must be None). Not needed if data is given.

  • lat (Angle or Quantity, optional) – The latitude coordinate for this object (lon must also be given and data must be None). Not needed if data is given.

  • radius (Quantity, optional) – The radial distance coordinate from Sun center for this object. Defaults to the radius of the Sun. Not needed if data is given.

  • observer (HeliographicStonyhurst, str) – The location of the observer. If a string is provided, it must be a solar system body that can be parsed by get_body_heliographic_stonyhurst at the time obstime. Defaults to Earth center.

  • obstime (tuple, str, pandas.Timestamp, pandas.Series, pandas.DatetimeIndex, datetime.datetime, datetime.date, numpy.datetime64, numpy.ndarray, astropy.time.Time) – The time of the observation. This is used to determine the position of solar-system bodies (e.g., the Sun and the Earth) as needed to define the origin and orientation of the frame.

  • representation_type (BaseRepresentation, str, optional) – A representation class or string name of a representation class. This may change the valid coordinate component arguments from the defaults (see above). For example, passing representation_type='cartesian' will make the frame expect Cartesian coordinate component arguments (typically, x, y, and z).

  • copy (bool, optional) – If True (default), make copies of the input coordinate arrays.

Examples

>>> from astropy.coordinates import SkyCoord
>>> import sunpy.coordinates
>>> import astropy.units as u
>>> sc = SkyCoord(1*u.deg, 2*u.deg, 3*u.km,
...               frame="heliographic_carrington",
...               observer="earth",
...               obstime="2010/01/01T00:00:30")
>>> sc
<SkyCoord (HeliographicCarrington: obstime=2010-01-01T00:00:30.000, observer=<HeliographicStonyhurst Coordinate for 'earth'>): (lon, lat, radius) in (deg, deg, km)
    (1., 2., 3.)>
>>> sc = SkyCoord([1,2,3]*u.deg, [4,5,6]*u.deg, [5,6,7]*u.km,
...               obstime="2010/01/01T00:00:45", frame="heliographic_carrington")
>>> sc
<SkyCoord (HeliographicCarrington: obstime=2010-01-01T00:00:45.000, observer=None): (lon, lat, radius) in (deg, deg, km)
    [(1., 4., 5.), (2., 5., 6.), (3., 6., 7.)]>
>>> sc = SkyCoord(CartesianRepresentation(0*u.km, 45*u.km, 2*u.km),
...               obstime="2011/01/05T00:00:50",
...               frame="heliographic_carrington")
>>> sc
<SkyCoord (HeliographicCarrington: obstime=2011-01-05T00:00:50.000, observer=None): (lon, lat, radius) in (deg, deg, km)
    (90., 2.54480438, 45.04442252)>

Attributes Summary

default_differential

default_representation

frame_attributes

frame_specific_representation_info

name

observer

Attributes Documentation

default_differential
default_representation
frame_attributes = {'observer': <sunpy.coordinates.frameattributes.ObserverCoordinateAttribute object>, 'obstime': <sunpy.coordinates.frameattributes.TimeFrameAttributeSunPy object>}
frame_specific_representation_info
name = 'heliographic_carrington'
observer = None