nwb.py
imaging_session_to_nwb(session_key, include_raw_data=False, lab_key=None, project_key=None, protocol_key=None, nwbfile_kwargs=None)
¶
Main function for converting calcium imaging data to NWB.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session_key |
dict
|
key from Session table. |
required |
include_raw_data |
bool
|
Optional. Default False. Include the raw data from |
False
|
lab_key |
dict
|
Optional key to add metadata from Element Lab. |
None
|
project_key |
dict
|
Optional key to add metadata from Element Lab. |
None
|
protocol_key |
dict
|
Optional key to add metadata from Element Lab. |
None
|
nwbfile_kwargs |
dict
|
Optional. If Element Session is not used, this argument is required and must be a dictionary containing 'session_description' (str), 'identifier' (str), and 'session_start_time' (datetime), the required minimal data for instantiating an NWBFile object. If element-session is being used, this argument can optionally be used to overwrite NWBFile fields. |
None
|
Returns: nwbfile (NWBFile): nwb file
Source code in element_calcium_imaging/export/nwb/nwb.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
write_nwb(nwbfile, fname, check_read=True)
¶
Export NWBFile
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
nwbfile |
NWBFile
|
nwb file |
required |
fname |
str
|
Absolute path including |
required |
check_read |
bool
|
If True, PyNWB will try to read the produced NWB file and ensure that it can be read. |
True
|
Source code in element_calcium_imaging/export/nwb/nwb.py
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | |