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

Methods Summary

append(item) L.append(object) – append object to end
coalesce() Merge contiguous elements of this list into single objects
copy() Return a copy of this list with each element copied to new memory
count(…)
extend(item) L.extend(iterable) – extend list by appending elements from the iterable
index((value, [start, …) Raises ValueError if the value is not present.
insert L.insert(index, object) – insert object before index
join([pad, gap]) Concatenate all of the elements of this list into a single object
pop(…) Raises IndexError if list is empty or index is out of range.
remove L.remove(value) – remove first occurrence of value.
reverse L.reverse() – reverse IN PLACE
sort L.sort(cmp=None, key=None, reverse=False) – stable sort IN PLACE;

Methods Documentation

append(item)[source]

L.append(object) – append object to end

coalesce()[source]

Merge contiguous elements of this list into single objects

This method implicitly sorts and potentially shortens this list.

copy()[source]

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

count(value) → integer -- return number of occurrences of value
extend(item)[source]

L.extend(iterable) – extend list by appending elements from the iterable

index(value[, start[, stop]]) → integer -- return first index of value.

Raises ValueError if the value is not present.

insert()

L.insert(index, object) – insert object before index

join(pad=0.0, gap='raise')[source]

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

Parameters:

pad : float, optional, default: 0.0

value with which to pad gaps

gap : str, optional, default: 'raise'

what to do in the event of a discontguity in the data, one of

  • ‘raise’: raise an exception
  • ‘warn’: print a warning
  • ‘ignore’: append series as if there was no gap
  • ‘pad’: pad the gap with a value
Returns:

`TimeSeriesBase`

a single TimeSeriesBase covering the full span of all entries in this list

See also

TimeSeriesBase.append
for details on how the individual series are concatenated together
pop([index]) → item -- remove and return item at index (default last).

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

remove()

L.remove(value) – remove first occurrence of value. Raises ValueError if the value is not present.

reverse()

L.reverse() – reverse IN PLACE

sort()

L.sort(cmp=None, key=None, reverse=False) – stable sort IN PLACE; cmp(x, y) -> -1, 0, 1

EntryClass[source]

alias of TimeSeries