Skip to content

Commit 23d8caa

Browse files
authored
Merge pull request #474 from bendichter/add_data_general
add data fields that were missing in "general"
2 parents f749097 + 8c77d12 commit 23d8caa

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

src/pynwb/file.py

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ class NWBFile(MultiContainerInterface):
143143
'session_id',
144144
'lab',
145145
'institution',
146+
'notes',
147+
'pharmacology',
148+
'protocol',
149+
'related_publications',
150+
'slices',
151+
'source_script',
152+
'surgery',
153+
'virus',
146154
{'name': 'ec_electrodes', 'child': True},
147155
'epochs',
148156
'subject',
@@ -161,6 +169,28 @@ class NWBFile(MultiContainerInterface):
161169
{'name': 'session_id', 'type': str, 'doc': 'lab-specific ID for the session', 'default': None},
162170
{'name': 'institution', 'type': str,
163171
'doc': 'institution(s) where experiment is performed', 'default': None},
172+
{'name': 'notes', 'type': str,
173+
'doc': 'Notes about the experiment.', 'default': None},
174+
{'name': 'pharmacology', 'type': str,
175+
'doc': 'Description of drugs used, including how and when they were administered. '
176+
'Anesthesia(s), painkiller(s), etc., plus dosage, concentration, etc.', 'default': None},
177+
{'name': 'protocol', 'type': str,
178+
'doc': 'Experimental protocol, if applicable. E.g., include IACUC protocol', 'default': None},
179+
{'name': 'related_publications', 'type': str,
180+
'doc': 'Publication information.'
181+
'PMID, DOI, URL, etc. If multiple, concatenate together and describe which is which. '
182+
'such as PMID, DOI, URL, etc', 'default': None},
183+
{'name': 'slices', 'type': str,
184+
'doc': 'Description of slices, including information about preparation '
185+
'thickness, orientation, temperature and bath solution', 'default': None},
186+
{'name': 'source_script', 'type': str,
187+
'doc': 'Script file used to create this NWB file.', 'default': None},
188+
{'name': 'surgery', 'type': str,
189+
'doc': 'Narrative description about surgery/surgeries, including date(s) '
190+
'and who performed surgery.', 'default': None},
191+
{'name': 'virus', 'type': str,
192+
'doc': 'Information about virus(es) used in experiments, including virus ID, '
193+
'source, date made, injection location, volume, etc.', 'default': None},
164194
{'name': 'lab', 'type': str, 'doc': 'lab where experiment was performed', 'default': None},
165195
{'name': 'acquisition', 'type': (list, tuple),
166196
'doc': 'Raw TimeSeries objects belonging to this NWBFile', 'default': None},
@@ -230,7 +260,15 @@ def __init__(self, **kwargs):
230260
'experiment_description',
231261
'session_id',
232262
'lab',
233-
'institution'
263+
'institution',
264+
'notes',
265+
'pharmacology',
266+
'protocol',
267+
'related_publications',
268+
'slices',
269+
'source_script',
270+
'surgery',
271+
'virus',
234272
]
235273
for attr in recommended:
236274
setattr(self, attr, kwargs.get(attr, None))

tests/unit/pynwb_tests/test_file.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@ def setUp(self):
2121
lab='a test lab',
2222
institution='a test institution',
2323
experiment_description='a test experiment description',
24-
session_id='test1')
24+
session_id='test1',
25+
notes='my notes',
26+
pharmacology='drugs',
27+
protocol='protocol',
28+
related_publications='my pubs',
29+
slices='my slices',
30+
surgery='surgery',
31+
virus='a virus')
2532

2633
def test_constructor(self):
2734
self.assertEqual(self.nwbfile.session_description, 'a test session description for a test NWBFile')

0 commit comments

Comments
 (0)