TimeSeriesDict#
- class gwpy.timeseries.TimeSeriesDict[source]#
Bases:
TimeSeriesBaseDictKey-value mapping of named
TimeSeriesobjects.This object is designed to hold data for many different sources (channels) for a single time span. Dictionary keys are ordered by insertion order.
The main entry points for this object are the
read()andfetch()data access methods.Attributes Summary
Retrieve data for multiple names from any data source.
Read data into a
TimeSeriesDict.Write this
TimeSeriesDictto a file.Attributes Documentation
- get#
Retrieve data for multiple names from any data source.
This method attemps to get data any way it can, potentially iterating over multiple available data sources.
- Parameters:
- names
list A
listof channel names to find.- start
LIGOTimeGPS,float,str GPS start time of required data, any input parseable by
to_gpsis fine- end
LIGOTimeGPS,float,str GPS end time of required data, any input parseable by
to_gpsis fine- source
str,list,listofdict. The data source to use. One of the following formats:
str- the name of a single source to use,list- a list of source names to try in order,listofdict- a list of source specifications to try in order; eachdictmust contain a"source"key giving the name of the source to use, and may contain other keys giving options to pass to the data access function for that source.
See ‘Notes’ section below for valid source names.
- frametype
str Name of frametype in which this channel is stored, by default will search for all required frame types.
- pad
float Value with which to fill gaps in the source data, by default gaps will result in a
ValueError.- scaled
bool apply slope and bias calibration to ADC data, for non-ADC data this option has no effect.
- nproc
int, default:1 Number of parallel processes to use, serial process by default.
- allow_tape
bool, default:None Allow the use of data files that are held on tape. Default is
Noneto attempt to allow theTimeSeries.fetchmethod to intelligently select a server that doesn’t use tapes for data storage (doesn’t always work), but to eventually allow retrieving data from tape if required.- verbose
bool This argument is deprecated and will be removed in a future release. Use DEBUG-level logging instead, see Logging with GWpy.
- kwargs
Other keyword arguments to pass to the data access function for each data source. See
TimeSeriesDict.get.help(source=<>)for details on the positional and keyword arguments supported for each data source.
- names
- read#
Read data into a
TimeSeriesDict.Arguments and keywords depend on the output format, see the online documentation for full details for each format, the parameters below are common to most formats.
- Parameters:
- source
str,list Source of data, any of the following:
- names
SequenceofstrorChannel A list (or similar) of dataset names to read from
source.When reading from GWF, this argument should specify the names of the channels to read.
When reading from HDF5, this argument should specify the paths or dataset names within the file.
- start
LIGOTimeGPS,float,str, optional GPS start time of required data, defaults to start of data found; any input parseable by
to_gpsis fine.- end
LIGOTimeGPS,float,str, optional GPS end time of required data, defaults to end of data found; any input parseable by
to_gpsis fine.- format
str, optional Source format identifier. If not given, the format will be detected if possible. See below for list of acceptable formats.
- parallel
int, optional Number of parallel processes to use, serial process by default.
- pad
float, optional Value with which to fill gaps in the source data, by default gaps will result in a
ValueError.
- source
- Raises:
IndexErrorIf
sourceis an empty list.
- write#
Write this
TimeSeriesDictto a file.Arguments and keywords depend on the output format, see the online documentation for full details for each format, the parameters below are common to most formats.