TimeSeriesList

class gwpy.timeseries.TimeSeriesList(*items)[source]

Bases: gwpy.timeseries.core.TimeSeriesBaseList

Fancy list representing a list of TimeSeries

The TimeSeriesList provides an easy way to collect and organise TimeSeries for a single Channel over multiple segments.

Parameters

*items

any number of TimeSeries

Returns

list

Raises

TypeError

if any elements are not TimeSeries

Attributes Summary

segments

The span of each series in this list

Methods Summary

append(self, item)

Append object to the end of the list.

clear(self, /)

Remove all items from list.

coalesce(self)

Merge contiguous elements of this list into single objects

copy(self)

Return a copy of this list with each element copied to new memory

count(self, value, /)

Return number of occurrences of value.

extend(self, item)

Extend list by appending elements from the iterable.

index(self, value[, start, stop])

Return first index of value.

insert(self, index, object, /)

Insert object before index.

join(self[, pad, gap])

Concatenate all of the elements of this list into a single object

pop(self[, index])

Remove and return item at index (default last).

remove(self, value, /)

Remove first occurrence of value.

reverse(self, /)

Reverse IN PLACE.

sort(self, /, \*[, key, reverse])

Stable sort IN PLACE.

Attributes Documentation

segments

The span of each series in this list

Methods Documentation

append(self, item)[source]

Append object to the end of the list.

clear(self, /)

Remove all items from list.

coalesce(self)[source]

Merge contiguous elements of this list into single objects

This method implicitly sorts and potentially shortens this list.

copy(self)[source]

Return a copy of this list with each element copied to new memory

count(self, value, /)

Return number of occurrences of value.

extend(self, item)[source]

Extend list by appending elements from the iterable.

index(self, value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

insert(self, index, object, /)

Insert object before index.

join(self, pad=None, gap=None)[source]

Concatenate all of the elements of this list into a single object

Parameters

pad : float, optional

value with which to fill gaps in the source data, by default gaps will result in a ValueError.

gap : str, optional, default: 'raise'

what to do if there are gaps in the data, one of

  • 'raise' - raise a ValueError

  • 'ignore' - remove gap and join data

  • 'pad' - pad gap with zeros

If pad is given and is not None, the default is 'pad', otherwise 'raise'.

Returns

series : gwpy.types.TimeSeriesBase subclass

a single series containing all data from each entry in this list

See also

TimeSeries.append

for details on how the individual series are concatenated together

pop(self, index=-1, /)

Remove and return item at index (default last).

Raises IndexError if list is empty or index is out of range.

remove(self, value, /)

Remove first occurrence of value.

Raises ValueError if the value is not present.

reverse(self, /)

Reverse IN PLACE.

sort(self, /, *, key=None, reverse=False)

Stable sort IN PLACE.

EntryClass[source]

alias of TimeSeries