STIXClient#

class stixpy.net.client.STIXClient(*, source='https://pub099.cs.technik.fhnw.ch/data/fits')[source]#

Bases: GenericClient

A Fido client to search and download STIX data from the STIX instrument archive

Examples

>>> from sunpy.net import Fido, attrs as a
>>> from stixpy.net.client import STIXClient
>>> query = Fido.search(a.Time('2020-06-05', '2020-06-07'), a.Instrument.stix,
...                     a.stix.DataProduct.ql_lightcurve)
>>> query
<sunpy.net.fido_factory.UnifiedResponse object at ...>
Results from 1 Provider:

3 Results from the STIXClient:
       Start Time               End Time        Instrument ... Ver Request ID
----------------------- ----------------------- ---------- ... --- ----------
2020-06-05 00:00:00.000 2020-06-05 23:59:59.999       STIX ... V02          -
2020-06-06 00:00:00.000 2020-06-06 23:59:59.999       STIX ... V02          -
2020-06-07 00:00:00.000 2020-06-07 23:59:59.999       STIX ... V02          -

Attributes Summary

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

base_pattern = '{}/{Level}/{year:4d}/{month:02d}/{day:02d}/{DataType}/'#
baseurl = 'https://pub099.cs.technik.fhnw.ch/data/fits'#
datapath = '{level}/{year:4d}/{month:02d}/{day:02d}/{datatype}/'#
ql_filename = 'solo_{level}_stix-{product}_[0-9]{{8}}_V.*.fits'#
ql_pattern = 'solo_{Level}_{descriptor}_{time}_{Ver}.fits'#
required = {<class 'sunpy.net.attrs.Instrument'> sunpy.net.attrs.Instrument  Specifies the Instrument name for the search.         Attribute Name       ... --------------------------- ... adapt                       ... aia                         ... aia                         ... bcs                         ... be_continuum                ... be_halpha                   ... bigbear                     ... caii                        ... cds                         ... celias                      ... cerrotololo                 ... chp                         ... cook                        ... costep                      ... cp                          ... dpm                         ... eis                         ... eit                         ... elteide                     ... erne                        ... eui                         ... eve                         ... eve                         ... film                        ... five_12_channelmagnetograph ... foxsi                       ... gbm                         ... goes                        ... golf                        ... gong                        ... ha2                         ... hi_c                        ... hi_c21                      ... hmi                         ... hxeclipse                   ... hxt                         ... imax                        ... impact                      ... iris                        ... isoon                       ... iss                         ... ivm                         ... k_cor                       ... kpdc                        ... lasco                       ... learmonth                   ... longwave_lobe_06            ... longwave_lobe_07            ... longwave_slit_06            ... longwave_slit_07            ... lyra                        ... lyra                        ... maunaloa                    ... mdi                         ... mees                        ... mergedgong                  ... metis                       ... meudonspectroheliograph     ... mk4                         ... nfi_0                       ... noaa_indices                ... noaa_predict                ... norh                        ... phoenix                     ... phoka                       ... plastic                     ... polar                       ... ptmc                        ... rhessi                      ... rhessi                      ... secchi                      ... shortwave_lobe_06           ... shortwave_lobe_07           ... shortwave_slit_06           ... shortwave_slit_07           ... six_0_ftshg                 ... sj                          ... solarftsspectrometer        ... solohi                      ... soon                        ... sot                         ... sp1                         ... sp2                         ... spectroheliograph           ... spectromagnetograph         ... spice                       ... srs_table                   ... stix                        ... sufi                        ... sumer                       ... sutri                       ... suvi                        ... suvi                        ... swan                        ... swap                        ... swaves                      ... sxt                         ... t1_halpha                   ... t4_cak                      ... t4_continuum                ... t4_gband                    ... tm_1001                     ... tm_1010                     ... trace                       ... udaipur                     ... unpolarized                 ... uvcs                        ... vault_1999                  ... vault_2002                  ... vault_2014                  ... virgo                       ... vsm                         ... wbs                         ... wfi_1                       ... wfi_2                       ... wfi_3                       ... wispr                       ... x123                        ... xrs                         ... xrt                         ..., <class 'sunpy.net.attrs.Time'> sunpy.net.attrs.Time Specify the time range of the query.  Attribute Name    Client   Full Name              Description               -------------- ----------- --------- -------------------------------------- all            NOAAIndices all       All values of this type are supported. all            NOAAPredict all       All values of this type are supported.}#
sci_filename = 'solo_{level}_stix-{product}_[0-9]{{8}}T[0-9]{{6}}-[0-9]{{8}}T[0-9]{{6}}_V.*.fits'#
sci_pattern = 'solo_{Level}_{descriptor}_{start}-{end}_{Ver}_{Request}-{tc}.fits'#

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) StixQueryResponse[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.