SunPy net

SunPy’s net submodule contains a lot of different code for accessing various solar physics related web services. This submodule contains many layers. Most users should use Fido, which is an interface to multiple sources including all the sources implemented in dataretriever as well as vso and jsoc. Fido can be used like so:

>>> from sunpy.net import Fido, attrs as a
>>> results = Fido.search(a.Time("2012/1/1", "2012/1/2"), a.Instrument('lyra'))
>>> files = Fido.fetch(results)

sunpy.net.fido_factory Module

This module provides the Fido instance of sunpy.net.fido_factory.UnifiedDownloaderFactory it also provides the UnifiedResponse class which Fido.search returns and the DownloadResponse class that is returned by Fido.fetch.

Classes

UnifiedResponse(lst) The object used to store results from search.
UnifiedDownloaderFactory([…]) sunpy.net.Fido(*args, **kwargs)
DownloadResponse(lst) Object returned by clients servicing the query.

Class Inheritance Diagram

Inheritance diagram of sunpy.net.fido_factory.UnifiedResponse, sunpy.net.fido_factory.UnifiedDownloaderFactory, sunpy.net.fido_factory.DownloadResponse

Dataretriever

sunpy.net.dataretriever Package

The sunpy.net.dataretriever submodule is a framework for downloading data from “simple” web sources such as HTTP or FTP servers. Although it could be used for more complex services as well. Following the example of sunpy.map and sunpy.timeseries this module provides a base class GenericClient from which specific services can subclass. All these subclasses are then registered with the Fido factory class, so do not need to be called individually.

Classes

GenericClient() Base class for simple web clients for the data retriever module.
QueryResponse(lst) Container of QueryResponseBlocks
QueryResponseBlock(map0, url[, time]) Represents url, source along with other information

Class Inheritance Diagram

Inheritance diagram of sunpy.net.dataretriever.client.GenericClient, sunpy.net.dataretriever.client.QueryResponse, sunpy.net.dataretriever.client.QueryResponseBlock

sunpy.net.dataretriever.sources Package

Class Inheritance Diagram

Inheritance diagram of sunpy.net.dataretriever.sources.eve.EVEClient, sunpy.net.dataretriever.sources.goes.XRSClient, sunpy.net.dataretriever.sources.lyra.LYRAClient, sunpy.net.dataretriever.sources.noaa.NOAAIndicesClient, sunpy.net.dataretriever.sources.noaa.NOAAPredictClient, sunpy.net.dataretriever.sources.norh.NoRHClient, sunpy.net.dataretriever.sources.rhessi.RHESSIClient

VSO

sunpy.net.vso Package

Classes

VSOClient([url, port, api]) Main VSO Client.
InteractiveVSOClient([url, port, api])

Deprecated since version 0.8.0.

Class Inheritance Diagram

Inheritance diagram of sunpy.net.vso.vso.VSOClient, sunpy.net.vso.vso.InteractiveVSOClient

sunpy.net.vso.attrs Module

Attributes that can be used to construct VSO queries. Attributes are the fundamental building blocks of queries that, together with the two operations of AND and OR (and in some rare cases XOR) can be used to construct complex queries. Most attributes can only be used once in an AND-expression, if you still attempt to do so it is called a collision. For a quick example think about how the system should handle Instrument(‘aia’) & Instrument(‘eit’).

Classes
Wavelength(wavemin[, wavemax]) Specifies the wavelength or spectral energy range of the detector.
Time(start[, end, near]) Specify the time range of the query.
Extent(x, y, width, length, atype) Specify the spatial field-of-view of the query.
Field(fielditem) A subclass of the value attribute.
Provider(value) Specifies the VSO data provider to search for data for.
Source(value) Data sources that VSO can search on.
Instrument(value) Specifies the Instrument name for the search.
Physobs(value) Specifies the physical observable the VSO can search for.
Pixels(value) Pixels are (currently) limited to a single dimension (and only implemented for SDO data) We hope to change this in the future to support TRACE, Hinode and other investigations where this changed between observations.
Level(value) Specifies the data processing level to search for.
Resolution(value) Resolution level of the data.
Detector(value) The detector from which the data comes from.
Filter(value) This attribute is a placeholder for the future.
Sample(value) Time interval for data sampling.
Quicklook(value) Retrieve ‘quicklook’ data if available.
PScale(value) Pixel Scale (PSCALE) is in arc seconds.
Class Inheritance Diagram

