pynwb.misc module

class pynwb.misc.AbstractFeatureSeries(name, source, feature_units, features, data=[], resolution=0.0, conversion=1.0, timestamps=None, starting_time=None, rate=None, comments=no comments, description=no description, control=None, control_description=None, parent=None)

Bases: pynwb.base.TimeSeries

Represents the salient features of a data stream. Typically this will be used for things like a visual grating stimulus, where the bulk of data (each frame sent to the graphics card) is bulky and not of high value, while the salient characteristics (eg, orientation, spatial frequency, contrast, etc) are what important and are what are used for analysis

All time series are created by calls to NWB.create_timeseries(). They should not not be instantiated directly

Parameters:
  • name (str) – The name of this TimeSeries dataset
  • source (str) – Name of TimeSeries or Modules that serve as the source for the data contained here. It can also be the name of a device, for stimulus or acquisition data
  • feature_units (str) – The unit of each feature
  • features (str) – Description of each feature
  • data (list or ndarray) – The data this TimeSeries dataset stores. Can also store binary data e.g. image frames
  • resolution (float) – The smallest meaningful difference (in specified unit) between values in data
  • conversion (float) – Scalar to multiply each element in data to convert it to the specified unit
  • timestamps (list or ndarray) – Timestamps for samples stored in data
  • starting_time (float) – The timestamp of the first sample
  • rate (float) – Sampling rate in Hz
  • comments (str) – Human-readable comments about this TimeSeries dataset
  • description (str) – Description of this TimeSeries dataset
  • control (Iterable) – Numerical labels that apply to each element in data
  • control_description (Iterable) – Description of each control value
  • parent (NWBContainer) – The parent NWBContainer for this NWBContainer
add_features(time, features)
Parameters:
  • time (float) – the time point of this feature
  • features (list or ndarray) – the feature values for this time point
feature_units
features
class pynwb.misc.AnnotationSeries(name, source, data=[], timestamps=None, comments=no comments, description=no description, parent=None)

Bases: pynwb.base.TimeSeries

Stores text-based records about the experiment. To use the AnnotationSeries, add records individually through add_annotation() and then call finalize(). Alternatively, if all annotations are already stored in a list, use set_data() and set_timestamps()

All time series are created by calls to NWB.create_timeseries(). They should not not be instantiated directly

Parameters:
  • name (str) – The name of this TimeSeries dataset
  • source (str) – Name of TimeSeries or Modules that serve as the source for the data contained here. It can also be the name of a device, for stimulus or acquisition data
  • data (list or ndarray or TimeSeries) – The data this TimeSeries dataset stores. Can also store binary data e.g. image frames
  • timestamps (list or ndarray or TimeSeries) – Timestamps for samples stored in data
  • comments (str) – Human-readable comments about this TimeSeries dataset
  • description (str) – Description of this TimeSeries dataset
  • parent (NWBContainer) – The parent NWBContainer for this NWBContainer
add_annotation(time, annotation)

Add an annotation

Parameters:
  • time (float) – The time for the anotation
  • annotation (str) – the annotation
class pynwb.misc.IntervalSeries(name, source, data=[], timestamps=[], comments=no comments, description=no description, control=None, control_description=None, parent=None)

Bases: pynwb.base.TimeSeries

Stores intervals of data. The timestamps field stores the beginning and end of intervals. The data field stores whether the interval just started (>0 value) or ended (<0 value). Different interval types can be represented in the same series by using multiple key values (eg, 1 for feature A, 2 for feature B, 3 for feature C, etc). The field data stores an 8-bit integer. This is largely an alias of a standard TimeSeries but that is identifiable as representing time intervals in a machinereadable way.

Parameters:
  • name (str) – The name of this TimeSeries dataset
  • source (str) – Name of TimeSeries or Modules that serve as the source for the data contained here. It can also be the name of a device, for stimulus or acquisition data
  • data (list or ndarray or TimeSeries or Iterable) – >0 if interval started, <0 if interval ended.
  • timestamps (list or ndarray or TimeSeries or Iterable) – Timestamps for samples stored in data
  • comments (str) – Human-readable comments about this TimeSeries dataset
  • description (str) – Description of this TimeSeries dataset
  • control (Iterable) – Numerical labels that apply to each element in data
  • control_description (Iterable) – Description of each control value
  • parent (NWBContainer) – The parent NWBContainer for this NWBContainer
add_interval(start, stop)
Parameters:
  • start (float) – The name of this TimeSeries dataset
  • stop (float) – The name of this TimeSeries dataset
data
timestamps
class pynwb.misc.SpikeUnit(name, times, unit_description, source)

Bases: pynwb.core.NWBContainer

For use in the UnitTimes class.

Parameters:
  • name (str) – Name of the SpikeUnit
  • times (Iterable) – Spike time for the units (exact or estimated)
  • unit_description (str) – Description of the unit (eg, cell type).
  • source (str) – Name, path or description of where unit times originated. This is necessary only if the info here differs from or is more fine-grained than the interfaces source field.
times
unit_description
class pynwb.misc.UnitTimes(source, spike_units)

Bases: pynwb.core.NWBContainer

Event times of observed units (e.g. cell, synapse, etc.). The UnitTimes group contains a group for each unit. The name of the group should match the value in the source module, if that is possible/relevant (e.g., name of ROIs from Segmentation module).

Parameters:
  • source (str) – the source of the data represented in this Module Interface
  • spike_units (Iterable) – The SpikeUnits contained in this Interface
spike_units
unit_list