Sample Images

This example shows off all of the sample images provided by SunPy.

from __future__ import print_function, division

import matplotlib.pyplot as plt

from sunpy.data.sample import file_dict
import sunpy.map

We create a loop through all of the sample shortcuts and pick out the images that can be opened by Map. We then plot each one.

for key in file_dict:
    if key.count('IMAGE'):
        try:
            print(key)
            try:
                m = sunpy.map.Map(file_dict[key])
                plt.figure()
                m.plot()
                plt.show()
            except:
                pass
        except:
            pass
  • ../../_images/sphx_glr_plot_sample_images_001.png
  • ../../_images/sphx_glr_plot_sample_images_002.png
  • ../../_images/sphx_glr_plot_sample_images_003.png
  • ../../_images/sphx_glr_plot_sample_images_004.png
  • ../../_images/sphx_glr_plot_sample_images_005.png
  • ../../_images/sphx_glr_plot_sample_images_006.png
  • ../../_images/sphx_glr_plot_sample_images_007.png
  • ../../_images/sphx_glr_plot_sample_images_008.png
  • ../../_images/sphx_glr_plot_sample_images_009.png
  • ../../_images/sphx_glr_plot_sample_images_010.png
  • ../../_images/sphx_glr_plot_sample_images_011.png
  • ../../_images/sphx_glr_plot_sample_images_012.png
  • ../../_images/sphx_glr_plot_sample_images_013.png
  • ../../_images/sphx_glr_plot_sample_images_014.png
  • ../../_images/sphx_glr_plot_sample_images_015.png
  • ../../_images/sphx_glr_plot_sample_images_016.png

Out:

AIA_193_CUTOUT05_IMAGE
RHESSI_IMAGE
AIA_335_IMAGE
AIA_193_CUTOUT01_IMAGE
AIA_193_CUTOUT04_IMAGE
AIA_193_CUTOUT03_IMAGE
AIA_1600_IMAGE
AIA_131_IMAGE
AIA_094_IMAGE
SWAP_LEVEL1_IMAGE
AIA_171_ROLL_IMAGE
EIT_195_IMAGE
AIA_211_IMAGE
AIA_193_IMAGE
AIA_193_CUTOUT02_IMAGE
AIA_171_IMAGE

Total running time of the script: ( 0 minutes 4.569 seconds)

Generated by Sphinx-Gallery