Inheritance diagram of sunpy.net.vso.attrs.Wavelength, sunpy.net.vso.attrs.Time, sunpy.net.vso.attrs.Extent, sunpy.net.vso.attrs.Field, sunpy.net.vso.attrs.Provider, sunpy.net.vso.attrs.Source, sunpy.net.vso.attrs.Instrument, sunpy.net.vso.attrs.Physobs, sunpy.net.vso.attrs.Pixels, sunpy.net.vso.attrs.Level, sunpy.net.vso.attrs.Resolution, sunpy.net.vso.attrs.Detector, sunpy.net.vso.attrs.Filter, sunpy.net.vso.attrs.Sample, sunpy.net.vso.attrs.Quicklook, sunpy.net.vso.attrs.PScale

HEK

sunpy.net.hek Package

Classes

HEKClient([url]) Client to interact with the Heliophysics Event Knowledgebase (HEK).

Class Inheritance Diagram

Inheritance diagram of sunpy.net.hek.hek.HEKClient

sunpy.net.hek2vso Package

This module provides a translation layer between the HEK and the VSO. It allows you to acquire records of data that are available via the VSO, based on the data in HEK event entries.

Warning

This module is in beta and maybe unstable.

Functions

translate_results_to_query(results) Formulate VSO queries from HEK results.
vso_attribute_parse(phrase) Parses VSO attributes from a HEK result.

Classes

H2VClient() Class to handle HEK to VSO translations

Class Inheritance Diagram

Inheritance diagram of sunpy.net.hek2vso.hek2vso.H2VClient

HELIO

sunpy.net.helio Package

A Module for accessing the HELIO web service

Warning

This module is still in beta and may be unstable

sunpy.net.helio.hec Module

Access the Helio Event Catalogue

Classes
HECClient([link]) A client class used to interface with and query HELIO webservices.
Class Inheritance Diagram

Inheritance diagram of sunpy.net.helio.hec.HECClient

JSOC

sunpy.net.jsoc Package

Classes

Compression(value) Compression format for requested files.
JSOCClient This is a Client to the JSOC Data Export service.
JSOCResponse([table]) table : astropy.table.Table
Notify(value) An email address to get a notification to when JSOC has staged your request
Protocol(value) The type of download to request one of (“FITS”, “JPEG”, “MPG”, “MP4”, or “as-is”).
Segment(value) Segments choose which files to download when there are more than one present for each record e.g.
Series(value) The JSOC Series to Download.

Class Inheritance Diagram

Inheritance diagram of sunpy.net.jsoc.attrs.Compression, sunpy.net.jsoc.jsoc.JSOCClient, sunpy.net.jsoc.jsoc.JSOCResponse, sunpy.net.jsoc.attrs.Notify, sunpy.net.jsoc.attrs.Protocol, sunpy.net.jsoc.attrs.Segment, sunpy.net.jsoc.attrs.Series

sunpy.net.jsoc.attrs Module

Classes
Series(value) The JSOC Series to Download.
Protocol(value) The type of download to request one of (“FITS”, “JPEG”, “MPG”, “MP4”, or “as-is”).
Notify(value) An email address to get a notification to when JSOC has staged your request
Compression(value) Compression format for requested files.
Segment(value) Segments choose which files to download when there are more than one present for each record e.g.
Class Inheritance Diagram

Inheritance diagram of sunpy.net.jsoc.attrs.Series, sunpy.net.jsoc.attrs.Protocol, sunpy.net.jsoc.attrs.Notify, sunpy.net.jsoc.attrs.Compression, sunpy.net.jsoc.attrs.Segment