make_heliographic_header#

sunpy.map.header_helper.make_heliographic_header(date, observer_coordinate, shape, *, frame, projection_code='CAR', map_center_longitude: ~astropy.units.quantity.Quantity = <Quantity 0. deg>)[source]#

Construct a FITS-WCS header for a full-Sun heliographic (Carrington or Stonyhurst) coordinate frame.

The date-time and observer coordinate of the new coordinate frame are taken from the input map. The resulting WCS covers the full surface of the Sun, and has a reference coordinate at (0, 0) degrees Longitude/Latitude.

Parameters:
  • date – Date for the output header.

  • observer_coordinate – Observer coordinate for the output header.

  • shape ([int, int]) – Output map shape, number of pixels in (latitude, longitude).

  • frame ({‘carrington’, ‘stonyhurst’}) – Coordinate frame.

  • projection_code ({‘CAR’, ‘CEA’}) – Projection to use for the latitude coordinate.

  • map_center_longitude (Quantity) – Heliographic longitude of the map center

Returns:

MetaDict

See also

sunpy.map.header_helper.make_fitswcs_header

A more generic header helper that can be used if more customisation is required.

Examples

>>> from sunpy.map.header_helper import make_heliographic_header
>>> from sunpy.coordinates import get_earth
>>>
>>> date = '2020-01-01 12:00:00'
>>> observer = get_earth(date)
>>> header = make_heliographic_header(date, observer, [90, 180], frame='carrington')
>>> header
MetaDict([('wcsaxes': '2')
('crpix1': '90.5')
('crpix2': '45.5')
('cdelt1': '2.0')
('cdelt2': '2.0')
('cunit1': 'deg')
('cunit2': 'deg')
('ctype1': 'CRLN-CAR')
('ctype2': 'CRLT-CAR')
('crval1': '0.0')
('crval2': '0.0')
('lonpole': '0.0')
('latpole': '90.0')
('mjdref': '0.0')
('date-obs': '2020-01-01T12:00:00.000')
('rsun_ref': '695700000.0')
('dsun_obs': '147096975776.97')
('hgln_obs': '0.0')
('hglt_obs': '-3.0011725838606')
('naxis': '2')
('naxis1': '180')
('naxis2': '90')
('pc1_1': '1.0')
('pc1_2': '-0.0')
('pc2_1': '0.0')
('pc2_2': '1.0')
('rsun_obs': '975.53984320334...

Creating Carrington Maps

Creating Carrington Maps