SphericalScreen#

class sunpy.coordinates.SphericalScreen(center, *, radius: Unit('m') = None, **kwargs)[source]#

Bases: BaseScreen

Context manager to interpret 2D coordinates as being on the inside of a spherical screen.

The radius of the screen is the distance between the specified center and Sun center. This center does not have to be the same as the observer location for the coordinate frame. If they are the same, then this context manager is equivalent to assuming that the helioprojective “zeta” component is zero. This replaces the default assumption where 2D coordinates are mapped onto the surface of the Sun.

Note

This applies only to coordinates in a Helioprojective frame.

Parameters:
  • center (SkyCoord) – The center of the spherical screen

  • radius (Quantity, optional) – The radius of the spherical screen. The default sets the radius to the distance from the screen center to the Sun.

  • only_off_disk (bool, optional) – If True, apply this assumption only to off-disk coordinates, with on-disk coordinates still mapped onto the surface of the Sun. Defaults to False.

Notes

If this context manager is combined with the propagate_with_solar_surface() context manager, significantly more computations are required to numerically solve for the distance to the differentially rotated screen.

Examples

Differentially rotating a map

Differentially rotating a map

Auto-Aligning AIA and HMI Data During Plotting

Auto-Aligning AIA and HMI Data During Plotting

Aligning AIA and HMI Data with Reproject

Aligning AIA and HMI Data with Reproject

Reprojecting with Automatic Extent

Reprojecting with Automatic Extent

Reprojecting Using a Spherical Screen

Reprojecting Using a Spherical Screen

Overlay an AIA image on a LASCO C2 coronagraph

Overlay an AIA image on a LASCO C2 coronagraph

Overlaying off-disk contours using a screen

Overlaying off-disk contours using a screen

Blending maps together

Blending maps together

Creating a Composite Plot with Three Maps

Creating a Composite Plot with Three Maps

Visualizing 3D stereoscopic images

Visualizing 3D stereoscopic images
>>> import astropy.units as u
>>> from sunpy.coordinates import Helioprojective, SphericalScreen
>>> h = Helioprojective(range(7)*u.arcsec*319, [0]*7*u.arcsec,
...                     observer='earth', obstime='2020-04-08')
>>> print(h.make_3d())
<Helioprojective Coordinate (obstime=2020-04-08T00:00:00.000, rsun=695700.0 km, observer=<HeliographicStonyhurst Coordinate for 'earth'>): (Tx, Ty, distance) in (arcsec, arcsec, AU)
    [(   0., 0., 0.99660825), ( 319., 0., 0.99687244),
        ( 638., 0., 0.99778472), ( 957., 0., 1.00103285),
        (1276., 0.,        nan), (1595., 0.,        nan),
        (1914., 0.,        nan)]>
>>> with SphericalScreen(h.observer):
...     print(h.make_3d())
<Helioprojective Coordinate (obstime=2020-04-08T00:00:00.000, rsun=695700.0 km, observer=<HeliographicStonyhurst Coordinate for 'earth'>): (Tx, Ty, distance) in (arcsec, arcsec, AU)
    [(   0., 0., 1.00125872), ( 319., 0., 1.00125872),
        ( 638., 0., 1.00125872), ( 957., 0., 1.00125872),
        (1276., 0., 1.00125872), (1595., 0., 1.00125872),
        (1914., 0., 1.00125872)]>
>>> with SphericalScreen(h.observer, only_off_disk=True):
...     print(h.make_3d())
<Helioprojective Coordinate (obstime=2020-04-08T00:00:00.000, rsun=695700.0 km, observer=<HeliographicStonyhurst Coordinate for 'earth'>): (Tx, Ty, distance) in (arcsec, arcsec, AU)
    [(   0., 0., 0.99660825), ( 319., 0., 0.99687244),
        ( 638., 0., 0.99778472), ( 957., 0., 1.00103285),
        (1276., 0., 1.00125872), (1595., 0., 1.00125872),
        (1914., 0., 1.00125872)]>

Attributes Summary

Methods Summary

Attributes Documentation

screen_type = 'spherical'#

Methods Documentation

calculate_distance(frame)[source]#