Skip to main content

Convert data to nwb

Project description

# nwbext_ecog: An NWB extension for ECoG data

Author: Ben Dichter

There are three data types, `Surface`, `CorticalSurfaces`, and `ECoGSubject`. `CorticalSurfaces` is simply a group (like a folder) to put `Surface` objects into. `Surface` holds surface mesh data (vertices and triangular faces) for sections of cortex. `ECoGSubject` is an extension of `Subject` that allows you to add the `CorticalSurfaces` object to `/general/subject`.

## Usage

### python

pip install nwbext_ecog.git

import pynwb
from nwbext_ecog import CorticalSurfaces, ECoGSubject

nwbfile = pynwb.NWBFile(...)


cortical_surfaces = CorticalSurfaces()
## loop me
cortical_surfaces.create_surface(name=name, faces=faces, vertices=veritices)
nwbfile.subject = ECoGSubject(cortical_surfaces=cortical_surfaces)

You can optionally attach images of the subject's brain:
from pynwb.base import Images
from pynwb.image import GrayscaleImage

subject.images = Images(name='subject images', images=[GrayscaleImage('image1', data=image_data)])

import nwbext_ecog
from pynwb import NWBHDF5IO
io = NWBHDF5IO('path_to_file.nwb','r')
nwb =


cortical_surfaces = types.ecog.CorticalSurfaces;

%%% loop me
surf = types.ecog.Surface('faces', faces, 'vertices', vertices);
cortical_surfaces.surface.set(surface_name, surf);

file.subject = types.ecog.ECoGSubject(name, cortical_surfaces);

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nwbext-ecog, version 0.7.2
Filename, size File type Python version Upload date Hashes
Filename, size nwbext_ecog-0.7.2-py2.py3-none-any.whl (7.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size nwbext_ecog-0.7.2.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page