https://github.com/catalystneuro/ndx-bipolar-scheme

Structure for storing the bipolar schema of a recording in an NWB file.

https://github.com/catalystneuro/ndx-bipolar-scheme

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    1 of 5 committers (20.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.8%) to scientific vocabulary

Keywords from Contributors

json-schemas electrophysiology neuroscience data-retrieval spike-sorting dash-forms nwb conversion
Last synced: 11 months ago · JSON representation

Repository

Structure for storing the bipolar schema of a recording in an NWB file.

Basic Info
  • Host: GitHub
  • Owner: catalystneuro
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 214 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 2
  • Open Issues: 1
  • Releases: 0
Created over 6 years ago · Last pushed about 4 years ago
Metadata Files
Readme License

README.md

ndx-bipolar-scheme Extension for NWB

Structure for storing the bipolar schema of a recording in an NWB file.

PyPI version codecov License

schema schema

python installation

bash $ pip install ndx-bipolar-scheme

python usage

```python import os from pynwb import NWBHDF5IO, NWBFile from pynwb.file import DynamicTableRegion from datetime import datetime from ndxbipolarscheme import BipolarSchemeTable, NdxBipolarScheme from pynwb.ecephys import ElectricalSeries

import numpy as np

nwbfile = NWBFile('description', 'id', datetime.now().astimezone())

device = nwbfile.createdevice('devicename')

electrodegroup = nwbfile.createelectrodegroup('electrodegroup', 'desc', 'loc', device=device)

for i in np.arange(20.): nwbfile.addelectrode(i, i, i, np.nan, 'loc', 'filt', electrodegroup)

electrodes = DynamicTableRegion( name='electrodes', data=np.arange(0, 3), description='desc', table=nwbfile.electrodes, )

sourceecseries = ElectricalSeries( name='sourceecseries', description='desc', data=np.random.rand(100, 3), rate=1000., electrodes=electrodes, )

nwbfile.addacquisition(sourceec_series)

bipolarschemetable = BipolarSchemeTable( name='bipolar_scheme', description='desc' )

bipolarschemetable.addrow(anodes=[0], cathodes=[1]) bipolarschemetable.addrow(anodes=[0, 1], cathodes=[2, 3]) bipolarschemetable.add_row(anodes=[0, 1], cathodes=[2])

bipolarschemetable['anodes'].target.table = nwbfile.electrodes bipolarschemetable['cathodes'].target.table = nwbfile.electrodes

bipolarschemeregion = DynamicTableRegion( name='electrodes', data=np.arange(0, 3), description='desc', table=bipolarschemetable, )

ecseries = ElectricalSeries( name='destecseries', description='desc', data=np.random.rand(100, 3), rate=1000., electrodes=bipolarscheme_region, )

nwbfile.addacquisition(ecseries)

ndxbipolarscheme = NdxBipolarScheme( bipolarschemetables=[bipolarschemetable], source=sourceecseries ) nwbfile.addlabmetadata(ndxbipolar_scheme)

with NWBHDF5IO('test_nwb.nwb', 'w') as io: io.write(nwbfile)

with NWBHDF5IO('testnwb.nwb', 'r', loadnamespaces=True) as io: nwbfile = io.read() nwbfile.acquisition['destecseries'].electrodes.table['anodes'][2]['x']

os.remove('test_nwb.nwb') ```

MATLAB usage

