pynwb.epoch module

class pynwb.epoch.TimeIntervals(name, description='experimental intervals', id=None, columns=None, colnames=None, target_tables=None, meanings_tables=None)[source]

Bases: DynamicTable

Table for storing Epoch data

Parameters:
  • name (str) – name of this TimeIntervals

  • description (str) – Description of this TimeIntervals

  • id (ndarray or list or tuple or Dataset or Array or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or ElementIdentifiers) – the identifiers for this table

  • columns (tuple or list) – the columns in this table

  • colnames (ndarray or list or tuple or Dataset or Array or StrDataset or HDMFDataset or AbstractDataChunkIterator) – the ordered names of the columns in this table. columns must also be provided.

  • target_tables (dict) – dict mapping DynamicTableRegion column name to the table that the DTR points to. The column is added to the table if it is not already present (i.e., when it is optional).

  • meanings_tables (tuple or list) – MeaningsTable objects that provide meanings for values in VectorData columns. Each MeaningsTable must have a name of “{column_name}_meanings” where column_name is the name of the target column in this DynamicTable. The target column must exist in this table.

add_interval(start_time, stop_time, tags=None, timeseries=None)[source]
Parameters:
  • start_time (float) – Start time of epoch, in seconds

  • stop_time (float) – Stop time of epoch, in seconds

  • tags (str or list or tuple) – user-defined tags used throughout time intervals

  • timeseries (list or tuple or TimeSeries) – the TimeSeries this epoch applies to

get_starting_time()[source]

Get the earliest start time across all intervals in this TimeIntervals table.

Returns:

The earliest start time in seconds, or None if the table is empty.

Return type:

float or None

get_duration()[source]

Get the total duration from the earliest start time to the latest stop time.

Returns:

The duration in seconds, or None if the table is empty.

Return type:

float or None

Notes

The duration represents the time span from the earliest interval start to the latest interval stop, not the sum of individual interval durations.

namespace = 'core'
neurodata_type = 'TimeIntervals'