export.py
For didactic purposes, import upstream NWB export functions
Real use-cases should import these functions directly.
ecephys_session_to_nwb(session_key, raw=True, spikes=True, lfp='source', end_frame=None, lab_key=None, project_key=None, protocol_key=None, nwbfile_kwargs=None)
¶
Main function for converting ephys data to NWB
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session_key |
dict
|
key from Session table |
required |
raw |
bool
|
Optional. Default True. Include the raw data from source. SpikeGLX & OpenEphys are supported |
True
|
spikes |
bool
|
Optional. Default True. Whether to include CuratedClustering |
True
|
lfp |
str
|
One of the following. "dj", read LFP data from ephys.LFP. "source", read LFP data from source (SpikeGLX supported). False, do not convert LFP. |
'source'
|
end_frame |
int
|
Optional limit on frames for small test conversions. |
None
|
lab_key |
dict
|
Optional key to add metadata from other Element Lab. |
None
|
project_key |
dict
|
Optional key to add metadata from other Element Lab. |
None
|
protocol_key |
dict
|
Optional key to add metadata from other 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
|
Source code in element_array_ephys/export/nwb/nwb.py
567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 |
|
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_array_ephys/export/nwb/nwb.py
641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 |
|