```matlab nwb = NwbFile( ... 'sessiondescription', 'mouse in open exploration',... 'identifier', 'Mouse5Day3', ... 'sessionstarttime', datetime(2018, 4, 25, 2, 30, 3), ... 'generalexperimenter', 'My Name', ... % optional 'generalsessionid', 'session1234', ... % optional 'generalinstitution', 'University of My Institution', ... % optional 'generalrelated_publications', 'DOI:10.1016/j.neuron.2016.12.011'); % optional

nshanks = 4; nchannelspershank = 3; variables = {'x', 'y', 'z', 'imp', 'location', 'filtering', 'group', 'label'}; tbl = cell2table(cell(0, length(variables)), 'VariableNames', variables); device = types.core.Device(... 'description', 'the best array', ... 'manufacturer', 'Probe Company 9000'); devicename = 'array'; nwb.generaldevices.set(devicename, device); devicelink = types.untyped.SoftLink(['/general/devices/' devicename]); for ishank = 1:nshanks groupname = ['shank' num2str(ishank)]; nwb.generalextracellularephys.set(groupname, ... types.core.ElectrodeGroup( ... 'description', ['electrode group for shank' num2str(ishank)], ... 'location', 'brain area', ... 'device', devicelink)); groupobjectview = types.untyped.ObjectView( ... ['/general/extracellularephys/' groupname]); for ielec = 1:nchannelspershank tbl = [tbl; {5.3, 1.5, 8.5, NaN, 'unknown', 'unknown', ... groupobjectview, [group_name 'elec' num2str(ielec)]}]; end end

electrodetable = util.table2nwb(tbl, 'all electrodes'); nwb.generalextracellularephyselectrodes = electrodetable; electrodesobjectview = types.untyped.ObjectView( ... '/general/extracellularephys/electrodes');

electrodetableregion = types.hdmfcommon.DynamicTableRegion( ... 'table', electrodesobject_view, ... 'description', 'all electrodes', ... 'data', (0:height(tbl)-1)');

sourceelectricalseries = types.core.ElectricalSeries( ... 'startingtime', 0.0, ... % seconds 'startingtimerate', 30000., ... % Hz 'data', randn(12, 3000), ... 'electrodes', electrodetableregion, ... 'dataunit', 'volts');

nwb.acquisition.set('ElectricalSeries', sourceelectricalseries);

sourceelectricalseries_link = types.untyped.SoftLink( ... '/acquisition/ElectricalSeries');

anodesdata = {0, [0, 1], [0, 1]}; cathodesdata = {1, [2, 3], 2};

[anodes, anodesindex] = util.createindexedcolumn(anodesdata, ... '/general/ndxbipolarscheme/bipolarscheme', [], [], electrodesobject_view);

[cathodes, cathodesindex] = util.createindexedcolumn(cathodesdata, ... '/general/ndxbipolarscheme/bipolarscheme', [], [], electrodesobject_view);

bipolarschemetable = types.ndxbipolarscheme.BipolarSchemeTable( ... 'id', types.hdmfcommon.ElementIdentifiers('data', 0:2), ... 'description', 'my description', ... 'colnames', {'anodes', 'cathods'}, ... 'anodes', anodes, 'anodesindex', anodesindex, ... 'cathodes', cathodes, 'cathodesindex', cathodes_index);

ndxbipolarscheme = types.ndxbipolarscheme.NdxBipolarScheme(... 'bipolarscheme', bipolarschemetable, ... 'source', sourceelectricalserieslink);

nwb.general.set('ndxbipolarscheme', ndxbipolarscheme);

nwbExport(nwb, 'test.nwb'); ```

Owner

  • Name: CatalystNeuro
  • Login: catalystneuro
  • Kind: organization
  • Email: hello@catalystneuro.com

GitHub Events

Total
Last Year

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 106
  • Total Committers: 5
  • Avg Commits per committer: 21.2
  • Development Distribution Score (DDS): 0.321
Top Committers
Name Email Commits
Armin Najarpour Foroushani a****r@g****m 72
!git for-each-ref --format='%(refname:short)' `git symbolic-ref HEAD` b****r@g****m 29
Ryan Ly r****y@l****v 3
luiztauffer l****r@h****m 1
Cody Baker 5****D@u****m 1
Committer Domains (Top 20 + Academic)
lbl.gov: 1

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 6
  • Total pull requests: 12
  • Average time to close issues: 2 months
  • Average time to close pull requests: 1 day
  • Total issue authors: 5
  • Total pull request authors: 3
  • Average comments per issue: 2.33
  • Average comments per pull request: 0.58
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jessierliu (2)
  • sportnoah14 (1)
  • kristinksellers (1)
  • bendichter (1)
  • luiztauffer (1)
Pull Request Authors
  • Armin12 (10)
  • rly (1)
  • bendichter (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 26 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 2
  • Total maintainers: 2
pypi.org: ndx-bipolar-scheme

An NWB extension for storing bipolar scheme

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 26 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 19.2%
Dependent repos count: 21.6%
Average: 26.2%
Stargazers count: 31.9%
Downloads: 48.1%
Maintainers (2)
Last synced: 11 months ago

Dependencies

requirements.txt pypi
  • hdmf *
  • numpy *
  • nwb_docutils *
  • pynwb >=1.1.2