pynwb.misc module

class pynwb.misc.AnnotationSeries(name, data=[], timestamps=None, comments='no comments', description='no description')[source]

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()

Parameters:
add_annotation(time, annotation)[source]

Add an annotation

Parameters:
  • time (float) – The time for the annotation
  • annotation (str) – the annotation
namespace = 'core'
neurodata_type = 'AnnotationSeries'
class pynwb.misc.AbstractFeatureSeries(name, feature_units, features, data=[], resolution=-1.0, conversion=1.0, timestamps=None, starting_time=None, rate=None, comments='no comments', description='no description', control=None, control_description=None)[source]

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

Parameters:
  • name (str) – The name of this TimeSeries dataset
  • feature_units (Iterable) – The unit of each feature
  • features (Iterable) – Description of each feature
  • data (ndarray or list or tuple or Dataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries) – The data values. May be 1D or 2D. The first dimension must be time. The optional second dimension represents features
  • resolution (str or float) – The smallest meaningful difference (in specified unit) between values in data
  • conversion (str or float) – Scalar to multiply each element in data to convert it to the specified unit
  • timestamps (ndarray or list or tuple or Dataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries) – 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
features

Description of each feature

feature_units

The unit of each feature

add_features(time, features)[source]
Parameters:
  • time (float) – the time point of this feature
  • features (list or ndarray) – the feature values for this time point
namespace = 'core'
neurodata_type = 'AbstractFeatureSeries'
class pynwb.misc.IntervalSeries(name, data=[], timestamps=None, comments='no comments', description='no description', control=None, control_description=None)[source]

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 machine-readable way.

Parameters:
add_interval(start, stop)[source]
Parameters:
  • start (float) – The start time of the interval
  • stop (float) – The stop time of the interval
data
timestamps
namespace = 'core'
neurodata_type = 'IntervalSeries'
class pynwb.misc.Units(name='Units', id=None, columns=None, colnames=None, description=None, electrode_table=None, waveform_rate=None, waveform_unit='volts', resolution=None)[source]

Bases: hdmf.common.table.DynamicTable

Event times of observed units (e.g. cell, synapse, etc.).

Parameters:
waveform_rate

Sampling rate of the waveform means

waveform_unit

Unit of measurement of the waveform means

resolution

The smallest possible difference between two spike times

add_unit(spike_times=None, obs_intervals=None, electrodes=None, electrode_group=None, waveform_mean=None, waveform_sd=None, id=None)[source]

Add a unit to this table

Parameters:
get_unit_spike_times(index, in_interval=None)[source]
Parameters:
  • index (int or list or tuple or ndarray) – the index of the unit in unit_ids to retrieve spike times for
  • in_interval (tuple or list) – only return values within this interval
get_unit_obs_intervals(index)[source]
Parameters:index (int) – the index of the unit in unit_ids to retrieve observation intervals for
namespace = 'core'
neurodata_type = 'Units'
class pynwb.misc.DecompositionSeries(name, data, metric, description='no description', unit='no unit', bands=None, source_timeseries=None, resolution=-1.0, conversion=1.0, timestamps=None, starting_time=None, rate=None, comments='no comments', control=None, control_description=None)[source]

Bases: pynwb.base.TimeSeries

Stores product of spectral analysis

Parameters:
  • name (str) – The name of this TimeSeries dataset
  • data (ndarray or list or tuple or Dataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries) – The data values. Must be 3D, where the first dimension must be time, the second dimension must be channels, and the third dimension must be bands.
  • metric (str) – metric of analysis. recommended: ‘phase’, ‘amplitude’, ‘power’
  • description (str) – Description of this TimeSeries dataset
  • unit (str) – SI unit of measurement
  • bands (DynamicTable) – a table for describing the frequency bands that the signal was decomposed into
  • source_timeseries (TimeSeries) – the input TimeSeries from this analysis
  • resolution (str or float) – The smallest meaningful difference (in specified unit) between values in data
  • conversion (str or float) – Scalar to multiply each element in data to convert it to the specified unit
  • timestamps (ndarray or list or tuple or Dataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries) – 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
  • control (Iterable) – Numerical labels that apply to each element in data
  • control_description (Iterable) – Description of each control value
source_timeseries

the input TimeSeries from this analysis

metric

‘phase’, ‘amplitude’, ‘power’

Type:metric of analysis. recommended
bands

the bands that the signal is decomposed into

add_band(band_name=None, band_limits=None, band_mean=None, band_stdev=None)[source]

Add ROI data to this

Parameters:
namespace = 'core'
neurodata_type = 'DecompositionSeries'