SunPy timeseries

Overview

One of the core classes in SunPy is a timeseries. A number of instruments are supported through subclasses of the base GenericTimeSeries class. To see Instrument TimeSeries Classes for a list of all of them.

Creating a TimeSeries

TimeSeries can either be created manually or from source files using the factory. To create a custom GenericTimeSeries see the example in the class documentation below. Subclasses of GenericTimeSeries for specific instruments provide their own methods for opening files for their data. For more information see Instrument TimeSeries Classes.

Instrument TimeSeries Classes

The generic method to create an instrument-specific TimeSeries is to call the TimeSeries factory on a file from that dataset and pass the source keyword argument. Some sources use FITS files and these may define the source class themselves, in this case the TimeSeries factory can determine the source implicitly, but it’s good practice to explicitly state it. The following example shows the factory loading a sample file:

>>> import sunpy.timeseries as ts
>>> import sunpy.data.sample
>>> goes = ts.TimeSeries(sunpy.data.sample.GOES_XRS_TIMESERIES, source='XRS')

The TimeSeries factory will load the file and create the timeseries instance. The following instrument classes are supported.

sunpy.timeseries Package

SunPy’s TimeSeries module provides a datatype for 1D time series data, replacing the SunPy LightCurve module.

Currently the objects can be instansiated from files (such as CSV and FITS) and urls to these files, but don’t include data downloaders for their specific instruments as this will become part of the universal downloader.

Classes

EVESpWxTimeSeries(data[, meta, units]) SDO EVE LightCurve for level 0CS data.
GBMSummaryTimeSeries(data[, meta, units]) Fermi/GBM Summary Lightcurve TimeSeries.
GenericTimeSeries(data[, meta, units]) A generic time series object.
LYRATimeSeries(data[, meta, units]) Proba-2 LYRA Lightcurve TimeSeries.
NOAAIndicesTimeSeries(data[, meta, units]) NOAA Solar Cycle monthly indices.
NOAAPredictIndicesTimeSeries(data[, meta, units]) NOAA Solar Cycle Predicted Progression
NoRHTimeSeries(data, header, units, **kwargs) Nobeyama Radioheliograph Correlation Lightcurve TimeSeries.
RHESSISummaryTimeSeries(data[, meta, units]) RHESSI X-ray Summary Lightcurve TimeSeries.
TimeSeriesMetaData([meta, timerange, colnames]) An object used to store metadata for TimeSeries objects that enables multiple TimeSeries metadata to be concatenated in an organised fashion.
XRSTimeSeries(data[, meta, units]) GOES XRS Time Series

Class Inheritance Diagram

Inheritance diagram of sunpy.timeseries.sources.eve.EVESpWxTimeSeries, sunpy.timeseries.sources.fermi_gbm.GBMSummaryTimeSeries, sunpy.timeseries.timeseriesbase.GenericTimeSeries, sunpy.timeseries.sources.lyra.LYRATimeSeries, sunpy.timeseries.sources.noaa.NOAAIndicesTimeSeries, sunpy.timeseries.sources.noaa.NOAAPredictIndicesTimeSeries, sunpy.timeseries.sources.norh.NoRHTimeSeries, sunpy.timeseries.sources.rhessi.RHESSISummaryTimeSeries, sunpy.timeseries.metadata.TimeSeriesMetaData, sunpy.timeseries.sources.goes.XRSTimeSeries