UnifiedDownloaderFactory

class sunpy.net.fido_factory.UnifiedDownloaderFactory(default_widget_type=None, additional_validation_functions=[], registry=None)[source] [edit on github]

Bases: sunpy.util.datatype_factory_base.BasicRegistrationFactory

sunpy.net.Fido(*args, **kwargs)

Search and Download data from a variety of supported sources.

Methods Summary

__call__(*args, **kwargs)
fetch(*query_results, **kwargs) Download the records represented by UnifiedResponse objects.
search(*query) Query for data in form of multiple parameters.

Methods Documentation

__call__(*args, **kwargs)[source] [edit on github]
fetch(*query_results, **kwargs)[source] [edit on github]

Download the records represented by UnifiedResponse objects.

Parameters:
  • query_results (sunpy.net.fido_factory.UnifiedResponse) – Container returned by query method, or multiple.
  • wait (bool) – fetch will wait until the download is complete before returning.
  • progress (bool) – Show a progress bar while the download is running.
Returns:

sunpy.net.fido_factory.DownloadResponse

Example

>>> from sunpy.net.vso.attrs import Time, Instrument
>>> unifresp = Fido.search(Time('2012/3/4','2012/3/6'), Instrument('AIA'))
>>> downresp = Fido.fetch(unifresp)
>>> file_paths = downresp.wait()
search(*query)[source] [edit on github]

Query for data in form of multiple parameters.

Examples

Query for LYRALightCurve data for the time range (‘2012/3/4’,‘2012/3/6’)

>>> from sunpy.net import Fido, attrs as a
>>> unifresp = Fido.search(a.Time('2012/3/4', '2012/3/6'), a.Instrument('lyra'))

Query for data from Nobeyama Radioheliograph and RHESSI

>>> unifresp = Fido.search(a.Time('2012/3/4', '2012/3/6'),
                  (a.Instrument('norh') & a.Wavelength(17*u.GHz)) | a.Instrument('rhessi'))

Query for 304 Angstrom SDO AIA data with a cadence of 10 minutes

>>> import astropy.units as u
>>> from sunpy.net import Fido, attrs as a
>>> unifresp = Fido.search(a.Time('2012/3/4', '2012/3/6'),
                           a.Instrument('AIA'),
                           a.Wavelength(304*u.angstrom, 304*u.angstrom),
                           a.vso.Sample(10*u.minute))
Parameters:query (sunpy.net.vso.attrs, sunpy.net.jsoc.attrs) – A query consisting of multiple parameters which define the requested data. The query is specified using attributes from the VSO and the JSOC. The query can mix attributes from the VSO and the JSOC.
Returns:sunpy.net.fido_factory.UnifiedResponse object – Container of responses returned by clients servicing query.

Notes

The conjunction ‘and’ transforms query into disjunctive normal form ie. query is now of form A & B or ((A & B) | (C & D)) This helps in modularising query into parts and handling each of the parts individually.