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 ~`sunpy.net.fido_factory.UnifiedDownloaderFactory` 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)

Class Inheritance Diagram

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

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

QueryResponseBlock(map0, url[, time])

Represents url, source along with other information

QueryResponse(lst)

Container of QueryResponseBlocks

GenericClient()

Base class for simple web clients for the data retriever module.

EVEClient()

This EVEClient is for the Level 0C data from http://lasp.colorado.edu/home/eve/data/data-access/.

XRSClient()

LYRAClient()

NOAAIndicesClient()

NOAAPredictClient()

NoRHClient()

RHESSIClient()

SRSClient()

GBMClient()

This GBMClient is for the Gamma-Ray Burst Monitor (GBM) instrument aboard the Fermi satellite.

Class Inheritance Diagram

Inheritance diagram of sunpy.net.dataretriever.client.QueryResponseBlock, sunpy.net.dataretriever.client.QueryResponse, sunpy.net.dataretriever.client.GenericClient, 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, sunpy.net.dataretriever.sources.noaa.SRSClient, sunpy.net.dataretriever.sources.fermi_gbm.GBMClient

sunpy.net.dataretriever.sources Package

VSO

sunpy.net.vso Package

Classes

VSOClient([url, port, api])

Main VSO Client.

QueryResponse(lst[, queryresult, table])

A container for VSO Records returned from VSO Searches.

Class Inheritance Diagram

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

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

JSOC

sunpy.net.jsoc Package

Classes

JSOCClient

This is a Client to the JSOC Data Export service.

JSOCResponse([table])

table : astropy.table.Table

Class Inheritance Diagram

Inheritance diagram of sunpy.net.jsoc.jsoc.JSOCClient, sunpy.net.jsoc.jsoc.JSOCResponse

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.

Segment(value)

Segments choose which files to download when there are more than one present for each record e.g.

Keys(value)

Keys choose which keywords to fetch while making a query request.

PrimeKey(label, value)

Prime Keys

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.Segment, sunpy.net.jsoc.attrs.Keys, sunpy.net.jsoc.attrs.PrimeKey

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

Functions

endpoint_parser(link)

Takes a link to a list of endpoints and parses the WSDL links.

webservice_parser([service])

Quickly parses important contents from HELIO registry.

wsdl_retriever([service])

Retrieves a link to a taverna WSDL file

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

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

Helioviewer

sunpy.net.helioviewer Module

This module provides a wrapper around the Helioviewer API.

Classes

HelioviewerClient([url])

Helioviewer.org Client

Class Inheritance Diagram

Inheritance diagram of sunpy.net.helioviewer.HelioviewerClient

Attr

Allow representation of queries as logic expressions. This module makes sure that attributes that are combined using the two logic operations AND (&) and OR (|) always are in disjunctive normal form, that is, there are only two levels ­- the first being disjunction and the second being conjunction. In other words, every combinations of attributes looks like this: (a AND b AND c) OR (d AND e).

Walkers are used to traverse the tree that results from combining attributes. They are implemented using sunpy.util.multimethod. Multimethods are functions that are not assigned to classes but still dispatch by type of one or more of their arguments. For more information about multimethods, refer to sunpy.util.multimethod.

Please note that & is evaluated first, so A & B | C is equivalent to (A & B) | C.

Functions

and_(*args)

Trick operator precedence.

or_(*args)

Trick operator precedence.

Classes

Attr

This is the base for all attributes.

DummyAttr

Empty attribute.

SimpleAttr(value)

An attribute that only has a single value.

AttrAnd(attrs)

Attribute representing attributes ANDed together.

AttrOr(attrs)

Attribute representing attributes ORed together.

ValueAttr(attrs)

Class Inheritance Diagram

Inheritance diagram of sunpy.net.attr.Attr, sunpy.net.attr.DummyAttr, sunpy.net.attr.SimpleAttr, sunpy.net.attr.AttrAnd, sunpy.net.attr.AttrOr, sunpy.net.attr.ValueAttr