SequenceList

SequenceList(self, *args)

A list of SequenceIntervals or SequencePoints that remains sorted

Parameters

Name Type Description Default
*args SequenceInterval | SequencePoint SequenceIntervals or SequencePoints ()

Attributes

Name Type Description
starts np.array An array of start times
ends np.array An array of end times
labels list[str] A list of labels

Methods

Name Description
append Append a SequenceInterval to the list.
concat Concatenate two sequence lists
pop Pop a SequenceInterval
remove Remove a SequenceInterval from the list

append

SequenceList.append(value, shift=False, re_init=False)

Append a SequenceInterval to the list.

After appending, the SequenceIntervals are re-sorted

Parameters

Name Type Description Default
value SequenceInterval A SequenceInterval to append required

concat

SequenceList.concat(intervals)

Concatenate two sequence lists

In concatenation, the time values of intervals are time shfted by the end time of the original SequenceList.

Parameters

Name Type Description Default
intervals Sequence[SeqVar] A list or SequenceList of SequenceIntervals or SequencePoints required

pop

SequenceList.pop(x)

Pop a SequenceInterval

Parameters

Name Type Description Default
x SequenceInterval SequenceInterval to pop required

remove

SequenceList.remove(x)

Remove a SequenceInterval from the list

Parameters

Name Type Description Default
x SequenceInterval The SequenceInterval to remove. required

Reuse

GPLv3