HeliographicCarrington#
- class sunpy.coordinates.frames.HeliographicCarrington(*args, **kwargs)[source]#
Bases:
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 (see Calculating Carrington longitude). 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
andobserver
must be a keyword argument):HeliographicCarrington(lon, lat, obstime=obstime, observer=observer) HeliographicCarrington(lon, lat, radius, obstime=obstime, observer=observer)
If you want to define the location in HGC such that the observer for the coordinate frame is the same as that location (e.g., the location of an observatory in its corresponding HGC frame), use
observer='self'
:HeliographicCarrington(lon, lat, radius, obstime=obstime, observer='self')
- Parameters:
data (
BaseRepresentation
orNone
) – A representation object orNone
to have no data (or use the coordinate component arguments, see below).lon (
Angle
orQuantity
, optional) – The longitude coordinate for this object (lat
must also be given anddata
must beNone
). Not needed ifdata
is given.lat (
Angle
orQuantity
, optional) – The latitude coordinate for this object (lon
must also be given anddata
must beNone
). Not needed ifdata
is given.radius (
Quantity
, optional) – The radial distance coordinate from Sun center for this object. Defaults to the radius of the Sun. Not needed ifdata
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 byget_body_heliographic_stonyhurst
at the timeobstime
. Defaults to Earth center.rsun (
Quantity
) – The radius of the Sun in length units. Used to convert a 2D coordinate (i.e., noradius
component) to a 3D coordinate by assuming that the coordinate is on the surface of the Sun. Defaults to the photospheric radius as defined insunpy.sun.constants
.obstime (
tuple
,list
,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, passingrepresentation_type='cartesian'
will make the frame expect Cartesian coordinate component arguments (typically,x
,y
, andz
).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, rsun=695700.0 km, 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", ... observer="self", ... frame="heliographic_carrington") >>> sc <SkyCoord (HeliographicCarrington: obstime=2010-01-01T00:00:45.000, rsun=695700.0 km, observer=self): (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, rsun=695700.0 km, observer=None): (lon, lat, radius) in (deg, deg, km) (90., 2.54480438, 45.04442252)>
Attributes Summary
Default representation for differential data (e.g., velocity)
Default representation for position data
Mapping for frame-specific component names
A frame attribute
Attributes Documentation
- default_differential#
Default representation for differential data (e.g., velocity)
- default_representation#
Default representation for position data
- frame_attributes = {'observer': <sunpy.coordinates.frameattributes.ObserverCoordinateAttribute object>, 'obstime': <sunpy.coordinates.frameattributes.TimeFrameAttributeSunPy object>, 'rsun': <astropy.coordinates.attributes.QuantityAttribute object>}#
- frame_specific_representation_info#
Mapping for frame-specific component names
- name = 'heliographic_carrington'#
- observer#
A frame attribute
No default value