XRSClient

class sunpy.net.dataretriever.XRSClient[source]

Bases: sunpy.net.dataretriever.client.GenericClient

Provides access to the GOES XRS fits files archive.

Searches for GOES XRS data both on NASA servers prior to re-processed GOES 13, 14 and 15 and on the NOAA archive for > GOES 13. For satellite numbers > 13 the XRSClient searches the NOAA archive, and returns the re-processed science-quality data for GOES 13, 14 and 15, and also the new GOES-R series 16 and 17.

Note - the new science quality data have scaling factors removed for 13, 14 and 15 and they are not added to GOES 16 AND 17. This means the peak flux will be different to the older version of the data, such as those collected from the NASA servers.

See the following readmes about the data

Examples

>>> from sunpy.net import Fido, attrs as a
>>> results = Fido.search(a.Time("2016/1/1", "2016/1/2"),
...                       a.Instrument.xrs)  
>>> results  
<sunpy.net.fido_factory.UnifiedResponse object at ...>
Results from 1 Provider:

4 Results from the XRSClient:
       Start Time               End Time        Instrument ... Source Provider
----------------------- ----------------------- ---------- ... ------ --------
2016-01-01 00:00:00.000 2016-01-01 23:59:59.999        XRS ...   GOES     NOAA
2016-01-02 00:00:00.000 2016-01-02 23:59:59.999        XRS ...   GOES     NOAA
2016-01-01 00:00:00.000 2016-01-01 23:59:59.999        XRS ...   GOES     NOAA
2016-01-02 00:00:00.000 2016-01-02 23:59:59.999        XRS ...   GOES     NOAA

Attributes Summary

baseurl_new

baseurl_old

baseurl_r

pattern_new

pattern_old

pattern_r

Methods Summary

post_search_hook(i, 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_new = 'https://satdat.ngdc.noaa.gov/sem/goes/data/science/xrs/goes{SatelliteNumber}/gxrs-l2-irrad_science/%Y/%m/sci_gxrs-l2-irrad_g{SatelliteNumber}_d%Y%m%d_.*\\.nc'
baseurl_old = 'https://umbra.nascom.nasa.gov/goes/fits/%Y/go(\\d){2}(\\d){6,8}\\.fits'
baseurl_r = 'https://data.ngdc.noaa.gov/platforms/solar-space-observing-satellites/goes/goes{SatelliteNumber}/l2/data/xrsf-l2-flx1s_science/%Y/%m/sci_xrsf-l2-flx1s_g{SatelliteNumber}_d%Y%m%d_.*\\.nc'
pattern_new = '{}/goes{SatelliteNumber:02d}/gxrs-l2-irrad_science/{year:4d}/{month:2d}/sci_gxrs-l2-irrad_g{SatelliteNumber:02d}_d{year:4d}{month:2d}{day:2d}_{}.nc'
pattern_old = '{}/fits/{year:4d}/go{SatelliteNumber:02d}{}{month:2d}{day:2d}.fits'
pattern_r = '{}/goes/goes{SatelliteNumber:02d}/l2/data/xrsf-l2-flx1s_science/{year:4d}/{month:2d}/sci_xrsf-l2-flx1s_g{SatelliteNumber:02d}_d{year:4d}{month:2d}{day:2d}_{}.nc'

Methods Documentation

post_search_hook(i, 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.