pynwb.base module

class pynwb.base.ProcessingModule(name, description, data_interfaces=None)[source]

Bases: pynwb.core.MultiContainerInterface

Processing module. This is a container for one or more containers that provide data at intermediate levels of analysis

ProcessingModules should be created through calls to NWB.create_module(). They should not be instantiated directly

Parameters:
  • name (str) – The name of this processing module
  • description (str) – Description of this processing module
  • data_interfaces (list or tuple or dict) – NWBDataInterfacess that belong to this ProcessingModule
description

Description of this processing module

data_interfaces

a dictionary containing the NWBDataInterface or DynamicTable in this ProcessingModule

containers
__getitem__(name=None)

Get a NWBDataInterface from this ProcessingModule

Parameters:name (str) – the name of the NWBDataInterface or DynamicTable
Returns:the NWBDataInterface or DynamicTable with the given name
Return type:(<class ‘pynwb.core.NWBDataInterface’>, <class ‘hdmf.common.table.DynamicTable’>)
add_container(container)[source]

Add an NWBContainer to this ProcessingModule

Parameters:container (NWBDataInterface or DynamicTable) – the NWBDataInterface to add to this Module
get_container(container_name)[source]

Retrieve an NWBContainer from this ProcessingModule

Parameters:container_name (str) – the name of the NWBContainer to retrieve
add_data_interface(NWBDataInterface)[source]
Parameters:NWBDataInterface (NWBDataInterface or DynamicTable) – the NWBDataInterface to add to this Module
get_data_interface(data_interface_name)[source]
Parameters:data_interface_name (str) – the name of the NWBContainer to retrieve
add(data_interfaces)

Add a NWBDataInterface to this ProcessingModule

Parameters:data_interfaces (list or tuple or dict or NWBDataInterface or DynamicTable) – the NWBDataInterface or DynamicTable to add
get(name=None)

Get a NWBDataInterface from this ProcessingModule

Parameters:name (str) – the name of the NWBDataInterface or DynamicTable
Returns:the NWBDataInterface or DynamicTable with the given name
Return type:(<class ‘pynwb.core.NWBDataInterface’>, <class ‘hdmf.common.table.DynamicTable’>)
namespace = 'core'
neurodata_type = 'ProcessingModule'
class pynwb.base.TimeSeries(name, data=None, unit=None, 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.core.NWBDataInterface

A generic base class for time series data

Create a TimeSeries object

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. The first dimension must be time. Can also store binary data, e.g., image frames
  • unit (str) – The base unit of measurement (should be SI unit)
  • 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
timestamps_unit
interval
rate

Sampling rate in Hz

starting_time

The timestamp of the first sample

starting_time_unit
num_samples

Tries to return the number of data samples. If this cannot be assessed, returns None.

data
timestamps
time_unit
comments

Human-readable comments about this TimeSeries dataset

control

Numerical labels that apply to each element in data

control_description

Description of each control value

conversion

Scalar to multiply each element in data to convert it to the specified unit

description

Description of this TimeSeries dataset

namespace = 'core'
neurodata_type = 'TimeSeries'
resolution

The smallest meaningful difference (in specified unit) between values in data

unit

The base unit of measurement (should be SI unit)

class pynwb.base.Image(name, data, resolution=None, description=None)[source]

Bases: pynwb.core.NWBData

Abstract image class. It is recommended to instead use pynwb.image.GrayscaleImage or pynwb.image.RGPImage where appropriate.

Parameters:
namespace = 'core'
neurodata_type = 'Image'
class pynwb.base.Images(name, images=None, description='no description')[source]

Bases: pynwb.core.MultiContainerInterface

Parameters:
description

description of images

__getitem__(name=None)

Get an Image from this Images

Parameters:name (str) – the name of the Image
Returns:the Image with the given name
Return type:Image
add_image(images)

Add an Image to this Images

Parameters:images (list or tuple or dict or Image) – the Image to add
create_image(name, data, resolution=None, description=None)

Create an Image and add it to this Images

Parameters:
Returns:

the Image object that was created

Return type:

Image

get_image(name=None)

Get an Image from this Images

Parameters:name (str) – the name of the Image
Returns:the Image with the given name
Return type:Image
images

a dictionary containing the Image in this Images

namespace = 'core'
neurodata_type = 'Images'