Epoch management

class nwbep.Epoch(name, nwb, start, stop, spec)

Epoch object Epochs represent specific experimental intervals and store references to desired time series that overlap with the interval. The references to those time series indicate the first index in the time series that overlaps with the interval, and the duration of that overlap.

Epochs should be created through NWB.create_epoch(). They should not be instantiated directly

add_ignore_interval(start, stop)

Each epoch has a list of intervals that can be flagged to be ignored, for example due electrical noise or poor behavior of the subject. Intervals are trimmed to fit within epoch boundaries, but no further logic is performed (eg, if overlapping intervals are specified, those overlaps will be stored)

Arguments:

start (float) Start of the interval to ignore

stop (float) End time of the interval

Returns:
nothing
add_tag(content)

Append string annotation to epoch. This will be stored in the epoch’s ‘tags’ dataset. Additionally, it will be added to a master tag list stored as an attribute on the root ‘epoch/’ group. Each epoch can have multiple tags. The root epoch keeps a list of unique tags

Arguments:
content (text) Name of the tag to add to the epoch
Returns:
nothing
add_timeseries(in_epoch_name, timeseries)

Associates time series with epoch. This will create a link to the specified time series within the epoch and will calculate its overlaps.

Arguments:

in_epoch_name (text) Name that time series will use in the epoch (this can be different than the actual time series name)

timeseries (text or TimeSeries object) Full hdf5 path to time series that’s being added, or the TimeSeries object itself

Returns:
nothing
finalize()

Finish epoch entry and write data to the file

Arguments:
none
Returns:
nothing
set_description(desc)

Convenience function to set the value of the ‘description’ dataset in the epoch

Arguments:
desc (text) Description of the epoch
Returns:
nothing
set_value(key, value, **attrs)

Adds an annotating key-value pair (ie, dataset) to the epoch.

Arguments:

key (text) A unique identifier within the TimeSeries

value (any) The value associated with this key

Returns:
nothing

Previous topic

Module and interfaces

Next topic

Metadata constants and helper functions

This Page