Reprojecting Using a Spherical Screen¶
This example demonstrates how you can reproject an image as if it lies on the inside of a spherical screen and the observer is not at the center of the sphere. This functionality is primarily for visualization purposes, since features in the image are unlikely to actually lie on this spherical screen.
You will need reproject v0.6 or higher installed.
We will use one of the AIA images from the sample data. We fix the range of values for the Map’s normalizer.
Let’s define a new observer that is well separated from Earth.
Create a WCS header for this new observer using helioprojective coordinates.
out_shape = aia_map.data.shape out_ref_coord = SkyCoord(0*u.arcsec, 0*u.arcsec, obstime=new_observer.obstime, frame='helioprojective', observer=new_observer, rsun=aia_map.coordinate_frame.rsun) out_header = sunpy.map.make_fitswcs_header( out_shape, out_ref_coord, scale=u.Quantity(aia_map.scale), rotation_matrix=aia_map.rotation_matrix, instrument=aia_map.instrument, wavelength=aia_map.wavelength )
If you reproject the AIA Map to the perspective of the new observer, the default assumption is that the image lies on the surface of the Sun. However, the parts of the image beyond the solar disk cannot be mapped to the surface of the Sun, and thus do not show up in the output.
You can use the different assumption that the image lies on the surface of a spherical screen centered at AIA, with a radius equal to the Sun-AIA distance. The curvature of the spherical screen is not obvious in this plot due to the relatively small field of view of AIA (compared to, say, a coronagraph).
Finally, you can specify that the spherical-screen assumption should be used for only off-disk parts of the image, and continue to map on-disk parts of the image to the surface of the Sun.
Total running time of the script: ( 0 minutes 10.257 seconds)