-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
466 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from pynwb import nwb_config | ||
from datetime import datetime | ||
from uuid import uuid4 | ||
|
||
import numpy as np | ||
from dateutil import tz | ||
|
||
from pynwb import NWBHDF5IO, NWBFile, TimeSeries | ||
from pynwb.behavior import Position, SpatialSeries | ||
from pynwb.epoch import TimeIntervals | ||
from pynwb.file import Subject | ||
|
||
session_start_time = datetime(2018, 4, 25, 2, 30, 3, tzinfo=tz.gettz("US/Pacific")) | ||
|
||
nwbfile = NWBFile( | ||
session_description="Mouse exploring an open field", # required | ||
identifier=str(uuid4()), # required | ||
session_start_time=session_start_time, # required | ||
session_id="session_1234", # optional | ||
experimenter=[ | ||
"Baggins, Bilbo", | ||
], # optional | ||
lab="Bag End Laboratory", # optional | ||
institution="University of My Institution", # optional | ||
experiment_description="I went on an adventure to reclaim vast treasures.", # optional | ||
related_publications="DOI:10.1016/j.neuron.2016.12.011", # optional | ||
) | ||
|
||
|
||
subject = Subject( | ||
subject_id="001", | ||
age="P90D", | ||
description="mouse 5", | ||
species="Mus musculus", | ||
sex="M", | ||
) | ||
|
||
nwbfile.subject = subject | ||
breakpoint() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Subject: | ||
namespace: | ||
namespace_version: | ||
fields: | ||
species: src/pynwb/config/nwb_subject_termset.yaml | ||
# field2: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
id: termset/species_example | ||
name: Species | ||
version: 0.0.1 | ||
prefixes: | ||
NCBI_TAXON: https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id= | ||
imports: | ||
- linkml:types | ||
default_range: string | ||
|
||
enums: | ||
Species: | ||
permissible_values: | ||
Homo sapiens: | ||
description: the species is human | ||
meaning: NCBI_TAXON:9606 | ||
Mus musculus: | ||
description: the species is a house mouse | ||
meaning: NCBI_TAXON:10090 | ||
Ursus arctos horribilis: | ||
description: the species is a grizzly bear | ||
meaning: NCBI_TAXON:116960 | ||
Myrmecophaga tridactyla: | ||
description: the species is an anteater | ||
meaning: NCBI_TAXON:71006 | ||
Ailuropoda melanoleuca: | ||
description: the species is a panda | ||
meaning: NCBI_TAXON:9646 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule nwb-schema
updated
27 files
+3 −0 | .codespellrc | |
+34 −0 | .github/workflows/check_sphinx_links.yml | |
+19 −0 | .github/workflows/codespell.yml | |
+3 −3 | .github/workflows/validate_schema.yml | |
+2 −2 | .gitignore | |
+2 −2 | README.rst | |
+4 −4 | core/nwb.file.yaml | |
+4 −0 | core/nwb.icephys.yaml | |
+1 −1 | core/nwb.image.yaml | |
+1 −1 | core/nwb.namespace.yaml | |
+9 −3 | core/nwb.ogen.yaml | |
+2 −2 | core/nwb.ophys.yaml | |
+3 −3 | core/nwb.retinotopy.yaml | |
+27 −0 | docs/format/.readthedocs.yaml | |
+2 −2 | docs/format/Makefile | |
+4 −4 | docs/format/Readme.md | |
+1 −1 | docs/format/make.bat | |
+3 −3 | docs/format/source/conf.py | |
+1 −1 | docs/format/source/conf_doc_autogen.py | |
+2 −2 | docs/format/source/credits.rst | |
+2 −2 | docs/format/source/format_description.rst | |
+54 −45 | docs/format/source/format_release_notes.rst | |
+1 −1 | docs/format/source/software_process.rst | |
+1 −1 | docs/storage/Makefile | |
+6 −6 | docs/storage/source/storage_release_notes.rst | |
+1 −1 | hdmf-common-schema | |
+3 −0 | requirements-doc.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from hdmf.term_set import TermSetConfigurator as hdmf_TermSetConfigurator | ||
from hdmf.utils import docval | ||
|
||
|
||
class NWBTermSetConfigurator(hdmf_TermSetConfigurator): | ||
""" | ||
""" | ||
@docval({'name': 'path', 'type': str, 'doc': 'Path to the configuartion file.', | ||
'default': 'src/pynwb/config/nwb_config.yaml'}) | ||
def __init__(self,**kwargs): | ||
super().__init__(**kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from pynwb import nwb_config | ||
breakpoint() |