EISClient

class eispac.net.EISClient[source]

Bases: GenericClient

Provides access to the level 1 EIS data in HDF5 and FITS format.

This data is hosted by the Naval Research Laboratory.

Examples

>>> from sunpy.net import Fido, attrs as a
>>> import eispac.net
>>> from eispac.net.attrs import FileType
>>> results = Fido.search(a.Time('2020-11-09 00:00:00','2020-11-09 01:00:00'),
...                       a.Instrument('EIS'),
...                       a.Physobs.intensity,
...                       a.Source('Hinode'),
...                       a.Provider('NRL'),
...                       a.Level('1'))  
>>> results  
<sunpy.net.fido_factory.UnifiedResponse object at ...>
Results from 1 Provider:

3 Results from the EISClient:
Source: https://eis.nrl.navy.mil/

       Start Time               End Time        ... Level   FileType
----------------------- ----------------------- ... ----- -----------
2020-11-09 00:10:12.000 2020-11-09 00:10:12.999 ...     1   HDF5 data
2020-11-09 00:10:12.000 2020-11-09 00:10:12.999 ...     1 HDF5 header
2020-11-09 00:10:12.000 2020-11-09 00:10:12.999 ...     1        FITS


>>> results = Fido.search(a.Time('2020-11-09 00:00:00','2020-11-09 01:00:00'),
...                       a.Instrument('EIS'),
...                       a.Physobs.intensity,
...                       a.Source('Hinode'),
...                       a.Provider('NRL'),
...                       a.Level('1'),
...                       FileType('HDF5 header'))  
>>> results  
<sunpy.net.fido_factory.UnifiedResponse object at ...>
Results from 1 Provider:

1 Results from the EISClient:
Source: https://eis.nrl.navy.mil/

       Start Time               End Time        ... Level   FileType
----------------------- ----------------------- ... ----- -----------
2020-11-09 00:10:12.000 2020-11-09 00:10:12.999 ...     1 HDF5 header

Attributes Summary

baseurl_fits

baseurl_hdf5

info_url

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

pattern_fits

pattern_hdf5

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_fits = 'https://eis.nrl.navy.mil/level1/fits/%Y/%m/%d/eis_er_%Y%m%d_%H%M%S.fits'
baseurl_hdf5 = 'https://eis.nrl.navy.mil/level1/hdf5/%Y/%m/%d/eis_%Y%m%d_%H%M%S.(\\w){4}.h5'
info_url
pattern_fits = '{}/{year:4d}/{month:2d}/{day:2d}/eis_er_{:8d}_{hour:2d}{minute:2d}{second:2d}.{FileType}'
pattern_hdf5 = '{}/{year:4d}/{month:2d}/{day:2d}/eis_{:8d}_{hour:2d}{minute:2d}{second:2d}.{FileType}'

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 – An Ordered Dictionary which is used by QueryResponse to show results.

Return type:

OrderedDict

classmethod register_values()[source]

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

Returns:

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

Return type:

dict

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.

Return type:

A QueryResponse instance containing the query result.