TimeSeriesBaseList#

class gwpy.timeseries.TimeSeriesBaseList(*items: _T)[source]#

Bases: list[_T], Generic[_T]

Fancy list representing a list of TimeSeriesBase.

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

Parameters:
items

Any number of TimeSeriesBase.

Returns:
list

A new TimeSeriesBaseList.

Raises:
TypeError

if any elements are not TimeSeriesBase

Attributes Summary

segments

The span of each series in this list.

Methods Summary

append(item)

Append object to the end of the list.

coalesce()

Merge contiguous elements of this list into single objects.

copy()

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

extend(item)

Extend list by appending elements from the iterable.

join([pad, gap])

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

Attributes Documentation

segments[source]#

The span of each series in this list.

Methods Documentation

append(item: _T) None[source]#

Append object to the end of the 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.

extend(item: Iterable[_T]) None[source]#

Extend list by appending elements from the iterable.

join(
pad: float | None = None,
gap: Literal['raise', 'ignore', 'pad'] | None = None,
) _T[source]#

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

Parameters:
padfloat, optional

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

gapstr, optional

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:
seriesgwpy.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.