nwb.py
Portions of code adapted from DeepLabCut/DLC2NWB MIT License Copyright (c) 2022 Alexander Mathis DataJoint export methods for DeepLabCut 2.x
dlc_session_to_nwb(keys, use_element_session=True, session_kwargs=None)
¶
Using keys from PoseEstimation table, save DLC's h5 output to NWB.
Calls DLC2NWB to export NWB file using current h5 on disk. If use_element_session, calls NWB export function from Elements for lab, animal and session, passing session_kwargs. Saves output based on naming convention in DLC2NWB. If output path already exists, returns output path without making changes to the file. NOTE: does not support multianimal exports
Parameters:
Name | Type | Description | Default |
---|---|---|---|
keys |
list
|
One or more keys from model.PoseEstimation |
required |
use_element_session |
bool
|
Optional. If True, call NWB export from Element Session |
True
|
session_kwargs |
dict
|
Optional. Additional keyword args for Element Session export |
None
|
Returns:
Type | Description |
---|---|
str
|
Output path of saved file |
Source code in element_deeplabcut/export/nwb.py
24 25 26 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 |
|