SOLARNETClient#

class sunpy.net.solarnet.SOLARNETClient[source]#

Bases: BaseClient

Provides access to query and download from the SOLARNET Virtual Observatory (SVO).

The SVO was first supported by the SOLARNET project, funded by the European Commission’s FP7 Capacities Programme under the Grant Agreement 312495. It was turned operational due to the SOLARNET2 project, funded by the European Union’s Horizon 2020 Research and Innovation Programme under Grant Agreement 824135. It’s purpose is to collect metadata from as many solar observations as possible, especially those involved in the SOLARNET projects, in a common catalog and make them available to the scientific community.

There is various ways one can access SVO Data, this client using the RESTful API (available documentation).

Notes

This client by defaults limits the number of results returned from a search to 20. To change this limit, use the a.solarnet.Limit attribute in your query.

In addition, the query returns a large number of columns, many of which are not useful to the user. These are columns found in the FITS headers of the files, and are hidden by default. If you want to see all the columns, you can do query_results.show() on the results returned from a search.

Examples

>>> from sunpy.net import Fido, attrs as a
>>> search_results = Fido.search(a.solarnet.Dataset.gris_level_1,a.solarnet.Limit(2), a.solarnet.Target.ar)
>>> search_results
<sunpy.net.fido_factory.UnifiedResponse object at ...>
Results from 1 Provider:

2 Results from the SOLARNETClient:
Source: https://solarnet2.oma.be

     OID               DATE_BEG                 DATE_END          WAVEMIN   WAVEMAX          DATE_OBS         EXPTIME MEASURE STEPS WAVELENG
-------------- ------------------------ ------------------------ --------- --------- ------------------------ ------- ------- ----- --------
20140426094659 2014-04-26T09:46:59.000Z 2014-04-26T09:53:41.300Z 1564.0199 1568.0461 2014-04-26T00:00:00.000Z    None          None     1566
20140426095643 2014-04-26T09:56:43.000Z 2014-04-26T10:09:50.300Z 1564.0191 1568.0461 2014-04-26T00:00:00.000Z    None          None     1566

Attributes Summary

info_url

This should return a string that is a URL to the data server or documentation on the data being served.

Methods Summary

fetch(query_results, path, downloader, **kwargs)

This enables the user to fetch the data using the client, after a search.

load_solarnet_values()

Load Solarnet dataset values from a local JSON file.

register_values()

This enables the client to register what kind of Attrs it can use directly.

search(*query)

Searches the SVO for datasets matching the query.

Attributes Documentation

info_url#

Methods Documentation

fetch(query_results, path, downloader, **kwargs)[source]#

This enables the user to fetch the data using the client, after a search.

Parameters:
  • query_results – Results to download.

  • path (str or pathlib.Path, optional) – Path to the download directory

  • downloader (parfive.Downloader) – The download manager to use.

Returns:

parfive.Results – The results object, can be None if wait is False and downloader is not None.

static load_solarnet_values()[source]#

Load Solarnet dataset values from a local JSON file.

Returns:

attrs (dict) – Dictionary of Solarnet dataset values.

classmethod register_values()[source]#

This enables the client to register what kind of Attrs it can use directly.

Returns:

dict – A dictionary with key values of Attrs and the values are a tuple of (“Attr Type”, “Name”, “Description”).

search(*query)[source]#

Searches the SVO for datasets matching the query.

Parameters:

*query (attrs) – Attributes to search for datasets.

Returns:

QueryResponseTable – A table containing the search results.