SphericalScreen#
- class sunpy.coordinates.screens.SphericalScreen(center, *, radius=None, **kwargs)[source]#
Bases:
BaseScreenContext 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
centerand Sun center. Thiscenterdoes 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
Helioprojectiveframe.- Parameters:
center (
SkyCoord) – The center of the spherical screenradius (
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) – IfTrue, apply this assumption only to off-disk coordinates, with on-disk coordinates still mapped onto the surface of the Sun. Defaults toFalse.
See also
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
Creating a time-distance plot from a sequence of maps
Creating a time-distance plot from a sequence of maps>>> 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
calculate_distance(frame)Attributes Documentation
- screen_type = 'spherical'#
Methods Documentation