pynwb.ecephys module

class pynwb.ecephys.ClusterWaveforms(source, clustering_interface, waveform_filtering, waveform_mean, waveform_sd, name=ClusterWaveforms)

Bases: pynwb.core.NWBContainer

Describe cluster waveforms by mean and standard deviation for at each sample.

Parameters:
  • source (str) – the source of the data
  • clustering_interface (Clustering) – the clustered spike data used as input for computing waveforms
  • waveform_filtering (str) – filter applied to data before calculating mean and standard deviation
  • waveform_mean (Iterable) – the mean waveform for each cluster
  • waveform_sd (Iterable) – the standard deviations of waveforms for each cluster
  • name (str) – the name of this container
clustering_interface
waveform_filtering
waveform_mean
waveform_sd
class pynwb.ecephys.Clustering(source, description, num, peak_over_rms, times, name=Clustering)

Bases: pynwb.core.NWBContainer

Specifies cluster event times and cluster metric for maximum ratio of waveform peak to RMS on any channel in cluster.

Parameters:
  • source (str) – The source of the data
  • description (str) – Description of clusters or clustering, (e.g. cluster 0 is noise, clusters curated using Klusters, etc).
  • num (Iterable) – Cluster number of each event.
  • peak_over_rms (Iterable) – Maximum ratio of waveform peak to RMS on any channel in the cluster(provides a basic clustering metric).
  • times (Iterable) – Times of clustered events, in seconds.
  • name (str) – the name of this container
cluster_nums
description
num
peak_over_rms
times
class pynwb.ecephys.Device(name, source, parent=None)

Bases: pynwb.core.NWBContainer

Parameters:
  • name (str) – the name of this device
  • source (str) – the source of the data
  • parent (NWBContainer) – The parent NWBContainer for this NWBContainer
class pynwb.ecephys.ElectricalSeries(name, source, data, electrode_group, 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

Stores acquired voltage data from extracellular recordings. The data field of an ElectricalSeries is an int or float array storing data in Volts. TimeSeries::data array structure: [num times] [num channels] (or [num_times] for single electrode).

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 DataChunkIterator or TimeSeries or Iterable) – The data this TimeSeries dataset stores. Can also store binary data e.g. image frames
  • electrode_group (ElectrodeGroup) – The names of the electrode groups, or the ElectrodeGroup objects that each channel corresponds to.
  • resolution (float) – The smallest meaningful difference (in specified unit) between values in data
  • conversion (float) – Scalar to multiply each element by to conver to volts
  • timestamps (list or ndarray or DataChunkIterator or TimeSeries or Iterable) – 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
electrode_group
class pynwb.ecephys.ElectrodeGroup(name, source, channel_description, channel_location, channel_filtering, channel_coordinates, channel_impedance, description, location, device, parent=None)

Bases: pynwb.core.NWBContainer

Parameters:
  • name (str) – the name of this electrode
  • source (str) – the source of the data
  • channel_description (Iterable) – array with description for each channel
  • channel_location (Iterable) – array with location description for each channel e.g. “CA1”
  • channel_filtering (Iterable) – array with description of filtering applied to each channel
  • channel_coordinates (Iterable) – xyz-coordinates for each channel. use NaN for unknown dimensions
  • channel_impedance (Iterable) – float array with impedance used on each channel. Can be 2D matrix to store a range
  • description (str) – description of this electrode group
  • location (str) – description of location of this electrode group
  • device (Device) – the device that was used to record from this electrode group
  • parent (NWBContainer) – The parent NWBContainer for this NWBContainer
channel_coordinates
channel_description
channel_filtering
channel_impedance
channel_location
description
device
location
class pynwb.ecephys.EventDetection(source, detection_method, source_electricalseries, source_idx, times, name=EventDetection)

Bases: pynwb.core.NWBContainer

Detected spike events from voltage trace(s).

