RSTNClient#

class radiospectra.net.RSTNClient[source]#

Bases: GenericClient

Radio Spectrometer Telescope Network (RSTN) hosted at NOAA National Geophysical Data (NGDC) archive.

Examples

>>> from radiospectra import net
>>> from sunpy.net import Fido, attrs as a
>>> query = Fido.search(a.Time('2003/03/15 00:00', '2003/03/15 23:59'),
...                     a.Instrument('RSTN'), net.Observatory('San Vito'))  
>>> query  
<sunpy.net.fido_factory.UnifiedResponse object at ...
Results from 1 Provider:

1 Results from the RSTNClient:
       Start Time               End Time        Provider Instrument Observatory
----------------------- ----------------------- -------- ---------- -----------
2003-03-15 00:00:00.000 2003-03-15 23:59:59.999     RSTN       RSTN    San Vito

Attributes Summary

baseurl

observatory_map

pattern

Methods Summary

post_search_hook(exdict, matchdict)

Helper function used after search() which makes the extracted metadata representable in a query response table.

register_values()

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

search(*args, **kwargs)

Query this client for a list of results.

Attributes Documentation

baseurl = 'https://www.ngdc.noaa.gov/stp/space-weather/solar-data/solar-features/solar-radio/rstn-spectral/{obs}/%Y/%m/.*.gz'#
observatory_map = {'Holloman': 'holloman', 'Learmonth': 'learmonth', 'Palehua': 'palehua', 'Sagamore Hill': 'sagamore', 'San Vito': 'san-vito', 'holloman': 'Holloman', 'learmonth': 'Learmonth', 'palehua': 'Palehua', 'sagamore': 'Sagamore Hill', 'san-vito': 'San Vito'}#
pattern = '{}/rstn-spectral/{obs}/{year:4d}/{month:2d}/{obs_short:2l}{year2:2d}{month2:2d}{day:2d}.SRS.gz'#

Methods Documentation

post_search_hook(exdict, matchdict)[source]#

Helper function used after search() which makes the extracted metadata representable in a query response table.

Parameters:
  • exdict (dict) – Represents metadata extracted from files.

  • matchdict (dict) – Contains attr values accessed from register_values() and the search query itself.

Returns:

rowdict (OrderedDict) – An Ordered Dictionary which is used by QueryResponse to show results.

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(*args, **kwargs)[source]#

Query this client for a list of results.

Parameters:
  • *args (tuple) – sunpy.net.attrs objects representing the query.

  • **kwargs (dict) – Any extra keywords to refine the search.

Returns:

A QueryResponse instance containing the query result.