SunPy Interact

Map Objects

The Map examples below use the following SunPy sample data: AIA_171_IMAGE and AIA_193_IMAGE.

Basic Map View - "plotly_map"

The Plotly Express function Imshow is used to create a Map plot similar to that of Matplotlib. A colorscale can be applied, but will slow down the performance of the interactive figure.

plotly_map(aia171,clip_interval=(1,99))

Map with Contours and HGS Grid

The plotly_map function can also overlay a heliographic Stonyhurst coordinate (HGS) grid. Your cursor will snap to the grid lines and display the HGS coordinates as well as heliographic Carrington coordinates (HGC). The contours method of a Map object can be passed as an argument to plotly_map to display contours. Contours are drawn on the plot as a scatter layer in red lines (plotly calls the individual sets of data being plotted "traces"). The hover info for the contours shows the HPC coordinates of the contours. Compare to this SunPy example.

plotly_map(aia193, clip_interval=(1,99), draw_grid=True, contours=50000)

Map Summary

You can also display a summary table side by side with the Map plot. plotly_map(aia171, clip_interval=(1,99), summary=True, draw_grid=True)

TimeSeries Objects

The examples in this section use the following SunPy sample data: GOES_XRS_TIMESERIES and GBM_TIMESERIES.

Basic Timeseries View - "plotly_ts"

TimeSeries data is plotted using the Plotly function Scatter (specifically, this uses the Plotly Graph Objects class instead of the Plotly Express module). You can toggle data from each channel by clicking on its name in the legend.

plotly_ts(goes_lc)

TimeSeries Findpeaks

The plot_ts function has a built-in peak finding method. This method is the same as that used in the following SunPy example. In addition, there is a gradient argument that will display the NumPy gradient of each channel in the timeseries object.

my_ts = goes_lc.truncate('2011/06/07 06:10', '2011/06/07 09:00')
plotly_ts(my_ts, peaks=1e-7)

TimeSeries Summary - "ts_summary"

The summary display for a TimeSeries object has a separate function unlike the Map summary above. It uses Plotly's Subplots and combines three different types of Plotly traces: Scatter, Histogram, and Table. Click the dropdown menu to change the channel whose data is plotted in the scatter plot and histogram.

ts_summary(gbm)