Example Gallery#
The gallery contains examples of how to use sunpy. Each example is a short and self contained how-to guide for performing a specific task.
Sample data#
Some of these examples require the SunPy sample data, which are downloaded as needed via the module sunpy.data.sample
.
If you want to download all of the sample data files in advance, call sunpy.data.sample.download_all()
.
Acquiring Data#
Examples of downloading solar data located on remote servers
Querying and loading SHARP data
Querying the GOES flare event list
Requesting cutouts of AIA images from the JSOC
Map#
Examples using Map
with solar data
Comparing Map Rotation Functions
Creating a mask for LASCO C2 data
Finding bright regions with ndimage
Generating a map from data array
Masking HMI based on the intensity of AIA
Overplotting HMI Contours on an AIA Image
Plotting a Map without any Axes
Segmenting a Map based on transformation of coordinates
Combining, Co-aligning, and Reprojecting Images#
Examples of combining, aligning, and reprojecting sunpy maps
Aligning AIA and HMI Data with Reproject
Auto-Aligning AIA and HMI Data During Plotting
Creating a Full Sun Map with AIA and EUVI
Reprojecting Images to Different Observers
Reprojecting Using a Spherical Screen
Reprojecting to a Map Projection with a Custom Origin
Rotating HMI maps so they’re not ‘upside-down’
Time Series#
Examples using TimeSeries
Creating a TimeSeries from GOES-XRS near real time data
Find Peaks in sunpy TimeSeries
Flare times on a GOES XRS plot
Making a power spectrum from a TimeSeries
Retrieving and analyzing GOES X-Ray Sensor (XRS) data
Smoothing of timeSeries data using convolution filters
Coordinates, times, and units#
Examples of working with coordinate information, times, and scientific units
AIA to STEREO coordinate conversion
Converting between Helioprojective and AltAz Coordinate
Coordinates computations using SPICE kernels
Create a Helioprojective Map from observations in the RA-DEC coordinate system
Drawing the AIA limb on a STEREO EUVI image
Extracting intensity of a map along a line
Getting the location of the planets
Getting the observer location from a Map
Identifying stars in a STEREO/SECCHI COR2 coronagraph image
Obtaining a spacecraft trajectory from JPL Horizons
Offsetting the north pole of a coordinate frame
Overplotting the position of the Venus transit
Setting the correct position for SOHO in a LASCO C3 Map
Plotting#
Examples of visualizing supported data types
Combining off-limb and disk maps
Creating a Composite Plot with Three Maps
Drawing a latitude-longitude quadrangle
Drawing a rotated rectangle on a map
Drawing heliographic longitude and latitude lines
Editing the colormap and normalization of a Map
Finding Local Peaks in Solar Data
Fine grained Plotting Features of Map
Overlay an AIA image on a LASCO C2 coronagraph
Overplotting HEK feature/event polygons on a map
Overplotting SRS active region locations on a magnetograms
Plotting points on a Map with WCSAxes
Plotting the solar equator and prime meridian
Set Axis Range When Plotting a Map
Using the sunpy Colormaps with matplotlib
Differential Rotation of the Sun#
Examples of accounting for differential rotation (i.e., the latitude-dependent rotation rate of the Sun) in the coordinates framework
Comparing differential-rotation models
Differentially rotating a coordinate
Overlaying differentially rotated gridlines
Saving and Loading Data#
Examples of saving and loading data
Saving and loading coordinates with asdf
Saving and loading sunpy Maps with FITS
Saving and loading sunpy Maps with asdf
Computer Vision Techniques#
Examples of using computer vision techniques to analyze solar data
Finding and masking bright pixels
Showcase#
Examples that use an advanced combination of capabilities in sunpy
Obtaining solar-eclipse information
Reproducing the “Where is STEREO Today?” plot
Understanding Observer Orientation Relative to a Simulated Volume with astropy.coordinates
Visualizing 3D stereoscopic images