Parameters:
  • source (str) – the source of the data
  • detection_method (str) – Description of how events were detected, such as voltage threshold, or dV/dT threshold, as well as relevant values.
  • source_electricalseries (ElectricalSeries) – The source electrophysiology data
  • source_idx (Iterable) – Indices (zero-based) into source ElectricalSeries::data array corresponding to time of event. Module description should define what is meant by time of event (e.g., .25msec before action potential peak, zero-crossing time, etc). The index points to each event from the raw data
  • times (Iterable) – Timestamps of events, in Seconds
  • name (str) – the name of this container
detection_method
source_electricalseries
source_idx
times
class pynwb.ecephys.EventWaveform(source, spike_event_series, name=EventWaveform)

Bases: pynwb.core.NWBContainer

Spike data for spike events detected in raw data stored in this NWBFile, or events detect at acquisition

Parameters:
  • source (str) – the source of the data
  • spike_event_series (list or SpikeEventSeries) – spiking event data
  • name (str) – the name of this container
spike_event_series
class pynwb.ecephys.FeatureExtraction(source, electrode_group, description, times, features, name=FeatureExtraction)

Bases: pynwb.core.NWBContainer

Features, such as PC1 and PC2, that are extracted from signals stored in a SpikeEvent TimeSeries or other source.

Parameters:
  • source (str) – The source of the data
  • electrode_group (ElectrodeGroup) – The electrode groups for each channel from which features were extracted
  • description (list or tuple or ndarray or DataChunkIterator) – A description for each feature extracted
  • times (list or tuple or ndarray or DataChunkIterator) – The times of events that features correspond to
  • features (list or tuple or ndarray or DataChunkIterator) – Features for each channel
  • name (str) – the name of this container
description
electrode_group
features
times
class pynwb.ecephys.FilteredEphys(source, electrical_series, name=FilteredEphys)

Bases: pynwb.core.NWBContainer

Ephys data from one or more channels that has been subjected to filtering. Examples of filtered data include Theta and Gamma (LFP has its own interface). FilteredEphys modules publish an ElectricalSeries for each filtered channel or set of channels. The name of each ElectricalSeries is arbitrary but should be informative. The source of the filtered data, whether this is from analysis of another time series or as acquired by hardware, should be noted in each’s TimeSeries::description field. There is no assumed 1::1 correspondence between filtered ephys signals and electrodes, as a single signal can apply to many nearby electrodes, and one electrode may have different filtered (e.g., theta and/or gamma) signals represented.

Parameters:
  • source (str) – the source of the data
  • electrical_series (ElectricalSeries) – filtered electrophysiology data
  • name (str) – the name of this container
electrical_series
class pynwb.ecephys.LFP(source, electrical_series, name=LFP)

Bases: pynwb.core.NWBContainer

LFP data from one or more channels. The electrode map in each published ElectricalSeries will identify which channels are providing LFP data. Filter properties should be noted in the ElectricalSeries description or comments field.

Parameters:
  • source (str) – the source of the data
  • electrical_series (ElectricalSeries) – LFP electrophysiology data
  • name (str) – the name of this container
electrical_series
class pynwb.ecephys.SpikeEventSeries(name, source, data, timestamps, electrode_group, resolution=0.0, conversion=1.0, comments=no comments, description=no description, control=None, control_description=None, parent=None)

Bases: pynwb.ecephys.ElectricalSeries

Stores “snapshots” of spike events (i.e., threshold crossings) in data. This may also be raw data, as reported by ephys hardware. If so, the TimeSeries::description field should describing how events were detected. All SpikeEventSeries should reside in a module (under EventWaveform interface) even if the spikes were reported and stored by hardware. All events span the same recording channels and store snapshots of equal duration. TimeSeries::data array structure: [num events] [num channels] [num samples] (or [num events] [num samples] for single electrode).

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 DataChunkIterator or TimeSeries or Iterable) – The data this TimeSeries dataset stores. Can also store binary data e.g. image frames
  • timestamps (list or ndarray or DataChunkIterator or TimeSeries or Iterable) – Timestamps for samples stored in data
  • electrode_group (ElectrodeGroup) – The names of the electrode groups, or the ElectrodeGroup objects that each channel corresponds to.
  • resolution (float) – The smallest meaningful difference (in specified unit) between values in data
  • conversion (float) – Scalar to multiply each element by to conver to volts
  • 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