Data (sunpy.data)#

sunpy.data contains ways to access sample data and small test files for running the sunpy test suite.

sunpy.data Package#

Variables#

manager

This class provides a remote data manager for managing remote files.

cache

Cache provides a way to download and cache files.

sunpy.data.sample Module#

This module provides the following sample data files. When a sample shortname is accessed, the corresponding file is downloaded if needed. All files can be downloaded by calling download_all().

Summary variables#

file_dict

Dictionary of all sample shortnames and, if downloaded, corresponding file locations on disk (otherwise, None)

file_list

List of disk locations for sample data files that have been downloaded

Sample shortnames#

Sample shortname

Name of downloaded file

AIA_094_IMAGE

AIA20110607_063305_0094_lowres.fits

AIA_131_IMAGE

AIA20110607_063301_0131_lowres.fits

AIA_1600_IMAGE

AIA20110607_063305_1600_lowres.fits

AIA_1600_VENUS_IMAGE

aia_lev1_1600a_2012_06_06t04_07_29_12z_image_lev1_lowres.fits

AIA_171_IMAGE

AIA20110607_063302_0171_lowres.fits

AIA_171_ROLL_IMAGE

aiacalibim5.fits

AIA_193_CUTOUT01_IMAGE

AIA20110607_063307_0193_cutout.fits

AIA_193_CUTOUT02_IMAGE

AIA20110607_063931_0193_cutout.fits

AIA_193_CUTOUT03_IMAGE

AIA20110607_064555_0193_cutout.fits

AIA_193_CUTOUT04_IMAGE

AIA20110607_065219_0193_cutout.fits

AIA_193_CUTOUT05_IMAGE

AIA20110607_065843_0193_cutout.fits

AIA_193_IMAGE

AIA20110607_063307_0193_lowres.fits

AIA_193_JUN2012

AIA20120601_000007_0193_lowres.fits

AIA_211_IMAGE

AIA20110607_063302_0211_lowres.fits

AIA_304_IMAGE

AIA20110607_063334_0304_lowres.fits

AIA_335_IMAGE

AIA20110607_063303_0335_lowres.fits

AIA_STEREOSCOPIC_IMAGE

aia_lev1_171a_2023_07_06t00_05_33_35z_image_lev1.fits

CALLISTO_SPECTRUM

BIR_20110607_062400_10.fit

EIT_195_IMAGE

eit_l1_20110607_203753.fits

EUVI_STEREOSCOPIC_IMAGE

20230706_000525_n4eua.fts

EVE_TIMESERIES

20110607_EVE_L0CS_DIODES_1m.txt

GBM_TIMESERIES

glg_cspec_n5_110607_v00.pha

GOES_XRS_TIMESERIES

go1520110607.fits

HMI_LOS_IMAGE

HMI20110607_063211_los_lowres.fits

LOFAR_IMAGE

LOFAR_70MHZ_20190409_131136.fits

LYRA_LEVEL3_TIMESERIES

lyra_20110607-000000_lev3_std.fits

NORH_TIMESERIES

tca110607.fits

RHESSI_IMAGE

hsi_image_20110607_063300.fits

RHESSI_TIMESERIES

hsi_obssumm_20110607_025.fits

SRS_TABLE

20110607SRS.txt

STEREO_A_195_JUN2012

20120601_000530_n4eua.fits

STEREO_B_195_JUN2012

20120601_000530_n4eub.fits

SWAP_LEVEL1_IMAGE

swap_lv1_20110607_063329.fits

Functions#

download_all([force_download])

Download all sample data at once that has not already been downloaded.

sunpy.data.test Package#

This package contains all of SunPy’s test data.

Functions#

get_test_filepath(filename, **kwargs)

Return the full path to a test file in the data/test directory.

get_test_data_filenames()

Return a list of all test files in data/test directory.

get_dummy_map_from_header(filename)

Generate a dummy Map from header-only test data.

write_header_file_from_image_file(...[, hdu])

Convert a FITS file containing an image and a header to a plaintext file containing only the string representation of the header.

sunpy.data.data_manager Package#

Classes#

Cache(downloader, storage, cache_dir[, expiry])

Cache provides a way to download and cache files.

DataManager(cache)

This class provides a remote data manager for managing remote files.

ParfiveDownloader()

Concrete implementation of DownloaderBase using parfive.

SqliteStorage(path)

This provides a sqlite backend for storage.

Class Inheritance Diagram#

Inheritance diagram of sunpy.data.data_manager.cache.Cache, sunpy.data.data_manager.manager.DataManager, sunpy.data.data_manager.downloader.ParfiveDownloader, sunpy.data.data_manager.storage.SqliteStorage

sunpy.data.data_manager.downloader Module#

Classes#

DownloaderBase()

Base class for remote data manager downloaders.

DownloaderError

Error to be raised when a download fails.

ParfiveDownloader()

Concrete implementation of DownloaderBase using parfive.

Class Inheritance Diagram#

Inheritance diagram of sunpy.data.data_manager.downloader.DownloaderBase, sunpy.data.data_manager.downloader.DownloaderError, sunpy.data.data_manager.downloader.ParfiveDownloader

sunpy.data.data_manager.storage Module#

Storage module contains the abstract implementation of storage for sunpy.data.data_manager.Cache and a concrete implementation using sqlite.

Classes#

StorageProviderBase()

Base class for remote data manager storage providers.

SqliteStorage(path)

This provides a sqlite backend for storage.

InMemStorage()

This provides a storage stored in memory.

Class Inheritance Diagram#

Inheritance diagram of sunpy.data.data_manager.storage.StorageProviderBase, sunpy.data.data_manager.storage.SqliteStorage, sunpy.data.data_manager.storage.InMemStorage