class sunpy.coordinates.metaframes.NorthOffsetFrame(*args, **kwargs)

Bases: object

A frame which is offset from another frame such that it shares the same origin, but has its “north pole” (i.e., the Z axis) in a different direction.

The original coordinate frame and the direction of the new north pole are specified by the north keyword.

This class should be used when specifying a new north pole is natural. In constrast, for shifting the origin in the projected sky (e.g., where helioprojective X and Y coordinates are zero), use SkyOffsetFrame instead.


north (HeliographicStonyhurst) – The direction and frame for the new “north pole”.


A common use for this is to create a frame derived from Heliographic, which has the north pole at some point of interest. In this new frame, lines of longitude form great circles radially away from the point, and lines of latitude measure angular distance from the point.

In this example the new frame is shifted so the new north pole is at (20, 20) in the Heliographic Stonyhurst frame. The new grid is overplotted in blue.

import matplotlib.pyplot as plt
import astropy.units as u

from astropy.coordinates import SkyCoord
from sunpy.coordinates import NorthOffsetFrame

from import AIA_171_IMAGE

m =

north = SkyCoord(20*u.deg, 20*u.deg, frame="heliographic_stonyhurst")
new_frame = NorthOffsetFrame(north=north)

ax = plt.subplot(projection=m)

overlay = ax.get_coords_overlay('heliographic_stonyhurst')
overlay[0].set_ticks(spacing=30. * u.deg, color='white')
overlay.grid(ls='-', color='white')

overlay = ax.get_coords_overlay(new_frame)
overlay[0].set_ticks(spacing=30. * u.deg)
overlay.grid(ls='-', color='blue')

(Source code, png, hires.png, pdf)



NorthOffsetFrame is a wrapper around the SkyOffsetFrame factory class. This class will calculate the desired coordinates of the origin from the north keyword argument and then create a SkyOffsetFrame.

Using this frame is equivalent to using SkyOffsetFrame with lat = lat - 90*u.deg for a position of the north pole in the original northern hemisphere.